diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-12 10:18:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-12 12:17:49 +0200 |
commit | 08495e24e899c2fd52b9724d993598189e12fc7e (patch) | |
tree | f8ce90f090b3fbc6e685f1a026751ffe04c141a9 /framework | |
parent | 8f9523b3ef464731afed61a253c958644fca6335 (diff) |
OUString::intern is a relic
and a pessimisation. Remove usage thereof.
Change-Id: I98f6197aa375349b909a7ef1403ec06ca37890d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150269
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
5 files changed, 6 insertions, 13 deletions
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index 05b8d6257eff..950759215043 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -121,7 +121,6 @@ static void ExtractMenuParameters( const Sequence< PropertyValue >& rProp, if ( p.Name == ITEM_DESCRIPTOR_COMMANDURL ) { p.Value >>= rCommandURL; - rCommandURL = rCommandURL.intern(); } else if ( p.Name == ITEM_DESCRIPTOR_HELPURL ) { @@ -200,7 +199,7 @@ void ReadMenuDocumentHandlerBase::initPropertyCommon( pProps[5].Name = m_aType; // Common values - pProps[0].Value <<= rCommandURL.intern(); + pProps[0].Value <<= rCommandURL; pProps[1].Value <<= rHelpId; pProps[2].Value <<= Reference< XIndexContainer >(); pProps[3].Value <<= rLabel; diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index 09d42e9257f3..0a477f951ca6 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -101,7 +101,6 @@ static void ExtractStatusbarItemParameters( if ( rEntry.Name == ITEM_DESCRIPTOR_COMMANDURL ) { rEntry.Value >>= rCommandURL; - rCommandURL = rCommandURL.intern(); } else if ( rEntry.Name == ITEM_DESCRIPTOR_HELPURL ) { diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 28005b3172ff..595845279d4c 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -65,10 +65,7 @@ static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp, for ( const PropertyValue& rEntry : rProp ) { if ( rEntry.Name == ITEM_DESCRIPTOR_COMMANDURL ) - { rEntry.Value >>= rCommandURL; - rCommandURL = rCommandURL.intern(); - } else if ( rEntry.Name == ITEM_DESCRIPTOR_LABEL ) rEntry.Value >>= rLabel; else if ( rEntry.Name == ITEM_DESCRIPTOR_TYPE ) @@ -284,7 +281,7 @@ void SAL_CALL OReadToolBoxDocumentHandler::startElement( case TB_ATTRIBUTE_URL: { bAttributeURL = true; - aCommandURL = xAttribs->getValueByIndex( n ).intern(); + aCommandURL = xAttribs->getValueByIndex( n ); } break; diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx index b2ec62c5a434..84e44e422de4 100644 --- a/framework/source/services/urltransformer.cxx +++ b/framework/source/services/urltransformer.cxx @@ -58,7 +58,7 @@ public: virtual OUString SAL_CALL getPresentation( const css::util::URL& aURL, sal_Bool bWithPassword ) override; }; -void lcl_ParserHelper(INetURLObject& _rParser, css::util::URL& _rURL,bool _bUseIntern) +void lcl_ParserHelper(INetURLObject& _rParser, css::util::URL& _rURL) { // Get all information about this URL. _rURL.Protocol = INetURLObject::GetScheme( _rParser.GetProtocol() ); @@ -98,8 +98,6 @@ void lcl_ParserHelper(INetURLObject& _rParser, css::util::URL& _rURL,bool _bUseI // INetURLObject supports only an intelligent method of parsing URL's. So write // back Complete to have a valid encoded URL in all cases! _rURL.Complete = _rParser.GetMainURL( INetURLObject::DecodeMechanism::NONE ); - if ( _bUseIntern ) - _rURL.Complete = _rURL.Complete.intern(); _rParser.SetMark( u"" ); _rParser.SetParam( u"" ); @@ -136,7 +134,7 @@ sal_Bool SAL_CALL URLTransformer::parseStrict( css::util::URL& aURL ) } else if ( !aParser.HasError() ) { - lcl_ParserHelper(aParser,aURL,false); + lcl_ParserHelper(aParser,aURL); // Return "URL is parsed". return true; } @@ -174,7 +172,7 @@ sal_Bool SAL_CALL URLTransformer::parseSmart( css::util::URL& aURL, bool bOk = aParser.SetSmartURL( aURL.Complete ); if ( bOk ) { - lcl_ParserHelper(aParser,aURL,true); + lcl_ParserHelper(aParser,aURL); // Return "URL is parsed". return true; } diff --git a/framework/source/xml/acceleratorconfigurationreader.cxx b/framework/source/xml/acceleratorconfigurationreader.cxx index ad6bc7259a4a..7cbb81de9bcd 100644 --- a/framework/source/xml/acceleratorconfigurationreader.cxx +++ b/framework/source/xml/acceleratorconfigurationreader.cxx @@ -101,7 +101,7 @@ void SAL_CALL AcceleratorConfigurationReader::startElement(const OUString& switch(eAttribute) { case E_ATTRIBUTE_URL : - sCommand = sValue.intern(); + sCommand = sValue; break; case E_ATTRIBUTE_KEYCODE : |