summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xepivotxml.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-05-17 11:28:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-05-17 21:03:12 +0200
commit649313625b94e6b879848fc19b607b74375100bf (patch)
treedaa8993fe967cbfdad18aabac1635f7ded1977c2 /sc/source/filter/excel/xepivotxml.cxx
parent3a667101987ccbc75024942d779c8c62a4d0a296 (diff)
New o3tl::temporary to simplify calls of std::modf
...that ignore the out-parameter integral part Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca Reviewed-on: https://gerrit.libreoffice.org/54474 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/filter/excel/xepivotxml.cxx')
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index ffa2eb724f84..004f9938a72a 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -15,6 +15,7 @@
#include <document.hxx>
#include <generalfunction.hxx>
+#include <o3tl/temporary.hxx>
#include <oox/export/utils.hxx>
#include <oox/token/namespaces.hxx>
#include <sax/tools/converter.hxx>
@@ -263,7 +264,6 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
double fMin = std::numeric_limits<double>::infinity(), fMax = -std::numeric_limits<double>::infinity();
bool isValueInteger = true;
bool isContainsDate = rCache.IsDateDimension(i);
- double intpart;
for (; it != itEnd; ++it)
{
ScDPItemData::Type eType = it->GetType();
@@ -275,7 +275,7 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
fMax = std::max(fMax, fVal);
// Check if all values are integers
- if (isValueInteger && (modf(fVal, &intpart) != 0.0))
+ if (isValueInteger && (modf(fVal, &o3tl::temporary(double())) != 0.0))
{
isValueInteger = false;
}