summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tools/solar.h1
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/tools/solar.h b/include/tools/solar.h
index 5d078763d3f7..3fd676acbc2a 100644
--- a/include/tools/solar.h
+++ b/include/tools/solar.h
@@ -49,6 +49,7 @@ typedef sal_uInt8 SVBT64[8];
inline sal_uInt16 SVBT16ToUInt16( const SVBT16 p ) { return static_cast<sal_uInt16>
(static_cast<sal_uInt16>(p[0])
+ (static_cast<sal_uInt16>(p[1]) << 8)); }
+inline sal_Int16 SVBT16ToInt16( const SVBT16 p ) { return sal_Int16(SVBT16ToUInt16(p)); }
inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return static_cast<sal_uInt32>
(static_cast<sal_uInt32>(p[0])
+ (static_cast<sal_uInt32>(p[1]) << 8)
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));