[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - oox/source sw/qa
Regényi Balázs (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 29 14:36:09 UTC 2020
oox/source/export/drawingml.cxx | 8 --------
sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 9 +++++++++
sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 2 +-
4 files changed, 10 insertions(+), 9 deletions(-)
New commits:
commit ecb06c0c5af4563d2feae5a927ab23542f63001b
Author: Regényi Balázs <regenyi.balazs at nisz.hu>
AuthorDate: Mon Sep 7 19:54:19 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 29 16:35:36 2020 +0200
tdf#77236 DOCX shape export: fix missing solidFill
(resulting for example, invisible shapes).
Co-authored-by: Szabolcs Tóth
Change-Id: I328514022f4a594c374d5a97db39d1cf3a954e02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102195
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
Signed-off-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103615
Tested-by: Jenkins
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 67c089b73cf5..8a45e22d3fc3 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -908,14 +908,6 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc
// the line had a scheme color and the user didn't change it
WriteSolidFill( sColorFillScheme, aTransformations );
}
- else if( aStyleProperties.hasElements() )
- {
- if( nColor != nStyleColor )
- // the line style defines some color but it wasn't being used
- WriteSolidFill( nColor );
- // in case the shape used the style color and the user didn't change it,
- // we must not write a <a: solidFill> tag.
- }
else
{
WriteSolidFill( nColor, nColorAlpha );
diff --git a/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx b/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx
new file mode 100644
index 000000000000..2bb2c097838d
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf77236_MissingSolidFill.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 13d6f679bbae..8921cc0fdda9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -1316,6 +1316,15 @@ DECLARE_OOXMLEXPORT_TEST( testTdf107359, "tdf107359-char-pitch.docx" )
CPPUNIT_ASSERT_EQUAL( sal_Int32(convertTwipToMm100(24 * 20)), nBaseWidth );
}
+DECLARE_OOXMLEXPORT_TEST(testTdf77236_MissingSolidFill, "tdf77236_MissingSolidFill.docx")
+{
+ // tdf#77236: solidFill of VML shape was not exported if the colors of line and style were the same
+ xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "//mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill", 1);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 7702b935f3fe..d52a867045bd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -793,7 +793,7 @@ DECLARE_OOXMLEXPORT_TEST(testShapeThemePreservation, "shape-theme-preservation.d
0);
assertXPath(pXmlDocument,
"/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill",
- 0);
+ 1);
// check direct theme assignments have been preserved
assertXPath(pXmlDocument,
More information about the Libreoffice-commits
mailing list