From 5496274731d15b671b25915d7e6d1d9ae06af7e1 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Nov 21 2016 22:56:59 +0000 Subject: ODF: do not write an empty style:text-position="" attribute for CharEscapement --- diff --git a/0001-ODF-do-not-write-an-empty-style-text-position-attrib.patch b/0001-ODF-do-not-write-an-empty-style-text-position-attrib.patch new file mode 100644 index 0000000..37f1bae --- /dev/null +++ b/0001-ODF-do-not-write-an-empty-style-text-position-attrib.patch @@ -0,0 +1,67 @@ +From 692cf8964b7975b3f862bf8485e9d95b067b8e8a Mon Sep 17 00:00:00 2001 +Message-Id: <692cf8964b7975b3f862bf8485e9d95b067b8e8a.1479768730.git.erack@redhat.com> +From: Eike Rathke +Date: Thu, 17 Nov 2016 19:52:10 +0100 +Subject: [PATCH] ODF: do not write an empty style:text-position="" attribute + for CharEscapement +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="------------erAck-patch-parts" + +This is a multi-part message in MIME format. +--------------erAck-patch-parts +Content-Type: text/plain; charset=UTF-8; format=fixed +Content-Transfer-Encoding: 8bit + + +... and CharEscapementHeight if the Any is void. +This was a real error complained about in the officeotron validation +https://bugs.documentfoundation.org/attachment.cgi?id=128411 +https://bugs.documentfoundation.org/show_bug.cgi?id=103493 + +Also showed up as console warning + + warn:legacy.osl:3269:1:xmloff/source/core/xmlerror.cxx:178: An error or a warning has occurred during XML import/export! + Error-Id: 0x20040003 + Flags: 2 ERROR + Class: 4 API + Number: 3 + Parameters: + 0: CharEscapement + Exception-Message: UNKNOWN_PROPERTY + Position: + Public Identifier: + System Identifier: file:///.../103493-LotroPlan%203.8.ods + Row, Column: 2,1850164 + +Change-Id: Ifc634cc6b3d5d6dfa43741005ef0c9a1f7ff71fe +(cherry picked from commit 8aec9057a169acfda6f2d986af93edca54677fd2) +Reviewed-on: https://gerrit.libreoffice.org/30939 +Tested-by: Jenkins +Reviewed-by: Markus Mohrhard +--- + xmloff/source/style/escphdl.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + + +--------------erAck-patch-parts +Content-Type: text/x-patch; name="0001-ODF-do-not-write-an-empty-style-text-position-attrib.patch" +Content-Transfer-Encoding: 8bit +Content-Disposition: attachment; filename="0001-ODF-do-not-write-an-empty-style-text-position-attrib.patch" + +diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx +index 9573706..9528f3b 100644 +--- a/xmloff/source/style/escphdl.cxx ++++ b/xmloff/source/style/escphdl.cxx +@@ -95,7 +95,7 @@ bool XMLEscapementPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV + } + + rStrExpValue = aOut.makeStringAndClear(); +- return true; ++ return !rStrExpValue.isEmpty(); + } + + + +--------------erAck-patch-parts-- + + diff --git a/libreoffice.spec b/libreoffice.spec index 886576b..906c80e 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -300,6 +300,7 @@ Patch62: 0001-don-t-suppress-crashes.patch Patch63: 0001-drawing-shapes-aren-t-tracking-style-name-changes-co.patch Patch64: 0001-set-the-search-toolbar-so-it-doesn-t-move-around-wrt.patch Patch65: 0001-Resolves-tdf-104096-reset-also-rRawRes-if-trailing-c.patch +Patch66: 0001-ODF-do-not-write-an-empty-style-text-position-attrib.patch %if ! 0%{?rhel} Patch400: 0001-Update-liborcus-to-0.11.0.patch @@ -2372,6 +2373,7 @@ done %changelog * Mon Nov 21 2016 Eike Rathke - 1:5.1.6.2-5-UNBUILT - Resolves: tdf#104096 reset also rRawRes if trailing characters are present +- ODF: do not write an empty style:text-position="" attribute for CharEscapement * Mon Nov 21 2016 David Tardon - 1:5.1.6.2-4 - allow abrt to work again