LCOV - code coverage report
Current view: top level - awt/grid - SortableGridDataModel.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 12 58.3 %
Date: 2013-07-09 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10