Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / writerperfect / source / draw / PageMakerImportFilter.cxx
blob5f5379de94d973d1ea6a4aa1ef945df0539576d6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* PageMakerImportFilter: Sets up the filter, and calls OdgExporter
3 * to do the actual filtering
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 #include <libpagemaker/libpagemaker.h>
12 #include <cppuhelper/supportsservice.hxx>
14 #include "PageMakerImportFilter.hxx"
16 bool PageMakerImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput,
17 OdgGenerator& rGenerator, utl::MediaDescriptor&)
19 return libpagemaker::PMDocument::parse(&rInput, &rGenerator);
22 bool PageMakerImportFilter::doDetectFormat(librevenge::RVNGInputStream& rInput, OUString& rTypeName)
24 if (libpagemaker::PMDocument::isSupported(&rInput))
26 rTypeName = "draw_PageMaker_Document";
27 return true;
30 return false;
33 // XServiceInfo
34 OUString SAL_CALL PageMakerImportFilter::getImplementationName()
36 return "org.libreoffice.comp.Draw.PageMakerImportFilter";
39 sal_Bool SAL_CALL PageMakerImportFilter::supportsService(const OUString& rServiceName)
41 return cppu::supportsService(this, rServiceName);
44 css::uno::Sequence<OUString> SAL_CALL PageMakerImportFilter::getSupportedServiceNames()
46 return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" };
49 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
50 org_libreoffice_comp_Draw_PageMakerImportFilter_get_implementation(
51 css::uno::XComponentContext* const context, const css::uno::Sequence<css::uno::Any>&)
53 return cppu::acquire(new PageMakerImportFilter(context));
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */