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 /unotools | |
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 'unotools')
-rw-r--r-- | unotools/source/config/viewoptions.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index f62cce6a7182..dc257ca9b471 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -187,7 +187,7 @@ void SvtViewOptions::SetWindowState( const OUString& sState ) // public method -OString SvtViewOptions::GetPageID() const +OUString SvtViewOptions::GetPageID() const { // Safe impossible cases. // These call isn't allowed for dialogs, tab-pages or windows! @@ -207,13 +207,13 @@ OString SvtViewOptions::GetPageID() const TOOLS_WARN_EXCEPTION("unotools", "Unexpected exception"); } - return sID.toUtf8(); + return sID; } // public method -void SvtViewOptions::SetPageID(std::string_view rID) +void SvtViewOptions::SetPageID(const OUString& rID) { // Safe impossible cases. // These call isn't allowed for dialogs, tab-pages or windows! @@ -224,7 +224,7 @@ void SvtViewOptions::SetPageID(std::string_view rID) css::uno::Reference< css::beans::XPropertySet > xNode( impl_getSetNode(m_sViewName, true), css::uno::UNO_QUERY_THROW); - xNode->setPropertyValue(PROPERTY_PAGEID, css::uno::Any(OUString::fromUtf8(rID))); + xNode->setPropertyValue(PROPERTY_PAGEID, css::uno::Any(rID)); ::comphelper::ConfigurationHelper::flush(m_xRoot); } catch(const css::uno::Exception&) |