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 /sc | |
parent | 3a27dcd0ccac691307648c3d7a96c28412e0a311 (diff) |
Convert SV_DECL_PTRARR(SvBaseLinks) to std::vector
Change-Id: I9197dc4fd7ed32f030de8121913265ec78c83585
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen2.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/documen8.cxx | 32 | ||||
-rw-r--r-- | sc/source/core/tool/ddelink.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/undo/areasave.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/undo/undoblk3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/linkuno.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaquerytable.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshb.cxx | 2 |
13 files changed, 37 insertions, 37 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 6fcb80e897f0..241985935641 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -378,8 +378,8 @@ ScDocument::~ScDocument() for( ::sfx2::SvLinkSources::const_iterator it = aTemp.begin(); it != aTemp.end(); ++it ) (*it)->Closed(); - if ( pLinkManager->GetLinks().Count() ) - pLinkManager->Remove( 0, pLinkManager->GetLinks().Count() ); + if ( pLinkManager->GetLinks().size() ) + pLinkManager->Remove( 0, pLinkManager->GetLinks().size() ); } mxFormulaParserPool.reset(); diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 1d1407803cf7..11a640c87725 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -908,7 +908,7 @@ bool ScDocument::IdleCheckLinks() // true = demnaechst wieder versuche if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -934,7 +934,7 @@ void ScDocument::SaveDdeLinks(SvStream& rStream) const bool bExport40 = ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 ); const ::sfx2::SvBaseLinks& rLinks = GetLinkManager()->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); // erstmal zaehlen... @@ -987,7 +987,7 @@ bool ScDocument::HasDdeLinks() const if (GetLinkManager()) // Clipboard z.B. hat keinen LinkManager { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) if ((*rLinks[i])->ISA(ScDdeLink)) return true; @@ -1015,7 +1015,7 @@ void ScDocument::UpdateExternalRefLinks(Window* pWin) return; const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); bool bAny = false; for (sal_uInt16 i = 0; i < nCount; ++i) @@ -1069,7 +1069,7 @@ void ScDocument::UpdateDdeLinks(Window* pWin) if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); sal_uInt16 i; // falls das Updaten laenger dauert, erstmal alle Werte @@ -1128,7 +1128,7 @@ bool ScDocument::UpdateDdeLink( const rtl::OUString& rAppl, const rtl::OUString& if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -1154,7 +1154,7 @@ void ScDocument::DisconnectDdeLinks() if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -1177,7 +1177,7 @@ void ScDocument::CopyDdeLinks( ScDocument* pDestDoc ) const else if (GetLinkManager()) // Links direkt kopieren { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -1198,7 +1198,7 @@ sal_uInt16 ScDocument::GetDdeLinkCount() const if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) if ((*rLinks[i])->ISA(ScDdeLink)) ++nDdeCount; @@ -1222,7 +1222,7 @@ ScDdeLink* lclGetDdeLink( if( pLinkManager ) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); if( pnDdePos ) *pnDdePos = 0; for( sal_uInt16 nIndex = 0; nIndex < nCount; ++nIndex ) { @@ -1249,7 +1249,7 @@ ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, sal_uInt16 nDde if( pLinkManager ) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); sal_uInt16 nDdeIndex = 0; // counts only the DDE links for( sal_uInt16 nIndex = 0; nIndex < nCount; ++nIndex ) { @@ -1345,7 +1345,7 @@ bool ScDocument::HasAreaLinks() const if (GetLinkManager()) // Clipboard z.B. hat keinen LinkManager { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) if ((*rLinks[i])->ISA(ScAreaLink)) return true; @@ -1359,7 +1359,7 @@ void ScDocument::UpdateAreaLinks() if (GetLinkManager()) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -1375,7 +1375,7 @@ void ScDocument::DeleteAreaLinksOnTab( SCTAB nTab ) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); sal_uInt16 nPos = 0; - while ( nPos < rLinks.Count() ) + while ( nPos < rLinks.size() ) { const ::sfx2::SvBaseLink* pBase = *rLinks[nPos]; if ( pBase->ISA(ScAreaLink) && @@ -1395,7 +1395,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, bool bAnyUpdate = false; const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -1446,7 +1446,7 @@ void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, { // remove the first link, exit the inner loop, don't increment nFirstIndex pLinkManager->Remove( pFirst ); - nCount = rLinks.Count(); + nCount = rLinks.size(); bFound = true; } } diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 5d36e5281d9b..5bac102f9fb1 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -238,7 +238,7 @@ void ScDdeLink::ListenersGone() sfx2::LinkManager* pLinkMgr = pDoc->GetLinkManager(); pLinkMgr->Remove( this); // deletes this - if ( !pLinkMgr->GetLinks().Count() ) // letzten geloescht ? + if ( pLinkMgr->GetLinks().empty() ) // letzten geloescht ? { SfxBindings* pBindings = pStackDoc->GetViewBindings(); // don't use member pDoc! if (pBindings) diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 18609d4948b3..e359a3de0fab 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -2230,7 +2230,7 @@ void ScInterpreter::ScStyle() ScDdeLink* lcl_GetDdeLink( sfx2::LinkManager* pLinkMgr, const String& rA, const String& rT, const String& rI, sal_uInt8 nM ) { - sal_uInt16 nCount = pLinkMgr->GetLinks().Count(); + sal_uInt16 nCount = pLinkMgr->GetLinks().size(); for (sal_uInt16 i=0; i<nCount; i++ ) { ::sfx2::SvBaseLink* pBase = *pLinkMgr->GetLinks()[i]; @@ -2301,7 +2301,7 @@ void ScInterpreter::ScDde() { pLink = new ScDdeLink( pDok, aAppl, aTopic, aItem, nMode ); pLinkMgr->InsertDDELink( pLink, aAppl, aTopic, aItem ); - if ( pLinkMgr->GetLinks().Count() == 1 ) // erster ? + if ( pLinkMgr->GetLinks().size() == 1 ) // erster ? { SfxBindings* pBindings = pDok->GetViewBindings(); if (pBindings) diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index a58170617786..a7c7ab0015c3 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -4984,7 +4984,7 @@ sal_Bool ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, // remove them first (file format specifies only one link definition // for a cell) - sal_uInt16 nLinkCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nLinkCount = pLinkManager->GetLinks().size(); sal_uInt16 nRemoved = 0; sal_uInt16 nLinkPos = 0; while (nLinkPos<nLinkCount) @@ -5009,7 +5009,7 @@ sal_Bool ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, pOldArea->GetSource(), pOldArea->GetDestArea(), pOldArea->GetRefreshDelay() ) ); } pLinkManager->Remove( pBase ); - nLinkCount = pLinkManager->GetLinks().Count(); + nLinkCount = pLinkManager->GetLinks().size(); ++nRemoved; } else diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index e72c143c1945..e88bd5ecf136 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -385,7 +385,7 @@ void ScDocShell::UpdateLinks() // nicht mehr benutzte Links raus - sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nCount = pLinkManager->GetLinks().size(); for (sal_uInt16 k=nCount; k>0; ) { --k; @@ -450,7 +450,7 @@ sal_Bool ScDocShell::ReloadTabLinks() sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager(); sal_Bool bAny = false; - sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nCount = pLinkManager->GetLinks().size(); for (sal_uInt16 i=0; i<nCount; i++ ) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 1f9c5d89f0f2..3540c22bb985 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -814,7 +814,7 @@ void ScContentTree::GetLinkNames() sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); OSL_ENSURE(pLinkManager, "kein LinkManager am Dokument?"); const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -835,7 +835,7 @@ const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex ) sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); OSL_ENSURE(pLinkManager, "kein LinkManager am Dokument?"); const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx index f91460b3b91e..28d88c272665 100644 --- a/sc/source/ui/undo/areasave.cxx +++ b/sc/source/ui/undo/areasave.cxx @@ -113,7 +113,7 @@ bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const { size_t nPos = 0; const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nLinkCount = rLinks.Count(); + sal_uInt16 nLinkCount = rLinks.size(); for (sal_uInt16 i=0; i<nLinkCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -134,7 +134,7 @@ bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const ScAreaLink* lcl_FindLink( const ::sfx2::SvBaseLinks& rLinks, const ScAreaLinkSaver& rSaver ) { - sal_uInt16 nLinkCount = rLinks.Count(); + sal_uInt16 nLinkCount = rLinks.size(); for (sal_uInt16 i=0; i<nLinkCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; @@ -179,7 +179,7 @@ ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocum if (pLinkManager) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nLinkCount = rLinks.Count(); + sal_uInt16 nLinkCount = rLinks.size(); for (sal_uInt16 i=0; i<nLinkCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 2340da7c26ab..13522ad62f15 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -1773,7 +1773,7 @@ ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const String& rDo const String& rSrc, const ScRange& rDest ) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); - sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nCount = pLinkManager->GetLinks().size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *rLinks[i]; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 0f7e3278e565..4c7cb9097a54 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -7753,7 +7753,7 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr //! Update nur fuer die betroffene Tabelle??? sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); - sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nCount = pLinkManager->GetLinks().size(); for ( sal_uInt16 i=0; i<nCount; i++ ) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index b5d327f5f8cd..4986f514450c 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -122,7 +122,7 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nCount = pLinkManager->GetLinks().size(); for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; @@ -596,7 +596,7 @@ ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, sal_uInt16 nPos ) if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nTotalCount = pLinkManager->GetLinks().size(); sal_uInt16 nAreaCount = 0; for (sal_uInt16 i=0; i<nTotalCount; i++) { @@ -1014,7 +1014,7 @@ sal_Int32 SAL_CALL ScAreaLinksObj::getCount() throw(uno::RuntimeException) if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nTotalCount = pLinkManager->GetLinks().size(); for (sal_uInt16 i=0; i<nTotalCount; i++) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; diff --git a/sc/source/ui/vba/vbaquerytable.cxx b/sc/source/ui/vba/vbaquerytable.cxx index 03e734a81548..aa4f8d01e62a 100644 --- a/sc/source/ui/vba/vbaquerytable.cxx +++ b/sc/source/ui/vba/vbaquerytable.cxx @@ -67,7 +67,7 @@ ScVbaQueryTable::Refresh( const ::com::sun::star::uno::Any& /*aBackgroundQuery*/ //Get link info sfx2::LinkManager *pLinkMng = m_pDocument->GetLinkManager(); const ::sfx2::SvBaseLinks &rLinks = pLinkMng->GetLinks(); - sal_uInt16 nCount = rLinks.Count(); + sal_uInt16 nCount = rLinks.size(); for (sal_uInt16 i=0; i<nCount; i++) { diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 61795fa87fb4..6f250b5e834b 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -465,7 +465,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet) case SID_LINKS: { - if (GetViewData()->GetDocument()->GetLinkManager()->GetLinks().Count() == 0 ) + if (GetViewData()->GetDocument()->GetLinkManager()->GetLinks().empty()) rSet.DisableItem( SID_LINKS ); } break; |