[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - oox/source sw/qa

2019-09-04 Thread Tamás Zolnai (via logerrit)
 oox/source/ole/axbinarywriter.cxx|4 ++--
 sw/qa/extras/ooxmlexport/data/tdf118169.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |   11 +++
 3 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 7d9f20a723a73300e05a9885c5f02516f771692d
Author: Tamás Zolnai 
AuthorDate: Wed Aug 28 16:24:59 2019 +0200
Commit: Xisco Faulí 
CommitDate: Wed Sep 4 15:30:07 2019 +0200

tdf#118169: ActiveX form control saved incorrectly with accented letters

Write out unicode strings without any compression.

Change-Id: I93cadc40bacbd679724c3404fd870cba48065650
Reviewed-on: https://gerrit.libreoffice.org/78234
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/78592

diff --git a/oox/source/ole/axbinarywriter.cxx 
b/oox/source/ole/axbinarywriter.cxx
index 89d2dc25351a..400e6fbde551 100644
--- a/oox/source/ole/axbinarywriter.cxx
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -144,8 +144,8 @@ void AxBinaryPropertyWriter::writePairProperty( AxPairData& 
orPairData )
 
 void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue )
 {
-sal_uInt32 nSize = orValue.getLength();
-setFlag(  nSize, AX_STRING_COMPRESSED );
+sal_uInt32 nSize = orValue.getLength() * 2;
+setFlag(  nSize, AX_STRING_COMPRESSED, false );
 maOutStrm.writeAligned< sal_uInt32 >( nSize );
 maLargeProps.push_back( ComplexPropVector::value_type( new StringProperty( 
orValue, nSize ) ) );
 startNextProperty();
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118169.docx 
b/sw/qa/extras/ooxmlexport/data/tdf118169.docx
new file mode 100644
index ..2510fb3e59eb
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf118169.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index aab416a86f25..6a71a8e24747 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -414,6 +414,17 @@ DECLARE_OOXMLEXPORT_TEST(tdf127085, "tdf127085.docx")
 uno::Reference xShape(getShape(1), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(sal_Int16(50), getProperty(xShape, 
"FillTransparence"));
 }
+
+DECLARE_OOXMLEXPORT_TEST(tdf118169, "tdf118169.docx")
+{
+// Unicode characters were converted to question marks.
+uno::Reference xControlShape(getShape(1), 
uno::UNO_QUERY);
+uno::Reference 
xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+uno::Reference xServiceInfo(xPropertySet, 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(true, 
bool(xServiceInfo->supportsService("com.sun.star.form.component.CheckBox")));
+CPPUNIT_ASSERT_EQUAL(OUString(u"őőő"), 
getProperty(xPropertySet, "Label"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - oox/source sw/qa

2019-08-29 Thread Tamás Zolnai (via logerrit)
 oox/source/export/drawingml.cxx  |   10 +++---
 sw/qa/extras/ooxmlexport/data/tdf127085.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx   |6 ++
 3 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 4719c2360a5fa347707d47db7e3e85a5f1dd267a
Author: Tamás Zolnai 
AuthorDate: Thu Aug 22 15:57:41 2019 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 29 09:40:33 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 
(cherry picked from commit 505cbb9c3d2771a12c989515663cc1eb73dd0c2f)

Change-Id: I22ba83b5cc00f84112a3755898ee2be58337afd6
Reviewed-on: https://gerrit.libreoffice.org/77978
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 79046932000b..95d160ab5e4a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1272,14 +1272,18 @@ void 
DrawingML::WriteImageBrightnessContrastTransparence(uno::Reference();
 if (GetProperty(rXPropSet, "AdjustContrast"))
 nContrast = mAny.get();
-if (GetProperty(rXPropSet, "Transparency"))
-nTransparence = mAny.get();
+// Used for shapes with picture fill
+if (GetProperty(rXPropSet, "FillTransparence"))
+nTransparence = mAny.get();
+// Used for pictures
+if (nTransparence == 0 && GetProperty(rXPropSet, "Transparency"))
+nTransparence = static_cast(mAny.get());
 
 
 if (nBright || nContrast)
diff --git a/sw/qa/extras/ooxmlexport/data/tdf127085.docx 
b/sw/qa/extras/ooxmlexport/data/tdf127085.docx
new file mode 100644
index ..65556fe38abd
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf127085.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 0f4174033a29..aab416a86f25 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -408,6 +408,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf125518, "tdf125518.odt")
 CPPUNIT_ASSERT_EQUAL(OUString("Object3"), anchorName);
 }
 
+DECLARE_OOXMLEXPORT_TEST(tdf127085, "tdf127085.docx")
+{
+// Fill transparency was lost during export
+uno::Reference xShape(getShape(1), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int16(50), getProperty(xShape, 
"FillTransparence"));
+}
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits