diff options
author | Mark Hung <marklh9@gmail.com> | 2017-04-23 13:41:32 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2017-04-24 15:53:34 +0200 |
commit | 6030e8f5a42d48a43076bf1e2ddc88b20242e6da (patch) | |
tree | 08bdab352e4fd91be281c9b10ce8d220607ea454 /sw/qa | |
parent | 80486db4b691e9b716840438422b9001573d2a90 (diff) |
tdf107359: imporve line pitch and char pitch importing of writerfilter.
1. Use converted style name to assure the default style is found.
2. Switch off squared-page mode before setting the base text width and height.
3. Ruby text height is not effective per ODF spec.
Change-Id: I0f2901a453a9f7b344cac6989780688cc2d6c7b4
Reviewed-on: https://gerrit.libreoffice.org/36828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf107359-char-pitch.docx | bin | 0 -> 12806 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107359-char-pitch.docx b/sw/qa/extras/ooxmlexport/data/tdf107359-char-pitch.docx Binary files differnew file mode 100644 index 000000000000..970d722d3190 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf107359-char-pitch.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index d751899dee8e..f6a0dc3efa57 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -2172,6 +2172,27 @@ DECLARE_OOXMLEXPORT_TEST( testTablePosition15, "table-position-15.docx" ) } } +DECLARE_OOXMLEXPORT_TEST( testTdf107359, "tdf107359-char-pitch.docx" ) +{ + uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); + + bool bGridSnapToChars; + xPropertySet->getPropertyValue("GridSnapToChars") >>= bGridSnapToChars; + CPPUNIT_ASSERT_EQUAL( false, bGridSnapToChars ); + + sal_Int32 nRubyHeight; + xPropertySet->getPropertyValue("GridRubyHeight") >>= nRubyHeight; + CPPUNIT_ASSERT_EQUAL( sal_Int32(0), nRubyHeight ); + + sal_Int32 nBaseHeight; + xPropertySet->getPropertyValue("GridBaseHeight") >>= nBaseHeight; + CPPUNIT_ASSERT_EQUAL( sal_Int32(convertTwipToMm100(18 * 20)), nBaseHeight ); + + sal_Int32 nBaseWidth; + xPropertySet->getPropertyValue("GridBaseWidth") >>= nBaseWidth; + CPPUNIT_ASSERT_EQUAL( sal_Int32(convertTwipToMm100(24 * 20)), nBaseWidth ); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |