diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-24 00:38:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-26 10:18:39 +0100 |
commit | 0dcaf6c6299f10f25623ac41e735b0d03d25894c (patch) | |
tree | 90b1a0431ed3330091fe7cb6b3e0deee9c6c44e9 /extensions | |
parent | callcatcher: unused code (diff) | |
download | core-0dcaf6c6299f10f25623ac41e735b0d03d25894c.tar.gz core-0dcaf6c6299f10f25623ac41e735b0d03d25894c.zip |
ByteString->rtl::OStringBuffer
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/plugin/unx/unxmgr.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx index 742cb26f3498..7c77c835dbc3 100644 --- a/extensions/source/plugin/unx/unxmgr.cxx +++ b/extensions/source/plugin/unx/unxmgr.cxx @@ -256,26 +256,22 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th static const char* pHome = getenv( "HOME" ); static const char* pNPXPluginPath = getenv( "NPX_PLUGIN_PATH" ); - ByteString aSearchPath( "/usr/lib/netscape/plugins" ); + // netscape!, quick, beam me back to the 90's when Motif roamed the earth + rtl::OStringBuffer aSearchBuffer(RTL_CONSTASCII_STRINGPARAM("/usr/lib/netscape/plugins")); if( pHome ) - { - aSearchPath.Append( ':' ); - aSearchPath.Append( pHome ); - aSearchPath += "/.netscape/plugins"; - } + aSearchBuffer.append(':').append(pHome).append("/.netscape/plugins"); if( pNPXPluginPath ) - { - aSearchPath.Append( ':' ); - aSearchPath += pNPXPluginPath; - } + aSearchBuffer.append(':').append(pNPXPluginPath); const Sequence< ::rtl::OUString >& rPaths( PluginManager::getAdditionalSearchPaths() ); for( i = 0; i < rPaths.getLength(); i++ ) { - aSearchPath += ":"; - aSearchPath += ByteString( String( rPaths.getConstArray()[i] ), aEncoding ); + aSearchBuffer.append(':').append(rtl::OUStringToOString( + rPaths.getConstArray()[i], aEncoding)); } + ByteString aSearchPath = aSearchBuffer.makeStringAndClear(); + int nPaths = aSearchPath.GetTokenCount( ':' ); maxDirent u; for( i = 0; i < nPaths; i++ ) |