summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par6.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/ww8par6.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx478
1 files changed, 239 insertions, 239 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index b298f3721b00..57c04a5226cf 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -123,11 +123,11 @@ using namespace nsHdFtFlags;
#define MM_200 1134 // WW-Default fuer u.Seitenrand: 2.0 cm
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty = 0, const WW8PLCFx_SEPX* pSep = 0);
-ColorData SwWW8ImplReader::GetCol(BYTE nIco)
+ColorData SwWW8ImplReader::GetCol(sal_uInt8 nIco)
{
static const ColorData eSwWW8ColA[] =
{
@@ -151,24 +151,24 @@ inline sal_uInt32 MSRoundTweak(sal_uInt32 x)
# ( ausser OLST, dass weiterhin ein normales Attribut ist )
#**************************************************************************/
-static short ReadSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static short ReadSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
short nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static USHORT ReadUSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static sal_uInt16 ReadUSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- USHORT nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt16 nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static BYTE ReadBSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, BYTE nDefaultVal )
+static sal_uInt8 ReadBSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, sal_uInt8 nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- BYTE nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt8 nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
return nVal;
}
@@ -284,7 +284,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//Get the size of word's default styles font
sal_uInt32 nCharWidth=240;
- for (USHORT nI = 0; nI < pStyles->GetCount(); ++nI)
+ for (sal_uInt16 nI = 0; nI < pStyles->GetCount(); ++nI)
{
if (pCollA[nI].bValid && pCollA[nI].pFmt &&
pCollA[nI].GetWWStyleId() == 0)
@@ -298,9 +298,9 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//dxtCharSpace
if (rSection.maSep.dxtCharSpace)
{
- UINT32 nCharSpace = rSection.maSep.dxtCharSpace;
+ sal_uInt32 nCharSpace = rSection.maSep.dxtCharSpace;
//main lives in top 20 bits, and is signed.
- INT32 nMain = (nCharSpace & 0xFFFFF000);
+ sal_Int32 nMain = (nCharSpace & 0xFFFFF000);
nMain/=0x1000;
nCharWidth += nMain*20;
@@ -323,7 +323,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
rFmt.SetFmtAttr(aGrid);
}
-void SwWW8ImplReader::Read_ParaBiDi(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_FRAMEDIR);
@@ -358,27 +358,27 @@ bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection,
aCol.SetLineWidth(1);
}
- aCol.Init(nCols, writer_cast<USHORT>(nColSpace),
- writer_cast<USHORT>(nNettoWidth));
+ aCol.Init(nCols, writer_cast<sal_uInt16>(nColSpace),
+ writer_cast<sal_uInt16>(nNettoWidth));
// sprmSFEvenlySpaced
if (!rSection.maSep.fEvenlySpaced)
{
aCol._SetOrtho(false);
int nIdx = 1;
- for (USHORT i = 0; i < nCols; i++ )
+ for (sal_uInt16 i = 0; i < nCols; i++ )
{
SwColumn* pCol = aCol.GetColumns()[i];
sal_Int32 nLeft = rSection.maSep.rgdxaColumnWidthSpacing[nIdx-1]/2;
sal_Int32 nRight = rSection.maSep.rgdxaColumnWidthSpacing[nIdx+1]/2;
sal_Int32 nWishWidth = rSection.maSep.rgdxaColumnWidthSpacing[nIdx]
+ nLeft + nRight;
- pCol->SetWishWidth(writer_cast<USHORT>(nWishWidth));
- pCol->SetLeft(writer_cast<USHORT>(nLeft));
- pCol->SetRight(writer_cast<USHORT>(nRight));
+ pCol->SetWishWidth(writer_cast<sal_uInt16>(nWishWidth));
+ pCol->SetLeft(writer_cast<sal_uInt16>(nLeft));
+ pCol->SetRight(writer_cast<sal_uInt16>(nRight));
nIdx += 2;
}
- aCol.SetWishWidth(writer_cast<USHORT>(nNettoWidth));
+ aCol.SetWishWidth(writer_cast<sal_uInt16>(nNettoWidth));
}
rFmt.SetFmtAttr(aCol);
return true;
@@ -443,7 +443,7 @@ void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt,
SetCols(rFmt, rSection, rSection.GetTextAreaWidth());
}
-USHORT lcl_MakeSafeNegativeSpacing(USHORT nIn)
+sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn)
{
if (nIn > SHRT_MAX)
nIn = 0;
@@ -466,11 +466,11 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (rSection.maSep.pgbOffsetFrom == 1)
{
- USHORT nDist;
+ sal_uInt16 nDist;
if (aBox.GetLeft())
{
nDist = aBox.GetDistance(BOX_LINE_LEFT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
aSizeArray[WW8_LEFT] =
aSizeArray[WW8_LEFT] - nDist + aBox.GetDistance(BOX_LINE_LEFT);
}
@@ -478,7 +478,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetRight())
{
nDist = aBox.GetDistance(BOX_LINE_RIGHT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
aSizeArray[WW8_RIGHT] =
aSizeArray[WW8_RIGHT] - nDist + aBox.GetDistance(BOX_LINE_RIGHT);
}
@@ -486,7 +486,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetTop())
{
nDist = aBox.GetDistance(BOX_LINE_TOP);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
aSizeArray[WW8_TOP] =
aSizeArray[WW8_TOP] - nDist + aBox.GetDistance(BOX_LINE_TOP);
}
@@ -494,7 +494,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetBottom())
{
nDist = aBox.GetDistance(BOX_LINE_BOTTOM);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
aSizeArray[WW8_BOT] =
aSizeArray[WW8_BOT] - nDist + aBox.GetDistance(BOX_LINE_BOTTOM);
}
@@ -503,20 +503,20 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
}
if (aBox.GetLeft())
- aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
+ aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
if (aBox.GetRight())
- aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
+ aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
if (aBox.GetTop())
- aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
+ aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
if (aBox.GetBottom())
{
//#i30088# and #i30074# - do a final sanity check on
//bottom value. Do not allow a resulting zero if bottom
//Border margin value was not originally zero.
if(aUL.GetLower() != 0)
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - aSizeArray[WW8_BOT])));
else
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
}
aSet.Put(aLR);
@@ -616,7 +616,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo));
// --> OD 2004-06-18 #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aHdUL.SetLower( writer_cast<USHORT>(rData.nSwHLo - cMinHdFtHeight) );
+ aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) );
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -626,7 +626,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// header and body.
const SwTwips nHdLowerSpace( Abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo );
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace));
- aHdUL.SetLower( static_cast< USHORT >(nHdLowerSpace) );
+ aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) );
// <--
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -645,7 +645,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp));
// --> OD 2004-06-18 #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aFtUL.SetUpper( writer_cast<USHORT>(rData.nSwFUp - cMinHdFtHeight) );
+ aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) );
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -655,7 +655,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// footer and body.
const SwTwips nFtUpperSpace( Abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp );
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace));
- aFtUL.SetUpper( static_cast< USHORT >(nFtUpperSpace) );
+ aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) );
// <--
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -664,8 +664,8 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
}
}
- SvxULSpaceItem aUL(writer_cast<USHORT>(rData.nSwUp),
- writer_cast<USHORT>(rData.nSwLo), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(rData.nSwUp),
+ writer_cast<sal_uInt16>(rData.nSwLo), RES_UL_SPACE);
rFmt.SetFmtAttr(aUL);
}
@@ -747,7 +747,7 @@ void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection)
aInfo.SetRestartEachPage(rSection.maSep.lnc == 0);
- aInfo.SetPosFromLeft(writer_cast<USHORT>(rSection.maSep.dxaLnn));
+ aInfo.SetPosFromLeft(writer_cast<sal_uInt16>(rSection.maSep.dxaLnn));
//Paint only for every n line
aInfo.SetCountBy(rSection.maSep.nLnnMod);
@@ -850,12 +850,12 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aLastSection = maSegments.back();
//Here
- USHORT nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
+ sal_uInt16 nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
//BEGIN read section values
wwSection aNewSection(*mrReader.pPaM->GetPoint());
- static const USHORT aVer2Ids0[] =
+ static const sal_uInt16 aVer2Ids0[] =
{
/*sprmSBkc*/ 117,
/*sprmSFTitlePage*/ 118,
@@ -865,7 +865,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 133
};
- static const USHORT aVer67Ids0[] =
+ static const sal_uInt16 aVer67Ids0[] =
{
/*sprmSBkc*/ 142,
/*sprmSFTitlePage*/ 143,
@@ -875,7 +875,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 158
};
- static const USHORT aVer8Ids0[] =
+ static const sal_uInt16 aVer8Ids0[] =
{
/*sprmSBkc*/ 0x3009,
/*sprmSFTitlePage*/ 0x300A,
@@ -885,7 +885,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 0x3019
};
- const USHORT* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
+ const sal_uInt16* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
if (!maSegments.empty())
{
@@ -895,7 +895,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
// 2 New page
// 3 Even page
// 4 Odd page
- if (const BYTE* pSprmBkc = pSep->HasSprm(pIds[0]))
+ if (const sal_uInt8* pSprmBkc = pSep->HasSprm(pIds[0]))
aNewSection.maSep.bkc = *pSprmBkc;
}
@@ -935,7 +935,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
for (int i = 0; i < nCols; ++i)
{
//sprmSDxaColWidth
- const BYTE* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), BYTE( i ) );
+ const sal_uInt8* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), sal_uInt8( i ) );
ASSERT( pSW, "+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt" );
sal_uInt16 nWidth = pSW ? SVBT16ToShort(pSW + 1) : 1440;
@@ -945,7 +945,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (i < nCols-1)
{
//sprmSDxaColSpacing
- const BYTE* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), BYTE( i ) );
+ const sal_uInt8* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), sal_uInt8( i ) );
ASSERT( pSD, "+Sprm 137 (bzw. 0xF204) (Colspacing) fehlt" );
if( pSD )
@@ -958,7 +958,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
}
- static const USHORT aVer2Ids1[] =
+ static const sal_uInt16 aVer2Ids1[] =
{
/*sprmSBOrientation*/ 137,
/*sprmSXaPage*/ 139,
@@ -972,7 +972,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 116
};
- static const USHORT aVer67Ids1[] =
+ static const sal_uInt16 aVer67Ids1[] =
{
/*sprmSBOrientation*/ 162,
/*sprmSXaPage*/ 164,
@@ -986,7 +986,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 141
};
- static const USHORT aVer8Ids1[] =
+ static const sal_uInt16 aVer8Ids1[] =
{
/*sprmSBOrientation*/ 0x301d,
/*sprmSXaPage*/ 0xB01F,
@@ -1012,8 +1012,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.yaPage = ReadUSprm(pSep, pIds[2], lLetterHeight);
// 3. LR-Raender
- static const USHORT nLef[] = { MM_250, 1800 };
- static const USHORT nRig[] = { MM_250, 1800 };
+ static const sal_uInt16 nLef[] = { MM_250, 1800 };
+ static const sal_uInt16 nRig[] = { MM_250, 1800 };
aNewSection.maSep.dxaLeft = ReadUSprm( pSep, pIds[3], nLef[nLIdx]);
aNewSection.maSep.dxaRight = ReadUSprm( pSep, pIds[4], nRig[nLIdx]);
@@ -1037,23 +1037,23 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (eVer >= ww::eWW6)
{
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
aNewSection.maSep.iHeadingPgn = *p;
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
aNewSection.maSep.cnsPgn = *p;
}
- if(const BYTE* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
+ if(const sal_uInt8* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
aNewSection.maSep.dmBinFirst = *pSprmSDmBinFirst;
- if (const BYTE* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
+ if (const sal_uInt8* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
aNewSection.maSep.dmBinOther = *pSprmSDmBinOther;
- static const USHORT nTop[] = { MM_250, 1440 };
- static const USHORT nBot[] = { MM_200, 1440 };
+ static const sal_uInt16 nTop[] = { MM_250, 1440 };
+ static const sal_uInt16 nBot[] = { MM_200, 1440 };
- static const USHORT aVer2Ids2[] =
+ static const sal_uInt16 aVer2Ids2[] =
{
/*sprmSDyaTop*/ 143,
/*sprmSDyaBottom*/ 144,
@@ -1065,7 +1065,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLnnMin*/ 135
};
- static const USHORT aVer67Ids2[] =
+ static const sal_uInt16 aVer67Ids2[] =
{
/*sprmSDyaTop*/ 168,
/*sprmSDyaBottom*/ 169,
@@ -1076,7 +1076,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDxaLnn*/ 155,
/*sprmSLnnMin*/ 160
};
- static const USHORT aVer8Ids2[] =
+ static const sal_uInt16 aVer8Ids2[] =
{
/*sprmSDyaTop*/ 0x9023,
/*sprmSDyaBottom*/ 0x9024,
@@ -1100,7 +1100,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.wTextFlow = ReadUSprm(pSep, 0x5033, 0);
aNewSection.maSep.clm = ReadUSprm( pSep, 0x5032, 0 );
aNewSection.maSep.dyaLinePitch = ReadUSprm(pSep, 0x9031, 360);
- if (const BYTE* pS = pSep->HasSprm(0x7030))
+ if (const sal_uInt8* pS = pSep->HasSprm(0x7030))
aNewSection.maSep.dxtCharSpace = SVBT32ToUInt32(pS);
//sprmSPgbProp
@@ -1114,16 +1114,16 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
// check if Line Numbering must be activated or resetted
- if (const BYTE* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
+ if (const sal_uInt8* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
aNewSection.maSep.nLnnMod = *pSprmSNLnnMod;
- if (const BYTE* pSprmSLnc = pSep->HasSprm( pIds[5] ))
+ if (const sal_uInt8* pSprmSLnc = pSep->HasSprm( pIds[5] ))
aNewSection.maSep.lnc = *pSprmSLnc;
- if (const BYTE* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
+ if (const sal_uInt8* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
aNewSection.maSep.dxaLnn = SVBT16ToShort( pSprmSDxaLnn );
- if (const BYTE* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
+ if (const sal_uInt8* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
aNewSection.maSep.lnnMin = *pSprmSLnnMin;
if (eVer <= ww::eWW7)
@@ -1174,7 +1174,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode )
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode )
{
// copy first header content section
if (nCode & WW8_HEADER_FIRST)
@@ -1218,7 +1218,7 @@ void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
// Hilfsroutinen fuer Grafiken und Apos und Tabellen
//------------------------------------------------------
-static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
+static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const sal_uInt8* pS)
{
if( pS )
{
@@ -1231,7 +1231,7 @@ static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
return 0 != pS;
}
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty, const WW8PLCFx_SEPX* pSep)
{
// Ausgegend von diesen defines:
@@ -1241,15 +1241,15 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
// #define WW8_RIGHT 3
// #define WW8_BETW 4
-//returns a BYTE filled with a bit for each position that had a sprm
+//returns a sal_uInt8 filled with a bit for each position that had a sprm
//setting that border
- BYTE nBorder = false;
+ sal_uInt8 nBorder = false;
if( pSep )
{
if( !bVer67 )
{
- BYTE* pSprm[4];
+ sal_uInt8* pSprm[4];
// sprmSBrcTop, sprmSBrcLeft, sprmSBrcBottom, sprmSBrcRight
if( pSep->Find4Sprms( 0x702B, 0x702C, 0x702D, 0x702E,
@@ -1263,12 +1263,12 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
else
{
- static const USHORT aVer67Ids[5] = { 38, 39, 40, 41, 42 };
+ static const sal_uInt16 aVer67Ids[5] = { 38, 39, 40, 41, 42 };
- static const USHORT aVer8Ids[5] =
+ static const sal_uInt16 aVer8Ids[5] =
{ 0x6424, 0x6425, 0x6426, 0x6427, 0x6428 };
- const USHORT* pIds = bVer67 ? aVer67Ids : aVer8Ids;
+ const sal_uInt16* pIds = bVer67 ? aVer67Ids : aVer8Ids;
if( pPap )
{
@@ -1289,8 +1289,8 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
return nBorder;
}
-void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCol, short nIdx,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx,
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
WW8_BordersSO::eBorderCode eCodeIdx;
@@ -1472,9 +1472,9 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCo
}
void Set1Border(bool bVer67, SvxBoxItem &rBox, const WW8_BRC& rBor,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
- BYTE nCol;
+ sal_uInt8 nCol;
short nSpace, nIdx;
short nLineThickness = rBor.DetermineBorderProperties(bVer67,&nSpace,&nCol,
&nIdx);
@@ -1529,10 +1529,10 @@ bool WW8_BRC::IsZeroed(bool bVer67) const
}
bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc,
- short *pSizeArray, BYTE nSetBorders) const
+ short *pSizeArray, sal_uInt8 nSetBorders) const
{
bool bChange = false;
- static const USHORT aIdArr[ 10 ] =
+ static const sal_uInt16 aIdArr[ 10 ] =
{
WW8_TOP, BOX_LINE_TOP,
WW8_LEFT, BOX_LINE_LEFT,
@@ -1650,19 +1650,19 @@ static void FlySecur1(short& rSize, const bool bBorder)
rSize = nMin;
}
-inline bool SetValSprm( INT16* pVar, WW8PLCFx_Cp_FKP* pPap, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId )
{
- const BYTE* pS = pPap->HasSprm( nId );
+ const sal_uInt8* pS = pPap->HasSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
-inline bool SetValSprm( INT16* pVar, const WW8RStyle* pStyle, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId )
{
- const BYTE* pS = pStyle->HasParaSprm( nId );
+ const sal_uInt8* pS = pStyle->HasParaSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
@@ -1720,12 +1720,12 @@ bool WW8FlyPara::operator==(const WW8FlyPara& rSrc) const
}
// Read fuer normalen Text
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if( bVer67 )
{
SetValSprm( &nSp26, pPap, 26 ); // X-Position //sprmPDxaAbs
@@ -1775,7 +1775,7 @@ void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
nSp29 = nOrigSp29;
}
-void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
+void WW8FlyPara::ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo)
{
WW8PLCFMan* pPlcxMan = pIo->pPlcxMan;
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
@@ -1789,14 +1789,14 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
break; // (*pPap)++ geht bei FastSave schief
// -> bei FastSave kein Test auf Grafik-APO
SvStream* pIoStrm = pIo->pStrm;
- ULONG nPos = pIoStrm->Tell();
+ sal_uLong nPos = pIoStrm->Tell();
WW8PLCFxSave1 aSave;
pPlcxMan->GetPap()->Save( aSave );
bGrafApo = false;
do{ // Block zum rausspringen
- BYTE nTxt[2];
+ sal_uInt8 nTxt[2];
pIoStrm->Read( nTxt, 2 ); // lies Text
if( nTxt[0] != 0x01 || nTxt[1] != 0x0d )// nur Grafik + CR ?
@@ -1806,7 +1806,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// In APO ?
//sprmPPc
- const BYTE* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
+ const sal_uInt8* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
// Nein -> Grafik-Apo
if( !pS ){
@@ -1816,7 +1816,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
ww::WordVersion eVer = pIo->GetFib().GetFIBVersion();
WW8FlyPara *pNowStyleApo=0;
- USHORT nColl = pPap->GetIstd();
+ sal_uInt16 nColl = pPap->GetIstd();
ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
while (eSti != ww::stiNil && 0 == (pNowStyleApo = pIo->pCollA[nColl].pWWFly))
{
@@ -1840,12 +1840,12 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// Read fuer Apo-Defs in Styledefs
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8RStyle* pStyle)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if (bVer67)
{
SetValSprm( &nSp26, pStyle, 26 ); // X-Position
@@ -1918,8 +1918,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy )
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy )
{
(void) rPaM;
(void) nPgLeft;
@@ -2072,18 +2072,18 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// --> OD 2005-01-19 #119176# - no adjustments possible, if frame has
// automatic width.
// determine left border distance
- INT16 nLeBorderMgn( 0L );
+ sal_Int16 nLeBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeBorderMgn);
nLeBorderMgn = nLeBorderMgn + nTemp;
}
// determine right border distance
- INT16 nRiBorderMgn( 0L );
+ sal_Int16 nRiBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
&nRiBorderMgn);
nRiBorderMgn = nRiBorderMgn + nTemp;
}
@@ -2137,8 +2137,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
Word has a curious bug where the offset stored do not take into
account the internal distance from the corner both
*/
- INT16 nLeLMgn = 0;
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nLeLMgn = 0;
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeLMgn);
nLeLMgn = nLeLMgn + nTemp;
@@ -2157,7 +2157,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// convert "<X> from top page text area" to
// "<X + page top margin> from page"
eVRel = text::RelOrientation::PAGE_FRAME;
- nYPos = static_cast< INT16 >( nYPos + nWWPgTop );
+ nYPos = static_cast< sal_Int16 >( nYPos + nWWPgTop );
}
// <--
@@ -2291,8 +2291,8 @@ WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk)
{
//Close any open character properties and duplicate them inside the
//first table cell
- USHORT nCnt = static_cast< USHORT >(pCtrlStck->Count());
- for (USHORT i=0; i < nCnt; i++)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(pCtrlStck->Count());
+ for (sal_uInt16 i=0; i < nCnt; i++)
{
const SwFltStackEntry* pEntry = (*pCtrlStck)[ i ];
if(pEntry->bLocked)
@@ -2437,7 +2437,7 @@ bool SwWW8ImplReader::IsDropCap()
WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : 0;
if (pPap)
{
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPap->HasSprm(46);
else
@@ -2754,7 +2754,7 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
}
// holt Attribut aus der FmtColl / Stack / Doc
-const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
+const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( sal_uInt16 nWhich )
{
const SfxPoolItem* pRet = 0;
if (pAktColl)
@@ -2799,7 +2799,7 @@ const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
# Spezial WW - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Special(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{
@@ -2810,7 +2810,7 @@ void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
}
// Read_Obj wird fuer fObj und fuer fOle2 benutzt !
-void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Obj(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
bObj = false;
@@ -2823,7 +2823,7 @@ void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
}
}
-void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_PicLoc(sal_uInt16 , const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -2840,13 +2840,13 @@ void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (pAktColl && (0 < nLen))
{
if (SwWW8StyInf* pSI = GetStyle(nAktColl))
{
- pSI->nOutlineLevel = static_cast< BYTE >(
+ pSI->nOutlineLevel = static_cast< sal_uInt8 >(
( (1 <= pSI->GetWWStyleId()) && (9 >= pSI->GetWWStyleId()) )
? pSI->GetWWStyleId()-1
: (pData ? *pData : 0) );
@@ -2854,7 +2854,7 @@ void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( !bIgnoreText )
{
@@ -2889,7 +2889,7 @@ void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
}
}
-SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
+SwWW8StyInf *SwWW8ImplReader::GetStyle(sal_uInt16 nColl) const
{
return nColl < nColls ? &pCollA[nColl] : 0;
}
@@ -2900,13 +2900,13 @@ SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
// Read_BoldUsw fuer Italic, Bold, Kapitaelchen, Versalien, durchgestrichen,
// Contour und Shadow
-void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
const int nContigiousWestern = 8;
const int nWestern = nContigiousWestern + 1;
const int nEastern = 2;
const int nIds = nWestern + nEastern;
- static const USHORT nEndIds[ nIds ] =
+ static const sal_uInt16 nEndIds[ nIds ] =
{
RES_CHRATR_WEIGHT, RES_CHRATR_POSTURE,
RES_CHRATR_CROSSEDOUT, RES_CHRATR_CONTOUR,
@@ -2920,7 +2920,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
- BYTE nI;
+ sal_uInt8 nI;
// die Attribut-Nr fuer "doppelt durchgestrichen" tanzt aus der Reihe
if (0x2A53 == nId)
nI = nContigiousWestern; // The out of sequence western id
@@ -2928,11 +2928,11 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
{
// The contigious western ids
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 60);
+ nI = static_cast< sal_uInt8 >(nId - 60);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 85);
+ nI = static_cast< sal_uInt8 >(nId - 85);
else
- nI = static_cast< BYTE >(nId - 0x0835);
+ nI = static_cast< sal_uInt8 >(nId - 0x0835);
}
sal_uInt16 nMask = 1 << nI;
@@ -2952,7 +2952,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan && eVersion > ww::eWW2)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -2993,7 +2993,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SetToggleAttr( nI, bOn );
}
-void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
+void SwWW8ImplReader::Read_Bidi(sal_uInt16, const sal_uInt8*, short nLen)
{
if (nLen > 0)
bBidi = true;
@@ -3002,22 +3002,22 @@ void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
}
// Read_BoldUsw for BiDi Italic, Bold
-void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
+void SwWW8ImplReader::Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8* pData,
short nLen)
{
- static const USHORT nEndIds[2] =
+ static const sal_uInt16 nEndIds[2] =
{
RES_CHRATR_CTL_WEIGHT, RES_CHRATR_CTL_POSTURE,
};
- BYTE nI;
+ sal_uInt8 nI;
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 80);
+ nI = static_cast< sal_uInt8 >(nId - 80);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 111);
+ nI = static_cast< sal_uInt8 >(nId - 111);
else
- nI = static_cast< BYTE >(nId - 0x085C);
+ nI = static_cast< sal_uInt8 >(nId - 0x085C);
ASSERT(nI <= 1, "not happening");
if (nI > 1)
@@ -3035,7 +3035,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -3072,7 +3072,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SetToggleBiDiAttr(nI, bOn);
}
-void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn)
{
switch (nAttrId)
{
@@ -3097,7 +3097,7 @@ void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
{
switch (nAttrId)
{
@@ -3147,11 +3147,11 @@ void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3163,11 +3163,11 @@ void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3179,7 +3179,7 @@ void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuper( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_ESCAPEMENT );
@@ -3187,7 +3187,7 @@ void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
}
short nEs;
- BYTE nProp;
+ sal_uInt8 nProp;
switch( *pData )
{
case 1:
@@ -3251,7 +3251,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
bool bIsGraphicPlacementHack = false;
- USHORT nPos;
+ sal_uInt16 nPos;
if (pCtrlStck->GetFmtStackAttr(RES_CHRATR_ESCAPEMENT, &nPos))
{
SwPaM aRegion(*pPaM->GetPoint());
@@ -3273,7 +3273,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
return bIsGraphicPlacementHack;
}
-void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -3286,13 +3286,13 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
// Font-Position in HalfPoints
short nPos = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort( pData );
- INT32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
+ sal_Int32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
const SvxFontHeightItem* pF
= (const SvxFontHeightItem*)GetFmtAttr(RES_CHRATR_FONTSIZE);
ASSERT(pF, "Expected to have the fontheight available here");
// #i59022: Check ensure nHeight != 0. Div by zero otherwise.
- INT32 nHeight = 240;
+ sal_Int32 nHeight = 240;
if (pF != NULL && pF->GetHeight() != 0)
nHeight = pF->GetHeight();
nPos2 /= nHeight; // ... nun in % ( gerundet )
@@ -3304,7 +3304,7 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
NewAttr( aEs );
}
-void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Underline( sal_uInt16, const sal_uInt8* pData, short nLen )
{
FontUnderline eUnderline = UNDERLINE_NONE;
bool bWordLine = false;
@@ -3321,7 +3321,7 @@ void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
// erst mal ggfs. *bold* einschalten!
if( bAlsoBold )
{
- BYTE nOn = 1;
+ sal_uInt8 nOn = 1;
Read_BoldUsw( 0x0835, &nOn, nLen );
eUnderline = UNDERLINE_SINGLE;
}
@@ -3372,7 +3372,7 @@ NoBracket 78 CA 06 - 02 00 00 02 34 52
<> 78 CA 06 - 02 03 00 02 34 52
{} 78 CA 06 - 02 04 00 02 34 52
*/
-void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
+void SwWW8ImplReader::Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pData,
short nLen )
{
if( nLen < 0 ) // close the tag
@@ -3408,7 +3408,7 @@ void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
}
}
-void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtColor( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0x6870))
@@ -3418,7 +3418,7 @@ void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0;
@@ -3440,7 +3440,7 @@ sal_uInt32 wwUtility::BGRToRGB(sal_uInt32 nColor)
return nColor;
}
-void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
@@ -3453,7 +3453,7 @@ void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
}
}
-bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
+bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
String& rName, FontPitch& rePitch, CharSet& reCharSet )
{
// Die Defines, aus denen diese Tabellen erzeugt werden, stehen in windows.h
@@ -3492,7 +3492,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
}
// pF->ff : Family
- BYTE b = pF->ff;
+ sal_uInt8 b = pF->ff;
// make sure Font Family Code is set correctly
// at least for the most important fonts
@@ -3533,7 +3533,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
sFontName12, sFontName13
};
- for( USHORT n = 0; n < FONTNAMETAB_SZ; n++ )
+ for( sal_uInt16 n = 0; n < FONTNAMETAB_SZ; n++ )
{
const sal_Char* pCmp = aFontNameTab[ n ];
xub_StrLen nLen = *pCmp++;
@@ -3551,9 +3551,9 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
return true;
}
-USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich)
+sal_uInt16 SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, sal_uInt16 nWhich)
{
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
switch (nCharSet) {
case RTL_TEXTENCODING_MS_932:
@@ -3568,8 +3568,8 @@ USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich)
return nResult;
}
-bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
- USHORT nWhich)
+bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
+ sal_uInt16 nWhich)
{
FontFamily eFamily;
String aName;
@@ -3669,7 +3669,7 @@ void SwWW8ImplReader::ResetCJKCharSetVars()
/*
Font ein oder ausschalten:
*/
-void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontCode( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (!bSymbol) // falls bSymbol, gilt der am Symbol
{ // (siehe sprmCSymbol) gesetzte Font !
@@ -3703,7 +3703,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
else
{
- USHORT nFCode = SVBT16ToShort( pData ); // Font-Nummer
+ sal_uInt16 nFCode = SVBT16ToShort( pData ); // Font-Nummer
if (SetNewFontAttr(nFCode, true, nId) // Lies Inhalt
&& pAktColl && pStyles ) // Style-Def ?
{
@@ -3719,7 +3719,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontSize( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3748,7 +3748,7 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
// Font-Size in half points e.g. 10 = 1440 / ( 72 * 2 )
- USHORT nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
+ sal_uInt16 nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
nFSize*= 10;
SvxFontHeightItem aSz( nFSize, 100, nId );
@@ -3771,14 +3771,14 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
-void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{ // Ende des Attributes
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
return;
}
- BYTE nfChsDiff = SVBT8ToByte( pData );
+ sal_uInt8 nfChsDiff = SVBT8ToByte( pData );
if( nfChsDiff )
eHardCharSet = rtl_getTextEncodingFromWindowsCharset( *(pData + 1) );
@@ -3786,7 +3786,7 @@ void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
}
-void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Language( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3811,7 +3811,7 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
else
{
- USHORT nLang = SVBT16ToShort( pData ); // Language-Id
+ sal_uInt16 nLang = SVBT16ToShort( pData ); // Language-Id
NewAttr(SvxLanguageItem((const LanguageType)nLang, nId));
}
}
@@ -3819,14 +3819,14 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
/*
Einschalten des Zeichen-Styles:
*/
-void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_TXTATR_CHARFMT );
nCharFmt = -1;
return;
}
- USHORT nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
+ sal_uInt16 nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
if( nId >= nColls || !pCollA[nId].pFmt // ungueltige Id ?
|| pCollA[nId].bColl ) // oder Para-Style ?
@@ -3840,17 +3840,17 @@ void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
/*
enger oder weiter als normal:
*/
-void SwWW8ImplReader::Read_Kern( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_KERNING );
return;
}
- INT16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
+ sal_Int16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
NewAttr( SvxKerningItem( nKern, RES_CHRATR_KERNING ) );
}
-void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
+void SwWW8ImplReader::Read_FontKern( sal_uInt16, const sal_uInt8* , short nLen )
{
if( nLen < 0 ) // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_AUTOKERN );
@@ -3858,7 +3858,7 @@ void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
NewAttr(SvxAutoKernItem(true, RES_CHRATR_AUTOKERN));
}
-void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0xCA71))
@@ -3884,7 +3884,7 @@ void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -3906,7 +3906,7 @@ void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen <= 0 )
{
@@ -3919,7 +3919,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
}
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0; // Auto -> Black
@@ -3934,7 +3934,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
# Absatz - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 ) // Ende des Attributes
{
@@ -3953,7 +3953,7 @@ void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
}
// Sprm 16, 17
-void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (nLen < 0) // End of the Attributes
{
@@ -4034,7 +4034,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
*/
if (pPlcxMan && pCollA[nAktColl].bHasBrokenWW6List)
{
- const BYTE *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
+ const sal_uInt8 *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
if (pIsZeroed && *pIsZeroed == 0)
{
const SvxLRSpaceItem &rLR =
@@ -4070,7 +4070,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
}
// Sprm 20
-void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// Kommentear siehe Read_UL()
if (bStyNormal && bWWBugNormal)
@@ -4107,11 +4107,11 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
// bei proportional betraegt er min( 0cm, FontSize*(nFach-1) ) sowohl "vor"
// wie auch "nach"
- USHORT nWwPre = 0;
- USHORT nWwPost = 0;
- USHORT nSwPre = 0;
- USHORT nSwPost = 0;
- USHORT nSpaceTw = 0;
+ sal_uInt16 nWwPre = 0;
+ sal_uInt16 nWwPost = 0;
+ sal_uInt16 nSwPre = 0;
+ sal_uInt16 nSwPost = 0;
+ sal_uInt16 nSpaceTw = 0;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
@@ -4121,32 +4121,32 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
//JP 03.12.98: nach Absprache mit AMA ist die Begrenzung unsinnig
if( n>200 ) n = 200; // SW_UI-Maximum
- aLSpc.SetPropLineSpace( (const BYTE)n );
+ aLSpc.SetPropLineSpace( (const sal_uInt8)n );
const SvxFontHeightItem* pH = (const SvxFontHeightItem*)
GetFmtAttr( RES_CHRATR_FONTSIZE );
- nSpaceTw = (USHORT)( n * pH->GetHeight() / 100 );
+ nSpaceTw = (sal_uInt16)( n * pH->GetHeight() / 100 );
if( n > 100 )
- nWwPost = nSwPre = nSwPost = (USHORT)( ( n - 100 )
+ nWwPost = nSwPre = nSwPost = (sal_uInt16)( ( n - 100 )
* pH->GetHeight() / 100 );
}
else // Fixed / Minimum
{
// bei negativen Space ist der Abstand exakt, sonst minimum
- nSpaceTw = (USHORT)nSpace;
+ nSpaceTw = (sal_uInt16)nSpace;
aLSpc.SetLineHeight( nSpaceTw );
aLSpc.GetLineSpaceRule() = eLnSpc;
nSwPre = nSpace;
if( SVX_LINE_SPACE_FIX == eLnSpc ) // Genau
{
- nWwPre = (USHORT)( 8L * nSpace / 10 );
- nWwPost = (USHORT)( 2L * nSpace / 10 );
+ nWwPre = (sal_uInt16)( 8L * nSpace / 10 );
+ nWwPost = (sal_uInt16)( 2L * nSpace / 10 );
nSwPre = nSpace;
}
else // Minimum
{
- nWwPre = (USHORT)( 129L * nSpace / 100 - 95 );// erst bei groesseren
+ nWwPre = (sal_uInt16)( 129L * nSpace / 100 - 95 );// erst bei groesseren
// Zeilenabstaenden
}
}
@@ -4164,7 +4164,7 @@ sal_uInt16 SwWW8ImplReader::GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing)
return 280; //Seems to be always 14points in this case
}
-void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_DontAddEqual(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
return;
@@ -4173,7 +4173,7 @@ void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
maTracer.Log(sw::log::eDontAddSpaceForEqualStyles);
}
-void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoBefore(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4200,7 +4200,7 @@ void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
}
}
-void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoAfter(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4228,7 +4228,7 @@ void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
}
// Sprm 21, 22
-void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
// Nun eine Umpopelung eines WW-Fehlers: Bei nProduct == 0c03d wird
// faelschlicherweise ein DyaAfter 240 ( delta y abstand after, amn.d.?b.)
@@ -4273,7 +4273,7 @@ void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
NewAttr( aUL );
}
-void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
nIdctHint = 0;
@@ -4281,7 +4281,7 @@ void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
nIdctHint = *pData;
}
-void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Justify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4320,7 +4320,7 @@ void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
bool SwWW8ImplReader::IsRightToLeft()
{
bool bRTL = false;
- const BYTE *pDir =
+ const sal_uInt8 *pDir =
pPlcxMan ? pPlcxMan->GetPapPLCF()->HasSprm(0x2441) : 0;
if (pDir)
bRTL = *pDir ? true : false;
@@ -4334,7 +4334,7 @@ bool SwWW8ImplReader::IsRightToLeft()
return bRTL;
}
-void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_RTLJustify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4377,7 +4377,7 @@ void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoolItem( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -4406,7 +4406,7 @@ void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_EMPHASIS_MARK );
@@ -4417,7 +4417,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
//there is use it, if there is not fall back to the currently set one.
//Only the cjk language setting seems to matter to word, the western
//one is ignored
- const BYTE *pLang =
+ const sal_uInt8 *pLang =
pPlcxMan ? pPlcxMan->GetChpPLCF()->HasSprm(0x486E) : 0;
if (pLang)
@@ -4467,7 +4467,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_SCALEW );
@@ -4481,7 +4481,7 @@ void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_RELIEF );
@@ -4508,7 +4508,7 @@ void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_BLINK);
@@ -4536,7 +4536,7 @@ void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen
SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
{
- BYTE b = rSHD.GetFore();
+ sal_uInt8 b = rSHD.GetFore();
ASSERT(b < 17, "ww8: colour out of range");
if (b >= 17)
b = 0;
@@ -4557,7 +4557,7 @@ SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
{
- static const ULONG eMSGrayScale[] =
+ static const sal_uLong eMSGrayScale[] =
{
// Nul-Brush
0, // 0
@@ -4644,7 +4644,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
if( nIndex >= sizeof( eMSGrayScale ) / sizeof ( eMSGrayScale[ 0 ] ) )
nIndex = 0;
- ULONG nWW8BrushStyle = eMSGrayScale[nIndex];
+ sal_uLong nWW8BrushStyle = eMSGrayScale[nIndex];
switch (nWW8BrushStyle)
{
@@ -4670,7 +4670,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
}
}
-void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (!bVer67 && pPlcxMan && pPlcxMan->GetPapPLCF()->HasSprm(0xC64D))
return;
@@ -4696,7 +4696,7 @@ void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if (nLen <= 0)
{
@@ -4718,7 +4718,7 @@ void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
}
}
-sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
+sal_uInt32 SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData,
bool
#ifdef DBG_UTIL
bVer67
@@ -4743,7 +4743,7 @@ sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
return aShade.aColor.GetColor();
}
-void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
+void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8* , short nLen)
{
if( nLen < 0 )
{
@@ -4762,7 +4762,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
bHasBorder = true;
WW8_BRC5 aBrcs; // Top, Left, Bottom, Right, Between
- BYTE nBorder;
+ sal_uInt8 nBorder;
if( pAktColl )
nBorder = ::lcl_ReadBorders(bVer67, aBrcs, 0, pStyles);
@@ -4798,10 +4798,10 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
maTracer.Log(sw::log::eBorderDistOutside);
- aBox.SetDistance( (USHORT)aInnerDist.Left(), BOX_LINE_LEFT );
- aBox.SetDistance( (USHORT)aInnerDist.Top(), BOX_LINE_TOP );
- aBox.SetDistance( (USHORT)aInnerDist.Right(), BOX_LINE_RIGHT );
- aBox.SetDistance( (USHORT)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
NewAttr( aBox );
@@ -4813,7 +4813,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
}
}
-void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// set Hyphenation flag
if( nLen <= 0 )
@@ -4836,7 +4836,7 @@ void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -4845,7 +4845,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
else
{
- BYTE nL = ( *pData & 1 ) ? 2 : 0;
+ sal_uInt8 nL = ( *pData & 1 ) ? 2 : 0;
NewAttr( SvxWidowsItem( nL, RES_PARATR_WIDOWS ) ); // Aus -> nLines = 0
NewAttr( SvxOrphansItem( nL, RES_PARATR_ORPHANS ) );
@@ -4856,7 +4856,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
+void SwWW8ImplReader::Read_UsePgsuSettings(sal_uInt16,const sal_uInt8* pData,short nLen)
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SNAPTOGRID);
@@ -4869,7 +4869,7 @@ void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
}
}
-void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_VERTALIGN);
@@ -4902,7 +4902,7 @@ void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SPLIT );
@@ -4910,7 +4910,7 @@ void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtSplitItem( ( *pData & 1 ) == 0, RES_PARATR_SPLIT ) );
}
-void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_KEEP );
@@ -4918,7 +4918,7 @@ void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtKeepItem( ( *pData & 1 ) != 0 , RES_KEEP) );
}
-void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BREAK );
@@ -4927,7 +4927,7 @@ void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
( *pData & 1 ) ? SVX_BREAK_PAGE_BEFORE : SVX_BREAK_NONE, RES_BREAK ) );
}
-void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
+void SwWW8ImplReader::Read_ApoPPC( sal_uInt16, const sal_uInt8* pData, short )
{
if (pAktColl) // only for Styledef, sonst anders geloest
{
@@ -4943,7 +4943,7 @@ void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
bool SwWW8ImplReader::ParseTabPos(WW8_TablePos *pTabPos, WW8PLCFx_Cp_FKP* pPap)
{
bool bRet = false;
- const BYTE *pRes=0;
+ const sal_uInt8 *pRes=0;
memset(pTabPos, 0, sizeof(WW8_TablePos));
if (0 != (pRes = pPap->HasSprm(0x360D)))
{
@@ -4990,7 +4990,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
if( pRes->nSprmId < 280 )
{
- BYTE nIdx = static_cast< BYTE >(pRes->nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(pRes->nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
return (this->*aWwSprmTab[nIdx])(pRes);
@@ -5001,7 +5001,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
return 0;
}
-void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
+void SwWW8ImplReader::EndExtSprm(sal_uInt16 nSprmId)
{
typedef sal_uInt16 (SwWW8ImplReader:: *FNReadRecordExt)();
@@ -5014,7 +5014,7 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
/* 4 (260) */ 0 // Annotation
};
- BYTE nIdx = static_cast< BYTE >(nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
(this->*aWwSprmTab[nIdx])();
@@ -5025,11 +5025,11 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
#**************************************************************************/
// Funktion zum Einlesen von Sprms. Par1: SprmId
-typedef void (SwWW8ImplReader:: *FNReadRecord)( USHORT, const BYTE*, short );
+typedef void (SwWW8ImplReader:: *FNReadRecord)( sal_uInt16, const sal_uInt8*, short );
struct SprmReadInfo
{
- USHORT nId;
+ sal_uInt16 nId;
FNReadRecord pReadFnc;
};
@@ -6154,7 +6154,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
// Hilfsroutinen : SPRM finden
//-----------------------------------------
-const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
+const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(sal_uInt16 nId) const
{
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
const wwSprmDispatcher *pDispatcher;
@@ -6181,7 +6181,7 @@ const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
//-----------------------------------------
// Hilfsroutinen : SPRMs
//-----------------------------------------
-void SwWW8ImplReader::EndSprm( USHORT nId )
+void SwWW8ImplReader::EndSprm( sal_uInt16 nId )
{
if( ( nId > 255 ) && ( nId < 0x0800 ) ) return;
@@ -6191,7 +6191,7 @@ void SwWW8ImplReader::EndSprm( USHORT nId )
(this->*rSprm.pReadFnc)( nId, 0, -1 );
}
-short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
+short SwWW8ImplReader::ImportSprm(const sal_uInt8* pPos,sal_uInt16 nId)
{
if (!nId)
nId = mpSprmParser->GetSprmId(pPos);
@@ -6202,8 +6202,8 @@ short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
const SprmReadInfo& rSprm = GetSprmReadInfo(nId);
- USHORT nFixedLen = mpSprmParser->DistanceToData(nId);
- USHORT nL = mpSprmParser->GetSprmSize(nId, pPos);
+ sal_uInt16 nFixedLen = mpSprmParser->DistanceToData(nId);
+ sal_uInt16 nL = mpSprmParser->GetSprmSize(nId, pPos);
if (rSprm.pReadFnc)
(this->*rSprm.pReadFnc)(nId, pPos + nFixedLen, nL - nFixedLen);