From d618ea6b86711470b7f5ace94b95f15a4ba87325 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 25 Feb 2014 12:26:19 +0100 Subject: xmloff: import/export loext:rel-width/height-rel for Writer shapes Change-Id: Ie6e4367a235038479287530bd08b0a89c6bb498b --- sw/qa/extras/odfexport/odfexport.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sw/qa/extras/odfexport') diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 3d2450f4cb92..e6aaa409cfcb 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -353,9 +353,15 @@ DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, "textframe-vertadjust.odt") DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt") { + uno::Reference xShape = getShape(1); // 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")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(40), getProperty(xShape, "RelativeWidth")); + CPPUNIT_ASSERT_EQUAL(sal_Int16(20), getProperty(xShape, "RelativeHeight")); + + // Relation was "page" for both width and height, should be "paragraph" for width. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty(xShape, "RelativeWidthRelation")); + // And make sure that height stays "page". + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty(xShape, "RelativeHeightRelation")); } #endif -- cgit v1.2.3