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/inc | |
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/inc')
-rw-r--r-- | svx/inc/galbrws2.hxx | 2 | ||||
-rw-r--r-- | svx/inc/helpids.h | 74 | ||||
-rw-r--r-- | svx/inc/tbxcolorupdate.hxx | 4 |
3 files changed, 40 insertions, 40 deletions
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx index 2cf8609ed32b..9cfb5c7148d1 100644 --- a/svx/inc/galbrws2.hxx +++ b/svx/inc/galbrws2.hxx @@ -150,7 +150,7 @@ public: static css::uno::Reference< css::frame::XFrame > GetFrame(); const css::uno::Reference< css::util::XURLTransformer >& GetURLTransformer() const { return m_xTransformer; } - void Execute(std::string_view rIdent); + void Execute(std::u16string_view rIdent); void DispatchAdd(const css::uno::Reference<css::frame::XDispatch> &rxDispatch, const css::util::URL &rURL); diff --git a/svx/inc/helpids.h b/svx/inc/helpids.h index 625cc4304059..0fb3e2740feb 100644 --- a/svx/inc/helpids.h +++ b/svx/inc/helpids.h @@ -19,47 +19,47 @@ #ifndef INCLUDED_SVX_INC_HELPIDS_H #define INCLUDED_SVX_INC_HELPIDS_H -#include <rtl/string.hxx> +#include <rtl/ustring.hxx> -inline constexpr OStringLiteral HID_BMPMASK_CTL_QCOL_1 = "SVX_HID_BMPMASK_CTL_QCOL_1"; -inline constexpr OStringLiteral HID_COLOR_CTL_COLORS = "SVX_HID_COLOR_CTL_COLORS"; -inline constexpr OStringLiteral HID_CTRL3D_HSCROLL = "SVX_HID_CTRL3D_HSCROLL"; -inline constexpr OStringLiteral HID_CTRL3D_SWITCHER = "SVX_HID_CTRL3D_SWITCHER"; -inline constexpr OStringLiteral HID_CTRL3D_VSCROLL = "SVX_HID_CTRL3D_VSCROLL"; -inline constexpr OStringLiteral HID_CTRL_COLOR = "SVX_HID_CTRL_COLOR"; -inline constexpr OStringLiteral HID_GALLERY_ICONVIEW = "SVX_HID_GALLERY_ICONVIEW"; -inline constexpr OStringLiteral HID_GALLERY_LISTVIEW = "SVX_HID_GALLERY_LISTVIEW"; -inline constexpr OStringLiteral HID_GALLERY_NEWTHEME = "SVX_HID_GALLERY_NEWTHEME"; -inline constexpr OStringLiteral HID_GALLERY_THEMELIST = "SVX_HID_GALLERY_THEMELIST"; -inline constexpr OStringLiteral HID_GALLERY_WINDOW = "SVX_HID_GALLERY_WINDOW"; -inline constexpr OStringLiteral HID_POPUP_COLOR = "SVX_HID_POPUP_COLOR"; -inline constexpr OStringLiteral HID_POPUP_COLOR_CTRL = "SVX_HID_POPUP_COLOR_CTRL"; -inline constexpr OStringLiteral HID_POPUP_FRAME = "SVX_HID_POPUP_FRAME"; -inline constexpr OStringLiteral HID_POPUP_LINE = "SVX_HID_POPUP_LINE"; -inline constexpr OStringLiteral HID_POPUP_LINEEND = "SVX_HID_POPUP_LINEEND"; -inline constexpr OStringLiteral HID_POPUP_LINEEND_CTRL = "SVX_HID_POPUP_LINEEND_CTRL"; -inline constexpr OStringLiteral HID_STYLE_LISTBOX = "SVX_HID_STYLE_LISTBOX"; -inline constexpr OStringLiteral HID_VALUESET_EXTRUSION_LIGHTING = "SVX_HID_VALUESET_EXTRUSION_LIGHTING"; -inline constexpr OStringLiteral HID_UNDERLINE_BTN = "SVX_HID_UNDERLINE_BTN"; -inline constexpr OStringLiteral HID_SPACING_MB_KERN = "SVX_HID_SPACING_MB_KERN"; +inline constexpr OUStringLiteral HID_BMPMASK_CTL_QCOL_1 = u"SVX_HID_BMPMASK_CTL_QCOL_1"; +inline constexpr OUStringLiteral HID_COLOR_CTL_COLORS = u"SVX_HID_COLOR_CTL_COLORS"; +inline constexpr OUStringLiteral HID_CTRL3D_HSCROLL = u"SVX_HID_CTRL3D_HSCROLL"; +inline constexpr OUStringLiteral HID_CTRL3D_SWITCHER = u"SVX_HID_CTRL3D_SWITCHER"; +inline constexpr OUStringLiteral HID_CTRL3D_VSCROLL = u"SVX_HID_CTRL3D_VSCROLL"; +inline constexpr OUStringLiteral HID_CTRL_COLOR = u"SVX_HID_CTRL_COLOR"; +inline constexpr OUStringLiteral HID_GALLERY_ICONVIEW = u"SVX_HID_GALLERY_ICONVIEW"; +inline constexpr OUStringLiteral HID_GALLERY_LISTVIEW = u"SVX_HID_GALLERY_LISTVIEW"; +inline constexpr OUStringLiteral HID_GALLERY_NEWTHEME = u"SVX_HID_GALLERY_NEWTHEME"; +inline constexpr OUStringLiteral HID_GALLERY_THEMELIST = u"SVX_HID_GALLERY_THEMELIST"; +inline constexpr OUStringLiteral HID_GALLERY_WINDOW = u"SVX_HID_GALLERY_WINDOW"; +inline constexpr OUStringLiteral HID_POPUP_COLOR = u"SVX_HID_POPUP_COLOR"; +inline constexpr OUStringLiteral HID_POPUP_COLOR_CTRL = u"SVX_HID_POPUP_COLOR_CTRL"; +inline constexpr OUStringLiteral HID_POPUP_FRAME = u"SVX_HID_POPUP_FRAME"; +inline constexpr OUStringLiteral HID_POPUP_LINE = u"SVX_HID_POPUP_LINE"; +inline constexpr OUStringLiteral HID_POPUP_LINEEND = u"SVX_HID_POPUP_LINEEND"; +inline constexpr OUStringLiteral HID_POPUP_LINEEND_CTRL = u"SVX_HID_POPUP_LINEEND_CTRL"; +inline constexpr OUStringLiteral HID_STYLE_LISTBOX = u"SVX_HID_STYLE_LISTBOX"; +inline constexpr OUStringLiteral HID_VALUESET_EXTRUSION_LIGHTING = u"SVX_HID_VALUESET_EXTRUSION_LIGHTING"; +inline constexpr OUStringLiteral HID_UNDERLINE_BTN = u"SVX_HID_UNDERLINE_BTN"; +inline constexpr OUStringLiteral HID_SPACING_MB_KERN = u"SVX_HID_SPACING_MB_KERN"; -inline constexpr OStringLiteral HID_FORM_NAVIGATOR = "SVX_HID_FORM_NAVIGATOR"; -inline constexpr OStringLiteral HID_FORM_NAVIGATOR_WIN = "SVX_HID_FORM_NAVIGATOR_WIN"; -inline constexpr OStringLiteral HID_FIELD_SEL = "SVX_HID_FIELD_SEL"; -inline constexpr OStringLiteral HID_FIELD_SEL_WIN = "SVX_HID_FIELD_SEL_WIN"; -inline constexpr OStringLiteral HID_FILTER_NAVIGATOR = "SVX_HID_FILTER_NAVIGATOR"; -inline constexpr OStringLiteral HID_FILTER_NAVIGATOR_WIN = "SVX_HID_FILTER_NAVIGATOR_WIN"; -inline constexpr OStringLiteral HID_GRID_TRAVEL_FIRST = "SVX_HID_GRID_TRAVEL_FIRST"; -inline constexpr OStringLiteral HID_GRID_TRAVEL_PREV = "SVX_HID_GRID_TRAVEL_PREV"; -inline constexpr OStringLiteral HID_GRID_TRAVEL_NEXT = "SVX_HID_GRID_TRAVEL_NEXT"; -inline constexpr OStringLiteral HID_GRID_TRAVEL_LAST = "SVX_HID_GRID_TRAVEL_LAST"; -inline constexpr OStringLiteral HID_GRID_TRAVEL_NEW = "SVX_HID_GRID_TRAVEL_NEW"; -inline constexpr OStringLiteral HID_GRID_TRAVEL_ABSOLUTE = "SVX_HID_GRID_TRAVEL_ABSOLUTE"; -inline constexpr OStringLiteral HID_GRID_NUMBEROFRECORDS = "SVX_HID_GRID_NUMBEROFRECORDS"; +inline constexpr OUStringLiteral HID_FORM_NAVIGATOR = u"SVX_HID_FORM_NAVIGATOR"; +inline constexpr OUStringLiteral HID_FORM_NAVIGATOR_WIN = u"SVX_HID_FORM_NAVIGATOR_WIN"; +inline constexpr OUStringLiteral HID_FIELD_SEL = u"SVX_HID_FIELD_SEL"; +inline constexpr OUStringLiteral HID_FIELD_SEL_WIN = u"SVX_HID_FIELD_SEL_WIN"; +inline constexpr OUStringLiteral HID_FILTER_NAVIGATOR = u"SVX_HID_FILTER_NAVIGATOR"; +inline constexpr OUStringLiteral HID_FILTER_NAVIGATOR_WIN = u"SVX_HID_FILTER_NAVIGATOR_WIN"; +inline constexpr OUStringLiteral HID_GRID_TRAVEL_FIRST = u"SVX_HID_GRID_TRAVEL_FIRST"; +inline constexpr OUStringLiteral HID_GRID_TRAVEL_PREV = u"SVX_HID_GRID_TRAVEL_PREV"; +inline constexpr OUStringLiteral HID_GRID_TRAVEL_NEXT = u"SVX_HID_GRID_TRAVEL_NEXT"; +inline constexpr OUStringLiteral HID_GRID_TRAVEL_LAST = u"SVX_HID_GRID_TRAVEL_LAST"; +inline constexpr OUStringLiteral HID_GRID_TRAVEL_NEW = u"SVX_HID_GRID_TRAVEL_NEW"; +inline constexpr OUStringLiteral HID_GRID_TRAVEL_ABSOLUTE = u"SVX_HID_GRID_TRAVEL_ABSOLUTE"; +inline constexpr OUStringLiteral HID_GRID_NUMBEROFRECORDS = u"SVX_HID_GRID_NUMBEROFRECORDS"; // Help IDs for Manage Track Changes -inline constexpr OStringLiteral HID_REDLINE_CTRL_VIEW = "SVX_HID_REDLINE_CTRL_VIEW"; -inline constexpr OStringLiteral HID_REDLINE_CTRL_FILTER = "SVX_HID_REDLINE_CTRL_FILTER"; +inline constexpr OUStringLiteral HID_REDLINE_CTRL_VIEW = u"SVX_HID_REDLINE_CTRL_VIEW"; +inline constexpr OUStringLiteral HID_REDLINE_CTRL_FILTER = u"SVX_HID_REDLINE_CTRL_FILTER"; #endif diff --git a/svx/inc/tbxcolorupdate.hxx b/svx/inc/tbxcolorupdate.hxx index d496a6921fab..81aa1c9c12fb 100644 --- a/svx/inc/tbxcolorupdate.hxx +++ b/svx/inc/tbxcolorupdate.hxx @@ -116,11 +116,11 @@ namespace svx class ToolboxButtonColorUpdater final : public ToolboxButtonColorUpdaterBase { public: - ToolboxButtonColorUpdater(sal_uInt16 nSlotId, const OString& rTbxBtnId, weld::Toolbar* ptrTbx, bool bWideButton, + ToolboxButtonColorUpdater(sal_uInt16 nSlotId, const OUString& rTbxBtnId, weld::Toolbar* ptrTbx, bool bWideButton, const OUString& rCommandLabel, const css::uno::Reference<css::frame::XFrame>& rFrame); private: - OString msBtnId; + OUString msBtnId; weld::Toolbar* mpTbx; virtual void SetQuickHelpText(const OUString& rText) override; |