summaryrefslogtreecommitdiff
path: root/cui/source/customize
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 /cui/source/customize
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 'cui/source/customize')
-rw-r--r--cui/source/customize/SvxMenuConfigPage.cxx10
-rw-r--r--cui/source/customize/SvxToolbarConfigPage.cxx10
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx2
-rw-r--r--cui/source/customize/macropg.cxx2
5 files changed, 14 insertions, 14 deletions
diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx
index 5793825b5d76..dad5b5e1fc55 100644
--- a/cui/source/customize/SvxMenuConfigPage.cxx
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -275,7 +275,7 @@ void SvxMenuConfigPage::SelectElement()
UpdateButtonStates();
}
-IMPL_LINK(SvxMenuConfigPage, GearHdl, const OString&, rIdent, void)
+IMPL_LINK(SvxMenuConfigPage, GearHdl, const OUString&, rIdent, void)
{
if (rIdent == "menu_gear_add")
{
@@ -371,7 +371,7 @@ IMPL_LINK_NOARG(SvxMenuConfigPage, RemoveCommandHdl, weld::Button&, void)
}
}
-IMPL_LINK(SvxMenuConfigPage, InsertHdl, const OString&, rIdent, void)
+IMPL_LINK(SvxMenuConfigPage, InsertHdl, const OUString&, rIdent, void)
{
weld::TreeView& rTreeView = m_xContentsListBox->get_widget();
if (rIdent == "insertseparator")
@@ -423,7 +423,7 @@ IMPL_LINK(SvxMenuConfigPage, InsertHdl, const OString&, rIdent, void)
}
}
-IMPL_LINK(SvxMenuConfigPage, ModifyItemHdl, const OString&, rIdent, void)
+IMPL_LINK(SvxMenuConfigPage, ModifyItemHdl, const OUString&, rIdent, void)
{
if (rIdent == "renameItem")
{
@@ -541,7 +541,7 @@ IMPL_LINK(SvxMenuConfigPage, ContentContextMenuHdl, const CommandEvent&, rCEvt,
xContextMenu->set_visible("changeIcon", false);
xContextMenu->set_visible("resetIcon", false);
xContextMenu->set_visible("restoreDefault", false);
- OString sCommand(xContextMenu->popup_at_rect(
+ OUString sCommand(xContextMenu->popup_at_rect(
&rTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1))));
if (sCommand == "remove")
@@ -580,7 +580,7 @@ IMPL_LINK(SvxMenuConfigPage, FunctionContextMenuHdl, const CommandEvent&, rCEvt,
xContextMenu->set_visible("changeIcon", false);
xContextMenu->set_visible("resetIcon", false);
xContextMenu->set_visible("restoreDefault", false);
- OString sCommand(xContextMenu->popup_at_rect(
+ OUString sCommand(xContextMenu->popup_at_rect(
&rTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1))));
if (sCommand == "add")
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index 359dc02bb1f5..73a836ff7a17 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -287,7 +287,7 @@ IMPL_LINK_NOARG(SvxToolbarConfigPage, SelectToolbarEntry, weld::TreeView&, void)
UpdateButtonStates();
}
-IMPL_LINK(SvxToolbarConfigPage, GearHdl, const OString&, rIdent, void)
+IMPL_LINK(SvxToolbarConfigPage, GearHdl, const OUString&, rIdent, void)
{
SvxConfigEntry* pCurrentToolbar = GetTopLevelSelection();
@@ -427,7 +427,7 @@ IMPL_LINK_NOARG(SvxToolbarConfigPage, RemoveCommandHdl, weld::Button&, void)
DeleteSelectedContent();
}
-IMPL_LINK(SvxToolbarConfigPage, InsertHdl, const OString&, rIdent, void)
+IMPL_LINK(SvxToolbarConfigPage, InsertHdl, const OUString&, rIdent, void)
{
if (rIdent == "insertseparator")
{
@@ -452,7 +452,7 @@ IMPL_LINK(SvxToolbarConfigPage, InsertHdl, const OString&, rIdent, void)
}
}
-IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void)
+IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OUString&, rIdent, void)
{
bool bNeedsApply = false;
@@ -876,7 +876,7 @@ IMPL_LINK(SvxToolbarConfigPage, ContentContextMenuHdl, const CommandEvent&, rCEv
xContextMenu->set_visible("changeIcon", bIsValidSelection && !bIsSeparator);
xContextMenu->set_visible("resetIcon", bIsValidSelection && !bIsSeparator);
xContextMenu->set_visible("restoreDefault", bIsValidSelection && !bIsSeparator);
- OString sCommand(xContextMenu->popup_at_rect(
+ OUString sCommand(xContextMenu->popup_at_rect(
&rTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1))));
if (sCommand == "remove")
@@ -916,7 +916,7 @@ IMPL_LINK(SvxToolbarConfigPage, FunctionContextMenuHdl, const CommandEvent&, rCE
xContextMenu->set_visible("changeIcon", false);
xContextMenu->set_visible("resetIcon", false);
xContextMenu->set_visible("restoreDefault", false);
- OString sCommand(xContextMenu->popup_at_rect(
+ OUString sCommand(xContextMenu->popup_at_rect(
&rTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1))));
if (sCommand == "add")
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 91584562a647..d41012850bce 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -236,7 +236,7 @@ SvxConfigDialog::SvxConfigDialog(weld::Window * pParent, const SfxItemSet* pInSe
#endif
}
-void SvxConfigDialog::ActivatePage(const OString& rPage)
+void SvxConfigDialog::ActivatePage(const OUString& rPage)
{
SfxTabDialogController::ActivatePage(rPage);
GetResetButton()->set_visible(rPage != "keyboard");
@@ -257,7 +257,7 @@ void SvxConfigDialog::SetFrame(const css::uno::Reference<css::frame::XFrame>& xF
RemoveTabPage("keyboard");
}
-void SvxConfigDialog::PageCreated(const OString &rId, SfxTabPage& rPage)
+void SvxConfigDialog::PageCreated(const OUString &rId, SfxTabPage& rPage)
{
if (rId == "menus" || rId == "keyboard" || rId == "notebookbar"
|| rId == "toolbars" || rId == "contextmenus")
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 7746333fe796..aa77952563a8 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1204,7 +1204,7 @@ IMPL_LINK(SvxScriptSelectorDialog, ContextMenuHdl, const CommandEvent&, rCEvt, b
xDropMenu->set_active("alphabetically", xTreeView.get_sort_order());
xDropMenu->set_active("properorder", !xTreeView.get_sort_order());
- OString sCommand(xPopup->popup_at_rect(&xTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1))));
+ OUString sCommand(xPopup->popup_at_rect(&xTreeView, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1))));
if (sCommand == "alphabetically")
{
xTreeView.make_sorted();
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 3980c8b6c3f7..6a22ee2c3d99 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -72,7 +72,7 @@ void SvxMacroTabPage_::EnableButtons()
}
SvxMacroTabPage_::SvxMacroTabPage_(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription,
- const OString& rID, const SfxItemSet& rAttrSet)
+ const OUString& rID, const SfxItemSet& rAttrSet)
: SfxTabPage(pPage, pController, rUIXMLDescription, rID, &rAttrSet)
, m_nAssignedEvents(0)
, bDocModified(false)