diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-04-02 08:17:46 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-04-02 15:03:22 +0200 |
commit | 8603d7029b0d62032a5c9d2e039117799be9e798 (patch) | |
tree | 9251ffe24d2c0a733229026af1de1114d24290d3 | |
parent | a67125aa5c5ef8f2a19dcbcad778cd66a304761b (diff) |
tdf#124329 Test setting ResizeWithCell via UNO API
Change-Id: Iab8733e5a5df2b189197df89c3e08cd3463f2ec7
Reviewed-on: https://gerrit.libreoffice.org/70111
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r-- | test/source/sheet/shape.cxx | 18 |
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", |