diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-07 10:43:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-07 11:58:59 +0100 |
commit | b75632f3086b2f7af0606ef17d6535c514528644 (patch) | |
tree | f2a0d6860a84ac68e5007be384652effb9bec79e /desktop/source | |
parent | 5b910af084924e11b9a74002fd53843e88005db4 (diff) |
use comphelper::containerToSequence
Change-Id: Ib1cd28c8cabf8899c43701cb638d1191c593dad0
Reviewed-on: https://gerrit.libreoffice.org/50872
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/migration/migration.cxx | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 7f5b52a74b02..a42602bc7204 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -681,21 +681,6 @@ bool getComponent(OUString const & path, OUString * component) return true; } -uno::Sequence< OUString > setToSeq(std::set< OUString > const & set) -{ - std::set< OUString >::size_type n = set.size(); - if (n > SAL_MAX_INT32) { - throw std::bad_alloc(); - } - uno::Sequence< OUString > seq(static_cast< sal_Int32 >(n)); - sal_Int32 i = 0; - for (auto const& elem : set) - { - seq[i++] = elem; - } - return seq; -} - } void MigrationImpl::copyConfig() @@ -756,8 +741,9 @@ void MigrationImpl::copyConfig() configuration::Update::get( comphelper::getProcessComponentContext())-> insertModificationXcuFile( - regFilePath, setToSeq(comp.second.includedPaths), - setToSeq(comp.second.excludedPaths)); + regFilePath, + comphelper::containerToSequence(comp.second.includedPaths), + comphelper::containerToSequence(comp.second.excludedPaths)); } else { SAL_INFO( "desktop.migration", "configuration migration component " << comp.first << " ignored (only excludes, no includes)" ); } |