summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2014-12-19 19:36:12 +0100
committerMichael Stahl <mstahl@redhat.com>2015-01-07 17:14:28 +0000
commitbe2018f23f7886510316878647f5311a378cca1a (patch)
treee115dc63bd091403a12a96577cf8e0ef36b5ba4d
parentf72fa4199f976b21354b93d8d31a630eea930aae (diff)
teach XML import/export about unsigned integer types
resolves a shitload of warnings like warn:legacy.osl:941:1:xmloff/source/forms/elementimport.cxx:426: OElementImport::implImportGenericProperties: unsupported value type! warn:legacy.osl:941:1:xmloff/source/forms/elementimport.cxx:443: OElementImport::EndElement: could not set the property "ObjIDinMSO"! warn:legacy.osl:941:1:xmloff/source/forms/elementimport.cxx:444: caught an exception! in function:void xmloff::OElementImport::implApplyGenericProperties() type: com.sun.star.lang.IllegalArgumentException Change-Id: Ia598d12e7d9429fe4ad3b1e7173e11e75060a613 Reviewed-on: https://gerrit.libreoffice.org/13553 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--xmloff/source/forms/elementimport.cxx9
-rw-r--r--xmloff/source/forms/propertyexport.cxx8
2 files changed, 15 insertions, 2 deletions
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 0040d5ddbf19..911faec35b1a 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -415,10 +415,19 @@ namespace xmloff
case TypeClass_SHORT:
aPropValues->Value <<= static_cast< sal_Int16 >( nVal );
break;
+ case TypeClass_UNSIGNED_SHORT:
+ aPropValues->Value <<= static_cast< sal_uInt16 >( nVal );
+ break;
case TypeClass_LONG:
case TypeClass_ENUM:
aPropValues->Value <<= static_cast< sal_Int32 >( nVal );
break;
+ case TypeClass_UNSIGNED_LONG:
+ aPropValues->Value <<= static_cast< sal_uInt32 >( nVal );
+ break;
+ case TypeClass_UNSIGNED_HYPER:
+ aPropValues->Value <<= static_cast< sal_uInt64 >( nVal );
+ break;
case TypeClass_HYPER:
aPropValues->Value <<= static_cast< sal_Int64 >( nVal );
break;
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index bc41ab43d8c7..21d8dc4b40ba 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -539,14 +539,18 @@ namespace xmloff
aBuffer = getBOOL(_rValue) ? m_sValueTrue : m_sValueFalse;
break;
case TypeClass_BYTE:
+ case TypeClass_UNSIGNED_SHORT:
case TypeClass_SHORT:
case TypeClass_LONG:
// let the unit converter format is as string
::sax::Converter::convertNumber(aBuffer, getINT32(_rValue));
break;
+ case TypeClass_UNSIGNED_LONG:
case TypeClass_HYPER:
- // TODO
- OSL_FAIL("OPropertyExport::implConvertAny: missing implementation for sal_Int64!");
+ ::sax::Converter::convertNumber(aBuffer, getINT64(_rValue));
+ break;
+ case TypeClass_UNSIGNED_HYPER:
+ ::sax::Converter::convertNumber(aBuffer, _rValue.get<sal_uInt64>());
break;
case TypeClass_ENUM:
{