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 : /* "This product is not manufactured, approved, or supported by
11 : * Corel Corporation or Corel Corporation Limited."
12 : */
13 : #ifndef _WPGIMPORTFILTER_HXX
14 : #define _WPGIMPORTFILTER_HXX
15 :
16 : #include "ImportFilter.hxx"
17 :
18 : #include "DocumentHandlerForOdg.hxx"
19 :
20 : /* This component will be instantiated for both import or export. Whether it calls
21 : * setSourceDocument or setTargetDocument determines which Impl function the filter
22 : * member calls */
23 172 : class WPGImportFilter : public writerperfect::ImportFilter<OdgGenerator>
24 : {
25 : public:
26 86 : explicit WPGImportFilter(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext)
27 86 : : writerperfect::ImportFilter<OdgGenerator>(rxContext)
28 : {
29 86 : }
30 :
31 : // XServiceInfo
32 : virtual OUString SAL_CALL getImplementationName()
33 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
34 : virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
35 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
36 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
37 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
38 :
39 : private:
40 : virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) SAL_OVERRIDE;
41 : virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) SAL_OVERRIDE;
42 : };
43 :
44 : OUString WPGImportFilter_getImplementationName()
45 : throw (::com::sun::star::uno::RuntimeException);
46 :
47 : ::com::sun::star::uno::Sequence< OUString > SAL_CALL WPGImportFilter_getSupportedServiceNames()
48 : throw (::com::sun::star::uno::RuntimeException);
49 :
50 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
51 : SAL_CALL WPGImportFilter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
52 : throw (::com::sun::star::uno::Exception);
53 :
54 : #endif
55 :
56 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|