diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-03-04 20:11:20 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-03-05 08:46:36 +0100 |
commit | bc3c181b81f931a931e822ab0fe51a22bdd433ba (patch) | |
tree | 9dbe81c933a09c8a2e08879122e1eee3d5b9c576 /sw/source/filter/ww8 | |
parent | 2cf8e2b9eee9f17f947c0b0af93ab1e983874a87 (diff) |
Introduce SVBT16ToInt16 for reading sal_Int16 instead of sal_uInt16
This change does not change the actual results, but avoids Clang
-fsanitize=implicit-signed-integer-truncation warnings
Change-Id: If82193d7a6ad6bdadb4e8a8b3ed3bbdf3d88c4a3
Reviewed-on: https://gerrit.libreoffice.org/68706
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 1aa9e0946763..f95859e553a5 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -144,7 +144,7 @@ static short ReadSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefault { SprmResult aRes = pSep->HasSprm(nId); // sprm here? const sal_uInt8* pS = aRes.pSprm; - short nVal = (pS && aRes.nRemainingData >= 2) ? SVBT16ToUInt16(pS) : nDefaultVal; + short nVal = (pS && aRes.nRemainingData >= 2) ? SVBT16ToInt16(pS) : nDefaultVal; return nVal; } @@ -3439,7 +3439,7 @@ void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, sho } // font position in HalfPoints - short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *pData ) : SVBT16ToUInt16( pData ); + short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *pData ) : SVBT16ToInt16( pData ); sal_Int32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw const SvxFontHeightItem* pF = static_cast<const SvxFontHeightItem*>(GetFormatAttr(RES_CHRATR_FONTSIZE)); |