desktop/source/lib/init.cxx | 3 - filter/Configuration_filter.mk | 2 filter/source/config/fragments/filters/writer_web_jpg_Export.xcu | 21 ++++++++++ filter/source/config/fragments/filters/writer_web_png_Export.xcu | 21 ++++++++++ filter/source/graphic/GraphicExportDialog.cxx | 2 filter/source/graphic/GraphicExportFilter.cxx | 1 6 files changed, 48 insertions(+), 2 deletions(-)
New commits: commit 806d34981f480908645038f4cfc29ebcf25ca145 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.com> Date: Thu Feb 4 14:44:36 2016 +0100 lok: fix saveAs for a loaded HTML document a HTML document is reported as "com.sun.star.text.WebDocument" which is a unsupported document type in LOK so report it as a LOK_DOCTYPE_TEXT instead. Change-Id: Iaa77cb8b1f55cf31ebbb4fd4d69c02702e60e251 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 203279c..7c4d8cf 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -622,6 +622,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha break; case LOK_DOCTYPE_OTHER: default: + SAL_INFO("lok", "Can't save document - unsopported document type."); return false; } @@ -765,7 +766,7 @@ static int doc_getDocumentType (LibreOfficeKitDocument* pThis) { return LOK_DOCTYPE_DRAWING; } - else if (xDocument->supportsService("com.sun.star.text.TextDocument")) + else if (xDocument->supportsService("com.sun.star.text.TextDocument") || xDocument->supportsService("com.sun.star.text.WebDocument")) { return LOK_DOCTYPE_TEXT; } commit 9f84b757a2e6678a30a797e85d8236612b952646 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.com> Date: Thu Feb 4 14:43:28 2016 +0100 Allow HTML (WebDocument) to be exported as PNG or JPEG Change-Id: Id6b70a88ea479b402e680c7c216a20be3d6e116e diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk index 579dc80..38c67fea 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -416,6 +416,8 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_web_filters.xc writer_web_StarOffice_XML_Writer \ writer_web_StarOffice_XML_Writer_Web_Template \ writer_web_pdf_Export\ + writer_web_png_Export\ + writer_web_jpg_Export\ writerweb8_writer_template\ writerweb8_writer \ )) diff --git a/filter/source/config/fragments/filters/writer_web_jpg_Export.xcu b/filter/source/config/fragments/filters/writer_web_jpg_Export.xcu new file mode 100644 index 0000000..584283f --- /dev/null +++ b/filter/source/config/fragments/filters/writer_web_jpg_Export.xcu @@ -0,0 +1,21 @@ +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * +--> + <node oor:name="writer_web_jpg_Export" oor:op="replace"> + <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="UIComponent"><value>com.sun.star.comp.GraphicExportDialog</value></prop> + <prop oor:name="FilterService"><value>com.sun.star.comp.GraphicExportFilter</value></prop> + <prop oor:name="UserData"><value></value></prop> + <prop oor:name="UIName"> + <value xml:lang="en-US">JPEG - Joint Photographic Experts Group</value> + </prop> + <prop oor:name="FileFormatVersion"><value>0</value></prop> + <prop oor:name="Type"><value>jpg_JPEG</value></prop> + <prop oor:name="TemplateName"/> + <prop oor:name="DocumentService"><value>com.sun.star.text.WebDocument</value></prop> + </node> diff --git a/filter/source/config/fragments/filters/writer_web_png_Export.xcu b/filter/source/config/fragments/filters/writer_web_png_Export.xcu new file mode 100644 index 0000000..7408773 --- /dev/null +++ b/filter/source/config/fragments/filters/writer_web_png_Export.xcu @@ -0,0 +1,21 @@ +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * +--> + <node oor:name="writer_web_png_Export" oor:op="replace"> + <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop> + <prop oor:name="UIComponent"><value>com.sun.star.comp.GraphicExportDialog</value></prop> + <prop oor:name="FilterService"><value>com.sun.star.comp.GraphicExportFilter</value></prop> + <prop oor:name="UserData"><value></value></prop> + <prop oor:name="UIName"> + <value xml:lang="en-US">PNG - Portable Network Graphic</value> + </prop> + <prop oor:name="FileFormatVersion"><value>0</value></prop> + <prop oor:name="Type"><value>png_Portable_Network_Graphic</value></prop> + <prop oor:name="TemplateName"/> + <prop oor:name="DocumentService"><value>com.sun.star.text.WebDocument</value></prop> + </node> diff --git a/filter/source/graphic/GraphicExportDialog.cxx b/filter/source/graphic/GraphicExportDialog.cxx index f2d9a82..d9d0a0d 100644 --- a/filter/source/graphic/GraphicExportDialog.cxx +++ b/filter/source/graphic/GraphicExportDialog.cxx @@ -135,7 +135,7 @@ void GraphicExportDialog::setSourceDocument( const Reference<XComponent>& xDocum { aConfigPath = "Office.Draw/Layout/Other/MeasureUnit"; } - else if ( xServiceInfo->supportsService("com.sun.star.text.TextDocument") ) + else if ( xServiceInfo->supportsService("com.sun.star.text.TextDocument") || xServiceInfo->supportsService("com.sun.star.text.WebDocument") ) { aConfigPath = "Office.Writer/Layout/Other/MeasureUnit"; } diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx index 86f0d49..b4141f4 100644 --- a/filter/source/graphic/GraphicExportFilter.cxx +++ b/filter/source/graphic/GraphicExportFilter.cxx @@ -47,6 +47,7 @@ void GraphicExportFilter::gatherProperties( const Sequence<PropertyValue>& rProp aInternalFilterName = aInternalFilterName.replaceFirst("impress_", ""); aInternalFilterName = aInternalFilterName.replaceFirst("calc_", ""); aInternalFilterName = aInternalFilterName.replaceFirst("writer_", ""); + aInternalFilterName = aInternalFilterName.replaceFirst("web_", ""); } else if ( aProperty.Name == "FilterData" ) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits