LCOV - code coverage report
Current view: top level - lotuswordpro/source/filter - LotusWordProImportFilter.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 4 4 100.0 %
Date: 2014-11-03 Functions: 3 3 100.0 %
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_LOTUSWORDPRO_SOURCE_FILTER_LOTUSWORDPROIMPORTFILTER_HXX
      21             : #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LOTUSWORDPROIMPORTFILTER_HXX
      22             : 
      23             : #include <com/sun/star/document/XFilter.hpp>
      24             : #include <com/sun/star/document/XImporter.hpp>
      25             : #include <com/sun/star/document/XExtendedFilterDetection.hpp>
      26             : #include <com/sun/star/lang/XInitialization.hpp>
      27             : #include <com/sun/star/lang/XServiceInfo.hpp>
      28             : #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
      29             : #include <cppuhelper/implbase5.hxx>
      30             : #include <rtl/ustrbuf.hxx>
      31             : 
      32             : /* This component will be instantiated for both import or export. Whether it calls
      33             :  * setSourceDocument or setTargetDocument determines which Impl function the filter
      34             :  * member calls */
      35             : class LotusWordProImportFilter : public cppu::WeakImplHelper5
      36             : <
      37             :     com::sun::star::document::XFilter,
      38             :     com::sun::star::document::XImporter,
      39             :     com::sun::star::document::XExtendedFilterDetection,
      40             :     com::sun::star::lang::XInitialization,
      41             :     com::sun::star::lang::XServiceInfo
      42             : >
      43             : {
      44             : private:
      45             : 
      46             : protected:
      47             :     // oo.org declares
      48             :     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
      49             :     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxDoc;
      50             :     OUString msFilterName;
      51             :     ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler;
      52             : 
      53             :     bool SAL_CALL importImpl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
      54             :         throw (::com::sun::star::uno::RuntimeException);
      55             : 
      56             : public:
      57           2 :     LotusWordProImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
      58           2 :         : mxContext( rxContext )
      59             :     {
      60           2 :     }
      61           4 :     virtual ~LotusWordProImportFilter() {}
      62             : 
      63             :     // XFilter
      64             :         virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
      65             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      66             :         virtual void SAL_CALL cancel(  )
      67             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      68             : 
      69             :     // XImporter
      70             :         virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
      71             :         throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      72             : 
      73             :     //XExtendedFilterDetection
      74             :     virtual OUString SAL_CALL detect( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& Descriptor )
      75             :         throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      76             : 
      77             :     // XInitialization
      78             :         virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
      79             :         throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      80             : 
      81             :     // XServiceInfo
      82             :         virtual OUString SAL_CALL getImplementationName(  )
      83             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      84             :         virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
      85             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      86             :         virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  )
      87             :         throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      88             : 
      89             : };
      90             : 
      91             : OUString LotusWordProImportFilter_getImplementationName()
      92             :     throw ( ::com::sun::star::uno::RuntimeException );
      93             : 
      94             : bool SAL_CALL LotusWordProImportFilter_supportsService( const OUString& ServiceName )
      95             :     throw ( ::com::sun::star::uno::RuntimeException );
      96             : 
      97             : ::com::sun::star::uno::Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames(  )
      98             :     throw ( ::com::sun::star::uno::RuntimeException );
      99             : 
     100             : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
     101             : SAL_CALL LotusWordProImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
     102             :     throw ( ::com::sun::star::uno::Exception );
     103             : 
     104             : #endif
     105             : 
     106             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10