[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - xmloff/inc xmloff/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Sat May 30 00:03:14 UTC 2020
xmloff/inc/XMLBackgroundImageExport.hxx | 4 ++--
xmloff/source/style/PageMasterExportPropMapper.cxx | 15 +++++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
New commits:
commit 05dfd20fd42f57d681fb65d3fee6b5fe10f4ea1b
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu May 28 17:17:26 2020 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sat May 30 02:02:44 2020 +0200
tdf#103602 xmloff: ODF export of page style: don't export draw:fill
... attributes on page-layout-properties in strict ODF.
Change-Id: Id7c440bf86f78f5f8bb95b9463874787372d5ae8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95053
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit b078679450a6653f69f32390ef2cc5b551f120b2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95111
diff --git a/xmloff/inc/XMLBackgroundImageExport.hxx b/xmloff/inc/XMLBackgroundImageExport.hxx
index a186399df7cd..89a8b8af206d 100644
--- a/xmloff/inc/XMLBackgroundImageExport.hxx
+++ b/xmloff/inc/XMLBackgroundImageExport.hxx
@@ -33,10 +33,10 @@ class XMLBackgroundImageExport
{
SvXMLExport& rExport;
- SvXMLExport& GetExport() { return rExport; }
-
public:
+ SvXMLExport& GetExport() const { return rExport; }
+
XMLBackgroundImageExport( SvXMLExport& rExport );
~XMLBackgroundImageExport();
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx
index d4c6abbc356f..22078b2376a1 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -20,6 +20,7 @@
#include "PageMasterExportPropMapper.hxx"
#include <xmloff/xmlprmap.hxx>
#include <xmloff/xmltoken.hxx>
+#include <xmloff/xmlexp.hxx>
#include <comphelper/types.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
@@ -335,6 +336,9 @@ void XMLPageMasterExportPropMapper::ContextFilter(
rtl::Reference < XMLPropertySetMapper > aPropMapper(getPropertySetMapper());
+ // distinguish 2 cases: drawing-page export has CTF_PM_FILL, page-layout-properties export does not
+ bool const isDrawingPageExport(aPropMapper->FindEntryIndex(CTF_PM_FILL) != -1);
+
for( auto& rProp : rPropState )
{
XMLPropertyState *pProp = &rProp;
@@ -343,6 +347,17 @@ void XMLPageMasterExportPropMapper::ContextFilter(
sal_Int16 nSimpleId = nContextId & (~CTF_PM_FLAGMASK | XML_PM_CTF_START);
sal_Int16 nPrintId = nContextId & CTF_PM_PRINTMASK;
+
+ // tdf#103602 don't export draw:fill attributes on page-layout-properteis in strict ODF
+ if (!isDrawingPageExport
+ && aPropMapper->GetEntryAPIName(rProp.mnIndex).startsWith("Fill")
+ && ((aBackgroundImageExport.GetExport().getSaneDefaultVersion()
+ & SvtSaveOptions::ODFSVER_EXTENDED) == 0))
+ {
+ lcl_RemoveState(&rProp);
+ continue;
+ }
+
XMLPropertyStateBuffer* pBuffer;
switch( nFlag )
{
More information about the Libreoffice-commits
mailing list