[Libreoffice-commits] core.git: sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Tue Jul 10 07:20:41 UTC 2018
sw/qa/extras/rtfimport/data/posh-leftright.rtf | 45 +++++++++++++++++++++++++
sw/qa/extras/rtfimport/rtfimport.cxx | 8 ++++
2 files changed, 53 insertions(+)
New commits:
commit 87b621a1262d2e57b770bc4c6e80e51f99441f58
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Jul 9 22:00:46 2018 +0200
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 at collabora.co.uk>
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.
More information about the Libreoffice-commits
mailing list