diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 133cf2b2918c..3995ee8984fe 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -843,8 +843,8 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool } else { - // Commit the string. Use intern() to ref-count it. - *(*_rRow)[i] = OUString::intern(pData, static_cast(nLastPos+1), m_eEncoding); + // Commit the string + *(*_rRow)[i] = OUString(pData, static_cast(nLastPos+1), m_eEncoding); } } // if (nType == DataType::CHAR || nType == DataType::VARCHAR) else if ( DataType::TIMESTAMP == nType ) @@ -928,7 +928,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool continue; } - OUString aStr = OUString::intern(pData+nPos1, nPos2-nPos1+1, m_eEncoding); + OUString aStr(pData+nPos1, nPos2-nPos1+1, m_eEncoding); switch (nType) { 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 : diff --git a/oox/source/ppt/commonbehaviorcontext.cxx b/oox/source/ppt/commonbehaviorcontext.cxx index 4ba40925a7e2..ca0a0c9ec7ac 100644 --- a/oox/source/ppt/commonbehaviorcontext.cxx +++ b/oox/source/ppt/commonbehaviorcontext.cxx @@ -83,9 +83,9 @@ namespace oox::ppt { if(msCurrentAttribute.equalsAscii( attrConv->mpMSName ) ) { Attribute attr; - attr.name = OUString::intern( attrConv->mpAPIName, - strlen(attrConv->mpAPIName), - RTL_TEXTENCODING_ASCII_US ); + attr.name = OUString( attrConv->mpAPIName, + strlen(attrConv->mpAPIName), + RTL_TEXTENCODING_ASCII_US ); attr.type = attrConv->meAttribute; maAttributes.push_back( attr ); SAL_INFO("oox.ppt", "OOX: attrName is " << msCurrentAttribute << " -> " << attrConv->mpAPIName ); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 9aa4b7b5ad36..a42bf11fdce9 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -894,7 +894,7 @@ void ScXMLExport::ExportExternalRefCacheStyles() // Export each unique number format used in the external ref cache. vector aNumFmts; pRefMgr->getAllCachedNumberFormats(aNumFmts); - const OUString aDefaultStyle = OUString("Default").intern(); + static constexpr OUStringLiteral aDefaultStyle(u"Default"); for (const auto& rNumFmt : aNumFmts) { sal_Int32 nNumFmt = static_cast(rNumFmt); @@ -904,7 +904,7 @@ void ScXMLExport::ExportExternalRefCacheStyles() uno::Any aVal; aVal <<= nNumFmt; vector aProps; - aVal <<= aDefaultStyle; + aVal <<= OUString(aDefaultStyle); aProps.emplace_back(nEntryIndex, aVal); OUString aName; diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 633dd4d2d3c8..a0a1ad028f77 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1838,8 +1838,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() p->rINetAttr.GetINetFormat().GetValue(), INetURLObject::DecodeMechanism::Unambiguous ) ); - // We have to distinguish between intern and real URLs - const bool bIntern = '#' == aURL[0]; + // We have to distinguish between internal and real URLs + const bool bInternal = '#' == aURL[0]; // GetCursor_() is a SwShellCursor, which is derived from // SwSelPaintRects, therefore the rectangles of the current @@ -1856,7 +1856,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() // Create the destination for internal links: sal_Int32 nDestId = -1; - if ( bIntern ) + if ( bInternal ) { aURL = aURL.copy( 1 ); mrSh.SwCursorShell::ClearMark(); @@ -1882,7 +1882,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } - if ( !bIntern || -1 != nDestId ) + if ( !bInternal || -1 != nDestId ) { // #i44368# Links in Header/Footer const bool bHeaderFooter = pDoc->IsInHeaderFooter( *pTNd ); @@ -1909,14 +1909,14 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() s_aLinkIdMap.push_back( aLinkEntry ); // Connect Link and Destination: - if ( bIntern ) + if ( bInternal ) pPDFExtOutDevData->SetLinkDest( nLinkId, nDestId ); else pPDFExtOutDevData->SetLinkURL( nLinkId, aURL ); // #i44368# Links in Header/Footer if ( bHeaderFooter ) - MakeHeaderFooterLinks(*pPDFExtOutDevData, *pTNd, rLinkRect, nDestId, aURL, bIntern, altText); + MakeHeaderFooterLinks(*pPDFExtOutDevData, *pTNd, rLinkRect, nDestId, aURL, bInternal, altText); } } } @@ -1943,11 +1943,11 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() OUString aURL( pItem->GetURL() ); if (aURL.isEmpty()) continue; - const bool bIntern = '#' == aURL[0]; + const bool bInternal = '#' == aURL[0]; // Create the destination for internal links: sal_Int32 nDestId = -1; - if ( bIntern ) + if ( bInternal ) { aURL = aURL.copy( 1 ); mrSh.SwCursorShell::ClearMark(); @@ -1972,7 +1972,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() } } - if ( !bIntern || -1 != nDestId ) + if ( !bInternal || -1 != nDestId ) { Point aNullPt; const SwRect aLinkRect = pFrameFormat->FindLayoutRect( false, &aNullPt ); @@ -1988,7 +1988,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() pPDFExtOutDevData->CreateLink(aRect, formatName, aLinkPageNum); // Connect Link and Destination: - if ( bIntern ) + if ( bInternal ) pPDFExtOutDevData->SetLinkDest( nLinkId, nDestId ); else pPDFExtOutDevData->SetLinkURL( nLinkId, aURL ); @@ -2002,7 +2002,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() { const SwTextNode* pTNd = pAnchorNode->GetTextNode(); if ( pTNd ) - MakeHeaderFooterLinks(*pPDFExtOutDevData, *pTNd, aLinkRect, nDestId, aURL, bIntern, formatName); + MakeHeaderFooterLinks(*pPDFExtOutDevData, *pTNd, aLinkRect, nDestId, aURL, bInternal, formatName); } } } @@ -2358,8 +2358,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() for ( const auto& rBookmark : rBookmarks ) { OUString aBookmarkName( rBookmark.aBookmark ); - const bool bIntern = '#' == aBookmarkName[0]; - if ( bIntern ) + const bool bInternal = '#' == aBookmarkName[0]; + if ( bInternal ) { aBookmarkName = aBookmarkName.copy( 1 ); JumpToSwMark( &mrSh, aBookmarkName ); @@ -2632,7 +2632,7 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP const SwRect& rLinkRect, sal_Int32 nDestId, const OUString& rURL, - bool bIntern, + bool bInternal, OUString const& rContent) const { // We assume, that the primary link has just been exported. Therefore @@ -2663,7 +2663,7 @@ void SwEnhancedPDFExportHelper::MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rP rPDFExtOutDevData.CreateLink(aRect, rContent, aHFLinkPageNum); // Connect Link and Destination: - if ( bIntern ) + if ( bInternal ) rPDFExtOutDevData.SetLinkDest( nHFLinkId, nDestId ); else rPDFExtOutDevData.SetLinkURL( nHFLinkId, rURL ); diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx index 488aa3e90798..0de8bb97e9db 100644 --- a/unoxml/source/rdf/CURI.cxx +++ b/unoxml/source/rdf/CURI.cxx @@ -707,8 +707,8 @@ void CURI::initFromConstant(const sal_Int16 i_Constant) throw css::lang::IllegalArgumentException( "CURI::initialize: invalid URIs constant argument", *this, 0); } - m_Namespace = OUString::createFromAscii(ns).intern(); - m_LocalName = OUString::createFromAscii(ln).intern(); + m_Namespace = OUString::createFromAscii(ns); + m_LocalName = OUString::createFromAscii(ln); } // css::lang::XInitialization: