nss: upgrade to release 3.73
[LibreOffice.git] / writerperfect / source / draw / QXPImportFilter.cxx
blobc644ad470c69d117e767f959e5d50d14ab4f3f7c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* QXPImportFilter: 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 <libqxp/libqxp.h>
12 #include <cppuhelper/supportsservice.hxx>
14 #include "QXPImportFilter.hxx"
16 using com::sun::star::uno::Sequence;
17 using com::sun::star::uno::XComponentContext;
18 using com::sun::star::uno::XInterface;
20 bool QXPImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput,
21 OdgGenerator& rGenerator, utl::MediaDescriptor&)
23 return libqxp::QXPDocument::parse(&rInput, &rGenerator) == libqxp::QXPDocument::RESULT_OK;
26 bool QXPImportFilter::doDetectFormat(librevenge::RVNGInputStream& rInput, OUString& rTypeName)
28 if (libqxp::QXPDocument::isSupported(&rInput))
30 rTypeName = "draw_QXP_Document";
31 return true;
34 return false;
37 // XServiceInfo
38 OUString SAL_CALL QXPImportFilter::getImplementationName()
40 return "org.libreoffice.comp.Draw.QXPImportFilter";
43 sal_Bool SAL_CALL QXPImportFilter::supportsService(const OUString& rServiceName)
45 return cppu::supportsService(this, rServiceName);
48 Sequence<OUString> SAL_CALL QXPImportFilter::getSupportedServiceNames()
50 return { "com.sun.star.document.ImportFilter", "com.sun.star.document.ExtendedTypeDetection" };
53 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
54 org_libreoffice_comp_Draw_QXPImportFilter_get_implementation(
55 css::uno::XComponentContext* const context, const css::uno::Sequence<css::uno::Any>&)
57 return cppu::acquire(new QXPImportFilter(context));
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */