summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx2
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx4
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 6732eaaf5116..27cb2974cf8d 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -1579,7 +1579,7 @@ void SAL_CALL ModuleUIConfigurationManager::storeToStorage( const Reference< XSt
try
{
Reference< XStorage > xElementTypeStorage( Storage->openStorageElement(
- UIELEMENTTYPENAMES[i], ElementModes::READWRITE ));
+ OUString(UIELEMENTTYPENAMES[i]), ElementModes::READWRITE ));
UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][i];
if ( rElementType.bModified && xElementTypeStorage.is() )
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 498279eb40bc..e97cd33bb6c9 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -635,7 +635,7 @@ void UIConfigurationManager::impl_Initialize()
Reference< XStorage > xElementTypeStorage;
try
{
- xElementTypeStorage = m_xDocConfigStorage->openStorageElement( UIELEMENTTYPENAMES[i], nModes );
+ xElementTypeStorage = m_xDocConfigStorage->openStorageElement( OUString(UIELEMENTTYPENAMES[i]), nModes );
}
catch ( const css::container::NoSuchElementException& )
{
@@ -1307,7 +1307,7 @@ void SAL_CALL UIConfigurationManager::storeToStorage( const Reference< XStorage
try
{
Reference< XStorage > xElementTypeStorage( Storage->openStorageElement(
- UIELEMENTTYPENAMES[i], ElementModes::READWRITE ));
+ OUString(UIELEMENTTYPENAMES[i]), ElementModes::READWRITE ));
UIElementType& rElementType = m_aUIElements[i];
if ( rElementType.bModified && xElementTypeStorage.is() )
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 8741b3d872b0..fb5362307068 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -175,7 +175,7 @@ void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu )
OString sIdent = OString(aCommands[i]).copy(5);
sal_uInt16 nId = pPopupMenu->GetItemId(sIdent);
if (m_bShowMenuImages)
- pPopupMenu->SetItemImage(nId, Image(StockImage::Yes, aImgIds[i]));
+ pPopupMenu->SetItemImage(nId, Image(StockImage::Yes, OUString(aImgIds[i])));
else
pPopupMenu->SetItemImage(nId, Image());
}