diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-04 14:26:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-05 08:39:23 +0200 |
commit | d15a6560bd445cd1931e9fded6ad8ecfdd54211b (patch) | |
tree | dc23fce7925c88620abe8cc032b27f25b0a888e0 /vcl | |
parent | c895edf3f67f19d8d2012674c084456a7851436e (diff) |
use more string_view
found by examining the call sites of OString::getToken
which means I needed to add a new o3tl::equalsAscii function
Change-Id: I7dc0ea1cf5ce8090a708d44f2cf7c938fa200c5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133826
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtksalmenu.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx index ac71e3390d87..619c24b20797 100644 --- a/vcl/unx/gtk3/gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtksalmenu.cxx @@ -17,6 +17,7 @@ #include <vcl/pngwrite.hxx> #include <vcl/pdfwriter.hxx> // for escapeStringXML +#include <o3tl/string_view.hxx> #include <sal/log.hxx> #include <tools/stream.hxx> #include <window.h> @@ -76,16 +77,16 @@ namespace OString sCommand(action_name); sal_Int32 nIndex = 0; - OString sWindow = sCommand.getToken(0, '-', nIndex); - OString sGtkSalMenu = sCommand.getToken(0, '-', nIndex); - OString sItemId = sCommand.getToken(0, '-', nIndex); + std::string_view sWindow = o3tl::getToken(sCommand, 0, '-', nIndex); + std::string_view sGtkSalMenu = o3tl::getToken(sCommand, 0, '-', nIndex); + std::string_view sItemId = o3tl::getToken(sCommand, 0, '-', nIndex); - GtkSalMenu* pSalSubMenu = reinterpret_cast<GtkSalMenu*>(sGtkSalMenu.toInt64()); + GtkSalMenu* pSalSubMenu = reinterpret_cast<GtkSalMenu*>(o3tl::toInt64(sGtkSalMenu)); assert(sWindow == "window" && pSalSubMenu); (void) sWindow; - return MenuAndId(pSalSubMenu, sItemId.toInt32()); + return MenuAndId(pSalSubMenu, o3tl::toInt32(sItemId)); } } |