summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2020-05-08 10:32:09 +0200
committerLászló Németh <nemeth@numbertext.org>2020-05-18 10:51:03 +0200
commit52442a4c0192cbedafe7b77459dd2c3d1cf3614b (patch)
tree0cf519c16121ed6d0c7a230b4043e1217f1c7a1f /sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
parenta782cce919952cff41c7cfa7ec3a6a915e1851aa (diff)
tdf#123622 DOCX VML import: fix relative horizontal alignment
Margin (left, right, inner, outer) alignments of VML shapes weren't handled. Co-authored-by: Attila Bakos (NISZ) Change-Id: I5f8ece64707a2d699b71d6151887db05ac39c4f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93723 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport14.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index cf6d3f6e2671..a591a3caa8fe 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -44,7 +44,7 @@ protected:
}
};
-DECLARE_OOXMLIMPORT_TEST(Tdf130907,"tdf130907.docx")
+DECLARE_OOXMLIMPORT_TEST(Tdf130907, "tdf130907.docx")
{
uno::Reference<text::XTextRange> xPara1 = getParagraph(2);
CPPUNIT_ASSERT(xPara1.is());
@@ -74,6 +74,19 @@ DECLARE_OOXMLIMPORT_TEST(Tdf130907,"tdf130907.docx")
sal_Int16(style::ParagraphAdjust::ParagraphAdjust_RIGHT), nHOri3);
}
+DECLARE_OOXMLIMPORT_TEST(testTdf123622, "tdf123622.docx")
+{
+ uno::Reference<beans::XPropertySet> XPropsRight(getShape(1),uno::UNO_QUERY);
+ sal_Int16 nRelativePosR = 0;
+ XPropsRight->getPropertyValue("HoriOrientRelation")>>=nRelativePosR;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape inside the margin", sal_Int16(4), nRelativePosR);
+
+ uno::Reference<beans::XPropertySet> XPropsLeft(getShape(2), uno::UNO_QUERY);
+ sal_Int16 nRelativePosL = 0;
+ XPropsLeft->getPropertyValue("HoriOrientRelation") >>= nRelativePosL;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape inside the margin", sal_Int16(3), nRelativePosL);
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf78749, "tdf78749.docx")
{
//Shape lost the background image before, now check if it still has...