sw/qa/extras/rtfexport/data/tdf114303.rtf |   11 +++++++++++
 sw/qa/extras/rtfexport/rtfexport4.cxx     |   13 +++++++++++++
 2 files changed, 24 insertions(+)

New commits:
commit 187bf06aabf1b730cfcd47cbdf976f58b4960dcb
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Apr 13 16:46:33 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Apr 14 00:41:51 2022 +0200

    tdf#114303: sw_rtfexport4: Add unittest
    
    Change-Id: Id07c834a58db7aedada8a923a464f554f30f3013
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132973
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/extras/rtfexport/data/tdf114303.rtf 
b/sw/qa/extras/rtfexport/data/tdf114303.rtf
new file mode 100644
index 000000000000..78f866fc5d52
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf114303.rtf
@@ -0,0 +1,11 @@
+{\rtf1\ansi\deff0
+{\fonttbl
+{\f0\fnil\fcharset204\fprq0\cpg1251 Arial;}
+{\f1\fnil\fcharset204\fprq0\cpg1251 Times New Roman;}
+{\f2\fnil\fcharset204\fprq0\cpg1251 Courier New;}
+}
+{\*\viewkind1}{\*\viewscale100}\margl0\margr0\margt0\margb0
+\paperw11905\paperh16837
+{\shp{\*\shpinst\shpleft1120\shptop8200\shpright11320\shpbottom8200\shpfhdr0\shpbxpage\shpbypage\shpwr3\shpwrk0\shpfblwtxt1\shpz0{\sp{\sn
 shapeType}{\sv 20}}}}
+{\par\plain\par
+}}
diff --git a/sw/qa/extras/rtfexport/rtfexport4.cxx 
b/sw/qa/extras/rtfexport/rtfexport4.cxx
index c2af71a93f63..276bdd963b26 100644
--- a/sw/qa/extras/rtfexport/rtfexport4.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport4.cxx
@@ -15,6 +15,7 @@
 #include <com/sun/star/text/XDocumentIndex.hpp>
 #include <com/sun/star/style/ParagraphAdjust.hpp>
 #include <com/sun/star/style/TabStop.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
 #include <com/sun/star/text/XTextTable.hpp>
 #include <o3tl/cppunittraitshelper.hxx>
 
@@ -249,6 +250,18 @@ DECLARE_RTFEXPORT_TEST(testBtlrCell, "btlr-cell.rtf")
     CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, 
getProperty<sal_Int16>(xC1, "WritingMode"));
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf114303, "tdf114303.rtf")
+{
+    CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::NONE,
+                         getProperty<sal_Int16>(getShape(1), "HoriOrient"));
+
+    // Without the fix in place, this test would have failed with
+    // - Expected: 0
+    // - Actual  : 1
+    CPPUNIT_ASSERT_EQUAL(text::VertOrientation::NONE,
+                         getProperty<sal_Int16>(getShape(1), "VertOrient"));
+}
+
 DECLARE_RTFEXPORT_TEST(testTbrlFrame, "tbrl-frame.odt")
 {
     CPPUNIT_ASSERT_EQUAL(1, getShapes());

Reply via email to