[Libreoffice-commits] core.git: oox/source sax/source sc/qa
László Németh (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 13 06:00:30 UTC 2019
oox/source/export/preset-definitions-to-shape-types.pl | 2 +-
sax/source/tools/fastserializer.cxx | 4 +++-
sc/qa/unit/subsequent_export-test.cxx | 4 ++++
3 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit c5d37d324cd6d17114c209de1862344ad58a1d93
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Thu Sep 12 15:48:35 2019 +0200
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Fri Sep 13 07:59:53 2019 +0200
tdf#117274 XLSX export: fix VML comment shape type id
to avoid shape multiplication in a mixed environment.
MSO needs the special unescaped VML comment shape type
id "_x0000_t202" to avoid of generating also DrawingML
shapes from the VML ones. Calc export escaped the shape
type ids ("_x005F_x0000_t202"), keeping also the DrawingML
shapes, so every round trip between LO and MSO resulted
more and more broken shapes in the document.
See also commit ea7274259a211170ee9f5a8714a2f9acd8bed6d8
"tdf#114842 Fix comment shape export for Calc".
Change-Id: I55b29146ebcdc20cf4f53464bf318fb34bfc5934
Reviewed-on: https://gerrit.libreoffice.org/78831
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth at numbertext.org>
diff --git a/oox/source/export/preset-definitions-to-shape-types.pl b/oox/source/export/preset-definitions-to-shape-types.pl
index 16bf1cf6c61f..f6bd260f7cde 100644
--- a/oox/source/export/preset-definitions-to-shape-types.pl
+++ b/oox/source/export/preset-definitions-to-shape-types.pl
@@ -1189,7 +1189,7 @@ close( $file );
if ( !defined( $result_shapes{'textBox'} ) ) {
# tdf#114842 shapetype id of the textbox, must be the same as defined
$result_shapes{'textBox'} =
- "<v:shapetype id=\"_x005F_x0000_t__ID__\" coordsize=\"21600,21600\" " .
+ "<v:shapetype id=\"_x0000_t__ID__\" coordsize=\"21600,21600\" " .
"o:spt=\"__ID__\" path=\"m,l,21600l21600,21600l21600,xe\">\n" .
"<v:stroke joinstyle=\"miter\"/>\n" .
"<v:path gradientshapeok=\"t\" o:connecttype=\"rect\"/>\n" .
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index d862c163fb38..2741bb4d4a28 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -130,7 +130,9 @@ namespace sax_fastparser {
if (nLen == -1)
nLen = pStr ? strlen(pStr) : 0;
- if (!bEscape)
+ if ( !bEscape ||
+ // tdf#127274 don't escape the special VML shape type id "#_x0000_t202"
+ (pStr && strcmp(pStr, "#_x0000_t202") == 0) )
{
writeBytes( pStr, nLen );
return;
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index d406100866ef..d4cee605170d 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -787,6 +787,10 @@ void ScExportTest::testCommentExportXLSX()
assertXPath(pVmlDrawing, "/xml/v:shape", "type", sShapeTypeId);
assertXPath(pVmlDrawing, "/xml/v:shape/v:shadow", "color", "black");
assertXPath(pVmlDrawing, "/xml/v:shape/v:shadow", "obscured", "t");
+
+ //tdf#117274 fix MSO interoperability with the secret VML shape type id
+ assertXPath(pVmlDrawing, "/xml/v:shapetype", "id", "_x0000_t202");
+ assertXPath(pVmlDrawing, "/xml/v:shape", "type", "#_x0000_t202");
}
void ScExportTest::testCommentExportXLSX_2_XLSX()
More information about the Libreoffice-commits
mailing list