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 ...@@ -1348,7 +1348,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
} }
SwFont *pFnt; SwFont *pFnt;
SwTxtFmtColl* pColl = GetTxtNode()->GetTxtColl(); SwTxtFmtColl* pColl = GetTxtNode()->GetTxtColl();
sal_uInt16 nFirst = GetTxtNode()->GetSwAttrSet().GetULSpace().GetLower(); SwTwips nFirst = GetTxtNode()->GetSwAttrSet().GetULSpace().GetLower();
SwTwips nDiff = rFill.Y() - Frm().Bottom(); SwTwips nDiff = rFill.Y() - Frm().Bottom();
if( nDiff < nFirst ) if( nDiff < nFirst )
nDiff = -1; nDiff = -1;
...@@ -1392,7 +1392,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const ...@@ -1392,7 +1392,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
nFirst = 0; nFirst = 0;
} }
else if( nDist < nFirst ) else if( nDist < nFirst )
nFirst = nFirst - (sal_uInt16)nDist; nFirst = nFirst - nDist;
else else
nFirst = 0; nFirst = 0;
nDist = std::max( nDist, long( GetLineSpace() ) ); nDist = std::max( nDist, long( GetLineSpace() ) );
...@@ -1522,7 +1522,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const ...@@ -1522,7 +1522,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
const SvxTabStopItem& rTab = const SvxTabStopItem& rTab =
(const SvxTabStopItem &)pSet-> (const SvxTabStopItem &)pSet->
GetPool()->GetDefaultItem( RES_PARATR_TABSTOP ); GetPool()->GetDefaultItem( RES_PARATR_TABSTOP );
sal_uInt16 nDefTabDist = (sal_uInt16)rTab[0].GetTabPos(); const SwTwips nDefTabDist = rTab[0].GetTabPos();
nRightTab = nLeftTab - nTxtLeft; nRightTab = nLeftTab - nTxtLeft;
nRightTab /= nDefTabDist; nRightTab /= nDefTabDist;
nRightTab = nRightTab * nDefTabDist + nTxtLeft; nRightTab = nRightTab * nDefTabDist + nTxtLeft;
......
...@@ -108,7 +108,7 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, SwViewShell *pVwSh, ...@@ -108,7 +108,7 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, SwViewShell *pVwSh,
if( aRect.Bottom() > nBottom ) if( aRect.Bottom() > nBottom )
aRect.Bottom( nBottom ); aRect.Bottom( nBottom );
} }
sal_uInt16 nVirtPageNum = 0; int nVirtPageNum = 0;
if( bLineNum ) if( bLineNum )
{ {
/* Initializes the Members necessary for line numbering: /* Initializes the Members necessary for line numbering:
...@@ -483,7 +483,7 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const ...@@ -483,7 +483,7 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess(); const IDocumentRedlineAccess* pIDRA = rTxtNode.getIDocumentRedlineAccess();
if( IDocumentRedlineAccess::IsShowChanges( pIDRA->GetRedlineMode() ) ) 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 ) if( USHRT_MAX != nRedlPos )
{ {
SwAttrHandler aAttrHandler; 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