diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-02-20 13:22:33 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-02-21 09:28:25 +0100 |
commit | 756d0b1dff3cb5c3cab10c1f14e4dae6ac3ba135 (patch) | |
tree | 8594ab1ace7a551f5bfc5b1a4e04f03c7aa52118 /sw | |
parent | drawingML export: gradient fill defined by imported theme (diff) | |
download | core-756d0b1dff3cb5c3cab10c1f14e4dae6ac3ba135.tar.gz core-756d0b1dff3cb5c3cab10c1f14e4dae6ac3ba135.zip |
drawingML import: run fonts inside group shape
Change-Id: Ib54fe868c11c0c22b85d8821fa7274c80918362c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/dml-groupshape-runfonts.docx | bin | 0 -> 16971 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/dml-groupshape-runfonts.docx b/sw/qa/extras/ooxmlimport/data/dml-groupshape-runfonts.docx Binary files differnew file mode 100644 index 000000000000..e4c8c6cb575f --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/dml-groupshape-runfonts.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index acfe4ea44bb8..5f41a1d9330f 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1881,6 +1881,16 @@ DECLARE_OOXMLIMPORT_TEST(testAnnotationFormatting, "annotation-formatting.docx") CPPUNIT_ASSERT_EQUAL(awt::FontUnderline::SINGLE, getProperty<sal_Int16>(getRun(xParagraph, 1), "CharUnderline")); } +DECLARE_OOXMLIMPORT_TEST(testDMLGroupShapeRunFonts, "dml-groupshape-runfonts.docx") +{ + // Fonts defined by w:rFonts was not imported and so the font specified by a:fontRef was used. + uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY); + uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(1), uno::UNO_QUERY)->getText(); + uno::Reference<text::XTextRange> xRun = getRun(getParagraphOfText(1, xText),1); + CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(xRun, "CharFontName")); + CPPUNIT_ASSERT_EQUAL(OUString("Arial Unicode MS"), getProperty<OUString>(xRun, "CharFontNameComplex")); + CPPUNIT_ASSERT_EQUAL(OUString("MS Mincho"), getProperty<OUString>(xRun, "CharFontNameAsian")); +} #endif CPPUNIT_PLUGIN_IMPLEMENT(); |