diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-07-09 22:00:46 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-07-10 09:20:20 +0200 |
commit | 87b621a1262d2e57b770bc4c6e80e51f99441f58 (patch) | |
tree | 426a0f64e5e039cdea6bd8767e5de40bae77fe95 /sw/qa | |
parent | ab3e7a234fb6e55274159952743d6c937c7c3f7c (diff) |
sw RTF import: add tests for shape prop posh left/right cases
Center was already tested, lcov says.
Change-Id: I10707a7a6318f3a8268db365f703485418ce7d51
Reviewed-on: https://gerrit.libreoffice.org/57204
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/rtfimport/data/posh-leftright.rtf | 45 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 8 |
2 files changed, 53 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/posh-leftright.rtf b/sw/qa/extras/rtfimport/data/posh-leftright.rtf new file mode 100644 index 000000000000..2c8c09ead541 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/posh-leftright.rtf @@ -0,0 +1,45 @@ +{\rtf1 +{\shp +{\*\shpinst\shpleft0\shptop0\shpright3727\shpbottom2212\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026 +{\sp +{\sn shapeType} +{\sv 202} +} +{\shptxt left} +{\sp +{\sn fFitShapeToText} +{\sv 1} +} +{\sp +{\sn posh} +{\sv 1} +} +{\sp +{\sn posv} +{\sv 2} +} +} +} +{\shp +{\*\shpinst\shpleft0\shptop0\shpright3727\shpbottom2212\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026 +{\sp +{\sn shapeType} +{\sv 202} +} +{\shptxt right} +{\sp +{\sn fFitShapeToText} +{\sv 1} +} +{\sp +{\sn posh} +{\sv 3} +} +{\sp +{\sn posv} +{\sv 2} +} +} +} +\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index ab7df4cdcf31..664f3edb9589 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -550,6 +550,14 @@ DECLARE_RTFIMPORT_TEST(testPoshPosv, "posh-posv.rtf") CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "FrameIsAutomaticHeight")); } +DECLARE_RTFIMPORT_TEST(testPoshLeftRight, "posh-leftright.rtf") +{ + CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::RIGHT, + getProperty<sal_Int16>(getShape(1), "HoriOrient")); + CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::LEFT, + getProperty<sal_Int16>(getShape(2), "HoriOrient")); +} + DECLARE_RTFIMPORT_TEST(testTdf96326, "tdf96326.rtf") { // Make sure this is not checked. |