LCOV - code coverage report
Current view: top level - writerperfect/source/writer - MSWorksImportFilter.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 3 100.0 %
Date: 2012-08-25 Functions: 3 3 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     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                 :            : 
      10                 :            : #ifndef _MSWORKSIMPORTFILTER_HXX
      11                 :            : #define _MSWORKSIMPORTFILTER_HXX
      12                 :            : 
      13                 :            : #include <com/sun/star/document/XFilter.hpp>
      14                 :            : #include <com/sun/star/document/XImporter.hpp>
      15                 :            : #include <com/sun/star/document/XExtendedFilterDetection.hpp>
      16                 :            : #include <com/sun/star/lang/XInitialization.hpp>
      17                 :            : #include <com/sun/star/lang/XServiceInfo.hpp>
      18                 :            : #include <com/sun/star/uno/XComponentContext.hpp>
      19                 :            : #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
      20                 :            : #include <cppuhelper/implbase5.hxx>
      21                 :            : 
      22                 :            : /* This component will be instantiated for both import or export. Whether it calls
      23                 :            :  * setSourceDocument or setTargetDocument determines which Impl function the filter
      24                 :            :  * member calls */
      25                 :            : class MSWorksImportFilter : public cppu::WeakImplHelper5
      26                 :            :     <
      27                 :            :     com::sun::star::document::XFilter,
      28                 :            :     com::sun::star::document::XImporter,
      29                 :            :     com::sun::star::document::XExtendedFilterDetection,
      30                 :            :     com::sun::star::lang::XInitialization,
      31                 :            :     com::sun::star::lang::XServiceInfo
      32                 :            :     >
      33                 :            : {
      34                 :            : protected:
      35                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
      36                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
      37                 :            :     ::rtl::OUString msFilterName;
      38                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
      39                 :            : 
      40                 :            :     sal_Bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
      41                 :            :     throw (::com::sun::star::uno::RuntimeException);
      42                 :            : 
      43                 :            : public:
      44                 :         10 :     MSWorksImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
      45                 :         10 :         : mxContext( rxContext ) {}
      46         [ -  + ]:         20 :     virtual ~MSWorksImportFilter() {}
      47                 :            : 
      48                 :            :     // XFilter
      49                 :            :     virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
      50                 :            :     throw (::com::sun::star::uno::RuntimeException);
      51                 :            :     virtual void SAL_CALL cancel(  )
      52                 :            :     throw (::com::sun::star::uno::RuntimeException);
      53                 :            : 
      54                 :            :     // XImporter
      55                 :            :     virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
      56                 :            :     throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
      57                 :            : 
      58                 :            :     //XExtendedFilterDetection
      59                 :            :     virtual ::rtl::OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
      60                 :            :     throw( com::sun::star::uno::RuntimeException );
      61                 :            : 
      62                 :            :     // XInitialization
      63                 :            :     virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
      64                 :            :     throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
      65                 :            : 
      66                 :            :     // XServiceInfo
      67                 :            :     virtual ::rtl::OUString SAL_CALL getImplementationName(  )
      68                 :            :     throw (::com::sun::star::uno::RuntimeException);
      69                 :            :     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString &ServiceName )
      70                 :            :     throw (::com::sun::star::uno::RuntimeException);
      71                 :            :     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  )
      72                 :            :     throw (::com::sun::star::uno::RuntimeException);
      73                 :            : 
      74                 :            : };
      75                 :            : 
      76                 :            : ::rtl::OUString MSWorksImportFilter_getImplementationName()
      77                 :            : throw ( ::com::sun::star::uno::RuntimeException );
      78                 :            : 
      79                 :            : sal_Bool SAL_CALL MSWorksImportFilter_supportsService( const ::rtl::OUString &ServiceName )
      80                 :            : throw ( ::com::sun::star::uno::RuntimeException );
      81                 :            : 
      82                 :            : ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL MSWorksImportFilter_getSupportedServiceNames(  )
      83                 :            : throw ( ::com::sun::star::uno::RuntimeException );
      84                 :            : 
      85                 :            : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
      86                 :            : SAL_CALL MSWorksImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rContext)
      87                 :            : throw ( ::com::sun::star::uno::Exception );
      88                 :            : 
      89                 :            : #endif
      90                 :            : 
      91                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10