summaryrefslogtreecommitdiff
path: root/include/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-27 21:49:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-27 23:58:53 +0200
commit74ccd02eda2d6325a27266fd935aba29b3d75020 (patch)
treeb5db339494824202fa325f1f1b684fee09d1f751 /include/oox
parentf8fdc6417b4d023b7c75485754a0ab1b164a69d6 (diff)
tdf#107020: Reintroduce uses of I32S, I64S
...that had been removed with 4b788a12380518e31a9064d5839f4880d3f36874 "There should be no need to distinguish between I32S and I64S" (which this commit effectively reverts). I had erroneously assumed that the arguments to I32S and I64S would only be of (signed) integer types, and that it would be irrelevant that they are truncated to sal_Int32 resp. sal_Int64. However, at least oox/source/export/drawingml.cxx called I32S with double values (for which there is an OUString::number overload too), so the resulting strings could be rather different. Change-Id: Ib3887269fad0764740bc9ed3be91f67696a23b55 Reviewed-on: https://gerrit.libreoffice.org/37040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/oox')
-rw-r--r--include/oox/export/utils.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx
index 8e5b814dd908..50e488ec2d6e 100644
--- a/include/oox/export/utils.hxx
+++ b/include/oox/export/utils.hxx
@@ -24,6 +24,12 @@
#include <rtl/textenc.h>
#include <sal/types.h>
+namespace {
+inline OString I32S_(sal_Int32 x) { return OString::number(x); }
+inline OString I64S_(sal_Int64 x) { return OString::number(x); }
+}
+#define I32S(x) I32S_(x).getStr()
+#define I64S(x) I64S_(x).getStr()
#define IS(x) OString::number( x ).getStr()
#define BS(x) (x ? "1":"0")
#define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr()