summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-18 13:12:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-21 07:33:57 +0100
commit2af5d6006948890229d9e55feb56e0e849bf857d (patch)
tree063ecb733421a7fa8d33720d92c67316a1af9a5c /dbaccess
parent2b34be5be176e6080f0a39294bf09c6d6183f4b5 (diff)
use comphelper::containerToSequence in OGenericUnoController
Change-Id: If58a22a3d9536ade5f63a3708fd0b6c53f2e21c3 Reviewed-on: https://gerrit.libreoffice.org/66585 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx23
1 files changed, 2 insertions, 21 deletions
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index f990224b11c4..e99725deb228 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -1204,37 +1204,18 @@ Sequence< ::sal_Int16 > SAL_CALL OGenericUnoController::getSupportedCommandGroup
return comphelper::mapKeysToSequence( aCmdHashMap );
}
-namespace
-{
- //Current c++0x draft (apparently) has std::identity, but not operator()
- template<typename T> struct SGI_identity
- {
- T& operator()(T& x) const { return x; }
- const T& operator()(const T& x) const { return x; }
- };
-}
-
Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableDispatchInformation( ::sal_Int16 CommandGroup )
{
std::vector< DispatchInformation > aInformationVector;
- DispatchInformation aDispatchInfo;
for (auto const& supportedFeature : m_aSupportedFeatures)
{
if ( sal_Int16( supportedFeature.second.GroupId ) == CommandGroup )
{
- aDispatchInfo = supportedFeature.second;
- aInformationVector.push_back( aDispatchInfo );
+ aInformationVector.push_back( supportedFeature.second );
}
}
- Sequence< DispatchInformation > aInformation( aInformationVector.size() );
- std::transform( aInformationVector.begin(),
- aInformationVector.end(),
- aInformation.getArray(),
- SGI_identity< DispatchInformation >()
- );
-
- return aInformation;
+ return comphelper::containerToSequence( aInformationVector );
}
void OGenericUnoController::fillSupportedFeatures()