summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2016-11-05 12:30:20 +0000
committerTamás Zolnai <tamas.zolnai@collabora.com>2016-11-05 12:30:20 +0000
commit630f06d222c339e86ca3133123931b9262264e3a (patch)
tree1d64bee250e9726a937373d7e06df71451c61766 /sw/qa/extras
parent219b16cffdd1661886fa1e00d3503c42b270a825 (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
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf103664.docxbin0 -> 11444 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx20
2 files changed, 20 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 c3c4728c3763..b70f270176e3 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>
@@ -3246,6 +3247,25 @@ DECLARE_OOXMLIMPORT_TEST(testTdf99074, "tdf99074.docx")
CPPUNIT_ASSERT(getProperty<bool>(xSettings, "InBrowseMode"));
}
+DECLARE_OOXMLIMPORT_TEST(testTdf103664, "tdf103664.docx")
+{
+ // Wingdings symbols was 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 imported as symbols
+ CPPUNIT_ASSERT_EQUAL(awt::CharSet::SYMBOL, getProperty<sal_Int16>(xRun, "CharFontCharSet"));
+}
+
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */