summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport/odfexport.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-25 12:26:19 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-25 12:43:32 +0100
commitd618ea6b86711470b7f5ace94b95f15a4ba87325 (patch)
treee8edc471c272b63f51f99ef964a94f6fb9a8a5ea /sw/qa/extras/odfexport/odfexport.cxx
parentaaf1e86408758ff332bb071e329187b7369be1b2 (diff)
xmloff: import/export loext:rel-width/height-rel for Writer shapes
Change-Id: Ie6e4367a235038479287530bd08b0a89c6bb498b
Diffstat (limited to 'sw/qa/extras/odfexport/odfexport.cxx')
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx10
1 files changed, 8 insertions, 2 deletions
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<drawing::XShape> 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<sal_Int16>(getShape(1), "RelativeWidth"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(20), getProperty<sal_Int16>(getShape(1), "RelativeHeight"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(40), getProperty<sal_Int16>(xShape, "RelativeWidth"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(20), getProperty<sal_Int16>(xShape, "RelativeHeight"));
+
+ // Relation was "page" for both width and height, should be "paragraph" for width.
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty<sal_Int16>(xShape, "RelativeWidthRelation"));
+ // And make sure that height stays "page".
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "RelativeHeightRelation"));
}
#endif