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 INCLUDED_WRITERPERFECT_SOURCE_WRITER_PAGESIMPORTFILTER_HXX
11 : #define INCLUDED_WRITERPERFECT_SOURCE_WRITER_PAGESIMPORTFILTER_HXX
12 :
13 : #include <com/sun/star/lang/XServiceInfo.hpp>
14 : #include <com/sun/star/uno/XComponentContext.hpp>
15 :
16 : #include "DocumentHandlerForOdt.hxx"
17 : #include "ImportFilter.hxx"
18 :
19 : /* This component will be instantiated for both import or export. Whether it calls
20 : * setSourceDocument or setTargetDocument determines which Impl function the filter
21 : * member calls */
22 178 : class PagesImportFilter : public writerperfect::ImportFilter<OdtGenerator>
23 : {
24 : public:
25 89 : explicit PagesImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
26 89 : : writerperfect::ImportFilter<OdtGenerator>(rxContext) {}
27 :
28 : // XServiceInfo
29 : virtual OUString SAL_CALL getImplementationName()
30 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
31 : virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
32 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
33 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
34 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
35 :
36 : private:
37 : virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
38 : virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdtGenerator &rGenerator, utl::MediaDescriptor &rDescriptor) SAL_OVERRIDE;
39 : };
40 :
41 : OUString PagesImportFilter_getImplementationName()
42 : throw (::com::sun::star::uno::RuntimeException);
43 :
44 : ::com::sun::star::uno::Sequence< OUString > SAL_CALL PagesImportFilter_getSupportedServiceNames()
45 : throw (::com::sun::star::uno::RuntimeException);
46 :
47 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
48 : SAL_CALL PagesImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
49 : throw (::com::sun::star::uno::Exception);
50 :
51 : #endif
52 :
53 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|