summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2015-06-29 21:59:23 +0800
committerCaolán McNamara <caolanm@redhat.com>2015-07-09 07:43:21 +0000
commit991dd34d66dada90de0f5eb8f28deb74af8c5851 (patch)
treedb868b63b23dbd855ddd0bb8ac832da733c4d843
parentfdefb34fc82a8dea8e78130c95109e81816fcb9f (diff)
tdf#92281 - FILEOPEN: Only western font is set for symbols in DOC files
Inserting a symbol in Writer set all fonts including CJK and CTL to the same one. This patch makes the behavior consistent with that, allows CJK and CTL user to see the symbols. Change-Id: I7a61868e8078c81c68e471760f080b3ce7df589f Reviewed-on: https://gerrit.libreoffice.org/16604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/16871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/qa/extras/ww8export/data/tdf92281.docbin0 -> 26112 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx2
3 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf92281.doc b/sw/qa/extras/ww8export/data/tdf92281.doc
new file mode 100644
index 000000000000..2893eb37ab00
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf92281.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index e1626cd5f60c..cdf6d14f361a 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -452,6 +452,14 @@ DECLARE_WW8EXPORT_TEST(testWw8Cjklist35, "cjklist35.doc")
CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_LOWER_ZH, numFormat);
}
+DECLARE_WW8EXPORT_TEST(testTdf92281, "tdf92281.doc")
+{
+ uno::Reference<beans::XPropertySet> xRun(getRun(getParagraph(1),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"));
+}
+
DECLARE_WW8EXPORT_TEST(testCommentedTable, "commented-table.doc")
{
// Document has a non-trivial commented text range, as the range contains a table.
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 267cd7909a00..86281ac64915 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2779,6 +2779,8 @@ void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen
//themselves so they don't need to add it to the stack either.
if (SetNewFontAttr(SVBT16ToShort( pData ), false, RES_CHRATR_FONT))
{
+ SetNewFontAttr(SVBT16ToShort( pData ), false, RES_CHRATR_CJK_FONT);
+ SetNewFontAttr(SVBT16ToShort( pData ), false, RES_CHRATR_CTL_FONT);
if( m_bVer67 )
{
//convert single byte from MS1252 to Unicode