diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-12-17 22:02:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-19 17:53:06 +0100 |
commit | 46c5de832868d2812448b2caace3eeaa9237b9f6 (patch) | |
tree | 6f25538cfb7a0def54ff7ac5b6b17eb22a76178a /sd | |
parent | 6dd1d2268487920e8bda44dfd169a5bda4d62f13 (diff) |
make *String(string_view) constructors explicit
to make it more obvious when we are constructing heap OUStrings
code and potentially inadvertently throwing away performance.
And fix a handful of places so revealed.
Change-Id: I0cf390f78026f8a670aaab53424cd31510633051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107923
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/stlsheet.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/viewoverlaymanager.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 8b4ca07413bd..270b1c5d63b7 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -618,7 +618,7 @@ OUString GetApiNameForHelpId(sal_uLong nId) for (const auto& i : pApiNameMap) if (nId == i.mnHelpId) - return i.mpApiName; + return OUString(i.mpApiName); return OUString(); } diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 5c309ba4cf67..95c34d0655bd 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -99,8 +99,8 @@ static BitmapEx* getButtonImage( int index, bool large ) { for (size_t i = 0; i < SAL_N_ELEMENTS(aSmallPlaceHolders); i++ ) { - gSmallButtonImages[i].set(std::make_unique<BitmapEx>(aSmallPlaceHolders[i])); - gLargeButtonImages[i].set(std::make_unique<BitmapEx>(aBigPlaceHolders[i])); + gSmallButtonImages[i].set(std::make_unique<BitmapEx>(OUString(aSmallPlaceHolders[i]))); + gLargeButtonImages[i].set(std::make_unique<BitmapEx>(OUString(aBigPlaceHolders[i]))); } } |