ByteString->rtl::OString
This commit is contained in:
@@ -89,8 +89,7 @@ int main( int argc, char** argv )
|
|||||||
sal_Bool bSource = sal_False;
|
sal_Bool bSource = sal_False;
|
||||||
ByteString aRespArg;
|
ByteString aRespArg;
|
||||||
// who needs anything but '/' ?
|
// who needs anything but '/' ?
|
||||||
// String aDelim = String(DirEntry::GetAccessDelimiter());
|
sal_Char cDelim = '/';
|
||||||
String aDelim = '/';
|
|
||||||
|
|
||||||
RscHrcDep *pDep = new RscHrcDep;
|
RscHrcDep *pDep = new RscHrcDep;
|
||||||
|
|
||||||
@@ -212,7 +211,7 @@ int main( int argc, char** argv )
|
|||||||
String aOutPath = aOutEntry.GetPath().GetFull();
|
String aOutPath = aOutEntry.GetPath().GetFull();
|
||||||
|
|
||||||
String aFileName( aOutPath );
|
String aFileName( aOutPath );
|
||||||
aFileName += aDelim;
|
aFileName += cDelim;
|
||||||
aFileName += aCwd;
|
aFileName += aCwd;
|
||||||
aFileName += String(".", osl_getThreadTextEncoding());
|
aFileName += String(".", osl_getThreadTextEncoding());
|
||||||
aFileName += aSrsBaseName;
|
aFileName += aSrsBaseName;
|
||||||
@@ -226,7 +225,7 @@ int main( int argc, char** argv )
|
|||||||
printf("further arguments : ");
|
printf("further arguments : ");
|
||||||
#endif
|
#endif
|
||||||
aString = ByteString( pSrsFileName );
|
aString = ByteString( pSrsFileName );
|
||||||
aString.SearchAndReplaceAll('\\', ByteString( aDelim, RTL_TEXTENCODING_ASCII_US ));
|
aString.SearchAndReplaceAll('\\', cDelim);
|
||||||
aString += ByteString(" : " );
|
aString += ByteString(" : " );
|
||||||
|
|
||||||
while ( optind < argc )
|
while ( optind < argc )
|
||||||
@@ -260,7 +259,7 @@ int main( int argc, char** argv )
|
|||||||
for ( size_t j = 0; j < nCount; j++ )
|
for ( size_t j = 0; j < nCount; j++ )
|
||||||
{
|
{
|
||||||
ByteString *pStr = (*pLst)[ j ];
|
ByteString *pStr = (*pLst)[ j ];
|
||||||
pStr->SearchAndReplaceAll('\\', ByteString( aDelim, RTL_TEXTENCODING_ASCII_US ));
|
pStr->SearchAndReplaceAll('\\', cDelim);
|
||||||
if ( j != (nCount-1) )
|
if ( j != (nCount-1) )
|
||||||
*pStr += ByteString( "\\" );
|
*pStr += ByteString( "\\" );
|
||||||
aOutStream.WriteLine( *pStr );
|
aOutStream.WriteLine( *pStr );
|
||||||
|
@@ -319,14 +319,14 @@ sal_uInt16 DirReader_Impl::Read()
|
|||||||
if ( ( pDir->eAttrMask & FSYS_KIND_DIR || pDir->eAttrMask & FSYS_KIND_FILE ) &&
|
if ( ( pDir->eAttrMask & FSYS_KIND_DIR || pDir->eAttrMask & FSYS_KIND_FILE ) &&
|
||||||
( ( pDosEntry = readdir( pDosDir ) ) != NULL ) )
|
( ( pDosEntry = readdir( pDosDir ) ) != NULL ) )
|
||||||
{
|
{
|
||||||
String aD_Name(pDosEntry->d_name, osl_getThreadTextEncoding());
|
String aD_Name(pDosEntry->d_name, osl_getThreadTextEncoding());
|
||||||
if ( pDir->aNameMask.Matches( aD_Name ) )
|
if ( pDir->aNameMask.Matches( aD_Name ) )
|
||||||
{
|
{
|
||||||
DirEntryFlag eFlag =
|
DirEntryFlag eFlag =
|
||||||
0 == strcmp( pDosEntry->d_name, "." ) ? FSYS_FLAG_CURRENT
|
0 == strcmp( pDosEntry->d_name, "." ) ? FSYS_FLAG_CURRENT
|
||||||
: 0 == strcmp( pDosEntry->d_name, ".." ) ? FSYS_FLAG_PARENT
|
: 0 == strcmp( pDosEntry->d_name, ".." ) ? FSYS_FLAG_PARENT
|
||||||
: FSYS_FLAG_NORMAL;
|
: FSYS_FLAG_NORMAL;
|
||||||
DirEntry *pTemp = new DirEntry( ByteString(pDosEntry->d_name), eFlag, FSYS_STYLE_UNX );
|
DirEntry *pTemp = new DirEntry(rtl::OString(pDosEntry->d_name), eFlag, FSYS_STYLE_UNX);
|
||||||
if ( pParent )
|
if ( pParent )
|
||||||
pTemp->ImpChangeParent( new DirEntry( *pParent ), sal_False);
|
pTemp->ImpChangeParent( new DirEntry( *pParent ), sal_False);
|
||||||
FileStat aStat( *pTemp );
|
FileStat aStat( *pTemp );
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#include "precompiled_tools.hxx"
|
#include "precompiled_tools.hxx"
|
||||||
#include <sal/types.h>
|
#include <sal/types.h>
|
||||||
#include <rtl/memory.h>
|
#include <rtl/memory.h>
|
||||||
|
#include <rtl/strbuf.hxx>
|
||||||
#include <tools/cachestr.hxx>
|
#include <tools/cachestr.hxx>
|
||||||
#include <tools/debug.hxx>
|
#include <tools/debug.hxx>
|
||||||
#include <tools/inetmsg.hxx>
|
#include <tools/inetmsg.hxx>
|
||||||
@@ -1441,13 +1442,14 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
|
|||||||
if (pMsg->IsMultipart())
|
if (pMsg->IsMultipart())
|
||||||
{
|
{
|
||||||
// Insert multipart delimiter.
|
// Insert multipart delimiter.
|
||||||
ByteString aDelim ("--");
|
rtl::OStringBuffer aDelim(
|
||||||
aDelim += pMsg->GetMultipartBoundary();
|
RTL_CONSTASCII_STRINGPARAM("--"));
|
||||||
aDelim += "\r\n";
|
aDelim.append(pMsg->GetMultipartBoundary());
|
||||||
|
aDelim.append("\r\n");
|
||||||
|
|
||||||
rtl_copyMemory (
|
rtl_copyMemory(pData, aDelim.getStr(),
|
||||||
pData, aDelim.GetBuffer(), aDelim.Len());
|
aDelim.getLength());
|
||||||
return aDelim.Len();
|
return aDelim.getLength();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -932,9 +932,10 @@ void ResMgr::Init( const OUString& rFileName )
|
|||||||
if ( !pImpRes )
|
if ( !pImpRes )
|
||||||
{
|
{
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
ByteString aStr( "Resourcefile not found:\n" );
|
rtl::OStringBuffer aStr(
|
||||||
aStr += ByteString( OUStringToOString( rFileName, RTL_TEXTENCODING_UTF8 ) );
|
RTL_CONSTASCII_STRINGPARAM("Resourcefile not found:\n"));
|
||||||
OSL_FAIL( aStr.GetBuffer() );
|
aStr.append(OUStringToOString(rFileName, RTL_TEXTENCODING_UTF8));
|
||||||
|
OSL_FAIL(aStr.getStr());
|
||||||
#endif
|
#endif
|
||||||
RscException_Impl();
|
RscException_Impl();
|
||||||
}
|
}
|
||||||
@@ -950,9 +951,11 @@ void ResMgr::Init( const OUString& rFileName )
|
|||||||
InternalResMgr::FreeGlobalRes( aResHandle, pVoid );
|
InternalResMgr::FreeGlobalRes( aResHandle, pVoid );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ByteString aStr( "Wrong version:\n" );
|
rtl::OStringBuffer aStr(
|
||||||
aStr += ByteString( OUStringToOString( pImpRes->aFileName, RTL_TEXTENCODING_UTF8 ) );
|
RTL_CONSTASCII_STRINGPARAM("Wrong version:\n"));
|
||||||
DbgError( aStr.GetBuffer() );
|
aStr.append(rtl::OUStringToOString(pImpRes->aFileName,
|
||||||
|
RTL_TEXTENCODING_UTF8));
|
||||||
|
DbgError(aStr.getStr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user