LCOV - code coverage report
Current view: top level - task - StatusIndicatorFactory.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 9 28 32.1 %
Date: 2013-07-09 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10