summaryrefslogtreecommitdiff
path: root/test/source/sheet
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-03 13:17:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-03 19:42:51 +0100
commit815fad1e55ebd3f1e98a2e062af2d59caed2ac3e (patch)
treef755c5f9bfa12705253eefc4db69fad699cbb1be /test/source/sheet
parent0cf64cf29c43ae60c91dab53b99045986cd79038 (diff)
Silence false -Werror=maybe-uninitialized
...where success of >>= has already been checked with CPPUNIT_ASSERT Change-Id: I9aa553749988b6b2e26d9a5ac5b376cc5997aba7 Reviewed-on: https://gerrit.libreoffice.org/84335 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'test/source/sheet')
-rw-r--r--test/source/sheet/shape.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/source/sheet/shape.cxx b/test/source/sheet/shape.cxx
index b147ad1ee28c..9e291be2650b 100644
--- a/test/source/sheet/shape.cxx
+++ b/test/source/sheet/shape.cxx
@@ -49,34 +49,34 @@ void Shape::testShapePropertiesAnchor()
xShape->getPropertyValue("Anchor") >>= xCellGet);
// Shape should not resize with cell by default
- bool bIsResizeWithCell;
- xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell;
+ bool bIsResizeWithCell = {};
+ CPPUNIT_ASSERT(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(xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell);
CPPUNIT_ASSERT_MESSAGE("Shape should resize with the cell", bIsResizeWithCell);
// Anchoring to a different cell should keep the "ResizeWithCell" attribute
uno::Reference<table::XCell> xCell2(xSheet->getCellByPosition(1, 2), UNO_SET_THROW);
aNewValue <<= xCell2;
xShape->setPropertyValue("Anchor", aNewValue);
- xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell;
+ CPPUNIT_ASSERT(xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell);
CPPUNIT_ASSERT_MESSAGE("ResizeWithCell should still be set", bIsResizeWithCell);
// Now anchor to sheet again
aNewValue <<= xSheet;
xShape->setPropertyValue("Anchor", aNewValue);
- xShape->getPropertyValue("Anchor") >>= xSheetGet;
+ CPPUNIT_ASSERT(xShape->getPropertyValue("Anchor") >>= xSheetGet);
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(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(xShape->getPropertyValue("ResizeWithCell") >>= bIsResizeWithCell);
CPPUNIT_ASSERT_MESSAGE("ResizeWithCell should be unchangeable for sheet anchored shapes",
!bIsResizeWithCell);
}