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 /sfx2/source/control/request.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 'sfx2/source/control/request.cxx')
-rw-r--r-- | sfx2/source/control/request.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 802fc3b34c9e..9279b5dceb5a 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -332,7 +332,7 @@ void SfxRequest_Impl::Record if(!xRecorder.is()) return; - OUString aCmd = ".uno:" + OUString::createFromAscii( pSlot->GetUnoName() ); + OUString aCmd = pSlot->GetCommand(); uno::Reference< container::XIndexReplace > xReplace( xRecorder, uno::UNO_QUERY ); if ( xReplace.is() && aCmd == ".uno:InsertText" ) @@ -573,10 +573,10 @@ void SfxRequest::Done_Impl // recordable? // new Recording uses UnoName! - SAL_WARN_IF( !pImpl->pSlot->pUnoName, "sfx", "Recording not exported slot: " + SAL_WARN_IF( pImpl->pSlot->pUnoName.isEmpty(), "sfx", "Recording not exported slot: " << pImpl->pSlot->GetSlotId() ); - if ( !pImpl->pSlot->pUnoName ) // playing it safe + if ( pImpl->pSlot->pUnoName.isEmpty() ) // playing it safe return; // often required values |