summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-19 16:55:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-20 19:53:39 +0200
commitf90c2001eb8f6d41e90fa347bf5a707bbefb6f43 (patch)
tree0dda65a7c6f8dfb78f59ba350bd26b08f3f7294a /xmloff
parentc2b33fec70f0f4c79584db119ecd565af3a5b28e (diff)
pvs-studio: Expression '!bWasSetTypeAttribute' is always true.
Change-Id: I605bbc117426bba3dae9a8ec3ffc45967edbf7c4 Reviewed-on: https://gerrit.libreoffice.org/62060 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/numehelp.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index b678d559a277..db9e1d8dac6e 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -105,11 +105,8 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp
case util::NumberFormat::SCIENTIFIC:
case util::NumberFormat::FRACTION:
{
- if (!bWasSetTypeAttribute)
- {
- rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT);
- bWasSetTypeAttribute = true;
- }
+ rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT);
+ bWasSetTypeAttribute = true;
SAL_FALLTHROUGH;
}
case util::NumberFormat::PERCENT:
@@ -374,11 +371,8 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(
case util::NumberFormat::SCIENTIFIC:
case util::NumberFormat::FRACTION:
{
- if (!bWasSetTypeAttribute)
- {
- pExport->AddAttribute(sAttrValType, XML_FLOAT);
- bWasSetTypeAttribute = true;
- }
+ pExport->AddAttribute(sAttrValType, XML_FLOAT);
+ bWasSetTypeAttribute = true;
SAL_FALLTHROUGH;
}
case util::NumberFormat::PERCENT: