summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2016-07-10 22:55:51 +0800
committerMark Hung <marklh9@gmail.com>2016-08-05 23:09:43 +0000
commit07966a9999b0b3f27e1adeea1f4c97b3ba2944fa (patch)
tree895a1223b44af0fc45352c85176727d39fed05d9 /sw/qa
parente8932e33123ca84fa16be629461108b6bb50a90a (diff)
tdf#98739 recover CJK and CTL fonts after symbols.
This fix what has been done in 203e3c0f1190473d2e587a0801dc9f3883a6874a , which set CJK and CTL font in SwWW8ImplReader::Read_Symbol but didn't close CJK and CTL fonts in SwWW8ImplReader::ReadChars. Change-Id: I7c1d3b2a284d00a524a61785a5a94ca2d589295e Reviewed-on: https://gerrit.libreoffice.org/27090 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 6ff9590b191a..747f1e4b4d46 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -563,6 +563,21 @@ DECLARE_WW8EXPORT_TEST(testTdf92281, "tdf92281.doc")
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"));
+
+ uno::Reference<text::XText> xXText(getParagraph(1)->getText(), uno::UNO_QUERY);
+ uno::Reference<text::XTextCursor> xCursor( xXText->createTextCursor() , uno::UNO_QUERY );
+
+ xCursor->goRight( 5 , false );
+ uno::Reference< beans::XPropertySet > xPropSet(xCursor, uno::UNO_QUERY);
+ OUString sPMingLiUFont= OUString( sal_Unicode( 26032 ) ) +
+ OUString( sal_Unicode( 32048 ) ) +
+ OUString( sal_Unicode( 26126 ) ) +
+ OUString( sal_Unicode( 39636 ) ) +
+ OUString(";PMingLiU");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Calibri"), getProperty<OUString>(xPropSet, "CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(sPMingLiUFont , getProperty<OUString>(xPropSet, "CharFontNameAsian"));
+ CPPUNIT_ASSERT_EQUAL(OUString("Times New Roman"), getProperty<OUString>(xPropSet, "CharFontNameComplex"));
}
DECLARE_WW8EXPORT_TEST(testCommentedTable, "commented-table.doc")