summaryrefslogtreecommitdiff
path: root/sw/source/core/access
diff options
context:
space:
mode:
authorIvan Stefanenko <ivan.stefanenko@collabora.com>2020-08-26 14:52:36 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-08-28 13:21:39 +0200
commit061394b6dfb8b2bcf6a2d4485751eb7443a8c081 (patch)
tree67493528c193a83fc47d6fac5d2bce9e974ab620 /sw/source/core/access
parentd336e6c26012255015d3fc0caf8e7fafe14bd8f2 (diff)
tdf#136144: Initialize background colors to COL_AUTO
Default ctor initializes the colors to black. This is incorrect, since in case of absent explicit setting, the actual background color is white. Using COL_AUTO activated the proper fallback mechanism to the default WHITE. Change-Id: Iddc39032f041adc4d419a54b3142b87d4447fb31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101418 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/access')
-rw-r--r--sw/source/core/access/AccessibilityCheck.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx
index b3bb024df39b..55f0e214bbe3 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -338,7 +338,7 @@ private:
void checkTextRange(uno::Reference<text::XTextRange> const& xTextRange,
uno::Reference<text::XTextContent> const& xParagraph, SwTextNode* pTextNode)
{
- sal_Int32 nParaBackColor = {}; // spurious -Werror=maybe-uninitialized
+ sal_Int32 nParaBackColor(COL_AUTO);
uno::Reference<beans::XPropertySet> xParagraphProperties(xParagraph, uno::UNO_QUERY);
if (!(xParagraphProperties->getPropertyValue("ParaBackColor") >>= nParaBackColor))
{
@@ -367,7 +367,7 @@ private:
const XFillStyleItem* pXFillStyleItem(
rPageSet.GetItem<XFillStyleItem>(XATTR_FILLSTYLE, false));
- Color aPageBackground;
+ Color aPageBackground(COL_AUTO);
if (pXFillStyleItem && pXFillStyleItem->GetValue() == css::drawing::FillStyle_SOLID)
{
@@ -376,7 +376,7 @@ private:
aPageBackground = rXFillColorItem->GetColorValue();
}
- sal_Int32 nCharBackColor = {}; // spurious -Werror=maybe-uninitialized
+ sal_Int32 nCharBackColor(COL_AUTO);
if (!(xProperties->getPropertyValue("CharBackColor") >>= nCharBackColor))
{