summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/listsh.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-07-27 09:36:24 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-08-16 21:52:27 +0200
commit0976d2764f27d7ed3db26a74d263d1a3e663d3fb (patch)
tree37b705638a45ee40c9ea49100d3841bb4a6949ba /sw/source/uibase/shells/listsh.cxx
parentdf3b138055cc445dde319b5eda449c753c8eabc0 (diff)
Use more proper integer types, avoid temporaries and constify
Change-Id: Ia2b591641ab7c954f3b1c7d5f58b42927d974a58
Diffstat (limited to 'sw/source/uibase/shells/listsh.cxx')
-rw-r--r--sw/source/uibase/shells/listsh.cxx10
1 files changed, 5 insertions, 5 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#