writerfilter/source/dmapper/PropertyMap.cxx |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 6d249bec487208e56a057ea8a25c34c5d3133a23
Author: Stephan Bergmann <[email protected]>
Date:   Fri Oct 17 16:09:42 2014 +0200

    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

diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index bb50c74..9a8102e 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;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to