diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-09-04 00:21:14 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-09-06 12:12:32 +0200 |
commit | ba0498a696423036360f51b15f9e21f180c7dedf (patch) | |
tree | f540ad4adde80bc15f0dc0a444325e81a094ea19 /sw | |
parent | aaa5ed55b1c66888ad62951baaa2559d0f1bff87 (diff) |
Use more suitable integer types, avoid conversions, constify
Change-Id: I6b7a3b763ea3e2dc6d327c61668fa413fbc60a07
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/text/frmpaint.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index e1b771d4446e..b18d2bfecd47 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -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; diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index df7195afb181..4b480cd4f613 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -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; |