summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/source/sheet/shape.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/source/sheet/shape.cxx b/test/source/sheet/shape.cxx
index e9d26af4a2a0..ac50a1a11223 100644
--- a/test/source/sheet/shape.cxx
+++ b/test/source/sheet/shape.cxx
@@ -48,6 +48,15 @@ void Shape::testShapeProperties()
CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue Anchor (XCell)",
xShape->getPropertyValue("Anchor") >>= xCellGet);
+ // Shape should not resize with cell by default
+ bool bIsResizeWithCell;
+ xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell;
+ CPPUNIT_ASSERT_MESSAGE("Shape should not resize with the cell", !bIsResizeWithCell);
+
+ xShape->setPropertyValue("ResizeWithCell", uno::Any(true));
+ xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell;
+ CPPUNIT_ASSERT_MESSAGE("Shape should resize with the cell", bIsResizeWithCell);
+
// Now anchor to sheet again
aNewValue <<= xSheet;
xShape->setPropertyValue("Anchor", aNewValue);
@@ -55,6 +64,15 @@ void Shape::testShapeProperties()
CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue Anchor (XSpreadsheet)",
xShape->getPropertyValue("Anchor") >>= xSheetGet);
+ // Setting ResizeWithCell while anchored to page should not have any effect
+ xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell;
+ CPPUNIT_ASSERT_MESSAGE("ResizeWithCell should be false for sheet anchored shapes",
+ !bIsResizeWithCell);
+ xShape->setPropertyValue("ResizeWithCell", uno::Any(true));
+ xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell;
+ CPPUNIT_ASSERT_MESSAGE("ResizeWithCell should be unchangeable for sheet anchored shapes",
+ !bIsResizeWithCell);
+
sal_Int32 nHoriOrientPositionGet = 0;
sal_Int32 nHoriOrientPositionSet = 0;
CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue HoriOrientPosition",