LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/offapi/com/sun/star/resource - OfficeResourceLoader.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 5 0.0 %
Date: 2012-12-27 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_RESOURCE_OFFICERESOURCELOADER_HPP
       2             : #define INCLUDED_COM_SUN_STAR_RESOURCE_OFFICERESOURCELOADER_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include <cassert>
       7             : 
       8             : #include "com/sun/star/uno/XComponentContext.hpp"
       9             : #include "com/sun/star/uno/DeploymentException.hpp"
      10             : #include "com/sun/star/resource/XResourceBundleLoader.hpp"
      11             : #include "com/sun/star/uno/Any.hxx"
      12             : #include "com/sun/star/uno/Reference.hxx"
      13             : #include "cppu/unotype.hxx"
      14             : #include "rtl/ustring.h"
      15             : #include "rtl/ustring.hxx"
      16             : 
      17             : namespace com { namespace sun { namespace star { namespace resource {
      18             : 
      19             : class OfficeResourceLoader {
      20             : public:
      21           0 :     static ::com::sun::star::uno::Reference< css::resource::XResourceBundleLoader > get(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context) {
      22             :         assert(the_context.is());
      23           0 :         ::com::sun::star::uno::Reference< css::resource::XResourceBundleLoader > instance;
      24           0 :         if (!(the_context->getValueByName(::rtl::OUString( "/singletons/com.sun.star.resource.OfficeResourceLoader" )) >>= instance) || !instance.is()) {
      25           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton com.sun.star.resource.OfficeResourceLoader of type com.sun.star.resource.XResourceBundleLoader" ), the_context);
      26             :         }
      27           0 :         return instance;
      28             :     }
      29             : 
      30             : private:
      31             :     OfficeResourceLoader(); // not implemented
      32             :     OfficeResourceLoader(OfficeResourceLoader &); // not implemented
      33             :     ~OfficeResourceLoader(); // not implemented
      34             :     void operator =(OfficeResourceLoader); // not implemented
      35             : };
      36             : 
      37             : } } } }
      38             : 
      39             : #endif // INCLUDED_COM_SUN_STAR_RESOURCE_OFFICERESOURCELOADER_HPP

Generated by: LCOV version 1.10