tdf#100726: Improve readability of OUString concatenation in basic module

Change-Id: I96c3215cf9f8932127e681aaaaee649774cac2e4
Reviewed-on: https://gerrit.libreoffice.org/27229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
nadith
2016-07-15 00:09:57 +05:30
committed by Noel Grandin
parent e7d709cb24
commit 054cf21948
3 changed files with 11 additions and 33 deletions

View File

@@ -695,9 +695,7 @@ static bool CollectAttrs( const SbxBase* p, OUString& rRes )
}
if( !aAttrs.isEmpty() )
{
rRes = " (";
rRes += aAttrs;
rRes += ")";
rRes = " (" + aAttrs + ")";
return true;
}
else
@@ -763,9 +761,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill )
SbxVariable* pVar = r;
if( pVar )
{
OUString aLine( aIndent );
aLine += " - ";
aLine += pVar->GetName( SbxNAME_SHORT_TYPES );
OUString aLine = aIndent + " - " + pVar->GetName( SbxNAME_SHORT_TYPES );
OUString aAttrs2;
if( CollectAttrs( pVar, aAttrs2 ) )
{
@@ -802,9 +798,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill )
SbxVariable* pVar = r;
if( pVar )
{
OUString aLine( aIndent );
aLine += " - ";
aLine += pVar->GetName( SbxNAME_SHORT_TYPES );
OUString aLine = aIndent + " - " + pVar->GetName( SbxNAME_SHORT_TYPES );
OUString aAttrs3;
if( CollectAttrs( pVar, aAttrs3 ) )
{

View File

@@ -613,10 +613,7 @@ static void createVariableURL( OUString& rStr, const OUString& rLibName,
{
rStr = "$(INST)/" LIBO_SHARE_FOLDER "/basic/";
}
rStr += rLibName;
rStr += "/";
rStr += rInfoFileName;
rStr += ".xlb/";
rStr += rLibName + "/" + rInfoFileName + ".xlb/";
}
void SfxLibraryContainer::init( const OUString& rInitialDocumentURL, const uno::Reference< embed::XStorage >& rxInitialStorage )
@@ -730,9 +727,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if ( xLibrariesStor.is() )
{
aFileName = maInfoFileName;
aFileName += "-lc.xml";
aFileName = maInfoFileName + "-lc.xml";
try
{
xStream = xLibrariesStor->openStreamElement( aFileName, embed::ElementModes::READ );
@@ -745,9 +740,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
mbOldInfoFormat = true;
// Check old version
aFileName = maOldInfoFileName;
aFileName += ".xml";
aFileName = maOldInfoFileName + ".xml";
try
{
xStream = xLibrariesStor->openStreamElement( aFileName, embed::ElementModes::READ );
@@ -758,8 +751,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if( !xStream.is() )
{
// Check for EA2 document version with wrong extensions
aFileName = maOldInfoFileName;
aFileName += ".xli";
aFileName = maOldInfoFileName + ".xli";
xStream = xLibrariesStor->openStreamElement( aFileName, embed::ElementModes::READ );
}
}

View File

@@ -620,9 +620,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
SbModule* pMod = pBasicLib->FindModule( aElementName );
if( pMod )
{
OUString aCodeStreamName = aElementName;
aCodeStreamName += ".bin";
OUString aCodeStreamName = aElementName + ".bin";
try
{
uno::Reference< io::XStream > xCodeStream = xStorage->openStreamElement(
@@ -668,9 +666,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
continue;
}
OUString aSourceStreamName = aElementName;
aSourceStreamName += ".xml";
OUString aSourceStreamName = aElementName + ".xml";
try
{
uno::Reference< io::XStream > xSourceStream = xStorage->openStreamElement(
@@ -945,9 +941,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary
pBasicLib->SetModified( false );
}
OUString aCodeStreamName= aElementName;
aCodeStreamName += ".bin";
OUString aCodeStreamName= aElementName + ".bin";
try
{
uno::Reference< io::XStream > xCodeStream = xLibraryStor->openStreamElement(
@@ -981,9 +975,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary
if( bLoadSource || bVerifyPasswordOnly )
{
// Access encrypted source stream
OUString aSourceStreamName = aElementName;
aSourceStreamName += ".xml";
OUString aSourceStreamName = aElementName + ".xml";
try
{
uno::Reference< io::XStream > xSourceStream = xLibraryStor->openEncryptedStreamElement(