Kaydet (Commit) ba0498a6 authored tarafından Matteo Casalin's avatar Matteo Casalin

Use more suitable integer types, avoid conversions, constify

Change-Id: I6b7a3b763ea3e2dc6d327c61668fa413fbc60a07
üst aaa5ed55
......@@ -1348,7 +1348,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
}
SwFont *pFnt;
SwTxtFmtColl* pColl = GetTxtNode()->GetTxtColl();
sal_uInt16 nFirst = GetTxtNode()->GetSwAttrSet().GetULSpace().GetLower();
SwTwips nFirst = GetTxtNode()->GetSwAttrSet().GetULSpace().GetLower();
SwTwips nDiff = rFill.Y() - Frm().Bottom();
if( nDiff < nFirst )
nDiff = -1;
......@@ -1392,7 +1392,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
nFirst = 0;
}
else if( nDist < nFirst )
nFirst = nFirst - (sal_uInt16)nDist;
nFirst = nFirst - nDist;
else
nFirst = 0;
nDist = std::max( nDist, long( GetLineSpace() ) );
......@@ -1522,7 +1522,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
const SvxTabStopItem& rTab =
(const SvxTabStopItem &)pSet->
GetPool()->GetDefaultItem( RES_PARATR_TABSTOP );
sal_uInt16 nDefTabDist = (sal_uInt16)rTab[0].GetTabPos();
const SwTwips nDefTabDist = rTab[0].GetTabPos();
nRightTab = nLeftTab - nTxtLeft;
nRightTab /= nDefTabDist;
nRightTab = nRightTab * nDefTabDist + nTxtLeft;
......
......@@ -108,7 +108,7 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, SwViewShell *pVwSh,
if( aRect.Bottom() > nBottom )
aRect.Bottom( nBottom );
}
sal_uInt16 nVirtPageNum = 0;
int nVirtPageNum = 0;
if( bLineNum )
{
/* Initializes the Members necessary for line numbering:
......@@ -483,7 +483,7 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
if( IDocumentRedlineAccess::IsShowChanges( pIDRA->GetRedlineMode() ) )
{
sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
const sal_uInt16 nRedlPos = pIDRA->GetRedlinePos( rTxtNode, USHRT_MAX );
if( USHRT_MAX != nRedlPos )
{
SwAttrHandler aAttrHandler;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment