summaryrefslogtreecommitdiff
path: root/sw/source/core/text/itrcrsr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/itrcrsr.cxx')
-rw-r--r--sw/source/core/text/itrcrsr.cxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 34c0a9843986..67569418f0bb 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -81,9 +81,9 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
if ( rPor.InFldGrp() && ((SwFldPortion&)rPor).GetExp().Len() )
{
- const USHORT nCharOfst = rCMS.pSpecialPos->nCharOfst;
- USHORT nFldIdx = 0;
- USHORT nFldLen = 0;
+ const sal_uInt16 nCharOfst = rCMS.pSpecialPos->nCharOfst;
+ sal_uInt16 nFldIdx = 0;
+ sal_uInt16 nFldLen = 0;
const XubString* pString = 0;
const SwLinePortion* pPor = &rPor;
@@ -107,10 +107,10 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
rOrig.Pos().X() += pPor->Width();
pPor = pPor->GetPortion();
- } while ( TRUE );
+ } while ( sal_True );
ASSERT( nCharOfst >= nFldIdx, "Request of position inside field failed" )
- USHORT nLen = nCharOfst - nFldIdx + 1;
+ sal_uInt16 nLen = nCharOfst - nFldIdx + 1;
if ( pString )
{
@@ -155,7 +155,7 @@ namespace {
if ( rTxtNode.AreListLevelIndentsApplicable() )
{
const SwNumFmt& rNumFmt =
- rTxtNode.GetNumRule()->Get( static_cast<USHORT>(rTxtNode.GetActualListLevel()) );
+ rTxtNode.GetNumRule()->Get( static_cast<sal_uInt16>(rTxtNode.GetActualListLevel()) );
if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
bRet = true;
@@ -350,7 +350,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nFirst = nRight - 1;
}
const SvxAdjustItem& rAdjust = pFrm->GetTxtNode()->GetSwAttrSet().GetAdjust();
- nAdjust = static_cast<USHORT>(rAdjust.GetAdjust());
+ nAdjust = static_cast<sal_uInt16>(rAdjust.GetAdjust());
// left is left and right is right
if ( pFrm->IsRightToLeft() )
@@ -646,7 +646,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// For common portions (including BidiPortions) we want to add
// the portion width to nX. For MultiPortions, nExtra = 0,
// therefore we go to the 'else' branch and start a recursion.
- const BYTE nExtra = pPor->IsMultiPortion() &&
+ const sal_uInt8 nExtra = pPor->IsMultiPortion() &&
! ((SwMultiPortion*)pPor)->IsBidi() &&
! bWidth ? 0 : 1;
if ( aInf.GetIdx() + pPor->GetLen() < nOfst + nExtra )
@@ -758,7 +758,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// of the multi-portion.
xub_StrLen nOldStart = nStart;
SwTwips nOldY = nY;
- BYTE nOldProp = GetPropFont();
+ sal_uInt8 nOldProp = GetPropFont();
nStart = aInf.GetIdx();
SwLineLayout* pOldCurr = pCurr;
pCurr = &((SwMultiPortion*)pPor)->GetRoot();
@@ -767,14 +767,14 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
GETGRID( GetTxtFrm()->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
- const USHORT nRubyHeight = bHasGrid ?
+ const sal_uInt16 nRubyHeight = bHasGrid ?
pGrid->GetRubyHeight() : 0;
if( nStart + pCurr->GetLen() <= nOfst && GetNext() &&
( ! ((SwMultiPortion*)pPor)->IsRuby() ||
((SwMultiPortion*)pPor)->OnTop() ) )
{
- USHORT nOffset;
+ sal_uInt16 nOffset;
// in grid mode we may only add the height of the
// ruby line if ruby line is on top
if ( bHasGrid &&
@@ -796,8 +796,8 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// temporarily set the inner line height to the
// outer line height because that value is needed
// for the adjustment inside the recursion
- const USHORT nOldRubyHeight = pCurr->Height();
- const USHORT nOldRubyRealHeight = pCurr->GetRealHeight();
+ const sal_uInt16 nOldRubyHeight = pCurr->Height();
+ const sal_uInt16 nOldRubyRealHeight = pCurr->GetRealHeight();
const sal_Bool bChgHeight =
((SwMultiPortion*)pPor)->IsRuby() && bHasGrid;
@@ -1073,7 +1073,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
if( nTmpHeight < pOrig->Height() )
{
nTmpAscent = nPorAscent;
- nTmpHeight = USHORT( pOrig->Height() );
+ nTmpHeight = sal_uInt16( pOrig->Height() );
}
}
if( bWidth && pPor->PrtWidth() && pPor->GetLen() &&
@@ -1133,7 +1133,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// the bidi portion
if ( pLastBidiPor )
{
- const BYTE nPortionLevel = pLastBidiPor->GetLevel();
+ const sal_uInt8 nPortionLevel = pLastBidiPor->GetLevel();
if ( pCMS->nCursorBidiLevel >= nPortionLevel )
{
@@ -1160,7 +1160,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
}
else
{
- const BYTE nPortionLevel = ((SwBidiPortion*)pPor)->GetLevel();
+ const sal_uInt8 nPortionLevel = ((SwBidiPortion*)pPor)->GetLevel();
if ( pCMS->nCursorBidiLevel >= nPortionLevel )
{
@@ -1206,7 +1206,7 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
if ( bSpecialPos )
{
- const BYTE nExtendRange = pCMS->pSpecialPos->nExtendRange;
+ const sal_uInt8 nExtendRange = pCMS->pSpecialPos->nExtendRange;
ASSERT( ! pCMS->pSpecialPos->nLineOfst || SP_EXTEND_RANGE_BEFORE != nExtendRange,
"LineOffset AND Number Portion?" )
@@ -1216,7 +1216,7 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
++nFindOfst;
// skip lines for fields which cover more than one line
- for ( USHORT i = 0; i < pCMS->pSpecialPos->nLineOfst; i++ )
+ for ( sal_uInt16 i = 0; i < pCMS->pSpecialPos->nLineOfst; i++ )
Next();
}
@@ -1335,7 +1335,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
((SwTxtSizeInfo&)GetInfo()).SetIdx( nCurrStart );
- nWidth = nWidth + USHORT( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
+ nWidth = nWidth + sal_uInt16( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
}
if( ( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() ) ||
( pPor->IsMultiPortion() && ((SwMultiPortion*)pPor)->HasTabulator() )
@@ -1379,7 +1379,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
((SwTxtSizeInfo&)GetInfo()).SetIdx( nCurrStart );
- nWidth = nWidth + USHORT( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
+ nWidth = nWidth + sal_uInt16( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
}
if( ( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() ) ||
@@ -1584,7 +1584,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() );
if ( ((SwMultiPortion*)pPor)->IsBidi() )
{
- const BYTE nBidiLevel = ((SwBidiPortion*)pPor)->GetLevel();
+ const sal_uInt8 nBidiLevel = ((SwBidiPortion*)pPor)->GetLevel();
aLayoutModeModifier.Modify( nBidiLevel % 2 );
}
@@ -1600,7 +1600,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if( ((SwMultiPortion*)pPor)->HasBrackets() )
{
- USHORT nPreWidth = ((SwDoubleLinePortion*)pPor)->PreWidth();
+ sal_uInt16 nPreWidth = ((SwDoubleLinePortion*)pPor)->PreWidth();
if ( nX > nPreWidth )
nX = nX - nPreWidth;
else
@@ -1612,7 +1612,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
}
if( pPor->InTxtGrp() )
{
- BYTE nOldProp;
+ sal_uInt8 nOldProp;
if( GetPropFont() )
{
((SwFont*)GetFnt())->SetProportion( GetPropFont() );
@@ -1871,7 +1871,7 @@ bool SwTxtFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) c
if( GetDrawObjs() )
{
const SwSortedObjs &rObjs = *GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = rObjs[i];
if( !pAnchoredObj->ISA(SwFlyFrm) )