This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch odf-devel in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit e64781e76d12ee6851423a845853b0f5801f1faf Author: Jim Jagielski <[email protected]> AuthorDate: Thu Oct 22 15:47:41 2026 -0400 xmloff: export and import unsigned short form properties as typed values ObjIDinMSO and other sal_uInt16 properties were written as office:value="", which is invalid ODF, and never read back. --- main/xmloff/source/forms/elementimport.cxx | 3 +++ main/xmloff/source/forms/propertyexport.cxx | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/main/xmloff/source/forms/elementimport.cxx b/main/xmloff/source/forms/elementimport.cxx index c7c665b0c7..76cd8e4e71 100644 --- a/main/xmloff/source/forms/elementimport.cxx +++ b/main/xmloff/source/forms/elementimport.cxx @@ -452,6 +452,9 @@ 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 ); diff --git a/main/xmloff/source/forms/propertyexport.cxx b/main/xmloff/source/forms/propertyexport.cxx index 9a7b7d3441..fad5481cc0 100644 --- a/main/xmloff/source/forms/propertyexport.cxx +++ b/main/xmloff/source/forms/propertyexport.cxx @@ -566,6 +566,13 @@ namespace xmloff // let the unit converter format is as string m_rContext.getGlobalContext().GetMM100UnitConverter().convertNumber(aBuffer, getINT32(_rValue)); break; + case TypeClass_UNSIGNED_SHORT: + { + sal_uInt16 nValue = 0; + _rValue >>= nValue; + m_rContext.getGlobalContext().GetMM100UnitConverter().convertNumber(aBuffer, static_cast< sal_Int32 >(nValue)); + } + break; case TypeClass_HYPER: // TODO OSL_ENSURE(sal_False, "OPropertyExport::implConvertAny: missing implementation for sal_Int64!");
