diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-02 01:18:42 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-02 18:46:47 +0200 |
commit | 116b9d6ddf2b61186b29f0370234eec9c1bbe306 (patch) | |
tree | 7f90a12333274086e33c4e0fabfd96a8e54e6b6c /basctl/source/basicide | |
parent | d7ba78e9c7be835a1e2ecdacd25995663e96862f (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 'basctl/source/basicide')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/macrodlg.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 10 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.hxx | 6 |
8 files changed, 15 insertions, 15 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 12a78d9b65f4..5384eb70fa89 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1400,7 +1400,7 @@ void ModulWindow::OnNewDocument () m_aXEditorWindow->SetLineNumberDisplay(bLineNumbers); } -OString ModulWindow::GetHid () const +OUString ModulWindow::GetHid () const { return HID_BASICIDE_MODULWINDOW; } diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 2c9bc3f9930f..116dab2bb905 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -387,7 +387,7 @@ public: virtual void Deactivating () override; virtual void OnNewDocument () override; - virtual OString GetHid () const override; + virtual OUString GetHid () const override; virtual ItemType GetType () const override; virtual bool HasActiveEditor () const override; diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 6e4208747f4a..4819de623900 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1555,7 +1555,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) // test if break point is enabled... std::unique_ptr<weld::Menu> xBrkPropMenu = xUIBuilder->weld_menu("breakmenu"); xBrkPropMenu->set_active("active", pBrk->bEnabled); - OString sCommand = xBrkPropMenu->popup_at_rect(pPopupParent, aRect); + OUString sCommand = xBrkPropMenu->popup_at_rect(pPopupParent, aRect); if (sCommand == "active") { pBrk->bEnabled = !pBrk->bEnabled; @@ -1573,7 +1573,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) else { std::unique_ptr<weld::Menu> xBrkListMenu = xUIBuilder->weld_menu("breaklistmenu"); - OString sCommand = xBrkListMenu->popup_at_rect(pPopupParent, aRect); + OUString sCommand = xBrkListMenu->popup_at_rect(pPopupParent, aRect); if (sCommand == "manage") { BreakPointDialog aBrkDlg(pPopupParent, GetBreakPoints()); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 309caa0357c9..4e51cd4ed760 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1242,7 +1242,7 @@ css::uno::Reference< css::accessibility::XAccessible > DialogWindow::CreateAcces return new AccessibleDialogWindow(this); } -OString DialogWindow::GetHid () const +OUString DialogWindow::GetHid () const { return HID_BASICIDE_DIALOGWINDOW; } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 5fd607108dc1..bbd71ad08ce0 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -313,7 +313,7 @@ WinBits const DockingWindow::StyleBits = WB_BORDER | WB_3DLOOK | WB_CLIPCHILDREN | WB_MOVEABLE | WB_SIZEABLE | WB_DOCKABLE; -DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& rUIXMLDescription, const OString& rID) +DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& rUIXMLDescription, const OUString& rID) : ResizableDockingWindow(pParent) , m_xBuilder(Application::CreateInterimBuilder(m_xBox.get(), rUIXMLDescription, true)) , pLayout(nullptr) diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index e2511ee53b6b..6b4afb79f772 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -791,7 +791,7 @@ IMPL_LINK(MacroChooser, ContextMenuHdl, const CommandEvent&, rCEvt, bool) xDropMenu->set_active("alphabetically", m_xMacroBox->get_sort_order()); xDropMenu->set_active("properorder", !m_xMacroBox->get_sort_order()); - OString sCommand(xPopup->popup_at_rect(m_xMacroBox.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1)))); + OUString sCommand(xPopup->popup_at_rect(m_xMacroBox.get(), tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1)))); if (sCommand == "alphabetically") { m_xMacroBox->make_sorted(); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 617d80e7f033..4b67e320b5ac 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -211,7 +211,7 @@ OrganizeDialog::OrganizeDialog(weld::Window* pParent, const css::uno::Reference< SetCurrentEntry(xDocFrame); - OString sPage; + OUString sPage; if (tabId == 0) sPage = "modules"; else if (tabId == 1) @@ -225,7 +225,7 @@ OrganizeDialog::OrganizeDialog(weld::Window* pParent, const css::uno::Reference< pDispatcher->Execute( SID_BASICIDE_STOREALLMODULESOURCES ); } -IMPL_LINK(OrganizeDialog, ActivatePageHdl, const OString&, rPage, void) +IMPL_LINK(OrganizeDialog, ActivatePageHdl, const OUString&, rPage, void) { if (rPage == "modules") m_xModulePage->ActivatePage(); @@ -239,7 +239,7 @@ OrganizeDialog::~OrganizeDialog() { } -OrganizePage::OrganizePage(weld::Container* pParent, const OUString& rUIFile, const OString &rName, OrganizeDialog* pDialog) +OrganizePage::OrganizePage(weld::Container* pParent, const OUString& rUIFile, const OUString &rName, OrganizeDialog* pDialog) : m_pDialog(pDialog) , m_xBuilder(Application::CreateBuilder(pParent, rUIFile)) , m_xContainer(m_xBuilder->weld_container(rName)) @@ -563,8 +563,8 @@ public: }; // ObjectPage -ObjectPage::ObjectPage(weld::Container* pParent, const OString &rName, BrowseMode nMode, OrganizeDialog* pDialog) - : OrganizePage(pParent, "modules/BasicIDE/ui/" + OStringToOUString(rName, RTL_TEXTENCODING_UTF8).toAsciiLowerCase() + ".ui", +ObjectPage::ObjectPage(weld::Container* pParent, const OUString &rName, BrowseMode nMode, OrganizeDialog* pDialog) + : OrganizePage(pParent, "modules/BasicIDE/ui/" + rName.toAsciiLowerCase() + ".ui", rName, pDialog) , m_xBasicBox(new SbTreeListBox(m_xBuilder->weld_tree_view("library"), pDialog->getDialog())) , m_xEditButton(m_xBuilder->weld_button("edit")) diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index 37e8567b5e6c..4f4cbcbda3ad 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -115,7 +115,7 @@ protected: std::unique_ptr<weld::Builder> m_xBuilder; std::unique_ptr<weld::Container> m_xContainer; - OrganizePage(weld::Container* pParent, const OUString& rUIFile, const OString &rName, OrganizeDialog* pDialog); + OrganizePage(weld::Container* pParent, const OUString& rUIFile, const OUString &rName, OrganizeDialog* pDialog); virtual ~OrganizePage(); public: @@ -147,7 +147,7 @@ class ObjectPage final : public OrganizePage void EndTabDialog(); public: - ObjectPage(weld::Container* pParent, const OString& rName, BrowseMode nMode, OrganizeDialog* pDialog); + ObjectPage(weld::Container* pParent, const OUString& rName, BrowseMode nMode, OrganizeDialog* pDialog); virtual ~ObjectPage() override; void SetCurrentEntry(const EntryDescriptor& rDesc) { m_xBasicBox->SetCurrentEntry(rDesc); } @@ -206,7 +206,7 @@ private: std::unique_ptr<ObjectPage> m_xDialogPage; std::unique_ptr<LibPage> m_xLibPage; - DECL_LINK(ActivatePageHdl, const OString&, void); + DECL_LINK(ActivatePageHdl, const OUString&, void); void SetCurrentEntry(const css::uno::Reference<css::frame::XFrame>& xDocFrame); |