diff options
author | Eike Rathke <erack@redhat.com> | 2016-10-06 17:26:44 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-10-06 20:55:28 +0000 |
commit | a5442b696697e4a24566b1f5b7e5c9bc77a9fd03 (patch) | |
tree | 989ed9b2f781fae584a03392b138e4e7dd27fae3 /xmloff | |
parent | ff085ed8fd6438d855526a8a4d699960e4d3cc73 (diff) |
rtl::math::approxEqual(value,0.0) never yields true for value!=0.0
... so replace with a simple value == 0.0 also in other modules than sc.
Change-Id: Ie7316505a1cf9c15100114b45d300facceb03b7e
Reviewed-on: https://gerrit.libreoffice.org/29575
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/numehelp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index 84288edf105c..9c437ce6f47e 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -185,7 +185,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp } else { - if (::rtl::math::approxEqual( rValue, 0.0 )) + if (rValue == 0.0) { rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE, XML_FALSE); } @@ -454,7 +454,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes( } else { - if (::rtl::math::approxEqual( rValue, 0.0 )) + if (rValue == 0.0) { pExport->AddAttribute(sAttrBooleanValue, XML_FALSE); } diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 291b8d21013f..26cea156ca73 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2616,7 +2616,7 @@ void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName, if (bIsDuration) { // date/time duration handle bOmitDurationIfZero - if (!bOmitDurationIfZero || !::rtl::math::approxEqual(dValue, 0.0)) + if (!bOmitDurationIfZero || dValue != 0.0) { ::sax::Converter::convertDuration(aBuffer, dValue); } |