diff options
Diffstat (limited to 'sw/source/filter/ww8/ww8par2.cxx')
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 5778a4c53414..054e7aed7f91 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -569,11 +569,11 @@ static void SetBaseAnlv(SwNumFormat &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLev { rNum.SetIncludeUpperLevels(nSwLevel + 1); } - rNum.SetStart( SVBT16ToShort( rAV.iStartAt ) ); + rNum.SetStart( SVBT16ToUInt16( rAV.iStartAt ) ); rNum.SetNumAdjust( eAdjA[ rAV.aBits1 & 0x3] ); - rNum.SetCharTextDistance( SVBT16ToShort( rAV.dxaSpace ) ); - sal_Int16 nIndent = std::abs(static_cast<sal_Int16>(SVBT16ToShort( rAV.dxaIndent ))); + rNum.SetCharTextDistance( SVBT16ToUInt16( rAV.dxaSpace ) ); + sal_Int16 nIndent = std::abs(static_cast<sal_Int16>(SVBT16ToUInt16( rAV.dxaIndent ))); if( rAV.aBits1 & 0x08 ) //fHang { rNum.SetFirstLineOffset( -nIndent ); @@ -601,7 +601,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV, bool bInsert = false; // Default rtl_TextEncoding eCharSet = m_eStructCharSet; - const WW8_FFN* pF = m_xFonts->GetFont(SVBT16ToShort(rAV.ftc)); // FontInfo + const WW8_FFN* pF = m_xFonts->GetFont(SVBT16ToUInt16(rAV.ftc)); // FontInfo bool bListSymbol = pF && ( pF->aFFNBase.chs == 2 ); // Symbol/WingDings/... OUStringBuffer sText; @@ -626,7 +626,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV, } for(sal_uInt32 i = 0; i < nLen; ++i, pText += 2) { - sText.append(static_cast<sal_Unicode>(SVBT16ToShort(*reinterpret_cast<SVBT16 const *>(pText)))); + sText.append(static_cast<sal_Unicode>(SVBT16ToUInt16(*reinterpret_cast<SVBT16 const *>(pText)))); } } @@ -658,7 +658,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV, OUString aName; FontPitch ePitch; - if( GetFontParams( SVBT16ToShort( rAV.ftc ), eFamily, aName, + if( GetFontParams( SVBT16ToUInt16( rAV.ftc ), eFamily, aName, ePitch, eCharSet ) ){ vcl::Font aFont; @@ -1124,7 +1124,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS, short nLen) const sal_uInt8* pT = &pS[1]; for (int i = 0; i <= nCols; i++, pT+=2) - nCenter[i] = static_cast<sal_Int16>(SVBT16ToShort( pT )); // X-borders + nCenter[i] = static_cast<sal_Int16>(SVBT16ToUInt16( pT )); // X-borders if( nCols != nOldCols ) // different column count { @@ -1195,7 +1195,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS, short nLen) WW8_TCellVer8 const * pTc = reinterpret_cast<WW8_TCellVer8 const *>(pT); for (int k = 0; k < nColsToRead; ++k, ++pCurrentTC, ++pTc ) { - sal_uInt16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 ); + sal_uInt16 aBits1 = SVBT16ToUInt16( pTc->aBits1Ver8 ); pCurrentTC->bFirstMerged = sal_uInt8( ( aBits1 & 0x0001 ) != 0 ); pCurrentTC->bMerged = sal_uInt8( ( aBits1 & 0x0002 ) != 0 ); pCurrentTC->bVertical = sal_uInt8( ( aBits1 & 0x0004 ) != 0 ); @@ -1348,7 +1348,7 @@ void WW8TabBandDesc::ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol) { sal_uInt8 nitcFirst= pParamsTDxaCol[0]; // first col to be changed sal_uInt8 nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1 - short nDxaCol = static_cast<sal_Int16>(SVBT16ToShort( pParamsTDxaCol + 2 )); + short nDxaCol = static_cast<sal_Int16>(SVBT16ToUInt16( pParamsTDxaCol + 2 )); for( int i = nitcFirst; (i < nitcLim) && (i < nWwCols); i++ ) { @@ -1371,7 +1371,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const sal_uInt8* pParamsTInsert) if (nitcInsert >= MAX_COL) // cannot insert into cell outside max possible index return; sal_uInt8 nctc = pParamsTInsert[1]; // number of cells - sal_uInt16 ndxaCol = SVBT16ToShort( pParamsTInsert+2 ); + sal_uInt16 ndxaCol = SVBT16ToUInt16( pParamsTInsert+2 ); short nNewWwCols; if (nitcInsert > nWwCols) @@ -1438,7 +1438,7 @@ void WW8TabBandDesc::ProcessDirection(const sal_uInt8* pParams) { sal_uInt8 nStartCell = *pParams++; sal_uInt8 nEndCell = *pParams++; - sal_uInt16 nCode = SVBT16ToShort(pParams); + sal_uInt16 nCode = SVBT16ToUInt16(pParams); OSL_ENSURE(nStartCell < nEndCell, "not as I thought"); OSL_ENSURE(nEndCell < MAX_COL + 1, "not as I thought"); @@ -1468,7 +1468,7 @@ void WW8TabBandDesc::ProcessSpacing(const sal_uInt8* pParams) sal_uInt8 nSideBits = *pParams++; OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits"); ++pParams; //unknown byte - sal_uInt16 nValue = SVBT16ToShort( pParams ); + sal_uInt16 nValue = SVBT16ToUInt16( pParams ); for (int i = wwTOP; i <= wwRIGHT; i++) { switch (nSideBits & (1 << i)) @@ -1517,7 +1517,7 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const sal_uInt8* pParams) OSL_ENSURE(nUnknown2 == 0x3, "Unexpected value for spacing2"); #endif ++pParams; - sal_uInt16 nValue = SVBT16ToShort( pParams ); + sal_uInt16 nValue = SVBT16ToUInt16( pParams ); for (int i=0; i < 4; i++) { @@ -1891,13 +1891,13 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : m_eOri = aOriArr[*pParams & 0x3]; break; case sprmTFBiDi: - m_bIsBiDi = SVBT16ToShort(pParams) != 0; + m_bIsBiDi = SVBT16ToUInt16(pParams) != 0; break; case sprmTDxaGapHalf: - pNewBand->nGapHalf = static_cast<sal_Int16>(SVBT16ToShort( pParams )); + pNewBand->nGapHalf = static_cast<sal_Int16>(SVBT16ToUInt16( pParams )); break; case sprmTDyaRowHeight: - pNewBand->nLineHeight = static_cast<sal_Int16>(SVBT16ToShort( pParams )); + pNewBand->nLineHeight = static_cast<sal_Int16>(SVBT16ToUInt16( pParams )); m_bClaimLineFormat = true; break; case sprmTDefTable: @@ -1916,7 +1916,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : // parameter (meaning the left-most position) and then // shift the whole table to that margin (see below) { - short nDxaNew = static_cast<sal_Int16>(SVBT16ToShort( pParams )); + short nDxaNew = static_cast<sal_Int16>(SVBT16ToUInt16( pParams )); if( nDxaNew < nTabeDxaNew ) nTabeDxaNew = nDxaNew; } |