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,
43 return STOFFDocument::STOFF_R_OK == STOFFDocument::parse(&rInput, &rGenerator);
51 STOFFDocument::Kind docKind = STOFFDocument::STOFF_K_UNKNOWN;
52 const STOFFDocument::Confidence confidence
53 = STOFFDocument::isFileFormatSupported(&rInput, docKind);
55 if (confidence == STOFFDocument::STOFF_C_EXCELLENT
56 || confidence == STOFFDocument::STOFF_C_SUPPORTED_ENCRYPTION)
60 case STOFFDocument::STOFF_K_DRAW:
61 rTypeName =
"StarOffice_Drawing";
68 return !rTypeName.isEmpty();
74 rGenerator.registerEmbeddedObjectHandler(
"image/stoff-ods",
81 return "org.libreoffice.comp.Draw.StarOfficeDrawImportFilter";
91 return {
"com.sun.star.document.ImportFilter",
"com.sun.star.document.ExtendedTypeDetection" };
94extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
96 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)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_libreoffice_comp_Draw_StarOfficeDrawImportFilter_get_implementation(css::uno::XComponentContext *const context, const css::uno::Sequence< css::uno::Any > &)
virtual bool doImportDocument(weld::Window *pParent, librevenge::RVNGInputStream &rInput, OdgGenerator &rGenerator, utl::MediaDescriptor &) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void doRegisterHandlers(OdgGenerator &rGenerator) 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
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)