[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - oox/source sw/qa
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 23 11:14:32 UTC 2019
oox/source/export/drawingml.cxx | 12 ++++++++++--
sw/qa/extras/ooxmlexport/data/tdf127085.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 7 +++++++
3 files changed, 17 insertions(+), 2 deletions(-)
New commits:
commit aa4392de09770b08d267a5c0201d9e89053d9cb5
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Aug 22 15:57:41 2019 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Aug 23 13:13:43 2019 +0200
tdf#127085: FILESAVE: Transparency is lost after RT
Reviewed-on: https://gerrit.libreoffice.org/77963
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit 505cbb9c3d2771a12c989515663cc1eb73dd0c2f)
Change-Id: I22ba83b5cc00f84112a3755898ee2be58337afd6
Reviewed-on: https://gerrit.libreoffice.org/77982
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 0bc60021feb5..26939c4ff2ec 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1194,11 +1194,19 @@ OUString DrawingML::WriteBlip( const Reference< XPropertySet >& rXPropSet, const
}
sal_Int16 nBright = 0;
sal_Int32 nContrast = 0;
- sal_Int16 nTransparence = 0;
+ sal_Int32 nTransparence = 0;
GET( nBright, AdjustLuminance );
GET( nContrast, AdjustContrast );
- GET( nTransparence, Transparency );
+ // Used for shapes with picture fill
+ GET( nTransparence, FillTransparence );
+ if (nTransparence == 0)
+ {
+ // Used for pictures
+ sal_Int16 nPicTransparency = 0;
+ GET( nPicTransparency, Transparency );
+ nTransparence = static_cast<sal_Int32>(nPicTransparency);
+ }
mpFS->startElementNS( XML_a, XML_blip,
FSNS( XML_r, XML_embed), sRelId.toUtf8().getStr(),
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127085.docx b/sw/qa/extras/ooxmlexport/data/tdf127085.docx
new file mode 100644
index 000000000000..65556fe38abd
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf127085.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 5a63694ba4af..04e8442cac40 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -548,6 +548,13 @@ DECLARE_OOXMLIMPORT_TEST(testInvalidDateFormField, "invalid_date_form_field.docx
CPPUNIT_ASSERT_EQUAL(int(3), nIndex);
}
+DECLARE_OOXMLEXPORT_TEST(tdf127085, "tdf127085.docx")
+{
+ // Fill transparency was lost during export
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(50), getProperty<sal_Int16>(xShape, "FillTransparence"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list