[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Fri Jan 26 06:55:25 UTC 2018
sw/source/filter/xml/xmlimpit.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 1a0b01f2238e30a58a2bb4a4054b7726887fe15d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 25 16:50:51 2018 +0100
USHRT_MAX -> SAL_MAX_UINT16
The check against USHRT_MAX and the mismatching cast to sal_uInt16 in the
following SetWidth call were like that ever since the code first shows up in
57941a2dfdb461a2444a0ab84076db8423c46ca7 "#86004# removed
SfxPoolItem::importXML, exportXML, equalsXML".
Change-Id: Icd63d5b66765fc2391898a9d47a228407b9d5744
Reviewed-on: https://gerrit.libreoffice.org/48631
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index d4e9344d6b8a..32a591e82b0b 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -902,8 +902,8 @@ bool SvXMLImportItemMapper::PutXMLValue(
sal_Int32 nValue = rValue.toInt32();
if( nValue < MINLAY )
nValue = MINLAY;
- else if( nValue > USHRT_MAX )
- nValue = USHRT_MAX;
+ else if( nValue > SAL_MAX_UINT16 )
+ nValue = SAL_MAX_UINT16;
rFrameSize.SetWidth( static_cast<sal_uInt16>(nValue) );
rFrameSize.SetHeightSizeType( ATT_VAR_SIZE );
More information about the Libreoffice-commits
mailing list