summaryrefslogtreecommitdiff
path: root/editeng
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 /editeng
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 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx4
-rw-r--r--editeng/source/editeng/impedit.cxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 801fca0e0b21..c6af2f4cb1e0 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -524,7 +524,7 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bActivat
return;
static const OString aPayload = OString::boolean(true);
- pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload.getStr());
+ pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload);
pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", aPayload);
}
}
@@ -542,7 +542,7 @@ void EditView::HideCursor(bool bDeactivate)
return;
OString aPayload = OString::boolean(false);
- pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload.getStr());
+ pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, aPayload);
pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE, "visible", aPayload);
}
}
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 7d378af4da14..b28e4fdca501 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -422,7 +422,7 @@ void ImpEditView::lokSelectionCallback(const std::optional<tools::PolyPolygon> &
if (mpLOKSpecialPositioning)
aPayload += ":: " + sRefPoint;
- mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, aPayload.getStr());
+ mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, aPayload);
tools::Rectangle& rEnd = aRectangles.back();
tools::Rectangle aEnd(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom());
@@ -431,7 +431,7 @@ void ImpEditView::lokSelectionCallback(const std::optional<tools::PolyPolygon> &
if (mpLOKSpecialPositioning)
aPayload += ":: " + sRefPoint;
- mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_END, aPayload.getStr());
+ mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_END, aPayload);
}
if (mpOtherShell)
@@ -442,7 +442,7 @@ void ImpEditView::lokSelectionCallback(const std::optional<tools::PolyPolygon> &
}
else
{
- mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRectangle.getStr());
+ mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRectangle);
mpViewShell->NotifyOtherViews(LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", sRectangle);
}