12#include <libstaroffice/libstaroffice.hxx>
17using com::sun::star::uno::XComponentContext;
18using com::sun::star::uno::XInterface;
21 OdfDocumentHandler* pHandler,
22 const OdfStreamType streamType)
24 OdgGenerator exporter;
25 exporter.addDocumentHandler(pHandler, streamType);
26 return STOFFDocument::decodeGraphic(data, &exporter);
30 OdfDocumentHandler* pHandler,
31 const OdfStreamType streamType)
33 OdsGenerator exporter;
35 exporter.addDocumentHandler(pHandler, streamType);
36 return STOFFDocument::decodeSpreadsheet(data, &exporter);
40 librevenge::RVNGInputStream& rInput,
41 OdpGenerator& rGenerator,
44 return STOFFDocument::STOFF_R_OK == STOFFDocument::parse(&rInput, &rGenerator);
52 STOFFDocument::Kind docKind = STOFFDocument::STOFF_K_UNKNOWN;
53 const STOFFDocument::Confidence confidence
54 = STOFFDocument::isFileFormatSupported(&rInput, docKind);
56 if (confidence == STOFFDocument::STOFF_C_EXCELLENT
57 || confidence == STOFFDocument::STOFF_C_SUPPORTED_ENCRYPTION)
61 case STOFFDocument::STOFF_K_PRESENTATION:
62 rTypeName =
"StarOffice_Presentation";
69 return !rTypeName.isEmpty();
75 rGenerator.registerEmbeddedObjectHandler(
"image/stoff-ods",
82 return "org.libreoffice.comp.Impress.StarOfficePresentationImportFilter";
92 return {
"com.sun.star.document.ImportFilter",
"com.sun.star.document.ExtendedTypeDetection" };
95extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
97 css::uno::XComponentContext*
const context,
const css::uno::Sequence<css::uno::Any>&)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_libreoffice_comp_Presentation_StarOfficePresentationImportFilter_get_implementation(css::uno::XComponentContext *const context, const css::uno::Sequence< css::uno::Any > &)
static bool handleEmbeddedSTOFFSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
static bool handleEmbeddedSTOFFGraphicObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
virtual void doRegisterHandlers(OdpGenerator &rGenerator) override
virtual bool doImportDocument(weld::Window *pParent, librevenge::RVNGInputStream &rInput, OdpGenerator &rGenerator, utl::MediaDescriptor &) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)