summaryrefslogtreecommitdiff
path: root/sw/source/uibase/ribbar
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-02 01:18:42 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-04-02 18:46:47 +0200
commit116b9d6ddf2b61186b29f0370234eec9c1bbe306 (patch)
tree7f90a12333274086e33c4e0fabfd96a8e54e6b6c /sw/source/uibase/ribbar
parentd7ba78e9c7be835a1e2ecdacd25995663e96862f (diff)
Avoid conversions between OUString and OString in VCL
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/uibase/ribbar')
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 9a5c12707991..2adddb87cd33 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -292,10 +292,10 @@ void SwInputWindow::ShowWin()
}
}
-void SwInputWindow::MenuHdl(std::string_view command)
+void SwInputWindow::MenuHdl(std::u16string_view command)
{
if (!command.empty())
- mxEdit->replace_selection(OUString::fromUtf8(command) + " ");
+ mxEdit->replace_selection(OUString::Concat(command) + " ");
}
IMPL_LINK_NOARG(SwInputWindow, DropdownClickHdl, ToolBox *, void)
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 840b94b73442..eed488a72c46 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -854,7 +854,7 @@ void SAL_CALL PrevNextScrollToolboxController::statusChanged( const css::frame::
if (rEvent.FeatureURL.Path == "NavElement")
{
if (m_pToolbar)
- m_pToolbar->set_item_tooltip_text(m_aCommandURL.toUtf8(), lcl_GetScrollToolTip(meType != PrevNextScrollToolboxController::PREVIOUS));
+ m_pToolbar->set_item_tooltip_text(m_aCommandURL, lcl_GetScrollToolTip(meType != PrevNextScrollToolboxController::PREVIOUS));
else
{
ToolBox* pToolBox = nullptr;
@@ -866,7 +866,7 @@ void SAL_CALL PrevNextScrollToolboxController::statusChanged( const css::frame::
else if (rEvent.FeatureURL.Path == "ScrollToPrevious" || rEvent.FeatureURL.Path == "ScrollToNext")
{
if (m_pToolbar)
- m_pToolbar->set_item_sensitive(m_aCommandURL.toUtf8(), rEvent.IsEnabled);
+ m_pToolbar->set_item_sensitive(m_aCommandURL, rEvent.IsEnabled);
else
{
ToolBox* pToolBox = nullptr;