diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-04-21 21:09:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-22 13:27:56 +0200 |
commit | 9820f11ad2b1ef32e5527eec519b0a7c766e2602 (patch) | |
tree | 2ffa9a42bed16ab9a790d78b8f42a76996fdbe01 /unoidl/source/unoidl.cxx | |
parent | e4d1731ba3e8bac2801d1b76cfb66bf7f9795468 (diff) |
address review comments on "use more string in unoidl.."
on
commit 2d9291b9433c9645b0870525211f74bfb1151555
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Thu Apr 21 12:53:15 2022 +0200
use more string_view in unoidl,codemaker
Primarily reverting the findEntity call-chain to use OUString
instead of std::u16string_view.
Change-Id: Ib01b9473c859bba3791563df753823bbf0a87ce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoidl/source/unoidl.cxx')
-rw-r--r-- | unoidl/source/unoidl.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/unoidl/source/unoidl.cxx b/unoidl/source/unoidl.cxx index 5dfce2348d0c..749f9afe4f25 100644 --- a/unoidl/source/unoidl.cxx +++ b/unoidl/source/unoidl.cxx @@ -164,7 +164,7 @@ ServiceBasedSingletonEntity::~ServiceBasedSingletonEntity() noexcept {} Provider::~Provider() noexcept {} -rtl::Reference< Provider > Manager::addProvider(std::u16string_view uri) { +rtl::Reference< Provider > Manager::addProvider(OUString const & uri) { rtl::Reference< Provider > p(loadProvider(uri)); assert(p.is()); { @@ -174,7 +174,7 @@ rtl::Reference< Provider > Manager::addProvider(std::u16string_view uri) { return p; } -rtl::Reference< Entity > Manager::findEntity(std::u16string_view name) const { +rtl::Reference< Entity > Manager::findEntity(OUString const & name) const { //TODO: caching? (here or in cppuhelper::TypeManager?) osl::MutexGuard g(mutex_); for (auto & i: providers_) { @@ -194,8 +194,7 @@ rtl::Reference< MapCursor > Manager::createCursor(OUString const & name) Manager::~Manager() noexcept {} -rtl::Reference< Provider > Manager::loadProvider(std::u16string_view _uri) { - OUString uri(_uri); +rtl::Reference< Provider > Manager::loadProvider(OUString const & uri) { osl::DirectoryItem item; if (osl::DirectoryItem::get(uri, item) == osl::FileBase::E_None) { osl::FileStatus status(osl_FileStatus_Mask_Type); |