[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - oox/source sc/qa
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 31 09:34:27 UTC 2019
oox/source/vml/vmlinputstream.cxx | 6 ++++++
sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx |binary
2 files changed, 6 insertions(+)
New commits:
commit fd0a32ec2654b0d6cc11883991dd2f4a85ae0a44
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Wed Oct 30 11:11:45 2019 +0300
Commit: Xisco FaulĂ <xiscofauli at libreoffice.org>
CommitDate: Thu Oct 31 10:33:52 2019 +0100
tdf#128447 sc/vml: accept <? ?> xml prolog
... or processing instruction, or text directive.
The inability to parse this was exposed in LO 6.2
with commit 2cae2ecfef47d8dd10647c10f9577392c1887d3a
I added <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
to the top of vmlDrawing1.vml from the unit test,
which invalidates the entire .vml file and the two
controls are lost without this fix.
Change-Id: Ia1e6d5f9bb932756f70dca59fa8b32004c9e8013
Reviewed-on: https://gerrit.libreoffice.org/81730
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Tested-by: Jenkins
(cherry picked from commit 32efd4529aba776eca9456e96656d542267874f3)
Reviewed-on: https://gerrit.libreoffice.org/81814
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
diff --git a/oox/source/vml/vmlinputstream.cxx b/oox/source/vml/vmlinputstream.cxx
index 2442fa9bc489..55d0ad17f008 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -168,6 +168,12 @@ void lclProcessElement( OStringBuffer& rBuffer, const OString& rElement )
// do nothing
}
+ // just append any xml prolog (text directive) or processing instructions: <?...?>
+ else if( (nElementLen >= 4) && (pcOpen[ 1 ] == '?') && (pcClose[ -1 ] == '?') )
+ {
+ rBuffer.append( rElement );
+ }
+
// replace '<br>' element with newline
else if( (nElementLen >= 4) && (pcOpen[ 1 ] == 'b') && (pcOpen[ 2 ] == 'r') && (lclFindNonWhiteSpace( pcOpen + 3, pcClose ) == pcClose) )
{
diff --git a/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx b/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx
index 0677a0cf2eb2..b28c4dd71643 100644
Binary files a/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx and b/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx differ
More information about the Libreoffice-commits
mailing list