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>
This commit is contained in:
@@ -78,7 +78,7 @@ void CaptionShape::testCaptionShapeProperties()
|
||||
captionIsFixedAngleSet, !captionIsFixedAngleGet);
|
||||
|
||||
propName = "CaptionAngle";
|
||||
sal_Int32 captionAngleGet;
|
||||
sal_Int32 captionAngleGet = {};
|
||||
CPPUNIT_ASSERT_MESSAGE("Unable to get the PropertyValue of CaptionAngle",
|
||||
xCaptionShape->getPropertyValue(propName) >>= captionAngleGet);
|
||||
|
||||
@@ -90,7 +90,7 @@ void CaptionShape::testCaptionShapeProperties()
|
||||
captionAngleGet + 5);
|
||||
|
||||
propName = "CaptionGap";
|
||||
sal_Int32 captionGapGet;
|
||||
sal_Int32 captionGapGet = {};
|
||||
CPPUNIT_ASSERT_MESSAGE("Unable to get the PropertyValue of CaptionGap",
|
||||
xCaptionShape->getPropertyValue(propName) >>= captionGapGet);
|
||||
|
||||
@@ -102,7 +102,7 @@ void CaptionShape::testCaptionShapeProperties()
|
||||
captionGapGet + 5);
|
||||
|
||||
propName = "CaptionEscapeDirection";
|
||||
sal_Int32 captionEscapeDirectionGet;
|
||||
sal_Int32 captionEscapeDirectionGet = {};
|
||||
CPPUNIT_ASSERT_MESSAGE("Unable to get the PropertyValue of CaptionEscapeDirection",
|
||||
xCaptionShape->getPropertyValue(propName) >>= captionEscapeDirectionGet);
|
||||
|
||||
@@ -127,7 +127,7 @@ void CaptionShape::testCaptionShapeProperties()
|
||||
captionIsEscapeRelativeSet, !captionIsEscapeRelativeGet);
|
||||
|
||||
propName = "CaptionEscapeRelative";
|
||||
sal_Int32 captionEscapeRelativeGet;
|
||||
sal_Int32 captionEscapeRelativeGet = {};
|
||||
CPPUNIT_ASSERT_MESSAGE("Unable to get the PropertyValue of CaptionEscapeRelative",
|
||||
xCaptionShape->getPropertyValue(propName) >>= captionEscapeRelativeGet);
|
||||
|
||||
@@ -139,7 +139,7 @@ void CaptionShape::testCaptionShapeProperties()
|
||||
captionEscapeRelativeSet, captionEscapeRelativeGet + 5);
|
||||
|
||||
propName = "CaptionEscapeAbsolute";
|
||||
sal_Int32 captionEscapeAbsoluteGet;
|
||||
sal_Int32 captionEscapeAbsoluteGet = {};
|
||||
CPPUNIT_ASSERT_MESSAGE("Unable to get the PropertyValue of CaptionEscapeAbsolute",
|
||||
xCaptionShape->getPropertyValue(propName) >>= captionEscapeAbsoluteGet);
|
||||
|
||||
@@ -151,7 +151,7 @@ void CaptionShape::testCaptionShapeProperties()
|
||||
captionEscapeAbsoluteSet, captionEscapeAbsoluteGet + 5);
|
||||
|
||||
propName = "CaptionLineLength";
|
||||
sal_Int32 captionLineLengthGet;
|
||||
sal_Int32 captionLineLengthGet = {};
|
||||
CPPUNIT_ASSERT_MESSAGE("Unable to get the PropertyValue of CaptionLineLength",
|
||||
xCaptionShape->getPropertyValue(propName) >>= captionLineLengthGet);
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ void testPrinterIndependentLayout(css::uno::Reference<css::beans::XPropertySet>
|
||||
if (!extstsProperty(rxSettings, rPropertyName))
|
||||
return; // Property is optional
|
||||
|
||||
sal_Int16 aValue_Get;
|
||||
sal_Int16 aValue_Get = {};
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("Unable to get PropertyValue",
|
||||
rxSettings->getPropertyValue(rPropertyName) >>= aValue_Get);
|
||||
|
Reference in New Issue
Block a user