summaryrefslogtreecommitdiff
path: root/xmloff
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 /xmloff
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 'xmloff')
-rw-r--r--xmloff/source/forms/propertyimport.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index 3b15dcd69f40..d133e01a1d63 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -28,6 +28,7 @@
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmluconv.hxx>
#include <xmloff/nmspmap.hxx>
+#include <o3tl/temporary.hxx>
#include <osl/diagnose.h>
#include <comphelper/extract.hxx>
#include "callbacks.hxx"
@@ -186,9 +187,7 @@ Any PropertyConversion::convertString( const css::uno::Type& _rExpectedType,
{
case TYPE_DATE:
{
- double dummy;
- (void) dummy; // avoid warning C4101 with some over-eager MSVC
- OSL_ENSURE(std::modf(nValue, &dummy) == 0,
+ OSL_ENSURE(std::modf(nValue, &o3tl::temporary(double())) == 0,
"PropertyConversion::convertString: a Date value with a fractional part?");
aReturn <<= lcl_getDate(nValue);
}