summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2016-11-05 12:18:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-05 20:28:47 +0000
commit99f2663d8752db9779b72215d79597f8538e061f (patch)
treefc2bd4a00d79a77084411d468bcec47d39b8aaab /sw
parent0a296eee23380275ec7bad1dff8d81b75d98429f (diff)
tdf#103664: FILEOPEN: DOCX: Wingdings symbols are imported as rectangles
Reviewed-on: https://gerrit.libreoffice.org/30575 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 5ef66db91e87ef84724be22977acf4c9c472ad6b) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: Ifd9ff26f2460e5570ec1b736308d48acdb3e56a8 Reviewed-on: https://gerrit.libreoffice.org/30587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf103664.docxbin0 -> 11444 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx19
2 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf103664.docx b/sw/qa/extras/ooxmlimport/data/tdf103664.docx
new file mode 100644
index 000000000000..4d299a66ea0a
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf103664.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 417af4860b53..13c84379f4b7 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -81,6 +81,7 @@
#include <comphelper/propertysequence.hxx>
#include <svx/svdpage.hxx>
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
+#include <com/sun/star/awt/CharSet.hpp>
#include <bordertest.hxx>
@@ -3251,6 +3252,24 @@ DECLARE_OOXMLIMPORT_TEST(testTdf100830, "tdf100830.docx")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(30), getProperty<sal_Int16>(getShape(1), "FillTransparence"));
}
+DECLARE_OOXMLIMPORT_TEST(testTdf103664, "tdf103664.docx")
+{
+ // Wingdings symbols were displayed as rectangles
+ uno::Reference<text::XTextRange> xPara(getParagraph(1));
+ CPPUNIT_ASSERT_EQUAL(sal_Unicode(0xf020), xPara->getString()[0] );
+ CPPUNIT_ASSERT_EQUAL(sal_Unicode(0xf0fc), xPara->getString()[1] );
+ CPPUNIT_ASSERT_EQUAL(sal_Unicode(0xf0dc), xPara->getString()[2] );
+ CPPUNIT_ASSERT_EQUAL(sal_Unicode(0xf081), xPara->getString()[3] );
+
+ uno::Reference<beans::XPropertySet> xRun(getRun(xPara,1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty<OUString>(xRun, "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty<OUString>(xRun, "CharFontNameAsian"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty<OUString>(xRun, "CharFontNameComplex"));
+
+ // Make sure these special characters are imported as symbols
+ CPPUNIT_ASSERT_EQUAL(awt::CharSet::SYMBOL, getProperty<sal_Int16>(xRun, "CharFontCharSet"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */