From c8e3fea4996436d1fd608cf5ef0fdc18f5a8fd7f Mon Sep 17 00:00:00 2001 From: Grzegorz Araminowicz Date: Tue, 6 Jun 2017 08:53:39 +0200 Subject: GSoC: import VML shape adjustments Change-Id: Ifcd49f34b889b34eba2464de6e083f9021633bc6 Reviewed-on: https://gerrit.libreoffice.org/38427 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky --- sw/qa/extras/ooxmlimport/data/vml-adjustments.docx | Bin 0 -> 12987 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100755 sw/qa/extras/ooxmlimport/data/vml-adjustments.docx (limited to 'sw/qa') diff --git a/sw/qa/extras/ooxmlimport/data/vml-adjustments.docx b/sw/qa/extras/ooxmlimport/data/vml-adjustments.docx new file mode 100755 index 000000000000..eac08e966c87 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/vml-adjustments.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 4f76f5f321cb..673a2b5861cc 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -1290,6 +1291,16 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108408, "tdf108408.docx") CPPUNIT_ASSERT_EQUAL(double(20), getProperty(xRun, "CharHeight")); } +DECLARE_OOXMLIMPORT_TEST(testVmlAdjustments, "vml-adjustments.docx") +{ + uno::Reference xPropertySet(getShape(1), uno::UNO_QUERY); + comphelper::SequenceAsHashMap aGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry")); + uno::Sequence aAdjustmentValues = + aGeometry["AdjustmentValues"].get>(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aAdjustmentValues.getLength()); + drawing::EnhancedCustomShapeAdjustmentValue aAdjustmentValue = *aAdjustmentValues.begin(); + CPPUNIT_ASSERT_EQUAL(sal_Int32(17639), aAdjustmentValue.Value.get()); +} // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT -- cgit