summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-01-30 15:37:37 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-30 15:56:58 +0100
commit1af6cf096ade2276b364aff8d465f8782f77db53 (patch)
tree3e527c6f621b364379f65238af5836abadef3729 /sw/qa/extras/ooxmlimport
parentbcfa89158e1ce8cecf9c078ef852225180472a55 (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-xsw/qa/extras/ooxmlimport/data/rel-size-round.docxbin0 -> 15098 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx6
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
new file mode 100755
index 000000000000..ccd076a15e48
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/rel-size-round.docx
Binary files differ
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();