diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-12 15:41:27 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-12 23:25:10 +0200 |
commit | 2a360b68475d6fff5b6618feddb0b52f3a4a2373 (patch) | |
tree | 451af5b0f0f86241f578cf123818886436e31894 /sw | |
parent | 3a27dcd0ccac691307648c3d7a96c28412e0a311 (diff) |
Convert SV_DECL_PTRARR(SvBaseLinks) to std::vector
Change-Id: I9197dc4fd7ed32f030de8121913265ec78c83585
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/doc/swserv.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/docnode/swbaslnk.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/app/docsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/basesh.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewstat.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 2 |
10 files changed, 20 insertions, 20 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index b7414dbedc02..54e6e421ba47 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -2478,7 +2478,7 @@ bool SwDoc::LinksUpdated() const // embedded alle lokalen Links (Bereiche/Grafiken) ::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks, sfx2::LinkManager& rLnkMgr ) { - for( sal_uInt16 n = 0; n < rLinks.Count(); ++n ) + for( sal_uInt16 n = 0; n < rLinks.size(); ++n ) { ::sfx2::SvBaseLink* pLnk = &(*rLinks[ n ]); if( pLnk && @@ -2504,7 +2504,7 @@ bool SwDoc::EmbedAllLinks() sal_Bool bRet = sal_False; sfx2::LinkManager& rLnkMgr = GetLinkManager(); const ::sfx2::SvBaseLinks& rLinks = rLnkMgr.GetLinks(); - if( rLinks.Count() ) + if( !rLinks.empty() ) { ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 2d3e7c15a75c..270d6af262a7 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -516,8 +516,8 @@ SwDoc::~SwDoc() it != aTemp.end(); ++it ) (*it)->Closed(); - if( pLinkMgr->GetLinks().Count() ) - pLinkMgr->Remove( 0, pLinkMgr->GetLinks().Count() ); + if( !pLinkMgr->GetLinks().empty() ) + pLinkMgr->Remove( 0, pLinkMgr->GetLinks().size() ); } // The ChapterNumbers/Numbers need to be deleted before the Templates @@ -928,7 +928,7 @@ void SwDoc::UpdateLinks( sal_Bool bUI ) if ( GetDocShell()) { sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode(); if( (nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) && - GetLinkManager().GetLinks().Count() && + !GetLinkManager().GetLinks().empty() && SFX_CREATE_MODE_INTERNAL != ( eMode = GetDocShell()->GetCreateMode()) && SFX_CREATE_MODE_ORGANIZER != eMode && diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index 68093c739758..ceba15f63041 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -248,7 +248,7 @@ sal_Bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const SwServerObject::ServerModes eSave = eType; if( !pChkLnk ) ((SwServerObject*)this)->eType = NONE_SERVER; - for( sal_uInt16 n = rLnks.Count(); n; ) + for( sal_uInt16 n = rLnks.size(); n; ) { const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]); if( pLnk && OBJECT_CLIENT_GRF != pLnk->GetObjType() && diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 156952a60014..7ee67d7eef03 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -616,7 +616,7 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd ) { const SwNode* pNd; const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc()->GetLinkManager().GetLinks(); - for( sal_uInt16 n = rLnks.Count(); n; ) + for( sal_uInt16 n = rLnks.size(); n; ) { ::sfx2::SvBaseLink* pBLnk = &(*rLnks[ --n ]); if( pBLnk && !pBLnk->IsVisible() && @@ -1132,7 +1132,7 @@ void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd ) } const ::sfx2::SvBaseLink* pOwnLink( &(rSectNd.GetSection().GetBaseLink() ) ); const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc()->GetLinkManager().GetLinks(); - for ( sal_uInt16 n = rLnks.Count(); n > 0; ) + for ( sal_uInt16 n = rLnks.size(); n > 0; ) { SwIntrnlSectRefLink* pSectLnk = dynamic_cast<SwIntrnlSectRefLink*>(&(*rLnks[ --n ])); if ( pSectLnk && pSectLnk != pOwnLink && @@ -1143,9 +1143,9 @@ void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd ) pSectLnk->GetSectNode()->GetSection().BreakLink(); // for robustness, because link is removed from the link manager - if ( n > rLnks.Count() ) + if ( n > rLnks.size() ) { - n = rLnks.Count(); + n = rLnks.size(); } } } @@ -1165,7 +1165,7 @@ void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) aValue <<= ::rtl::OUString( sName ); // beliebiger Name const ::sfx2::SvBaseLinks& rLnks = pDoc->GetLinkManager().GetLinks(); - for( sal_uInt16 n = rLnks.Count(); n; ) + for( sal_uInt16 n = rLnks.size(); n; ) { ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]); if( pLnk && pLnk != &rUpdLnk && @@ -1184,7 +1184,7 @@ void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) // ggfs. neu den Link-Pointer wieder suchen, damit nicht einer // ausgelassen oder doppelt gerufen wird. - if( n >= rLnks.Count() && 0 != ( n = rLnks.Count() )) + if( n >= rLnks.size() && 0 != ( n = rLnks.size() )) --n; if( n && pLnk != &(*rLnks[ n ]) ) diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index f8becf2afd9a..1a797f36da64 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -243,7 +243,7 @@ void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) bInNotifyLinks = sal_True; const ::sfx2::SvBaseLinks& rLnks = pDoc->GetLinkManager().GetLinks(); - for( sal_uInt16 n = rLnks.Count(); n; ) + for( sal_uInt16 n = rLnks.size(); n; ) { ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]); if( pLnk && OBJECT_CLIENT_GRF == pLnk->GetObjType() && diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 151d79528810..f5986c725216 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -992,7 +992,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc ) const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); SwGrfNode* pGrfNd; String sFileNm; - for( sal_uInt16 n = rLnks.Count(); n; ) + for( sal_uInt16 n = rLnks.size(); n; ) { ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]); if( pLnk && OBJECT_CLIENT_GRF == pLnk->GetObjType() && diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index b4e89352c961..909741733987 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -1061,7 +1061,7 @@ void SwDocShell::GetState(SfxItemSet& rSet) sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager(); const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks(); sal_Bool bRet = sal_False; - if( rLnks.Count() ) + if( !rLnks.empty() ) bRet = sal_True; else { diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index f74f99ea57d1..e7867bb1443f 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -625,7 +625,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) { SwView& rTempView = GetView(); rSh.EnterStdMode(); - if( rSh.GetLinkManager().GetLinks().Count() ) + if( !rSh.GetLinkManager().GetLinks().empty() ) { rSh.StartAllAction(); rSh.GetLinkManager().UpdateAllLinks( sal_False, sal_True, sal_True ); @@ -1121,7 +1121,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_UPDATE_ALL_LINKS: { - if( rSh.GetLinkManager().GetLinks().Count() ) + if( !rSh.GetLinkManager().GetLinks().empty() ) { sal_Bool bUpdateGrf = sal_False, bCallErrHdl = sal_False; rSh.EnterStdMode(); @@ -1749,7 +1749,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet ) rSet.DisableItem( nWhich ); break; case FN_UPDATE_ALL_LINKS: - if ( !rSh.GetLinkManager().GetLinks().Count() ) + if ( rSh.GetLinkManager().GetLinks().empty() ) rSet.DisableItem(nWhich); break; case FN_XFORMS_DESIGN_MODE: diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx index 2805c64917e8..7938caab65cc 100644 --- a/sw/source/ui/uiview/viewstat.cxx +++ b/sw/source/ui/uiview/viewstat.cxx @@ -81,7 +81,7 @@ void SwView::GetState(SfxItemSet &rSet) switch(nWhich) { case FN_EDIT_LINK_DLG: - if( !pWrtShell->GetLinkManager().GetLinks().Count() ) + if( pWrtShell->GetLinkManager().GetLinks().empty() ) rSet.DisableItem(nWhich); else if( pWrtShell->IsSelFrmMode() && pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT)) diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 43c167211eeb..b39951a3d677 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2240,7 +2240,7 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException) throw RuntimeException(); SwDoc* pDoc = pDocShell->GetDoc(); sfx2::LinkManager& rLnkMan = pDoc->GetLinkManager(); - if( rLnkMan.GetLinks().Count() ) + if( !rLnkMan.GetLinks().empty() ) { UnoActionContext aAction(pDoc); rLnkMan.UpdateAllLinks( sal_False, sal_False, sal_True ); |