summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-17 16:09:42 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-17 16:09:42 +0200
commit6d249bec487208e56a057ea8a25c34c5d3133a23 (patch)
treee7431acec50c3921d7d86dac225981bb1606b79e /writerfilter
parent51d86c9e62f1b55a2ae7c2fdb2eefc7043a94226 (diff)
UBSan: Don't force sal_Int32/float values into sal_uInt32
...overload of TagLogger::attribute. Not withstanding that function looks just silly anyway. Change-Id: I6cc3c5004884e564aac1397cab6eb6fae7a06f7e
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index bb50c745a5fc..9a8102e4ab1a 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -231,16 +231,22 @@ static void lcl_AnyToTag(const uno::Any & rAny)
{
try {
sal_Int32 aInt = 0;
- rAny >>= aInt;
- dmapper_logger->attribute("value", aInt);
+ if (rAny >>= aInt) {
+ dmapper_logger->attribute("value", rAny);
+ } else {
+ dmapper_logger->attribute("unsignedValue", 0);
+ }
sal_uInt32 auInt = 0;
rAny >>= auInt;
dmapper_logger->attribute("unsignedValue", auInt);
float aFloat = 0.0f;
- rAny >>= aFloat;
- dmapper_logger->attribute("floatValue", aFloat);
+ if (rAny >>= aFloat) {
+ dmapper_logger->attribute("floatValue", rAny);
+ } else {
+ dmapper_logger->attribute("unsignedValue", 0);
+ }
OUString aStr;
rAny >>= aStr;