summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-04-06 12:18:57 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-04-12 22:36:21 +0200
commit7436db1ebb2a3d66c3d85b825246bdbad62727de (patch)
tree8bf2ad29e042ebdf502610e092021dc0a04f23c2
parent93ef3530d56afb7347fdf652a1c52db08a306890 (diff)
Use auto for backward loop index
Change-Id: I6d8c0c86cb2693bef6ef28ec85f9ac12cc4401f5
-rw-r--r--sw/source/core/docnode/section.cxx8
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 00e52c0fe3c3..98cf47e14918 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -601,7 +601,7 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd )
{
const SwNode* pNd;
const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc()->getIDocumentLinksAdministration().GetLinkManager().GetLinks();
- for( sal_uInt16 n = rLnks.size(); n; )
+ for( auto n = rLnks.size(); n; )
{
::sfx2::SvBaseLink* pBLnk = &(*rLnks[ --n ]);
if( pBLnk && !pBLnk->IsVisible() &&
@@ -1116,7 +1116,7 @@ static void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd )
}
const ::sfx2::SvBaseLink* pOwnLink( &(rSectNd.GetSection().GetBaseLink() ) );
const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc()->getIDocumentLinksAdministration().GetLinkManager().GetLinks();
- for ( sal_uInt16 n = rLnks.size(); n > 0; )
+ for ( auto n = rLnks.size(); n > 0; )
{
SwIntrnlSectRefLink* pSectLnk = dynamic_cast<SwIntrnlSectRefLink*>(&(*rLnks[ --n ]));
if ( pSectLnk && pSectLnk != pOwnLink &&
@@ -1148,7 +1148,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
aValue <<= sName; // Arbitrary name
const ::sfx2::SvBaseLinks& rLnks = pDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks();
- for( sal_uInt16 n = rLnks.size(); n; )
+ for( auto n = rLnks.size(); n; )
{
SwBaseLink* pBLink;
@@ -1459,7 +1459,7 @@ void SwIntrnlSectRefLink::Closed()
// Advise says goodbye: mark the Section as not protected
// and change the Flag
const SwSectionFmts& rFmts = pDoc->GetSections();
- for( sal_uInt16 n = rFmts.size(); n; )
+ for( auto n = rFmts.size(); n; )
if( rFmts[ --n ] == &rSectFmt )
{
SwViewShell* pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 3b3ae1b7c59d..edd25b63a154 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -226,7 +226,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
bInNotifyLinks = true;
const ::sfx2::SvBaseLinks& rLnks = pDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks();
- for( sal_uInt16 n = rLnks.size(); n; )
+ for( auto n = rLnks.size(); n; )
{
::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && OBJECT_CLIENT_GRF == pLnk->GetObjType() &&