Kaydet (Commit) 0dcaf6c6 authored tarafından Caolán McNamara's avatar Caolán McNamara

ByteString->rtl::OStringBuffer

üst ff6af403
...@@ -256,26 +256,22 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th ...@@ -256,26 +256,22 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th
static const char* pHome = getenv( "HOME" ); static const char* pHome = getenv( "HOME" );
static const char* pNPXPluginPath = getenv( "NPX_PLUGIN_PATH" ); 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 ) if( pHome )
{ aSearchBuffer.append(':').append(pHome).append("/.netscape/plugins");
aSearchPath.Append( ':' );
aSearchPath.Append( pHome );
aSearchPath += "/.netscape/plugins";
}
if( pNPXPluginPath ) if( pNPXPluginPath )
{ aSearchBuffer.append(':').append(pNPXPluginPath);
aSearchPath.Append( ':' );
aSearchPath += pNPXPluginPath;
}
const Sequence< ::rtl::OUString >& rPaths( PluginManager::getAdditionalSearchPaths() ); const Sequence< ::rtl::OUString >& rPaths( PluginManager::getAdditionalSearchPaths() );
for( i = 0; i < rPaths.getLength(); i++ ) for( i = 0; i < rPaths.getLength(); i++ )
{ {
aSearchPath += ":"; aSearchBuffer.append(':').append(rtl::OUStringToOString(
aSearchPath += ByteString( String( rPaths.getConstArray()[i] ), aEncoding ); rPaths.getConstArray()[i], aEncoding));
} }
ByteString aSearchPath = aSearchBuffer.makeStringAndClear();
int nPaths = aSearchPath.GetTokenCount( ':' ); int nPaths = aSearchPath.GetTokenCount( ':' );
maxDirent u; maxDirent u;
for( i = 0; i < nPaths; i++ ) for( i = 0; i < nPaths; i++ )
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hpp>
#include <osl/endian.h> #include <osl/endian.h>
#include <rtl/logfile.hxx> #include <rtl/logfile.hxx>
#include <rtl/strbuf.hxx>
#include <math.h> #include <math.h>
#include <tools/urlobj.hxx> #include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx> #include <unotools/ucbstreamhelper.hxx>
...@@ -302,12 +303,11 @@ SdrModel::~SdrModel() ...@@ -302,12 +303,11 @@ SdrModel::~SdrModel()
#ifdef DBG_UTIL #ifdef DBG_UTIL
if(pAktUndoGroup) if(pAktUndoGroup)
{ {
ByteString aStr("Im Dtor des SdrModel steht noch ein offenes Undo rum: \""); rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
"Im Dtor des SdrModel steht noch ein offenes Undo rum: \""));
aStr += ByteString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding()); aStr.append(rtl::OUStringToOString(pAktUndoGroup->GetComment(), gsl_getSystemTextEncoding()))
aStr += '\"'; .append('\"');
OSL_FAIL(aStr.getStr());
OSL_FAIL(aStr.GetBuffer());
} }
#endif #endif
if (pAktUndoGroup!=NULL) if (pAktUndoGroup!=NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment