simplify some OUString::concat usage
Change-Id: Ifa150dc9d694981ffe03c254ea8c3fd820c99795 Reviewed-on: https://gerrit.libreoffice.org/39812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
36e92f38c9
commit
f9b104abc1
@ -372,8 +372,8 @@ void lcl_uglyHackToStoreDialogeEmbedImages( const Reference< XStorageBasedLibrar
|
||||
for ( sal_Int32 j=0; j < nDialogs; ++j )
|
||||
{
|
||||
Reference < awt::XDialogProvider > xDlgPrv = awt::DialogProvider::createWithModel(rxContext, rxModel);
|
||||
OUString sDialogUrl = "vnd.sun.star.script:";
|
||||
sDialogUrl = sDialogUrl.concat( sLibraries[ i ] ).concat( "." ).concat ( sDialogs[ j ] ).concat( "?location=document" );
|
||||
OUString sDialogUrl =
|
||||
"vnd.sun.star.script:" + sLibraries[i] + "." + sDialogs[j] + "?location=document";
|
||||
|
||||
Reference< css::awt::XControl > xDialog( xDlgPrv->createDialog( sDialogUrl ), UNO_QUERY );
|
||||
Reference< XInterface > xModel( xDialog->getModel() );
|
||||
|
@ -134,9 +134,7 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property
|
||||
if(!comphelper::isFileUrl(msTemplateName))
|
||||
{
|
||||
SvtPathOptions aOptions;
|
||||
OUString PathString = aOptions.SubstituteVariable("$(progurl)");
|
||||
PathString = PathString.concat("/");
|
||||
msTemplateName=PathString.concat(msTemplateName);
|
||||
msTemplateName = aOptions.SubstituteVariable("$(progurl)") + "/" + msTemplateName;
|
||||
}
|
||||
|
||||
xstyleLoader->loadStylesFromURL(msTemplateName,aValue);
|
||||
|
@ -872,7 +872,7 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const OUString& aCommandURL, cons
|
||||
if ( nStyle & pStyle->nBit )
|
||||
{
|
||||
if ( !aValue.isEmpty() )
|
||||
aValue = aValue.concat( "+" );
|
||||
aValue += "+";
|
||||
aValue += OUString::createFromAscii( pStyle->attrName );
|
||||
}
|
||||
}
|
||||
|
@ -719,7 +719,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxItem(
|
||||
if ( nStyle & pStyle->nBit )
|
||||
{
|
||||
if ( !aValue.isEmpty() )
|
||||
aValue = aValue.concat( " " );
|
||||
aValue += " ";
|
||||
aValue += OUString::createFromAscii( pStyle->attrName );
|
||||
}
|
||||
}
|
||||
|
@ -94,8 +94,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper& rParent,
|
||||
if ( aPPAct.match( sJump, nIndex + 1 ) )
|
||||
{
|
||||
OUString aDestination( aPPAct.copy( nIndex + 1 + sJump.getLength() ) );
|
||||
sURL = sURL.concat( "#action?jump=" );
|
||||
sURL = sURL.concat( aDestination );
|
||||
sURL += "#action?jump=" + aDestination;
|
||||
}
|
||||
}
|
||||
else if ( aPPAction.match( sHlinksldjump ) )
|
||||
|
@ -293,10 +293,9 @@ namespace basprov
|
||||
|
||||
if ( !uriRef.is() || !sfUri.is() )
|
||||
{
|
||||
OUString errorMsg("BasicProviderImpl::getScript: failed to parse URI: ");
|
||||
errorMsg = errorMsg.concat( scriptURI );
|
||||
throw provider::ScriptFrameworkErrorException(
|
||||
errorMsg, Reference< XInterface >(),
|
||||
"BasicProviderImpl::getScript: failed to parse URI: " + scriptURI,
|
||||
Reference< XInterface >(),
|
||||
scriptURI, "Basic",
|
||||
provider::ScriptFrameworkErrorType::MALFORMED_URL );
|
||||
}
|
||||
|
@ -197,8 +197,7 @@ void MasterScriptProvider::createPkgProvider()
|
||||
try
|
||||
{
|
||||
Any location;
|
||||
OUString sPkgCtx = m_sCtxString.concat( ":uno_packages" );
|
||||
location <<= sPkgCtx;
|
||||
location <<= m_sCtxString + ":uno_packages";
|
||||
|
||||
Reference< provider::XScriptProviderFactory > xFac =
|
||||
provider::theMasterScriptProviderFactory::get( m_xContext );
|
||||
@ -237,10 +236,9 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
|
||||
|
||||
if ( !uriRef.is() || !sfUri.is() )
|
||||
{
|
||||
OUString errorMsg = "Incorrect format for Script URI: ";
|
||||
errorMsg = errorMsg.concat( scriptURI );
|
||||
throw provider::ScriptFrameworkErrorException(
|
||||
errorMsg, Reference< XInterface >(),
|
||||
"Incorrect format for Script URI: " + scriptURI,
|
||||
Reference< XInterface >(),
|
||||
scriptURI, "",
|
||||
provider::ScriptFrameworkErrorType::UNKNOWN );
|
||||
}
|
||||
@ -252,10 +250,9 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
|
||||
!sfUri->hasParameter( locKey ) ||
|
||||
( sfUri->getName().isEmpty() ) )
|
||||
{
|
||||
OUString errorMsg = "Incorrect format for Script URI: ";
|
||||
errorMsg = errorMsg.concat( scriptURI );
|
||||
throw provider::ScriptFrameworkErrorException(
|
||||
errorMsg, Reference< XInterface >(),
|
||||
"Incorrect format for Script URI: " + scriptURI,
|
||||
Reference< XInterface >(),
|
||||
scriptURI, "",
|
||||
provider::ScriptFrameworkErrorType::UNKNOWN );
|
||||
}
|
||||
@ -519,9 +516,7 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement )
|
||||
if ( index == xSProviders.getLength() )
|
||||
{
|
||||
// No script providers could process the package
|
||||
OUString message = "Failed to register package for ";
|
||||
message = message.concat( aName );
|
||||
throw lang::IllegalArgumentException( message,
|
||||
throw lang::IllegalArgumentException( "Failed to register package for " + aName,
|
||||
Reference < XInterface > (), 2 );
|
||||
}
|
||||
}
|
||||
@ -585,10 +580,8 @@ MasterScriptProvider::removeByName( const OUString& Name )
|
||||
if ( index == xSProviders.getLength() )
|
||||
{
|
||||
// No script providers could process the package
|
||||
OUString message = "Failed to revoke package for ";
|
||||
message = message.concat( Name );
|
||||
throw lang::IllegalArgumentException( message,
|
||||
Reference < XInterface > (), 1 );
|
||||
throw lang::IllegalArgumentException( "Failed to revoke package for " + Name,
|
||||
Reference < XInterface > (), 1 );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -88,8 +88,7 @@ ScriptingFrameworkURIHelper::initialize(
|
||||
throw uno::RuntimeException( "ScriptingFrameworkURIHelper error parsing args" );
|
||||
}
|
||||
|
||||
SCRIPTS_PART = "/Scripts/";
|
||||
SCRIPTS_PART = SCRIPTS_PART.concat( m_sLanguage.toAsciiLowerCase() );
|
||||
SCRIPTS_PART = "/Scripts/" + m_sLanguage.toAsciiLowerCase();
|
||||
|
||||
if ( !initBaseURI() )
|
||||
{
|
||||
|
@ -183,9 +183,7 @@ OUString StringResourceImpl::implResolveString
|
||||
}
|
||||
if( !bSuccess )
|
||||
{
|
||||
OUString errorMsg("StringResourceImpl: No entry for ResourceID: ");
|
||||
errorMsg = errorMsg.concat( ResourceID );
|
||||
throw css::resource::MissingResourceException( errorMsg );
|
||||
throw css::resource::MissingResourceException( "StringResourceImpl: No entry for ResourceID: " + ResourceID );
|
||||
}
|
||||
return aRetStr;
|
||||
}
|
||||
@ -413,9 +411,7 @@ void StringResourceImpl::implRemoveId( const OUString& ResourceID, LocaleItem* p
|
||||
IdToStringMap::iterator it = rHashMap.find( ResourceID );
|
||||
if( it == rHashMap.end() )
|
||||
{
|
||||
OUString errorMsg("StringResourceImpl: No entries for ResourceID: ");
|
||||
errorMsg = errorMsg.concat( ResourceID );
|
||||
throw css::resource::MissingResourceException( errorMsg );
|
||||
throw css::resource::MissingResourceException( "StringResourceImpl: No entries for ResourceID: " + ResourceID );
|
||||
}
|
||||
rHashMap.erase( it );
|
||||
pLocaleItem->m_bModified = true;
|
||||
|
@ -872,9 +872,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet )
|
||||
sProject = sScriptCode.copy( 0, nIndex );
|
||||
sScriptCode = sScriptCode.copy( nIndex + 1 );
|
||||
}
|
||||
OUString sMacroLoc = sProject;
|
||||
sMacroLoc = sMacroLoc.concat( "." );
|
||||
sMacroLoc = sMacroLoc.concat( sScriptCode ).concat( "." );
|
||||
OUString sMacroLoc = sProject + "." + sScriptCode + ".";
|
||||
|
||||
for ( ; txInfo != txInfo_end; ++txInfo )
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ void SwWW8ImplReader::ReadEmbeddedData(SvStream& rStrm, SwDocShell* pDocShell, s
|
||||
if( !xLongName.get() && xShortName.get() )
|
||||
{
|
||||
xLongName.reset( new OUString );
|
||||
*xLongName = xLongName->concat(*xShortName);
|
||||
*xLongName += *xShortName;
|
||||
}
|
||||
else if( !xLongName.get() && xTextMark.get() )
|
||||
xLongName.reset( new OUString );
|
||||
@ -313,8 +313,7 @@ void SwWW8ImplReader::ReadEmbeddedData(SvStream& rStrm, SwDocShell* pDocShell, s
|
||||
{
|
||||
if (xLongName->isEmpty())
|
||||
*xTextMark = xTextMark->replace('!', '.');
|
||||
*xLongName = xLongName->concat("#");
|
||||
*xLongName = xLongName->concat(*xTextMark);
|
||||
*xLongName += "#" + *xTextMark;
|
||||
}
|
||||
hlStr.hLinkAddr = *xLongName;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaHeaderFooter::getRange()
|
||||
}
|
||||
if( mnIndex == word::WdHeaderFooterIndex::wdHeaderFooterEvenPages )
|
||||
{
|
||||
sPropsNameText = sPropsNameText.concat( "Left" );
|
||||
sPropsNameText += "Left";
|
||||
}
|
||||
|
||||
uno::Reference< text::XText > xText( mxPageStyleProps->getPropertyValue( sPropsNameText ), uno::UNO_QUERY_THROW );
|
||||
|
@ -2299,8 +2299,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
|
||||
sRequestedName = sRequestedName.copy( 0, nLastIndex );
|
||||
if ( !sRequestedName.isEmpty() )
|
||||
{
|
||||
aResolveURL = aResolveURL.concat( "?requestedName=");
|
||||
aResolveURL = aResolveURL.concat( sRequestedName );
|
||||
aResolveURL += "?requestedName=" + sRequestedName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2315,11 +2314,11 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
|
||||
aStreamURL = sPackageURL;
|
||||
if ( aStr[0] == '#' )
|
||||
{
|
||||
aStreamURL = aStreamURL.concat( aStr.copy( 1, aStr.getLength() - 1 ) );
|
||||
aStreamURL += aStr.copy( 1, aStr.getLength() - 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
aStreamURL = aStreamURL.concat( aStr );
|
||||
aStreamURL += aStr;
|
||||
}
|
||||
|
||||
xPropSet->setPropertyValue( "GraphicStreamURL", uno::Any(aStreamURL) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user