diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-30 15:37:37 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-30 15:56:58 +0100 |
commit | 1af6cf096ade2276b364aff8d465f8782f77db53 (patch) | |
tree | 3e527c6f621b364379f65238af5836abadef3729 /sw/qa/extras/ooxmlimport | |
parent | bcfa89158e1ce8cecf9c078ef852225180472a55 (diff) |
DOCX import: round wp14:pctWidth/Height
sw core supports integers only ATM, so at least let e.g. 9.8 be 10, not
9.
Change-Id: I94842d7190bfa264f0fa0331d7418c411ef191d9
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/rel-size-round.docx | bin | 0 -> 15098 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/rel-size-round.docx b/sw/qa/extras/ooxmlimport/data/rel-size-round.docx Binary files differnew file mode 100755 index 000000000000..ccd076a15e48 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/rel-size-round.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index bfcaa267549d..c2f3c9570447 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1748,6 +1748,12 @@ DECLARE_OOXMLIMPORT_TEST(testPageRelSize, "pagerelsize.docx") CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty<sal_Int16>(xTextFrame, "RelativeWidthRelation")); } +DECLARE_OOXMLIMPORT_TEST(testRelSizeRound, "rel-size-round.docx") +{ + // This was 9: 9.8 was imported as 9 instead of being rounded to 10. + CPPUNIT_ASSERT_EQUAL(sal_Int16(10), getProperty<sal_Int16>(getShape(1), "RelativeHeight")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |