summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-24 16:42:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-01-27 20:58:35 +0100
commit8932ada4d8841499aa809f6b29efc1402fe95c1e (patch)
tree5ce8a2d8597bfbc3db396f5f4c74fe4e3d0b1309 /sw
parente62058cddd3a55707abd022cddae5b30866e21ca (diff)
tdf#115153 writerfilter: RTF import: fix vert orient of Word 6 shapes
The bugdoc is affected by the change of default vertical alignment; apparently it's not even possible to set the vertical alignment of a Word 6 drawing object (\do) so we have to set the Word default. (regression from c79467ba954987f1d239c594c1e1b3af3f5515f6) (cherry picked from commit dc16cc0492ba96007078cc285fee1a8d03f40d55) tdf#115153 the missing test document (cherry picked from commit b7f12d8fd7493a7201ae5fd97e80e0296538f136) Change-Id: I4084a7a7e2a55f864cb569e04632e034d59eefdb Reviewed-on: https://gerrit.libreoffice.org/48524 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/tdf115153.rtf9
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx14
2 files changed, 23 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf115153.rtf b/sw/qa/extras/rtfimport/data/tdf115153.rtf
new file mode 100644
index 000000000000..b80487072e54
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf115153.rtf
@@ -0,0 +1,9 @@
+{\rtf\ansi\ansicpg1251
+{\info {\author Oracle Reports} }
+\paperw11340\paperh16840\margl0\margr0\margt460\margb1240
+
+
+{\do \dobxpage\dobypage \dpline \dplinew0 \dpptx0 \dppty728 \dpptx0 \dppty0 \dpx1436 \dpy1208 \dpxsize0 \dpysize728
+}
+
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 49733991b16b..b71a21f901d8 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -705,6 +705,20 @@ DECLARE_RTFIMPORT_TEST(testGroupshapeRotation, "groupshape-rotation.rtf")
CPPUNIT_ASSERT_EQUAL(sal_Int32(315 * 100), getProperty<sal_Int32>(getShape(1), "RotateAngle"));
}
+DECLARE_RTFIMPORT_TEST(testTdf115153, "tdf115153.rtf")
+{
+ auto const xShape(getShape(1));
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::NONE, getProperty<sal_Int16>(xShape, "HoriOrient"));
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME,
+ getProperty<sal_Int16>(xShape, "HoriOrientRelation"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2533), getProperty<sal_Int32>(xShape, "HoriOrientPosition"));
+ // VertOrient was wrong
+ CPPUNIT_ASSERT_EQUAL(text::VertOrientation::NONE, getProperty<sal_Int16>(xShape, "VertOrient"));
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME,
+ getProperty<sal_Int16>(xShape, "VertOrientRelation"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2131), getProperty<sal_Int32>(xShape, "VertOrientPosition"));
+}
+
DECLARE_RTFIMPORT_TEST(testFdo68291, "fdo68291.odt")
{
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);