diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-23 00:18:25 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-24 23:22:10 +0100 |
commit | 9c925ddd5efdfc32dd62481c3a1f6469c4149bd4 (patch) | |
tree | dc1bbd3987a2a1cf65f30c0e581ac92dc8e5621d /sw | |
parent | edf385a19b1cfa024bc61ac2a793f24aa9689e37 (diff) |
Constify and reduce scope
Change-Id: If80b842a79d476e5e90eeedc4520fc952c8f8f2a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 88f32450f97a..ff4e2becf734 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -115,7 +115,6 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() ) : new SwFtnInfo( pSh->GetFtnInfo() ); SfxObjectShell * pDocSh = SfxObjectShell::Current(); - sal_uInt16 i; if (PTR_CAST(SwWebDocShell, pDocSh)) m_pStylesContainer->Hide(); @@ -198,12 +197,12 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) } } - // page - for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i ) + // page + for( sal_uInt16 i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i ) m_pPageTemplBox->InsertEntry(SwStyleNameMapper::GetUIName( i, OUString() )); - sal_uInt16 nCount = pSh->GetPageDescCnt(); - for(i = 0; i < nCount; ++i) + const sal_uInt16 nCount = pSh->GetPageDescCnt(); + for(sal_uInt16 i = 0; i < nCount; ++i) { const SwPageDesc &rPageDesc = pSh->GetPageDesc(i); if(LISTBOX_ENTRY_NOTFOUND == m_pPageTemplBox->GetEntryPos(rPageDesc.GetName())) @@ -327,7 +326,7 @@ IMPL_LINK_NOARG_INLINE_END(SwEndNoteOptionPage, PosChapterHdl) static SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFmtName ) { SwCharFmt* pFmt = 0; - sal_uInt16 nChCount = pSh->GetCharFmtCount(); + const sal_uInt16 nChCount = pSh->GetCharFmtCount(); for(sal_uInt16 i = 0; i< nChCount; i++) { SwCharFmt& rChFmt = pSh->GetCharFmt(i); |