Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / writerperfect / source / draw / WPGImportFilter.hxx
blob6be6ab90f038fd909081d0d00af4734709dd8c31
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 /* "This product is not manufactured, approved, or supported by
11 * Corel Corporation or Corel Corporation Limited."
13 #ifndef INCLUDED_WRITERPERFECT_SOURCE_DRAW_WPGIMPORTFILTER_HXX
14 #define INCLUDED_WRITERPERFECT_SOURCE_DRAW_WPGIMPORTFILTER_HXX
16 #include "ImportFilter.hxx"
18 #include "DocumentHandlerForOdg.hxx"
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 class WPGImportFilter : public writerperfect::ImportFilter<OdgGenerator>
25 public:
26 explicit WPGImportFilter(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
27 : writerperfect::ImportFilter<OdgGenerator>(rxContext)
31 // XServiceInfo
32 virtual OUString SAL_CALL getImplementationName()
33 throw (css::uno::RuntimeException, std::exception) override;
34 virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
35 throw (css::uno::RuntimeException, std::exception) override;
36 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
37 throw (css::uno::RuntimeException, std::exception) override;
39 private:
40 virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) override;
41 virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override;
44 #endif
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */