diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-01-13 01:44:03 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-01-13 01:44:03 -0500 |
commit | bf9499781bc5d9d8ccb08681a25a9ec4312c8f82 (patch) | |
tree | dd7d81b8fb903c33fa7a143452a7d02fd37a6ab4 /sc/source/ui | |
parent | eaa9f3425196260798e750a5564522dfa2b4c863 (diff) |
ScDPCollection is no longer derived from ScCollection.
ScCollection is another redundant data structure that could easily
be replaced with boost::ptr_vector or any of its siblings.
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 24 | ||||
-rw-r--r-- | sc/source/ui/view/dbfunc3.cxx | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 06a809541319..a824e79edf71 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -378,8 +378,8 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet) ScDPCollection* pDPCollection = aDocument.GetDPCollection(); if ( pDPCollection ) { - USHORT nDPCount = pDPCollection->GetCount(); - for (USHORT nDP=0; nDP<nDPCount; nDP++) + size_t nDPCount = pDPCollection->GetCount(); + for (size_t nDP=0; nDP<nDPCount; ++nDP) { ScDPObject* pDPObj = (*pDPCollection)[nDP]; if ( !pDPObj->GetName().Len() ) diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index fae3c9bfa941..5584d5f9c64f 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -265,8 +265,8 @@ ScDPObject* lcl_GetDPObject( ScDocShell* pDocShell, SCTAB nTab, const String& rN ScDPCollection* pColl = pDoc->GetDPCollection(); if ( pColl ) { - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + size_t nCount = pColl->GetCount(); + for (size_t i=0; i<nCount; ++i) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab && @@ -347,8 +347,8 @@ ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByIndex_Impl( sal_Int32 nInd // api only handles sheet data at this time //! allow all data sources!!! sal_Int32 nFound = 0; - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + size_t nCount = pColl->GetCount(); + for (size_t i=0; i<nCount; ++i) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab ) @@ -499,8 +499,8 @@ sal_Int32 SAL_CALL ScDataPilotTablesObj::getCount() throw(RuntimeException) //! allow all data sources!!! USHORT nFound = 0; - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + size_t nCount = pColl->GetCount(); + for (size_t i=0; i<nCount; ++i) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab ) @@ -562,9 +562,9 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames() //! allow all data sources!!! USHORT nFound = 0; - USHORT nCount = pColl->GetCount(); - USHORT i; - for (i=0; i<nCount; i++) + size_t nCount = pColl->GetCount(); + size_t i; + for (i=0; i<nCount; ++i) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab ) @@ -574,7 +574,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames() USHORT nPos = 0; Sequence<OUString> aSeq(nFound); OUString* pAry = aSeq.getArray(); - for (i=0; i<nCount; i++) + for (i=0; i<nCount; ++i) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab ) @@ -598,8 +598,8 @@ sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName ) if ( pColl ) { String aNamStr(aName); - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + size_t nCount = pColl->GetCount(); + for (size_t i=0; i<nCount; ++i) { // api only handles sheet data at this time //! allow all data sources!!! diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 3db93dee0d96..55ac3d55ef7c 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -708,8 +708,8 @@ ULONG RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, { //Refresh all dpobjects ScDPCollection* pDPCollection = pDoc->GetDPCollection(); - USHORT nCount = pDPCollection->GetCount(); - for (USHORT i=0; i<nCount; i++) + size_t nCount = pDPCollection->GetCount(); + for (size_t i=0; i<nCount; ++i) { if ( (*pDPCollection)[i]->GetCacheId() == pDPObj->GetCacheId() ) { |