Kaydet (Commit) 9c925ddd authored tarafından Matteo Casalin's avatar Matteo Casalin

Constify and reduce scope

Change-Id: If80b842a79d476e5e90eeedc4520fc952c8f8f2a
üst edf385a1
...@@ -115,7 +115,6 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) ...@@ -115,7 +115,6 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() ) SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() )
: new SwFtnInfo( pSh->GetFtnInfo() ); : new SwFtnInfo( pSh->GetFtnInfo() );
SfxObjectShell * pDocSh = SfxObjectShell::Current(); SfxObjectShell * pDocSh = SfxObjectShell::Current();
sal_uInt16 i;
if (PTR_CAST(SwWebDocShell, pDocSh)) if (PTR_CAST(SwWebDocShell, pDocSh))
m_pStylesContainer->Hide(); m_pStylesContainer->Hide();
...@@ -198,12 +197,12 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& ) ...@@ -198,12 +197,12 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
} }
} }
// page // page
for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i ) for( sal_uInt16 i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i )
m_pPageTemplBox->InsertEntry(SwStyleNameMapper::GetUIName( i, OUString() )); m_pPageTemplBox->InsertEntry(SwStyleNameMapper::GetUIName( i, OUString() ));
sal_uInt16 nCount = pSh->GetPageDescCnt(); const sal_uInt16 nCount = pSh->GetPageDescCnt();
for(i = 0; i < nCount; ++i) for(sal_uInt16 i = 0; i < nCount; ++i)
{ {
const SwPageDesc &rPageDesc = pSh->GetPageDesc(i); const SwPageDesc &rPageDesc = pSh->GetPageDesc(i);
if(LISTBOX_ENTRY_NOTFOUND == m_pPageTemplBox->GetEntryPos(rPageDesc.GetName())) if(LISTBOX_ENTRY_NOTFOUND == m_pPageTemplBox->GetEntryPos(rPageDesc.GetName()))
...@@ -327,7 +326,7 @@ IMPL_LINK_NOARG_INLINE_END(SwEndNoteOptionPage, PosChapterHdl) ...@@ -327,7 +326,7 @@ IMPL_LINK_NOARG_INLINE_END(SwEndNoteOptionPage, PosChapterHdl)
static SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFmtName ) static SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFmtName )
{ {
SwCharFmt* pFmt = 0; SwCharFmt* pFmt = 0;
sal_uInt16 nChCount = pSh->GetCharFmtCount(); const sal_uInt16 nChCount = pSh->GetCharFmtCount();
for(sal_uInt16 i = 0; i< nChCount; i++) for(sal_uInt16 i = 0; i< nChCount; i++)
{ {
SwCharFmt& rChFmt = pSh->GetCharFmt(i); SwCharFmt& rChFmt = pSh->GetCharFmt(i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment