fdo#57950: Remove some chained appends in xmhelp
Change-Id: I4680547aa1d12d3e8eab3c33e3158845848c2068 Reviewed-on: https://gerrit.libreoffice.org/5376 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
This commit is contained in:
parent
5a2c13a79a
commit
87b5ac652d
@ -576,7 +576,7 @@ helpdatafileproxy::Hdf* Databases::getHelpDataFile( const OUString& Database,
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
OUString aFileExt( helpText ? OUString(".ht") : OUString(".db") );
|
||||
OUString dbFileName = OUStringBuffer().append('/').append(Database).append(aFileExt).makeStringAndClear();
|
||||
OUString dbFileName = "/" + Database + aFileExt;
|
||||
OUString key;
|
||||
if( pExtensionPath == NULL )
|
||||
key = processLang( Language ) + dbFileName;
|
||||
@ -920,7 +920,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar,
|
||||
{
|
||||
return Reference< XHierarchicalNameAccess >( 0 );
|
||||
}
|
||||
OUString key = OUStringBuffer(processLang(Language)).append('/').append(jar).makeStringAndClear();
|
||||
OUString key = processLang(Language) + "/" + jar;
|
||||
|
||||
osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
@ -940,12 +940,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar,
|
||||
OUString aExtensionPath = jar.copy( nQuestionMark1 + 1, nQuestionMark2 - nQuestionMark1 - 1 );
|
||||
OUString aPureJar = jar.copy( nQuestionMark2 + 1 );
|
||||
|
||||
OUStringBuffer aStrBuf;
|
||||
aStrBuf.append( aExtensionPath );
|
||||
aStrBuf.append( '/' );
|
||||
aStrBuf.append( aPureJar );
|
||||
|
||||
zipFile = expandURL( aStrBuf.makeStringAndClear() );
|
||||
zipFile = expandURL( aExtensionPath + "/" + aPureJar );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1485,18 +1480,13 @@ OUString ExtensionIteratorBase::implGetFileFromPackage(
|
||||
OUString aLanguage = m_aLanguage;
|
||||
for( sal_Int32 iPass = 0 ; iPass < 2 ; ++iPass )
|
||||
{
|
||||
OUStringBuffer aStrBuf;
|
||||
aStrBuf.append( xPackage->getRegistrationDataURL().Value);
|
||||
aStrBuf.append( '/' );
|
||||
aStrBuf.append( aLanguage );
|
||||
OUString aStr = xPackage->getRegistrationDataURL().Value + "/" + aLanguage;
|
||||
if( !bLangFolderOnly )
|
||||
{
|
||||
aStrBuf.append( '/' );
|
||||
aStrBuf.append( "help" );
|
||||
aStrBuf.append( rFileExtension );
|
||||
aStr += "/help" + rFileExtension;
|
||||
}
|
||||
|
||||
aFile = m_rDatabases.expandURL( aStrBuf.makeStringAndClear() );
|
||||
aFile = m_rDatabases.expandURL( aStr );
|
||||
if( iPass == 0 )
|
||||
{
|
||||
if( m_xSFA->exists( aFile ) )
|
||||
@ -1626,7 +1616,7 @@ helpdatafileproxy::Hdf* DataBaseIterator::implGetHdfFromPackage( Reference< depl
|
||||
helpdatafileproxy::Hdf* pRetHdf = NULL;
|
||||
if (optRegData.IsPresent && !optRegData.Value.isEmpty())
|
||||
{
|
||||
OUString aRegDataUrl = OUStringBuffer(optRegData.Value).append('/').makeStringAndClear();
|
||||
OUString aRegDataUrl = optRegData.Value + "/";
|
||||
|
||||
OUString aHelpFilesBaseName("help");
|
||||
|
||||
@ -1652,7 +1642,7 @@ helpdatafileproxy::Hdf* DataBaseIterator::implGetHdfFromPackage( Reference< depl
|
||||
*o_pExtensionPath = aRegDataUrl + aUsedLanguage;
|
||||
|
||||
if( o_pExtensionRegistryPath )
|
||||
*o_pExtensionRegistryPath = OUStringBuffer(xPackage->getURL()).append('/').append(aUsedLanguage).makeStringAndClear();
|
||||
*o_pExtensionRegistryPath = xPackage->getURL() + "/" + aUsedLanguage;
|
||||
}
|
||||
|
||||
return pRetHdf;
|
||||
@ -1869,9 +1859,9 @@ OUString IndexFolderIterator::nextIndexFolder( bool& o_rbExtension, bool& o_rbTe
|
||||
switch( m_eState )
|
||||
{
|
||||
case INITIAL_MODULE:
|
||||
aIndexFolder = OUStringBuffer(m_rDatabases.getInstallPathAsURL()).
|
||||
append(m_rDatabases.processLang(m_aLanguage)).append('/').
|
||||
append(m_aInitialModule).append(".idxl").makeStringAndClear();
|
||||
aIndexFolder = m_rDatabases.getInstallPathAsURL()
|
||||
+ m_rDatabases.processLang(m_aLanguage) + "/"
|
||||
+ m_aInitialModule + ".idxl";
|
||||
|
||||
o_rbTemporary = false;
|
||||
o_rbExtension = false;
|
||||
|
@ -306,12 +306,7 @@ void URLParameter::readHelpDataFile()
|
||||
m_aJar = converter.getDatabase();
|
||||
if( !aExtensionPath.isEmpty() )
|
||||
{
|
||||
OUStringBuffer aExtendedJarStrBuf;
|
||||
aExtendedJarStrBuf.append( '?' );
|
||||
aExtendedJarStrBuf.append( aExtensionPath );
|
||||
aExtendedJarStrBuf.append( '?' );
|
||||
aExtendedJarStrBuf.append( m_aJar );
|
||||
m_aJar = aExtendedJarStrBuf.makeStringAndClear();
|
||||
m_aJar = "?" + aExtensionPath + "?" + m_aJar;
|
||||
m_aExtensionRegistryPath = aExtensionRegistryPath;
|
||||
}
|
||||
m_aTag = converter.getHash();
|
||||
|
@ -913,8 +913,6 @@ void TVChildTarget::subst( OUString& instpath ) const
|
||||
|
||||
// class ExtensionIteratorBase
|
||||
|
||||
static OUString aSlash("/");
|
||||
static OUString aHelpFilesBaseName("help");
|
||||
static OUString aHelpMediaType("application/vnd.sun.star.help");
|
||||
|
||||
ExtensionIteratorBase::ExtensionIteratorBase( const OUString& aLanguage )
|
||||
@ -1212,15 +1210,7 @@ OUString TreeFileIterator::implGetTreeFileFromPackage
|
||||
OUString aLanguage = m_aLanguage;
|
||||
for( sal_Int32 iPass = 0 ; iPass < 2 ; ++iPass )
|
||||
{
|
||||
OUStringBuffer aStrBuf;
|
||||
aStrBuf.append( xPackage->getURL() );
|
||||
aStrBuf.append( aSlash );
|
||||
aStrBuf.append( aLanguage );
|
||||
aStrBuf.append( aSlash );
|
||||
aStrBuf.append( aHelpFilesBaseName );
|
||||
aStrBuf.appendAscii( ".tree" );
|
||||
|
||||
aRetFile = expandURL( aStrBuf.makeStringAndClear() );
|
||||
aRetFile = expandURL( xPackage->getURL() + "/" + aLanguage + "/help.tree" );
|
||||
if( iPass == 0 )
|
||||
{
|
||||
if( m_xSFA->exists( aRetFile ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user