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

Generated by: LCOV version 1.10