diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-07-27 09:36:24 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-16 21:52:27 +0200 |
commit | 0976d2764f27d7ed3db26a74d263d1a3e663d3fb (patch) | |
tree | 37b705638a45ee40c9ea49100d3841bb4a6949ba /sw | |
parent | df3b138055cc445dde319b5eda449c753c8eabc0 (diff) |
Use more proper integer types, avoid temporaries and constify
Change-Id: Ia2b591641ab7c954f3b1c7d5f58b42927d974a58
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/listsh.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/shells/mediash.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/shells/navsh.cxx | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/sw/source/uibase/shells/listsh.cxx b/sw/source/uibase/shells/listsh.cxx index 0a4ab5ad70ea..3b7d1d06e0af 100644 --- a/sw/source/uibase/shells/listsh.cxx +++ b/sw/source/uibase/shells/listsh.cxx @@ -76,8 +76,8 @@ static void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bU if ( bMove ) { const IDocumentOutlineNodes* pIDoc( rSh.getIDocumentOutlineNodesAccess() ); - const sal_uInt16 nActLevel = static_cast<sal_uInt16>(pIDoc->getOutlineLevel( nActPos )); - sal_uInt16 nActEndPos = nActPos + 1; + const int nActLevel = pIDoc->getOutlineLevel( nActPos ); + sal_Int32 nActEndPos = nActPos + 1; sal_Int16 nDir = 0; if ( !bUp ) @@ -92,7 +92,7 @@ static void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bU // The current subpoint which should be moved // starts at nActPos and ends at nActEndPos - 1 --nActEndPos; - sal_uInt16 nDest = nActEndPos + 2; + sal_Int32 nDest = nActEndPos + 2; while ( nDest < pIDoc->getOutlineNodesCount() && pIDoc->getOutlineLevel( nDest ) > nActLevel ) ++nDest; @@ -106,7 +106,7 @@ static void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bU if ( nActPos > 0 ) { --nActEndPos; - sal_uInt16 nDest = nActPos - 1; + sal_Int32 nDest = nActPos - 1; while ( nDest > 0 && pIDoc->getOutlineLevel( nDest ) > nActLevel ) --nDest; @@ -134,7 +134,7 @@ static void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bU void SwListShell::Execute(SfxRequest &rReq) { const SfxItemSet* pArgs = rReq.GetArgs(); - sal_uInt16 nSlot = rReq.GetSlot(); + const sal_uInt16 nSlot = rReq.GetSlot(); SwWrtShell& rSh = GetShell(); // #i35572# diff --git a/sw/source/uibase/shells/mediash.cxx b/sw/source/uibase/shells/mediash.cxx index 0664138f8451..b249289a338e 100644 --- a/sw/source/uibase/shells/mediash.cxx +++ b/sw/source/uibase/shells/mediash.cxx @@ -86,12 +86,11 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq) if( pSdrView ) { const SfxItemSet* pArgs = rReq.GetArgs(); - sal_uInt16 nSlotId = rReq.GetSlot(); bool bChanged = pSdrView->GetModel()->IsChanged(); pSdrView->GetModel()->SetChanged( false ); - switch( nSlotId ) + switch( rReq.GetSlot() ) { case SID_DELETE: { diff --git a/sw/source/uibase/shells/navsh.cxx b/sw/source/uibase/shells/navsh.cxx index ee5be060295c..fad00297e9ef 100644 --- a/sw/source/uibase/shells/navsh.cxx +++ b/sw/source/uibase/shells/navsh.cxx @@ -48,7 +48,7 @@ void SwNavigationShell::Execute(SfxRequest &rReq) SwWrtShell *pSh = &GetShell(); SdrView* pSdrView = pSh->GetDrawView(); const SfxItemSet *pArgs = rReq.GetArgs(); - sal_uInt16 nSlotId = rReq.GetSlot(); + const sal_uInt16 nSlotId = rReq.GetSlot(); bool bChanged = pSdrView->GetModel()->IsChanged(); pSdrView->GetModel()->SetChanged(false); SwNavigationMgr& aSwNavigationMgr = pSh->GetNavigationMgr(); |