summaryrefslogtreecommitdiff
path: root/rsc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-27 08:21:00 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-28 09:55:02 +0000
commit3fd28200f1c1a46970789f21ee6fce3f6f3ac1ec (patch)
tree18600b1b78ed5ede7f7068a98fe3fe7b6962b311 /rsc
parent48221d6a2bf4c327b6cadcdc65169997f7d7408d (diff)
ByteString->rtl::OString[Buffer]
Diffstat (limited to 'rsc')
-rw-r--r--rsc/inc/rscdb.hxx2
-rw-r--r--rsc/inc/rscdef.hxx2
-rw-r--r--rsc/inc/rscrsc.hxx2
-rw-r--r--rsc/source/parser/rscibas.cxx4
-rw-r--r--rsc/source/parser/rscicpx.cxx4
-rw-r--r--rsc/source/parser/rscyacc.y10
-rw-r--r--rsc/source/rsc/rsc.cxx38
-rw-r--r--rsc/source/tools/rscdef.cxx2
-rw-r--r--rsc/source/tools/rsctools.cxx2
9 files changed, 37 insertions, 29 deletions
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index fd4988f6f2e9..ffe61c3c7df0 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -265,7 +265,7 @@ class RscTypCont
RscTop * pStyleFamily );
RscTop * InitClassSfxSlotInfo( RscTop * pSuper );
- void InsWinBit( RscTop * pClass, const ByteString & rName,
+ void InsWinBit( RscTop * pClass, const rtl::OString& rName,
Atom nVal );
void WriteInc( FILE * fOutput, sal_uLong lKey );
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index 6d335d5544b0..4e2ff5b9f40a 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -257,7 +257,7 @@ public:
// Alle Defines die in dieser Datei Definiert sind loeschen
void DeleteFileContext( sal_uLong lKey );
- sal_uLong NewCodeFile( const ByteString & rName );
+ sal_uLong NewCodeFile( const rtl::OString& rName );
sal_uLong NewIncFile( const ByteString & rName, const ByteString & rPath );
RscFile * GetFile( sal_uLong lFileKey ){ return Get( lFileKey ); }
};
diff --git a/rsc/inc/rscrsc.hxx b/rsc/inc/rscrsc.hxx
index aa7ee437643a..1f79a3e8206a 100644
--- a/rsc/inc/rscrsc.hxx
+++ b/rsc/inc/rscrsc.hxx
@@ -51,7 +51,7 @@ class RscCmdLine
public:
RscStrList aInputList; // Liste der Quelldateien
- ByteString aPath; // Liste der Pfade
+ rtl::OString aPath; // Liste der Pfade
RSCBYTEORDER_TYPE nByteOrder;
unsigned short nCommands; // Steuerbits
ByteString aOutputLst; // Name der List-Ausgabedatei
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index 9024281c0cf0..a7fdf0c6f137 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -144,8 +144,8 @@ void RscLangEnum::Init( RscNameTable& rNames )
nIndex++;
}
- ByteString aEnvIsoTokens = getenv( "RSC_LANG_ISO" );
- if ( aEnvIsoTokens.Len() )
+ rtl::OString aEnvIsoTokens = getenv( "RSC_LANG_ISO" );
+ if ( aEnvIsoTokens.getLength() )
{
ByteString aIsoToken;
sal_uInt16 nTokenCounter = 0;
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index c59acfb8273e..ad70349f17b0 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -47,7 +47,7 @@
/*************************************************************************
|* RscTypCont::InsWinBit()
*************************************************************************/
-void RscTypCont::InsWinBit( RscTop * pClass, const ByteString & rName,
+void RscTypCont::InsWinBit( RscTop * pClass, const rtl::OString& rName,
Atom nVal )
{
RscClient * pClient;
@@ -56,7 +56,7 @@ void RscTypCont::InsWinBit( RscTop * pClass, const ByteString & rName,
aBaseLst.push_back(
pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, &aWinBits, nVal )
);
- Atom nId = aNmTb.Put( rName.GetBuffer(), VARNAME );
+ Atom nId = aNmTb.Put( rName.getStr(), VARNAME );
pClass->SetVariable( nId, pClient, NULL,
VAR_NODATAINST, 0, nWinBitVarId );
}
diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y
index a89560a4ad6f..61f028e558ec 100644
--- a/rsc/source/parser/rscyacc.y
+++ b/rsc/source/parser/rscyacc.y
@@ -389,7 +389,7 @@ resource_definition
if( $4.IsNumber() ){
if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
- ByteString( $3 ),
+ rtl::OString( $3 ),
$4.GetLong(), ULONG_MAX ) )
bError = sal_True;
}
@@ -403,12 +403,12 @@ resource_definition
pExpr = new RscExpression( aExpType, '+', $4 );
if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
- ByteString( $3 ), pExpr, ULONG_MAX ) )
+ rtl::OString( $3 ), pExpr, ULONG_MAX ) )
bError = sal_True;
}
else if( $4.IsExpression() ){
if( !pTC->aFileTab.NewDef( pFI->GetFileIndex(),
- ByteString( $3 ), $4.aExp.pExp,
+ rtl::OString( $3 ), $4.aExp.pExp,
ULONG_MAX ) )
bError = sal_True;
}
@@ -1334,7 +1334,7 @@ line_number
RscFile * pFName;
pFI->SetLineNo( $3 );
- pFI->SetFileIndex( pTC->aFileTab.NewCodeFile( ByteString( $4 ) ) );
+ pFI->SetFileIndex( pTC->aFileTab.NewCodeFile( rtl::OString( $4 ) ) );
pFName = pTC->aFileTab.Get( pFI->GetFileIndex() );
pFName->bLoaded = sal_True;
pFName->bScanned = sal_True;
@@ -1344,7 +1344,7 @@ line_number
RscFile * pFName;
pFI->SetLineNo( $2 );
- pFI->SetFileIndex( pTC->aFileTab.NewCodeFile( ByteString( $3 ) ) );
+ pFI->SetFileIndex( pTC->aFileTab.NewCodeFile( rtl::OString( $3 ) ) );
pFName = pTC->aFileTab.Get( pFI->GetFileIndex() );
pFName->bLoaded = sal_True;
pFName->bScanned = sal_True;
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 282b250c6a2e..628dc572128b 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -101,7 +101,7 @@ void RscCmdLine::Init()
nByteOrder = RSC_BIGENDIAN;
DirEntry aEntry;
- aPath = ByteString( aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US ); //Immer im Aktuellen Pfad suchen
+ aPath = rtl::OUStringToOString(aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US); //Immer im Aktuellen Pfad suchen
m_aOutputFiles.clear();
m_aOutputFiles.push_back( OutputFile() );
}
@@ -181,7 +181,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
DirEntry aSDir( String( aSPath, RTL_TEXTENCODING_ASCII_US ) );
m_aReplacements.push_back( std::pair< OString, OString >( OString( (*ppStr)+4, pEqual - *ppStr - 4 ),
- ByteString( aSDir.GetFull(), RTL_TEXTENCODING_ASCII_US ) ) );
+ rtl::OUStringToOString(aSDir.GetFull(), RTL_TEXTENCODING_ASCII_US) ) );
}
}
else if( !rsc_stricmp( (*ppStr) + 1, "PreLoad" ) )
@@ -207,9 +207,11 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
else if( !rsc_strnicmp( (*ppStr) + 1, "i", 1 ) )
{ // Include-Pfade definieren
nCommands |= INCLUDE_FLAG;
- if( aPath.Len() )
- aPath += ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
- aPath += (*ppStr) + 2;
+ rtl::OStringBuffer aBuffer(aPath);
+ if (aBuffer.getLength())
+ aBuffer.append(rtl::OUStringToOString(DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US));
+ aBuffer.append((*ppStr) + 2);
+ aPath = aBuffer.makeStringAndClear();
}
else if( !rsc_strnicmp( (*ppStr) + 1, "fs=", 3 ) )
{ // anderer Name fuer .rc-file
@@ -226,10 +228,12 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
{
DirEntry aSysDir( String( aSysSearchDir, RTL_TEXTENCODING_ASCII_US ) );
m_aOutputFiles.back().aSysSearchDirs.push_back(
- ByteString( aSysDir.GetFull(), RTL_TEXTENCODING_ASCII_US ) );
+ rtl::OUStringToOString(aSysDir.GetFull(), RTL_TEXTENCODING_ASCII_US) );
if( m_aOutputFiles.back().aLangSearchPath.Len() )
+ {
m_aOutputFiles.back().aLangSearchPath.Append(
- ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US ) );
+ rtl::OUStringToOString(DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US) );
+ }
m_aOutputFiles.back().aLangSearchPath.Append( aSysSearchDir );
}
}
@@ -286,7 +290,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
{
if( m_aOutputFiles.back().aLangName.Len() )
m_aOutputFiles.push_back( OutputFile() );
- m_aOutputFiles.back().aLangName = ByteString( (*ppStr)+3 );
+ m_aOutputFiles.back().aLangName = rtl::OString((*ppStr)+3);
}
else
pEH->FatalError( ERR_UNKNOWNSW, RscId(), *ppStr );
@@ -652,7 +656,10 @@ ERRTYPE RscCompiler :: IncludeParser( sal_uLong lFileKey )
UniString aUniFileName( pFNTmp->aFileName, RTL_TEXTENCODING_ASCII_US );
DirEntry aFullName( aUniFileName );
if ( aFullName.Find( UniString( pCL->aPath, RTL_TEXTENCODING_ASCII_US ) ) )
- pFNTmp->aPathName = ByteString( aFullName.GetFull(), RTL_TEXTENCODING_ASCII_US );
+ {
+ pFNTmp->aPathName = rtl::OUStringToOString(
+ aFullName.GetFull(), RTL_TEXTENCODING_ASCII_US);
+ }
else
aError = ERR_OPENFILE;
}
@@ -707,8 +714,9 @@ ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey,
else
aSrsPath.CopyTo( aTmpPath, FSYS_ACTION_COPYFILE );
- ByteString aParseFile( aTmpPath.GetFull(), RTL_TEXTENCODING_ASCII_US );
- finput = fopen( aParseFile.GetBuffer(), "r" );
+ rtl::OString aParseFile(rtl::OUStringToOString(aTmpPath.GetFull(),
+ RTL_TEXTENCODING_ASCII_US));
+ finput = fopen(aParseFile.getStr(), "r");
if( !finput )
{
@@ -720,7 +728,7 @@ ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey,
RscFileInst aFileInst( pTC, lFileKey, lFileKey, finput );
pTC->pEH->StdOut( "reading file ", RscVerbosityVerbose );
- pTC->pEH->StdOut( aParseFile.GetBuffer(), RscVerbosityVerbose );
+ pTC->pEH->StdOut( aParseFile.getStr(), RscVerbosityVerbose );
pTC->pEH->StdOut( " ", RscVerbosityVerbose );
aError = ::parser( &aFileInst );
@@ -844,8 +852,8 @@ ERRTYPE RscCompiler::Link()
pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aRcTmp.getStr() );
// Schreibe Datei
- sal_Char cSearchDelim = ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US ).GetChar( 0 );
- sal_Char cAccessDelim = ByteString( DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US ).GetChar( 0 );
+ sal_Char cSearchDelim = rtl::OUStringToOString(DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US)[0];
+ sal_Char cAccessDelim = rtl::OUStringToOString(DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US)[0];
pTC->ChangeLanguage( it->aLangName );
pTC->SetSourceCharSet( RTL_TEXTENCODING_UTF8 );
pTC->ClearSysNames();
@@ -973,7 +981,7 @@ ERRTYPE RscCompiler::Link()
if( !aHxx.Len() )
{
UniString aUniOutputCxx( pCL->aOutputCxx, RTL_TEXTENCODING_ASCII_US );
- aHxx = ByteString( DirEntry( aUniOutputCxx ).GetBase(), RTL_TEXTENCODING_ASCII_US );
+ aHxx = rtl::OUStringToOString(DirEntry( aUniOutputCxx ).GetBase(), RTL_TEXTENCODING_ASCII_US);
aHxx += ".hxx";
}
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index 77a0b0de85f4..93d9144942a8 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -854,7 +854,7 @@ void RscFileTab :: DeleteFileContext( sal_uLong lFileKey ){
|* RscFileTab::NewCodeFile()
|*
*************************************************************************/
-sal_uLong RscFileTab :: NewCodeFile( const ByteString & rName )
+sal_uLong RscFileTab :: NewCodeFile( const rtl::OString& rName )
{
sal_uLong lKey;
RscFile * pFName;
diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx
index ff7c68b6e760..c4546077f87b 100644
--- a/rsc/source/tools/rsctools.cxx
+++ b/rsc/source/tools/rsctools.cxx
@@ -190,7 +190,7 @@ ByteString OutputFile ( ByteString aInput, const char * pExt )
UniString aExt( pExt, RTL_TEXTENCODING_ASCII_US );
aFileName.SetExtension( aExt );
- return ByteString( aFileName.GetFull(), RTL_TEXTENCODING_ASCII_US );
+ return rtl::OUStringToOString(aFileName.GetFull(), RTL_TEXTENCODING_ASCII_US);
}
/*************************************************************************