Kaydet (Commit) 203e3c0f authored tarafından Mark Hung's avatar Mark Hung Kaydeden (comit) Miklos Vajna

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/16604Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst d16d9f95
This diff was suppressed by a .gitattributes entry.
...@@ -452,6 +452,14 @@ DECLARE_WW8EXPORT_TEST(testWw8Cjklist35, "cjklist35.doc") ...@@ -452,6 +452,14 @@ DECLARE_WW8EXPORT_TEST(testWw8Cjklist35, "cjklist35.doc")
CPPUNIT_ASSERT_EQUAL(style::NumberingType::NUMBER_LOWER_ZH, numFormat); 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") DECLARE_WW8EXPORT_TEST(testCommentedTable, "commented-table.doc")
{ {
// Document has a non-trivial commented text range, as the range contains a table. // Document has a non-trivial commented text range, as the range contains a table.
......
...@@ -2779,6 +2779,8 @@ void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen ...@@ -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. //themselves so they don't need to add it to the stack either.
if (SetNewFontAttr(SVBT16ToShort( pData ), false, RES_CHRATR_FONT)) 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 ) if( m_bVer67 )
{ {
//convert single byte from MS1252 to Unicode //convert single byte from MS1252 to Unicode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment