diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-05-17 11:28:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-05-17 21:03:12 +0200 |
commit | 649313625b94e6b879848fc19b607b74375100bf (patch) | |
tree | daa8993fe967cbfdad18aabac1635f7ded1977c2 /xmloff/source/forms | |
parent | 3a667101987ccbc75024942d779c8c62a4d0a296 (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/source/forms')
-rw-r--r-- | xmloff/source/forms/propertyimport.cxx | 5 |
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); } |