summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-25 11:47:32 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-25 12:11:41 +0100
commit4da81e4a0bda96c3d25aa22341f94b58e584cefb (patch)
tree749c25bfda9ef2a6ba42e5b2f18a3ba700c92046 /sw/qa/extras/odfexport
parentea7685ce69e8e52ad214c3737ce77ce6564ae1b6 (diff)
xmloff: import style:rel-width/height for drawinglayer shapes
In case the underlying UNO object supports that, which is the case for Writer. Export was already working before. Change-Id: I4676c8349ebe1959da004d6e1a024a342da45049
Diffstat (limited to 'sw/qa/extras/odfexport')
-rwxr-xr-xsw/qa/extras/odfexport/data/shape-relsize.odtbin0 -> 10706 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx8
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/shape-relsize.odt b/sw/qa/extras/odfexport/data/shape-relsize.odt
new file mode 100755
index 000000000000..05a3ffa591ff
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/shape-relsize.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index db752040e4a9..3d2450f4cb92 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -350,6 +350,14 @@ DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, "textframe-vertadjust.odt")
xFrame.set(getTextFrameByName("Rectangle 3"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust"));
}
+
+DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt")
+{
+ // These were all 0, as style:rel-width/height was ignored on import for shapes.
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(40), getProperty<sal_Int16>(getShape(1), "RelativeWidth"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(20), getProperty<sal_Int16>(getShape(1), "RelativeHeight"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();