summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-06-25 13:23:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-06-25 15:15:28 +0200
commit46a5f75799db710c2456f9dc27db201f9a458789 (patch)
tree4ff5563aab3cb2ad11f5850a0a7cec5ec5f608b4 /sw
parentf6fba24f41baab07eb40f4e2787f68df95e989d2 (diff)
-Werror=maybe-uninitialized: may be used uninitialized in this function
Change-Id: Iae4ca4fb760bd0fae8e26e6c77f20159cfb61388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97110 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
index 10277c7eabe4..805a45e37eee 100644
--- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
+++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx
@@ -192,18 +192,18 @@ void WriterInspectorTextPanel::GetPropertyValues(const beans::Property rProperty
rString += (iValue == awt::FontSlant_ITALIC) ? OUStringLiteral("italic")
: OUStringLiteral("normal");
}
- else if ((rAny >>= fValue) || fValue)
+ else if ((rAny >>= fValue) && fValue)
{
if (rString == "CharWeight ")
rString += (fValue > 100) ? OUStringLiteral("bold") : OUStringLiteral("normal");
else
rString += OUString::number((round(fValue * 100)) / 100.00);
}
- else if ((rAny >>= sValue) || sValue)
+ else if ((rAny >>= sValue) && sValue)
{
rString += OUString::number(sValue);
}
- else if ((rAny >>= lValue) || lValue)
+ else if ((rAny >>= lValue) && lValue)
{
if (rString == "CharColor ")
rString += OUString::number(sal_Int16(lValue));