LCOV - code coverage report
Current view: top level - form/inspection - DefaultFormComponentInspectorModel.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 23 0.0 %
Date: 2013-07-09 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_FORM_INSPECTION_DEFAULTFORMCOMPONENTINSPECTORMODEL_HPP
       2             : #define INCLUDED_COM_SUN_STAR_FORM_INSPECTION_DEFAULTFORMCOMPONENTINSPECTORMODEL_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include <cassert>
       7             : 
       8             : #include "com/sun/star/inspection/XObjectInspectorModel.hpp"
       9             : #include "com/sun/star/lang/IllegalArgumentException.hpp"
      10             : #include "com/sun/star/uno/DeploymentException.hpp"
      11             : #include "com/sun/star/uno/Exception.hpp"
      12             : #include "com/sun/star/uno/RuntimeException.hpp"
      13             : #include "com/sun/star/uno/XComponentContext.hpp"
      14             : #include "com/sun/star/uno/Any.hxx"
      15             : #include "com/sun/star/uno/Reference.hxx"
      16             : #include "com/sun/star/uno/Sequence.hxx"
      17             : #include "cppu/unotype.hxx"
      18             : #include "rtl/ustring.h"
      19             : #include "rtl/ustring.hxx"
      20             : #include "sal/types.h"
      21             : 
      22             : namespace com { namespace sun { namespace star { namespace form { namespace inspection {
      23             : 
      24             : class DefaultFormComponentInspectorModel {
      25             : public:
      26           0 :     static ::com::sun::star::uno::Reference< css::inspection::XObjectInspectorModel > createDefault(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context) {
      27             :         assert(the_context.is());
      28           0 :         ::com::sun::star::uno::Reference< css::inspection::XObjectInspectorModel > the_instance;
      29             :         try {
      30           0 :             the_instance = ::com::sun::star::uno::Reference< css::inspection::XObjectInspectorModel >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext(::rtl::OUString( "com.sun.star.form.inspection.DefaultFormComponentInspectorModel" ), ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >(), the_context), ::com::sun::star::uno::UNO_QUERY);
      31           0 :         } catch (const ::com::sun::star::uno::RuntimeException &) {
      32           0 :             throw;
      33           0 :         } catch (const ::com::sun::star::uno::Exception & the_exception) {
      34           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply service com.sun.star.form.inspection.DefaultFormComponentInspectorModel of type com.sun.star.inspection.XObjectInspectorModel: " ) + the_exception.Message, the_context);
      35             :         }
      36           0 :         if (!the_instance.is()) {
      37           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply service com.sun.star.form.inspection.DefaultFormComponentInspectorModel of type com.sun.star.inspection.XObjectInspectorModel" ), the_context);
      38             :         }
      39           0 :         return the_instance;
      40             :     }
      41             : 
      42           0 :     static ::com::sun::star::uno::Reference< css::inspection::XObjectInspectorModel > createWithHelpSection(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context, ::sal_Int32 minHelpTextLines, ::sal_Int32 maxHelpTextLines) {
      43             :         assert(the_context.is());
      44           0 :         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > the_arguments(2);
      45           0 :         the_arguments[0] <<= minHelpTextLines;
      46           0 :         the_arguments[1] <<= maxHelpTextLines;
      47           0 :         ::com::sun::star::uno::Reference< css::inspection::XObjectInspectorModel > the_instance;
      48             :         try {
      49           0 :             the_instance = ::com::sun::star::uno::Reference< css::inspection::XObjectInspectorModel >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext(::rtl::OUString( "com.sun.star.form.inspection.DefaultFormComponentInspectorModel" ), the_arguments, the_context), ::com::sun::star::uno::UNO_QUERY);
      50           0 :         } catch (const ::com::sun::star::uno::RuntimeException &) {
      51           0 :             throw;
      52           0 :         } catch (const ::com::sun::star::uno::Exception & the_exception) {
      53           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply service com.sun.star.form.inspection.DefaultFormComponentInspectorModel of type com.sun.star.inspection.XObjectInspectorModel: " ) + the_exception.Message, the_context);
      54             :         }
      55           0 :         if (!the_instance.is()) {
      56           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply service com.sun.star.form.inspection.DefaultFormComponentInspectorModel of type com.sun.star.inspection.XObjectInspectorModel" ), the_context);
      57             :         }
      58           0 :         return the_instance;
      59             :     }
      60             : 
      61             : private:
      62             :     DefaultFormComponentInspectorModel(); // not implemented
      63             :     DefaultFormComponentInspectorModel(DefaultFormComponentInspectorModel &); // not implemented
      64             :     ~DefaultFormComponentInspectorModel(); // not implemented
      65             :     void operator =(DefaultFormComponentInspectorModel); // not implemented
      66             : };
      67             : 
      68             : } } } } }
      69             : 
      70             : #endif // INCLUDED_COM_SUN_STAR_FORM_INSPECTION_DEFAULTFORMCOMPONENTINSPECTORMODEL_HPP

Generated by: LCOV version 1.10