summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorGrzegorz Araminowicz <g.araminowicz@gmail.com>2017-06-06 08:53:39 +0200
committerJan Holesovsky <kendy@collabora.com>2017-06-09 16:28:11 +0200
commitc8e3fea4996436d1fd608cf5ef0fdc18f5a8fd7f (patch)
tree4a29ae2713515c47afa87a3b2b64445e6a5099f2 /sw
parent9614f12bae668dfe848ae6cc0bac091be106fa8e (diff)
GSoC: import VML shape adjustments
Change-Id: Ifcd49f34b889b34eba2464de6e083f9021633bc6 Reviewed-on: https://gerrit.libreoffice.org/38427 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/vml-adjustments.docxbin0 -> 12987 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
2 files changed, 11 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/vml-adjustments.docx
Binary files 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 <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
#include <com/sun/star/drawing/GraphicExportFilter.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
@@ -1290,6 +1291,16 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108408, "tdf108408.docx")
CPPUNIT_ASSERT_EQUAL(double(20), getProperty<double>(xRun, "CharHeight"));
}
+DECLARE_OOXMLIMPORT_TEST(testVmlAdjustments, "vml-adjustments.docx")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
+ comphelper::SequenceAsHashMap aGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
+ uno::Sequence<drawing::EnhancedCustomShapeAdjustmentValue> aAdjustmentValues =
+ aGeometry["AdjustmentValues"].get<uno::Sequence<drawing::EnhancedCustomShapeAdjustmentValue>>();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aAdjustmentValues.getLength());
+ drawing::EnhancedCustomShapeAdjustmentValue aAdjustmentValue = *aAdjustmentValues.begin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(17639), aAdjustmentValue.Value.get<sal_Int32>());
+}
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT