Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / writerperfect / source / writer / MWAWImportFilter.hxx
blob8644aa3fb7e1f9b9d6fcc83e90c2ba8ed7781c38
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 #ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_MWAWIMPORTFILTER_HXX
11 #define INCLUDED_WRITERPERFECT_SOURCE_WRITER_MWAWIMPORTFILTER_HXX
13 #include <com/sun/star/lang/XServiceInfo.hpp>
14 #include <com/sun/star/uno/XComponentContext.hpp>
16 #include "ImportFilter.hxx"
18 #include "DocumentHandlerForOdt.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 MWAWImportFilter : public writerperfect::ImportFilter<OdtGenerator>
25 public:
26 explicit MWAWImportFilter(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
27 : writerperfect::ImportFilter<OdtGenerator>(rxContext) {}
29 // XServiceInfo
30 virtual OUString SAL_CALL getImplementationName()
31 throw (css::uno::RuntimeException, std::exception) override;
32 virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
33 throw (css::uno::RuntimeException, std::exception) override;
34 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
35 throw (css::uno::RuntimeException, std::exception) override;
37 private:
38 virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) override;
39 virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, OdtGenerator &rGenerator, utl::MediaDescriptor &) override;
40 virtual void doRegisterHandlers(OdtGenerator &rGenerator) override;
43 #endif
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */