LCOV - code coverage report
Current view: top level - filter/source/config/cache - contenthandlerfactory.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 12 14 85.7 %
Date: 2014-04-11 Functions: 6 7 85.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONTENTHANDLERFACTORY_HXX
      21             : #define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONTENTHANDLERFACTORY_HXX
      22             : 
      23             : #include "basecontainer.hxx"
      24             : #include <com/sun/star/frame/XLoaderFactory.hpp>
      25             : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
      26             : #include <cppuhelper/implbase1.hxx>
      27             : 
      28             : 
      29             : namespace filter{
      30             :     namespace config{
      31             : 
      32             : 
      33             : 
      34             : 
      35             : /** @short      implements the service <type scope="com.sun.star.document">ContentHandlerFactory</type>.
      36             :  */
      37             : class ContentHandlerFactory : public ::cppu::ImplInheritanceHelper1< BaseContainer                   ,
      38             :                                                                      css::frame::XLoaderFactory >
      39             : {
      40             : 
      41             :     // native interface
      42             : 
      43             :     css::uno::Reference< css::uno::XComponentContext > m_xContext;
      44             : 
      45             :     public:
      46             : 
      47             : 
      48             :         // ctor/dtor
      49             : 
      50             :         /** @short  standard ctor to connect this interface wrapper to
      51             :                     the global filter cache instance ...
      52             : 
      53             :             @param  rxContext
      54             :                     reference to the uno service manager, which created this service instance.
      55             :          */
      56             :         ContentHandlerFactory(const css::uno::Reference< css::uno::XComponentContext >& rxContext);
      57             : 
      58             : 
      59             : 
      60             :         /** @short  standard dtor.
      61             :          */
      62             :         virtual ~ContentHandlerFactory();
      63             : 
      64             : 
      65             :     // uno interface
      66             : 
      67             :     public:
      68             : 
      69             : 
      70             :         // XMultiServiceFactory
      71             : 
      72             :         virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString& sHandler)
      73             :             throw(css::uno::Exception       ,
      74             :                   css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      75             : 
      76             :         virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString&                     sHandler  ,
      77             :                                                                                                  const css::uno::Sequence< css::uno::Any >& lArguments)
      78             :             throw(css::uno::Exception       ,
      79             :                   css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      80             : 
      81             :         virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames()
      82             :             throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      83             : 
      84             : 
      85             :     // static uno helper!
      86             : 
      87             :     public:
      88             : 
      89             : 
      90             : 
      91             :         /** @short  return the uno implementation name of this class.
      92             : 
      93             :             @descr  Because this information is used at several places
      94             :                     (and mostly an object instance of this class is not possible)
      95             :                     its implemented as a static function!
      96             : 
      97             :             @return The fix uno implementation name of this class.
      98             :          */
      99             :         static OUString impl_getImplementationName();
     100             : 
     101             : 
     102             : 
     103             :         /** @short  return the list of supported uno services of this class.
     104             : 
     105             :             @descr  Because this information is used at several places
     106             :                     (and mostly an object instance of this class is not possible)
     107             :                     its implemented as a static function!
     108             : 
     109             :             @return The fix list of uno services supported by this class.
     110             :          */
     111             :         static css::uno::Sequence< OUString > impl_getSupportedServiceNames();
     112             : 
     113             : 
     114             : 
     115             :         /** @short  return a new intsnace of this class.
     116             : 
     117             :             @descr  This method is used by the uno service manager, to create
     118             :                     a new instance of this service if needed.
     119             : 
     120             :             @param  xSMGR
     121             :                     reference to the uno service manager, which require
     122             :                     this new instance. It should be passed to the new object
     123             :                     so it can be used internally to create own needed uno resources.
     124             : 
     125             :             @return The new instance of this service as an uno reference.
     126             :          */
     127             :         static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
     128             : 
     129             : 
     130             :       // Overrides to resolve ambiguity
     131           3 :       virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     132           3 :         { return BaseContainer::getByName(aName); }
     133           3 :       virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     134           3 :         { return BaseContainer::getElementNames(); }
     135           2 :       virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     136           2 :         { return BaseContainer::hasByName(aName); }
     137             : 
     138           1 :       virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     139           1 :         { return BaseContainer::getElementType(); }
     140           1 :       virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     141           1 :         { return BaseContainer::hasElements(); }
     142             : 
     143           0 :       virtual ::com::sun::star::uno::Reference< css::container::XEnumeration > SAL_CALL createSubSetEnumerationByQuery( const ::rtl::OUString& Query ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     144           0 :         { return BaseContainer::createSubSetEnumerationByQuery(Query); }
     145       13420 :       virtual ::com::sun::star::uno::Reference< css::container::XEnumeration > SAL_CALL createSubSetEnumerationByProperties( const ::com::sun::star::uno::Sequence< css::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
     146       13420 :         { return BaseContainer::createSubSetEnumerationByProperties(Properties); }
     147             : 
     148             : 
     149             : };
     150             : 
     151             :     } // namespace config
     152             : } // namespace filter
     153             : 
     154             : #endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONTENTHANDLERFACTORY_HXX
     155             : 
     156             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10