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;
34 exporter.addDocumentHandler(pHandler, streamType);
35 return STOFFDocument::decodeSpreadsheet(data, &exporter);
39 librevenge::RVNGInputStream& rInput,
42 return STOFFDocument::STOFF_R_OK == STOFFDocument::parse(&rInput, &rGenerator);
49 STOFFDocument::Kind docKind = STOFFDocument::STOFF_K_UNKNOWN;
50 const STOFFDocument::Confidence confidence
51 = STOFFDocument::isFileFormatSupported(&rInput, docKind);
52 if (confidence == STOFFDocument::STOFF_C_EXCELLENT
53 || confidence == STOFFDocument::STOFF_C_SUPPORTED_ENCRYPTION)
57 case STOFFDocument::STOFF_K_DATABASE:
58 case STOFFDocument::STOFF_K_SPREADSHEET:
59 rTypeName =
"StarOffice_Spreadsheet";
66 return !rTypeName.isEmpty();
72 rGenerator.registerEmbeddedObjectHandler(
"image/stoff-ods",
79 return "org.libreoffice.comp.Calc.StarOfficeCalcImportFilter";
89 return {
"com.sun.star.document.ImportFilter",
"com.sun.star.document.ExtendedTypeDetection" };
92extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
94 css::uno::XComponentContext*
const context,
const css::uno::Sequence<css::uno::Any>&)
static bool handleEmbeddedSTOFFSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_libreoffice_comp_Calc_StarOfficeCalcImportFilter_get_implementation(css::uno::XComponentContext *const context, const css::uno::Sequence< css::uno::Any > &)
static bool handleEmbeddedSTOFFGraphicObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
virtual bool doImportDocument(weld::Window *pParent, librevenge::RVNGInputStream &rInput, OdsGenerator &rGenerator, utl::MediaDescriptor &) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void doRegisterHandlers(OdsGenerator &rGenerator) override
virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, OUString &rTypeName) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)