[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/qa sw/source
Mark Hung
marklh9 at gmail.com
Tue Jul 7 13:17:50 PDT 2015
sw/qa/extras/ww8export/data/tdf92281.doc |binary
sw/qa/extras/ww8export/ww8export.cxx | 8 ++++++++
sw/source/filter/ww8/ww8par6.cxx | 2 ++
3 files changed, 10 insertions(+)
New commits:
commit ef8615158921edaf5f3f6ee61425c25499b3a3d2
Author: Mark Hung <marklh9 at gmail.com>
Date: Mon Jun 29 21:59:23 2015 +0800
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.
Reviewed-on: https://gerrit.libreoffice.org/16604
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Conflicts:
sw/source/filter/ww8/ww8par6.cxx
Change-Id: I7a61868e8078c81c68e471760f080b3ce7df589f
Reviewed-on: https://gerrit.libreoffice.org/16820
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/sw/qa/extras/ww8export/data/tdf92281.doc b/sw/qa/extras/ww8export/data/tdf92281.doc
new file mode 100644
index 0000000..2893eb3
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf92281.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index e03c3cc..81ca031 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -440,6 +440,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 758c292..e0261c5 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2758,6 +2758,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( bVer67 )
{
//convert single byte from MS1252 to Unicode
More information about the Libreoffice-commits
mailing list