summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-19 09:14:59 +0200
committerNoel Grandin <noel@peralex.com>2015-11-19 09:33:29 +0200
commit2554efabb6d7cd2ad9f7cfdddd0712c25cdca1cd (patch)
tree1b8fd3940910ffcd328e16a53e208c099f67ab21 /dbaccess
parentf7b5f477bfd942e0a1d8880c372635000d724dd7 (diff)
use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.cxx8
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx3
3 files changed, 4 insertions, 11 deletions
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 3589548024cf..16895634d59e 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -412,9 +412,7 @@ Sequence< Type > OConnection::getTypes() throw (RuntimeException, std::exception
if ( !m_bSupportsGroups )
aNormalizedTypes.erase( cppu::UnoType<XGroupsSupplier>::get() );
- Sequence< Type > aSupportedTypes( aNormalizedTypes.size() );
- ::std::copy( aNormalizedTypes.begin(), aNormalizedTypes.end(), aSupportedTypes.getArray() );
- return aSupportedTypes;
+ return comphelper::containerToSequence<Type>(aNormalizedTypes);
}
Sequence< sal_Int8 > OConnection::getImplementationId() throw (RuntimeException, std::exception)
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 4fca0c824b0a..01a8f9435612 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1706,9 +1706,7 @@ bool OApplicationController::onContainerSelect(ElementType _eType)
SelectionByElementType::iterator pendingSelection = m_aPendingSelection.find( _eType );
if ( pendingSelection != m_aPendingSelection.end() )
{
- Sequence< OUString > aSelected( pendingSelection->second.size() );
- ::std::copy( pendingSelection->second.begin(), pendingSelection->second.end(), aSelected.getArray() );
- getContainer()->selectElements( aSelected );
+ getContainer()->selectElements( comphelper::containerToSequence(pendingSelection->second) );
m_aPendingSelection.erase( pendingSelection );
}
@@ -2861,9 +2859,7 @@ sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection ) throw
{
if ( sel->first == m_eCurrentType )
{
- Sequence< OUString > aSelected( sel->second.size() );
- ::std::copy( sel->second.begin(), sel->second.end(), aSelected.getArray() );
- getContainer()->selectElements( aSelected );
+ getContainer()->selectElements( comphelper::containerToSequence(sel->second) );
}
else
{
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 3d235aa31c8c..eba3487dc60b 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -552,8 +552,7 @@ bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_f
::std::vector< OUString > aNames( aPropertyValues.getNames() );
::std::sort(aNames.begin(), aNames.end());
- Sequence< OUString > aPropNames( aNames.size() );
- ::std::copy( aNames.begin(), aNames.end(), aPropNames.getArray() );
+ Sequence< OUString > aPropNames( comphelper::containerToSequence(aNames) );
Sequence< Any > aPropValues( aNames.size() );
::std::transform( aNames.begin(), aNames.end(), aPropValues.getArray(), SelectValueByName( aPropertyValues ) );