[Libreoffice-commits] core.git: desktop/source filter/Configuration_filter.mk filter/source officecfg/registry sd/inc sd/Library_sd.mk sd/qa sd/source
desktop/source/lib/init.cxx |2 filter/Configuration_filter.mk |2 filter/source/config/fragments/filters/draw_html_Export.xcu | 30 filter/source/config/fragments/filters/impress_html_Export.xcu | 30 officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu |2 sd/Library_sd.mk|2 sd/inc/sdhtmlfilter.hxx | 34 sd/qa/unit/HtmlExportTest.cxx | 29 sd/qa/unit/dialogs-test.cxx |1 sd/source/filter/html/htmlex.cxx| 858 ++ sd/source/filter/html/htmlex.hxx| 84 sd/source/filter/html/sdhtmlfilter.cxx | 44 sd/source/ui/docshell/docshel4.cxx |7 13 files changed, 1118 insertions(+), 7 deletions(-) New commits: commit 608c35665bee5990bd7e2799854e233d1454b6a4 Author: Xisco Fauli AuthorDate: Wed Sep 27 10:58:34 2023 +0200 Commit: Xisco Fauli CommitDate: Thu Sep 28 15:39:03 2023 +0200 tdf#105303: re-introduce single-document html export filter which was deleted in 28b6480c6bdd179f3943f768926b7f196226c768 "tdf#105303: Drop html export wizard" With this commit, exporting to HTML from File - Export dialog behaves the same way as using --convert-to html:"impress_html_Export" from the commandline. The slides are exported as a single document For more information see the discussion in tdf#105303 Change-Id: Ib96b3d855ae807e79f276099422903c86ea2628a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157331 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 777d1030d075..434b65319776 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -335,6 +335,7 @@ const ExtensionMap aCalcExtensionMap[] = const ExtensionMap aImpressExtensionMap[] = { { "fodp", "OpenDocument Presentation Flat XML" }, +{ "html", "impress_html_Export" }, { "odg", "impress8_draw" }, { "odp", "impress8" }, { "otp", "impress8_template" }, @@ -354,6 +355,7 @@ const ExtensionMap aImpressExtensionMap[] = const ExtensionMap aDrawExtensionMap[] = { { "fodg", "draw_ODG_FlatXML" }, +{ "html", "draw_html_Export" }, { "odg", "draw8" }, { "pdf", "draw_pdf_Export" }, { "svg", "draw_svg_Export" }, diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk index 921189c4de25..bd3d3486234e 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -764,6 +764,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_drawgraphics_f draw_emz_Export \ draw_eps_Export \ draw_gif_Export \ + draw_html_Export \ draw_jpg_Export \ draw_png_Export \ draw_svg_Export \ @@ -808,6 +809,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_impressgraphic impress_emf_Export \ impress_eps_Export \ impress_gif_Export \ + impress_html_Export \ impress_jpg_Export \ impress_png_Export \ impress_svg_Export \ diff --git a/filter/source/config/fragments/filters/draw_html_Export.xcu b/filter/source/config/fragments/filters/draw_html_Export.xcu new file mode 100644 index ..ebb14b75b19f --- /dev/null +++ b/filter/source/config/fragments/filters/draw_html_Export.xcu @@ -0,0 +1,30 @@ + + +EXPORT ALIEN + + + +0 +graphic_HTML + +com.sun.star.drawing.DrawingDocument + +HTML Document (Draw) + + diff --git a/filter/source/config/fragments/filters/impress_html_Export.xcu b/filter/source/config/fragments/filters/impress_html_Export.xcu new file mode 100644 index ..1e0fb435e01e --- /dev/null +++ b/filter/source/config/fragments/filters/impress_html_Export.xcu @@ -0,0 +1,30 @@ + + +EXPORT ALIEN + + + +0 +graphic_HTML + +com.sun.star.presentation.PresentationDocument + +HTML Document (Impress) + + diff --git a/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu b/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu index 3dc6272ab7b2..5dcce7b1e688 100644 --- a/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu +++ b/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu @@ -26,7 +26,7 @@ -draw8;draw8_template;StarOffice XML (Draw);draw_StarOffice_XML_Draw_Template;OpenDocument Drawing Flat XML;draw_pdf_Export;draw_flash_Export;WordPerfect Graphics;DXF - AutoCAD Interchange;EMF - MS Windows
[Libreoffice-commits] core.git: desktop/source filter/Configuration_filter.mk filter/source
desktop/source/lib/init.cxx| 18 +-- filter/Configuration_filter.mk |2 filter/source/config/fragments/filters/calc_svg_Export.xcu | 30 + filter/source/svg/svgexport.cxx| 20 filter/source/svg/svgfilter.cxx| 18 +++ filter/source/svg/svgfilter.hxx| 18 +++ 6 files changed, 72 insertions(+), 34 deletions(-) New commits: commit 870d30c62bb5f579dfa4e6fb2e32dd796159f3b3 Author: Tamás Zolnai AuthorDate: Fri Dec 14 22:06:35 2018 +0100 Commit: Tamás Zolnai CommitDate: Sat Dec 15 00:20:21 2018 +0100 lok: Implement SVG export for Calc (SelectionOnly mode) Change-Id: Ic305e5305890fd1efa3a3130e5216f9c672870e5 Reviewed-on: https://gerrit.libreoffice.org/65175 Tested-by: Jenkins Reviewed-by: Tamás Zolnai diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index e9675be766f6..0537d3808d61 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2619,13 +2619,19 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu uno::Reference xOut = new utl::OOutputStreamWrapper(aOutStream); utl::MediaDescriptor aMediaDescriptor; -if (doc_getDocumentType(pThis) == LOK_DOCTYPE_PRESENTATION) -{ -aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); -} -else if(doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT) +switch (doc_getDocumentType(pThis)) { -aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export"); +case LOK_DOCTYPE_PRESENTATION: +aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); +break; +case LOK_DOCTYPE_TEXT: +aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export"); +break; +case LOK_DOCTYPE_SPREADSHEET: +aMediaDescriptor["FilterName"] <<= OUString("calc_svg_Export"); +break; +default: +SAL_WARN("lok", "Failed to render shape selection: Document type is not supported"); } aMediaDescriptor["SelectionOnly"] <<= true; aMediaDescriptor["OutputStream"] <<= xOut; diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk index b56e0ae39bc8..97023325c94e 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -802,11 +802,13 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writergraphics # fcfg_calcgraphics $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calcgraphics_types.xcu,filter/source/config/fragments/types,\ png_Portable_Network_Graphic \ + svg_Scalable_Vector_Graphics \ )) $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calcgraphics_filters.xcu,filter/source/config/fragments/filters,\ calc_jpg_Export \ calc_png_Export \ + calc_svg_Export \ )) # fcfg_internalgraphics diff --git a/filter/source/config/fragments/filters/calc_svg_Export.xcu b/filter/source/config/fragments/filters/calc_svg_Export.xcu new file mode 100644 index ..703ce82e9778 --- /dev/null +++ b/filter/source/config/fragments/filters/calc_svg_Export.xcu @@ -0,0 +1,30 @@ + + +EXPORT ALIEN 3RDPARTYFILTER INTERNAL NOTINFILEDIALOG + +com.sun.star.comp.Draw.SVGFilter + + +SVG - Scalable Vector Graphics + +0 +svg_Scalable_Vector_Graphics + +com.sun.star.sheet.SpreadsheetDocument + diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 729fd2e29c2c..2dd294fba105 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -531,13 +531,13 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) } } -if(mbWriterFilter) - return implExportWriter(xOStm); +if(mbWriterOrCalcFilter) + return implExportWriterOrCalc(xOStm); -return implExportImpressDraw(xOStm); +return implExportImpressOrDraw(xOStm); } -bool SVGFilter::implExportImpressDraw( const Reference< XOutputStream >& rxOStm) +bool SVGFilter::implExportImpressOrDraw( const Reference< XOutputStream >& rxOStm) { Reference< XComponentContext >xContext( ::comphelper::getProcessComponentContext() ) ; bool bRet = false; @@ -629,7 +629,7 @@ bool SVGFilter::implExportImpressDraw( const Reference< XOutputStream >& rxOStm) } -bool SVGFilter::implExportWriter( const Reference< XOutputStream >& rxOStm ) +bool SVGFilter::implExportWriterOrCalc( const Reference< XOutputStream >& rxOStm ) { Reference< XComponentContext >xContext(
[Libreoffice-commits] core.git: desktop/source filter/Configuration_filter.mk filter/source
desktop/source/lib/init.cxx |9 filter/Configuration_filter.mk |2 filter/source/config/fragments/filters/writer_svg_Export.xcu | 30 + filter/source/svg/svgexport.cxx | 245 +++ filter/source/svg/svgfilter.cxx | 82 +++ filter/source/svg/svgfilter.hxx | 42 + 6 files changed, 312 insertions(+), 98 deletions(-) New commits: commit b052974a6574e4074794ffa590fe60f7c1726768 Author: Tamás Zolnai AuthorDate: Fri Dec 14 17:50:18 2018 +0100 Commit: Tamás Zolnai CommitDate: Fri Dec 14 19:52:48 2018 +0100 lok: Implement SVG export for Writer (SelectionOnly mode) Separate generic code from Impress / Draw specific code and implement shape selection handling in case of Writer. This is an internal filter, so it can be called only from the code. Change-Id: I807e04a0949530d6029037bb964c10c80197ff33 Reviewed-on: https://gerrit.libreoffice.org/65174 Tested-by: Jenkins Reviewed-by: Tamás Zolnai diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 90994a92c257..65ccfdf4a411 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2618,7 +2618,14 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu uno::Reference xOut = new utl::OOutputStreamWrapper(aOutStream); utl::MediaDescriptor aMediaDescriptor; -aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); +if (doc_getDocumentType(pThis) == LOK_DOCTYPE_PRESENTATION) +{ +aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export"); +} +else if(doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT) +{ +aMediaDescriptor["FilterName"] <<= OUString("writer_svg_Export"); +} aMediaDescriptor["SelectionOnly"] <<= true; aMediaDescriptor["OutputStream"] <<= xOut; diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk index d7a6322e5564..b56e0ae39bc8 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -790,11 +790,13 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_impressgraphic $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writergraphics_types.xcu,filter/source/config/fragments/types,\ jpg_JPEG \ png_Portable_Network_Graphic \ + svg_Scalable_Vector_Graphics \ )) $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writergraphics_filters.xcu,filter/source/config/fragments/filters,\ writer_jpg_Export \ writer_png_Export \ + writer_svg_Export \ )) # fcfg_calcgraphics diff --git a/filter/source/config/fragments/filters/writer_svg_Export.xcu b/filter/source/config/fragments/filters/writer_svg_Export.xcu new file mode 100644 index ..c08576cdd69b --- /dev/null +++ b/filter/source/config/fragments/filters/writer_svg_Export.xcu @@ -0,0 +1,30 @@ + + +EXPORT ALIEN 3RDPARTYFILTER INTERNAL NOTINFILEDIALOG + +com.sun.star.comp.Draw.SVGFilter + + +SVG - Scalable Vector Graphics + +0 +svg_Scalable_Vector_Graphics + +com.sun.star.text.TextDocument + diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index babf682a024f..729fd2e29c2c 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -504,12 +504,10 @@ bool EqualityBitmap::operator()( const ObjectRepresentation& rObjRep1, bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) { -Reference< XComponentContext >xContext( ::comphelper::getProcessComponentContext() ) ; Reference< XOutputStream >xOStm; std::unique_ptr pOStm; sal_Int32 nLength = rDescriptor.getLength(); const PropertyValue* pValue = rDescriptor.getConstArray(); -bool bRet = false; maFilterData.realloc( 0 ); @@ -533,11 +531,22 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) } } -if( xOStm.is() ) +if(mbWriterFilter) + return implExportWriter(xOStm); + +return implExportImpressDraw(xOStm); +} + +bool SVGFilter::implExportImpressDraw( const Reference< XOutputStream >& rxOStm) +{ +Reference< XComponentContext >xContext( ::comphelper::getProcessComponentContext() ) ; +bool bRet = false; + +if( rxOStm.is() ) { if( !mSelectedPages.empty() && !mMasterPageTargets.empty() ) { -Reference< XDocumentHandler > xDocHandler( implCreateExportDocumentHandler( xOStm ), UNO_QUERY ); +Reference< XDocumentHandler