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