summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-25 08:14:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-30 12:32:14 +0100
commit8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch)
treedd45d452202998297b8562743ea6345462304d04 /sw/source/uibase/utlui
parentd05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff)
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 6eceb15435eb..51a4bbd825cc 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2769,7 +2769,7 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint)
}
}
-void SwContentTree::ExecCommand(const OString& rCmd, bool bOutlineWithChildren)
+void SwContentTree::ExecCommand(std::string_view rCmd, bool bOutlineWithChildren)
{
const bool bUp = rCmd == "chapterup";
const bool bUpDown = bUp || rCmd == "chapterdown";
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index b550b0058000..095ec76e581c 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -292,7 +292,7 @@ IMPL_LINK(SwGlobalTree, CommandHdl, const CommandEvent&, rCEvt, bool)
return bPop;
}
-void SwGlobalTree::TbxMenuHdl(const OString& rCommand, weld::Menu& rMenu)
+void SwGlobalTree::TbxMenuHdl(std::string_view rCommand, weld::Menu& rMenu)
{
const MenuEnableFlags nEnableFlags = GetEnableFlags();
if (rCommand == "insert")
@@ -560,7 +560,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
}
}
-void SwGlobalTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry)
+void SwGlobalTree::ExecuteContextMenuAction(std::string_view rSelectedPopupEntry)
{
bool bUpdateHard = false;
@@ -808,7 +808,7 @@ void SwGlobalTree::HideTree()
m_xTreeView->hide();
}
-void SwGlobalTree::ExecCommand(const OString &rCmd)
+void SwGlobalTree::ExecCommand(std::string_view rCmd)
{
int nEntry = m_xTreeView->get_selected_index();
if (nEntry == -1)