From 46c5de832868d2812448b2caace3eeaa9237b9f6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 17 Dec 2020 22:02:06 +0200 Subject: 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 --- svx/source/fmcomp/fmgridif.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'svx/source/fmcomp/fmgridif.cxx') 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; ihasPropertyByName( 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); } -- cgit v1.2.3