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 /svx/source/dialog/_contdlg.cxx | |
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 'svx/source/dialog/_contdlg.cxx')
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index a7089208f808..ec122e3b1373 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -350,7 +350,7 @@ void SvxSuperContourDlg::UpdateGraphic( const Graphic& rGraphic, bool _bGraphicL // Click handler for ToolBox -IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OString&, rId, void) +IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OUString&, rId, void) { if (rId == "TBI_APPLY") { @@ -456,18 +456,18 @@ IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OString&, rId, void) m_xContourWnd->QueueIdleUpdate(); } -void SvxSuperContourDlg::SetActiveTool(std::string_view rId) +void SvxSuperContourDlg::SetActiveTool(std::u16string_view rId) { - m_xTbx1->set_item_active("TBI_SELECT", rId == "TBI_SELECT"); - m_xTbx1->set_item_active("TBI_RECT", rId == "TBI_RECT"); - m_xTbx1->set_item_active("TBI_CIRCLE", rId == "TBI_CIRCLE"); - m_xTbx1->set_item_active("TBI_POLY", rId == "TBI_POLY"); + m_xTbx1->set_item_active("TBI_SELECT", rId == u"TBI_SELECT"); + m_xTbx1->set_item_active("TBI_RECT", rId == u"TBI_RECT"); + m_xTbx1->set_item_active("TBI_CIRCLE", rId == u"TBI_CIRCLE"); + m_xTbx1->set_item_active("TBI_POLY", rId == u"TBI_POLY"); } -void SvxSuperContourDlg::SetActivePoly(std::string_view rId) +void SvxSuperContourDlg::SetActivePoly(std::u16string_view rId) { - m_xTbx1->set_item_active("TBI_POLYMOVE", rId == "TBI_POLYMOVE"); - m_xTbx1->set_item_active("TBI_POLYINSERT", rId == "TBI_POLYINSERT"); + m_xTbx1->set_item_active("TBI_POLYMOVE", rId == u"TBI_POLYMOVE"); + m_xTbx1->set_item_active("TBI_POLYINSERT", rId == u"TBI_POLYINSERT"); } IMPL_LINK( SvxSuperContourDlg, MousePosHdl, GraphCtrl*, pWnd, void ) @@ -575,10 +575,10 @@ IMPL_LINK( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void ) switch( pWnd->GetPolyEditMode() ) { case SID_BEZIER_MOVE: - SetActivePoly("TBI_POLYMOVE"); + SetActivePoly(u"TBI_POLYMOVE"); break; case SID_BEZIER_INSERT: - SetActivePoly("TBI_POLYINSERT"); + SetActivePoly(u"TBI_POLYINSERT"); break; default: break; @@ -587,7 +587,7 @@ IMPL_LINK( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void ) else { m_xTbx1->set_item_active("TBI_POLYEDIT", false); - SetActivePoly("TBI_POLYMOVE"); + SetActivePoly(u"TBI_POLYMOVE"); pWnd->SetPolyEditMode( 0 ); } } |