From 4da81e4a0bda96c3d25aa22341f94b58e584cefb Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 25 Feb 2014 11:47:32 +0100 Subject: 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 --- sw/qa/extras/odfexport/data/shape-relsize.odt | Bin 0 -> 10706 bytes sw/qa/extras/odfexport/odfexport.cxx | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100755 sw/qa/extras/odfexport/data/shape-relsize.odt (limited to 'sw/qa/extras/odfexport') 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 Binary files /dev/null and b/sw/qa/extras/odfexport/data/shape-relsize.odt 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(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(getShape(1), "RelativeWidth")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(20), getProperty(getShape(1), "RelativeHeight")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit v1.2.3