summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-07 10:02:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-09 20:51:44 +0200
commiteaf071397a1ff30536616f2ed76051f77fd38ed6 (patch)
treece55cdc75a0826c54b6b60458a028251f11fcb78 /sc/source/ui/view/viewfun2.cxx
parent1e79befa61a08de7a1ddaccb6c435dbb8015c063 (diff)
new loplugin:unnecessarygetstr
which prevents constructing unnecessary temporaries via getStr() Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/viewfun2.cxx')
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 298a54d9ae01..222ee4a61e98 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2114,7 +2114,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
GetFrameWin()->LeaveWait();
if (!bIsApi)
{
- GetViewData().GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, pSearchItem->GetSearchString().toUtf8().getStr());
+ GetViewData().GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, pSearchItem->GetSearchString().toUtf8());
SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound);
}
@@ -2197,7 +2197,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
boost::property_tree::write_json(aStream, aTree);
OString aPayload = aStream.str().c_str();
SfxViewShell* pViewShell = GetViewData().GetViewShell();
- pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_RESULT_SELECTION, aPayload.getStr());
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_RESULT_SELECTION, aPayload);
// Trigger LOK_CALLBACK_TEXT_SELECTION now.
MarkDataChanged();