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 | |
parent | ff6af4030a465cd9341c730ba575b9b2a1b50b69 (diff) |
ByteString->rtl::OStringBuffer
-rw-r--r-- | extensions/source/plugin/unx/unxmgr.cxx | 20 | ||||
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 12 |
2 files changed, 14 insertions, 18 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++ ) diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 56e6c7b67f49..6d50fae27918 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <osl/endian.h> #include <rtl/logfile.hxx> +#include <rtl/strbuf.hxx> #include <math.h> #include <tools/urlobj.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -302,12 +303,11 @@ SdrModel::~SdrModel() #ifdef DBG_UTIL if(pAktUndoGroup) { - ByteString aStr("Im Dtor des SdrModel steht noch ein offenes Undo rum: \""); - - aStr += ByteString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding()); - aStr += '\"'; - - OSL_FAIL(aStr.GetBuffer()); + rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( + "Im Dtor des SdrModel steht noch ein offenes Undo rum: \"")); + aStr.append(rtl::OUStringToOString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding())) + .append('\"'); + OSL_FAIL(aStr.getStr()); } #endif if (pAktUndoGroup!=NULL) |