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 /vcl/source/window/window2.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 'vcl/source/window/window2.cxx')
-rw-r--r-- | vcl/source/window/window2.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 180edf5cf961..6a6f20dab5a7 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -854,12 +854,12 @@ void Window::EnableDocking( bool bEnable ) return ImplGetTopmostFrameWindow()->mpWindowImpl->mpFrameData->maOwnerDrawList; } -void Window::SetHelpId( const OString& rHelpId ) +void Window::SetHelpId( const OUString& rHelpId ) { mpWindowImpl->maHelpId = rHelpId; } -const OString& Window::GetHelpId() const +const OUString& Window::GetHelpId() const { return mpWindowImpl->maHelpId; } @@ -1422,7 +1422,7 @@ namespace } } -bool Window::set_font_attribute(const OString &rKey, std::u16string_view rValue) +bool Window::set_font_attribute(const OUString &rKey, std::u16string_view rValue) { if (rKey == "weight") { @@ -1488,7 +1488,7 @@ bool Window::set_font_attribute(const OString &rKey, std::u16string_view rValue) return true; } -bool Window::set_property(const OString &rKey, const OUString &rValue) +bool Window::set_property(const OUString &rKey, const OUString &rValue) { if ((rKey == "label") || (rKey == "title") || (rKey == "text") ) { @@ -1622,7 +1622,7 @@ bool Window::set_property(const OString &rKey, const OUString &rValue) } else if (rKey == "accessible-role") { - sal_Int16 role = BuilderUtils::getRoleFromName(rValue.toUtf8()); + sal_Int16 role = BuilderUtils::getRoleFromName(rValue); if (role != com::sun::star::accessibility::AccessibleRole::UNKNOWN) SetAccessibleRole(role); } |