[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - oox/source sw/qa
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 28 21:14:31 UTC 2019
oox/source/ole/axbinarywriter.cxx | 4 ++--
sw/qa/extras/ooxmlexport/data/tdf118169.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 10 ++++++++++
3 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 06f4ee42fe82cf8828106afe305e09f1a40f0e1e
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Aug 28 16:24:59 2019 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Aug 28 23:13:53 2019 +0200
tdf#118169: ActiveX form control saved incorrectly with accented letters
Write out unicode strings without any compression.
Reviewed-on: https://gerrit.libreoffice.org/78234
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit 4b82652c4de94db553dfd7a63801ea81d366315a)
Change-Id: I93cadc40bacbd679724c3404fd870cba48065650
Reviewed-on: https://gerrit.libreoffice.org/78239
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx
index a0e4b83f23ce..cfdfee3d2c14 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 000000000000..2510fb3e59eb
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf118169.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 506d17729e01..6de75672af21 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -566,6 +566,16 @@ DECLARE_OOXMLEXPORT_TEST(tdf119809, "tdf119809.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty< uno::Sequence<OUString> >(xPropertySet, "StringItemList").getLength());
}
+DECLARE_OOXMLEXPORT_TEST(tdf118169, "tdf118169.docx")
+{
+ // Unicode characters were converted to question marks.
+ uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xServiceInfo(xPropertySet, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService("com.sun.star.form.component.CheckBox")));
+ CPPUNIT_ASSERT_EQUAL(OUString(u"őőőőőőőőőőőűűűű"), getProperty<OUString>(xPropertySet, "Label"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list