summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/fmcomp/fmgridif.cxx10
-rw-r--r--svx/source/form/fmshimp.cxx2
-rw-r--r--svx/source/form/fmundo.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx8
5 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 8854f7d8272c..09a72b3b9918 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -343,7 +343,7 @@ void FrameSelectorImpl::InitArrowImageList()
assert(SAL_N_ELEMENTS(aImageIds) == 16);
for (size_t i = 0; i < SAL_N_ELEMENTS(aImageIds); ++i)
{
- BitmapEx aBmpEx(aImageIds[i]);
+ BitmapEx aBmpEx { OUString(aImageIds[i]) };
aBmpEx.Replace(pColorAry1, pColorAry2, 3);
maArrows.emplace_back(aBmpEx);
}
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index d70a853b3f91..b74a31cec7d9 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1561,11 +1561,11 @@ void FmXGridPeer::addColumnListeners(const Reference< XPropertySet >& xCol)
Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo();
for (size_t i=0; i<SAL_N_ELEMENTS(aPropsListenedTo); ++i)
{
- if ( xInfo->hasPropertyByName( aPropsListenedTo[i] ) )
+ if ( xInfo->hasPropertyByName( OUString(aPropsListenedTo[i]) ) )
{
- Property aPropDesc = xInfo->getPropertyByName( aPropsListenedTo[i] );
+ Property aPropDesc = xInfo->getPropertyByName( OUString(aPropsListenedTo[i]) );
if ( 0 != ( aPropDesc.Attributes & PropertyAttribute::BOUND ) )
- xCol->addPropertyChangeListener( aPropsListenedTo[i], this );
+ xCol->addPropertyChangeListener( OUString(aPropsListenedTo[i]), this );
}
}
}
@@ -1583,8 +1583,8 @@ void FmXGridPeer::removeColumnListeners(const Reference< XPropertySet >& xCol)
Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo();
for (const auto & i : aPropsListenedTo)
- if (xInfo->hasPropertyByName(i))
- xCol->removePropertyChangeListener(i, this);
+ if (xInfo->hasPropertyByName(OUString(i)))
+ xCol->removePropertyChangeListener(OUString(i), this);
}
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 9fabb0f386de..d532ff4aaeee 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1015,7 +1015,7 @@ void FmXFormShell::GetConversionMenu_Lock(weld::Menu& rNewMenu)
for (size_t i = 0; i < SAL_N_ELEMENTS(aConvertSlots); ++i)
{
// the corresponding image at it
- rNewMenu.append(OUString::createFromAscii(aConvertSlots[i]), SvxResId(RID_SVXSW_CONVERTMENU[i]), aImgIds[i]);
+ rNewMenu.append(OUString::createFromAscii(aConvertSlots[i]), SvxResId(RID_SVXSW_CONVERTMENU[i]), OUString(aImgIds[i]));
}
}
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index e934e7c6574c..355736067a75 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -555,7 +555,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
{
try
{
- xSet->setPropertyValue(aValueProperties[i], evt.NewValue);
+ xSet->setPropertyValue(OUString(aValueProperties[i]), evt.NewValue);
}
catch(const Exception&)
{
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 387957e95d9c..ea3b7603b962 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -126,7 +126,7 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow(
for (sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i)
{
- maImgDirection[i] = Image(StockImage::Yes, aDirectionBmps[i]);
+ maImgDirection[i] = Image(StockImage::Yes, OUString(aDirectionBmps[i]));
}
mxDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectValueSetHdl ) );
@@ -582,10 +582,10 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(svt::PopupWindowController* pCo
{
if( i != FROM_FRONT )
{
- maImgLightingOff[i] = Image(StockImage::Yes, aLightOffBmps[i]);
- maImgLightingOn[i] = Image(StockImage::Yes, aLightOnBmps[i]);
+ maImgLightingOff[i] = Image(StockImage::Yes, OUString(aLightOffBmps[i]));
+ maImgLightingOn[i] = Image(StockImage::Yes, OUString(aLightOnBmps[i]));
}
- maImgLightingPreview[i] = Image(StockImage::Yes, aLightPreviewBmps[i]);
+ maImgLightingPreview[i] = Image(StockImage::Yes, OUString(aLightPreviewBmps[i]));
}
mxLightingSet->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );