tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / writerperfect / source / draw / MSPUBImportFilter.cxx
blobb4c89f20853c6754375e0e00060ab20609ce9e45
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* MSPUBImportFilter: 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 <cppuhelper/supportsservice.hxx>
12 #include <libmspub/libmspub.h>
14 #include "MSPUBImportFilter.hxx"
16 bool MSPUBImportFilter::doImportDocument(weld::Window*, librevenge::RVNGInputStream& rInput,
17 OdgGenerator& rGenerator, utl::MediaDescriptor&)
19 return libmspub::MSPUBDocument::parse(&rInput, &rGenerator);
22 bool MSPUBImportFilter::doDetectFormat(librevenge::RVNGInputStream& rInput, OUString& rTypeName)
24 if (libmspub::MSPUBDocument::isSupported(&rInput))
26 rTypeName = "draw_Publisher_Document";
27 return true;
30 return false;
33 // XServiceInfo
34 OUString SAL_CALL MSPUBImportFilter::getImplementationName()
36 return u"com.sun.star.comp.Draw.MSPUBImportFilter"_ustr;
39 sal_Bool SAL_CALL MSPUBImportFilter::supportsService(const OUString& rServiceName)
41 return cppu::supportsService(this, rServiceName);
44 css::uno::Sequence<OUString> SAL_CALL MSPUBImportFilter::getSupportedServiceNames()
46 return { u"com.sun.star.document.ImportFilter"_ustr,
47 u"com.sun.star.document.ExtendedTypeDetection"_ustr };
50 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
51 com_sun_star_comp_Draw_MSPUBImportFilter_get_implementation(
52 css::uno::XComponentContext* const context, const css::uno::Sequence<css::uno::Any>&)
54 return cppu::acquire(new MSPUBImportFilter(context));
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */