summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpobject.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-03-08 20:33:57 +0200
committerEike Rathke <erack@redhat.com>2016-03-31 15:18:55 +0000
commit374b69716dcf83dbbc1e240eb02e5101d9b6a983 (patch)
tree7125117499905f484d603ad84a23577ab21ae4ed /sc/source/core/data/dpobject.cxx
parent8c32ffd59aef2c7b319d64c310e7d0a46dbb9e2c (diff)
sequence->vector in sc
Change-Id: I3edf08fe5db798dbc1190db375cfb82c5b9bc5da Reviewed-on: https://gerrit.libreoffice.org/23696 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/core/data/dpobject.cxx')
-rw-r--r--sc/source/core/data/dpobject.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 7324c7f6428e..c70e02e13c9e 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2669,9 +2669,9 @@ bool ScDPObject::HasRegisteredSources()
return bFound;
}
-uno::Sequence<OUString> ScDPObject::GetRegisteredSources()
+std::vector<OUString> ScDPObject::GetRegisteredSources()
{
- uno::Sequence<OUString> aSeq(0);
+ std::vector<OUString> aVec;
// use implementation names...
@@ -2683,7 +2683,6 @@ uno::Sequence<OUString> ScDPObject::GetRegisteredSources()
SCDPSOURCE_SERVICE );
if ( xEnum.is() )
{
- long nCount = 0;
while ( xEnum->hasMoreElements() )
{
uno::Any aAddInAny = xEnum->nextElement();
@@ -2697,10 +2696,7 @@ uno::Sequence<OUString> ScDPObject::GetRegisteredSources()
if ( xInfo.is() )
{
OUString sName = xInfo->getImplementationName();
-
- aSeq.realloc( nCount+1 );
- aSeq.getArray()[nCount] = sName;
- ++nCount;
+ aVec.push_back( sName );
}
}
}
@@ -2708,7 +2704,7 @@ uno::Sequence<OUString> ScDPObject::GetRegisteredSources()
}
}
- return aSeq;
+ return aVec;
}
uno::Reference<sheet::XDimensionsSupplier> ScDPObject::CreateSource( const ScDPServiceDesc& rDesc )