summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-17 22:02:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-19 17:53:06 +0100
commit46c5de832868d2812448b2caace3eeaa9237b9f6 (patch)
tree6f25538cfb7a0def54ff7ac5b6b17eb22a76178a /basctl
parent6dd1d2268487920e8bda44dfd169a5bda4d62f13 (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 'basctl')
-rw-r--r--basctl/source/basicide/baside2b.cxx2
-rw-r--r--basctl/source/basicide/bastype3.cxx2
-rw-r--r--basctl/source/basicide/moduldl2.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 5ebca907749e..3bb09f3bb140 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1419,7 +1419,7 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext)
Size const aOutSz = GetOutputSize();
tools::Long const nLineHeight = GetTextHeight();
- Image aMarker = GetImage(bErrorMarker ? std::u16string_view(u"" RID_BMP_ERRORMARKER) : std::u16string_view(u"" RID_BMP_STEPMARKER));
+ Image aMarker = GetImage(OUString(bErrorMarker ? std::u16string_view(u"" RID_BMP_ERRORMARKER) : std::u16string_view(u"" RID_BMP_STEPMARKER)));
Size aMarkerSz(aMarker.GetSizePixel());
aMarkerSz = rRenderContext.PixelToLogic(aMarkerSz);
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index aedc8ee307f8..4318ad803306 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -102,7 +102,7 @@ IMPL_LINK(SbTreeListBox, RequestingChildrenHdl, const weld::TreeIter&, rEntry, b
// exchange image
const bool bDlgMode = (nMode & BrowseMode::Dialogs) && !(nMode & BrowseMode::Modules);
auto const aImage(bDlgMode ? std::u16string_view(u"" RID_BMP_DLGLIB) : std::u16string_view(u"" RID_BMP_MODLIB));
- SetEntryBitmaps(rEntry, aImage);
+ SetEntryBitmaps(rEntry, OUString(aImage));
}
else
{
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 5b78745613da..e04558a42e7f 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1351,7 +1351,7 @@ void createLibImpl(weld::Window* pWin, const ScriptDocument& rDocument,
BrowseMode nMode = pBasicBox->GetMode();
bool bDlgMode = ( nMode & BrowseMode::Dialogs ) && !( nMode & BrowseMode::Modules );
const auto sId = bDlgMode ? std::u16string_view(u"" RID_BMP_DLGLIB) : std::u16string_view(u"" RID_BMP_MODLIB);
- pBasicBox->AddEntry(aLibName, sId, xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_LIBRARY));
+ pBasicBox->AddEntry(aLibName, OUString(sId), xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_LIBRARY));
pBasicBox->AddEntry(aModName, RID_BMP_MODULE, xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_MODULE));
pBasicBox->set_cursor(*xRootEntry);
pBasicBox->select(*xRootEntry);