sw/source/core/access/AccessibilityCheck.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 061394b6dfb8b2bcf6a2d4485751eb7443a8c081
Author:     Ivan Stefanenko <ivan.stefane...@collabora.com>
AuthorDate: Wed Aug 26 14:52:36 2020 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri Aug 28 13:21:39 2020 +0200

    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.kagan...@collabora.com>
    Tested-by: Jenkins

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))
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to