diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2012-12-30 13:07:28 -0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-03 10:07:39 +0100 |
commit | c40cd8a4f203a4f817a77ab850e5027f8bae9b91 (patch) | |
tree | ee6c7cc0ca9fc79570898f31ff5b96dfc3b8d31a /basic/source/comp | |
parent | 329f3cd02546dfe58bf00f6ad3b71bc84a8d4320 (diff) |
Remove all occurences of RTL_* and ::rtl prefix from basic
This is a big commit, so thanks for your time reviewing this :)
Conflicts:
basic/source/sbx/sbxscan.cxx
Change-Id: Ib9bc710b87475b5695764557321e5dcef25e5933
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'basic/source/comp')
-rw-r--r-- | basic/source/comp/io.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/parser.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/sbcomp.cxx | 18 | ||||
-rw-r--r-- | basic/source/comp/scanner.cxx | 32 | ||||
-rw-r--r-- | basic/source/comp/token.cxx | 22 |
5 files changed, 42 insertions, 42 deletions
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx index 2fb50913cea3..55877b065205 100644 --- a/basic/source/comp/io.cxx +++ b/basic/source/comp/io.cxx @@ -115,7 +115,7 @@ void SbiParser::Line() aGen.Statement(); KeywordSymbolInfo aInfo; - aInfo.m_aKeywordSymbol = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "line" ) ); + aInfo.m_aKeywordSymbol = OUString( "line" ); aInfo.m_eSbxDataType = GetType(); aInfo.m_eTok = SYMBOL; @@ -247,7 +247,7 @@ void SbiParser::Open() if( Peek() == SYMBOL ) { Next(); - if( aSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("LEN")) ) + if( aSym.equalsIgnoreAsciiCase("LEN") ) { TestToken( EQ ); pLen = new SbiExpression( this ); @@ -278,7 +278,7 @@ void SbiParser::Name() aGen.Statement(); KeywordSymbolInfo aInfo; - aInfo.m_aKeywordSymbol = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "name" ) ); + aInfo.m_aKeywordSymbol = OUString( "name" ); aInfo.m_eSbxDataType = GetType(); aInfo.m_eTok = SYMBOL; diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index a4a4501077d9..28c553fb999d 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -134,7 +134,7 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) bSingleLineIf = bExplicit = false; bClassModule = ( pm->GetModuleType() == com::sun::star::script::ModuleType::CLASS ); - OSL_TRACE("Parser - %s, bClassModule %d", rtl::OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); + OSL_TRACE("Parser - %s, bClassModule %d", OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); pPool = &aPublics; for( short i = 0; i < 26; i++ ) eDefTypes[ i ] = SbxVARIANT; // no explicit default type @@ -783,7 +783,7 @@ void SbiParser::Option() { bText = false; } - else if( eTok == SYMBOL && GetSym().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("text")) ) + else if( eTok == SYMBOL && GetSym().equalsIgnoreAsciiCase("text") ) { bText = true; } @@ -837,7 +837,7 @@ void addStringConst( SbiSymPool& rPool, const char* pSym, const OUString& rStr ) inline void addStringConst( SbiSymPool& rPool, const char* pSym, const char* pStr ) { - addStringConst( rPool, pSym, rtl::OUString::createFromAscii( pStr ) ); + addStringConst( rPool, pSym, OUString::createFromAscii( pStr ) ); } void SbiParser::AddConstants( void ) diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index c7f048f6c3fa..8f1f0812bce5 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -227,7 +227,7 @@ struct TraceTextData rtl::OString m_aTraceStr_PCode; }; typedef std::hash_map< sal_Int32, TraceTextData > PCToTextDataMap; -typedef std::hash_map< ::rtl::OUString, PCToTextDataMap*, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleTraceMap; +typedef std::hash_map< OUString, PCToTextDataMap*, OUStringHash, ::std::equal_to< OUString > > ModuleTraceMap; ModuleTraceMap GaModuleTraceMap; ModuleTraceMap& rModuleTraceMap = GaModuleTraceMap; @@ -261,7 +261,7 @@ static rtl::OString lcl_toOStringSkipLeadingWhites( const OUString& aStr ) { static sal_Char Buffer[1000]; - rtl::OString aOStr = OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US ); + rtl::OString aOStr = OUStringToOString( OUString( aStr ), RTL_TEXTENCODING_ASCII_US ); const sal_Char* pStr = aOStr.getStr(); // Skip whitespace @@ -365,7 +365,7 @@ struct FunctionItem , m_bBlockSteps( false ) {} }; -typedef std::hash_map< ::rtl::OUString, FunctionItem*, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > FunctionItemMap; +typedef std::hash_map< OUString, FunctionItem*, OUStringHash, ::std::equal_to< OUString > > FunctionItemMap; static std::stack< double > GaCallEnterTimeStack; static std::stack< FunctionItem* > GaFunctionItemStack; @@ -525,7 +525,7 @@ void dbg_tracePrint( const OUString& aStr, sal_Int32 nCallLvl, bool bCallLvlRela nCallLvl += GnLastCallLvl; } int nIndent = nCallLvl * GnIndentPerCallLevel; - lcl_lineOut( OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr(), lcl_getSpaces( nIndent ) ); + lcl_lineOut( OUStringToOString( OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr(), lcl_getSpaces( nIndent ) ); } void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) @@ -564,7 +564,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) ModuleTraceMap::iterator it = rModuleTraceMap.find( aModuleName ); if( it == rModuleTraceMap.end() ) { - const char* pModuleNameStr = OUStringToOString( rtl::OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); + const char* pModuleNameStr = OUStringToOString( OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); char Buffer[200]; sprintf( Buffer, "TRACE ERROR: Unknown module \"%s\"", pModuleNameStr ); lcl_lineOut( Buffer ); @@ -581,7 +581,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) PCToTextDataMap::iterator itInner = pInnerMap->find( nPC ); if( itInner == pInnerMap->end() ) { - const char* pModuleNameStr = OUStringToOString( rtl::OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); + const char* pModuleNameStr = OUStringToOString( OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); char Buffer[200]; sprintf( Buffer, "TRACE ERROR: No info for PC = %d in module \"%s\"", (int)nPC, pModuleNameStr ); lcl_lineOut( Buffer ); @@ -803,7 +803,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallL pPostStr = TimeBuffer; } #endif - lcl_lineOut( (!bLeave || !bOwnBlockSteps) ? OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr() : "}", + lcl_lineOut( (!bLeave || !bOwnBlockSteps) ? OUStringToOString( OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr() : "}", lcl_getSpaces( nIndent ), pPostStr ); if( !bLeave ) { @@ -836,7 +836,7 @@ void dbg_traceNotifyError( SbError nTraceErr, const OUString& aTraceErrMsg, #endif GnLastCallLvl = nCallLvl; - rtl::OString aOTraceErrMsg = OUStringToOString( rtl::OUString( aTraceErrMsg ), RTL_TEXTENCODING_ASCII_US ); + rtl::OString aOTraceErrMsg = OUStringToOString( OUString( aTraceErrMsg ), RTL_TEXTENCODING_ASCII_US ); char Buffer[200]; const char* pHandledStr = bTraceErrHandled ? " / HANDLED" : ""; @@ -922,7 +922,7 @@ void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) } char Buffer[500]; - const char* pValStr = OUStringToOString( rtl::OUString( aValStr ), RTL_TEXTENCODING_ASCII_US ).getStr(); + const char* pValStr = OUStringToOString( OUString( aValStr ), RTL_TEXTENCODING_ASCII_US ).getStr(); sprintf( Buffer, "### TRACE_PRINT: %s ###", pValStr ); int nIndent = GnLastCallLvl * GnIndentPerCallLevel; diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 87265e7839e2..5fbdcef097cf 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -22,7 +22,7 @@ #include <vcl/svapp.hxx> -SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf ) +SbiScanner::SbiScanner( const OUString& rBuf, StarBASIC* p ) : aBuf( rBuf ) { pBasic = p; pLine = NULL; @@ -156,10 +156,10 @@ void SbiScanner::scanGoto() if(n + 1 < aLine.getLength()) { - ::rtl::OUString aTemp = aLine.copy(n, 2); - if(aTemp.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("to"))) + OUString aTemp = aLine.copy(n, 2); + if(aTemp.equalsIgnoreAsciiCase("to")) { - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("goto")); + aSym = OUString("goto"); pLine += n + 2 - nCol; nCol = n + 2; } @@ -209,7 +209,7 @@ bool SbiScanner::NextSym() sal_Unicode buf[ BUF_SIZE ], *p = buf; eScanType = SbxVARIANT; - aSym = ::rtl::OUString(); + aSym = OUString(); bHash = bSymbol = bNumber = bSpaces = false; // read in line? @@ -261,7 +261,7 @@ bool SbiScanner::NextSym() scanAlphanumeric(); // Special handling for "go to" - if(nCol < aLine.getLength() && bCompatible && aSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("go"))) + if(nCol < aLine.getLength() && bCompatible && aSym.equalsIgnoreAsciiCase("go")) scanGoto(); // replace closing '_' by space when end of line is following @@ -270,7 +270,7 @@ bool SbiScanner::NextSym() { // We are going to modify a potentially shared string, so force // a copy, so that aSym is not modified by the following operation - ::rtl::OUString aSymCopy( aSym.getStr(), aSym.getLength() ); + OUString aSymCopy( aSym.getStr(), aSym.getLength() ); aSym = aSymCopy; // HACK: modifying a potentially shared string here! @@ -358,7 +358,7 @@ bool SbiScanner::NextSym() aSym = p; bNumber = true; if( comma > 1 || exp > 1 ) - { aError = ::rtl::OUString('.'); + { aError = OUString('.'); GenError( SbERR_BAD_CHAR_IN_NUMBER ); } // #57844 use localized function @@ -406,7 +406,7 @@ bool SbiScanner::NextSym() default : // treated as an operator --pLine; --nCol; nCol1 = nCol-1; - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&")); + aSym = OUString("&"); return true; } bNumber = true; @@ -421,11 +421,11 @@ bool SbiScanner::NextSym() // from 4.1.1996: buffer full, go on scanning empty if( (p-buf) == (BUF_SIZE-1) ) bBufOverflow = true; - else if( rtl::OUString( cmp ).indexOf( ch ) != -1 ) + else if( OUString( cmp ).indexOf( ch ) != -1 ) *p++ = ch; else { - aError = ::rtl::OUString(ch); + aError = OUString(ch); GenError( SbERR_BAD_CHAR_IN_NUMBER ); } } @@ -462,7 +462,7 @@ bool SbiScanner::NextSym() { pLine++; nCol++; if( *pLine != cSep || cSep == ']' ) break; - } else aError = ::rtl::OUString(cSep), GenError( SbERR_EXPECTED ); + } else aError = OUString(cSep), GenError( SbERR_EXPECTED ); } // If VBA Interop then doen't eat the [] chars if ( cSep == ']' && bVBASupportOn ) @@ -470,7 +470,7 @@ bool SbiScanner::NextSym() else aSym = aLine.copy( n, nCol - n - 1 ); // get out duplicate string delimiters - ::rtl::OUStringBuffer aSymBuf; + OUStringBuffer aSymBuf; for ( sal_Int32 i = 0, len = aSym.getLength(); i < len; ++i ) { aSymBuf.append( aSym[i] ); @@ -505,10 +505,10 @@ bool SbiScanner::NextSym() PrevLineCommentLbl: if( bPrevLineExtentsComment || (eScanType != SbxSTRING && - ( aSym[0] == '\'' || aSym.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("REM") ) ) ) ) + ( aSym[0] == '\'' || aSym.equalsIgnoreAsciiCase( "REM" ) ) ) ) { bPrevLineExtentsComment = false; - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REM")); + aSym = OUString("REM"); sal_Int32 nLen = rtl_ustr_getLength(pLine); if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' ) bPrevLineExtentsComment = true; @@ -539,7 +539,7 @@ eoln: nLine = nOldLine; nCol1 = nOldCol1; nCol2 = nOldCol2; - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + aSym = OUString("\n"); nColLock = 0; return true; } diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index e0dc9fda3ac6..0da1c51476d9 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -210,7 +210,7 @@ TokenLabelInfo::~TokenLabelInfo() // the constructor detects the length of the token table -SbiTokenizer::SbiTokenizer( const ::rtl::OUString& rSrc, StarBASIC* pb ) +SbiTokenizer::SbiTokenizer( const OUString& rSrc, StarBASIC* pb ) : SbiScanner( rSrc, pb ) { pTokTable = aTokTable_Basic; @@ -240,11 +240,11 @@ void SbiTokenizer::Push( SbiToken t ) void SbiTokenizer::Error( SbError code, const char* pMsg ) { - aError = ::rtl::OUString::createFromAscii( pMsg ); + aError = OUString::createFromAscii( pMsg ); Error( code ); } -void SbiTokenizer::Error( SbError code, const ::rtl::OUString &aMsg ) +void SbiTokenizer::Error( SbError code, const OUString &aMsg ) { aError = aMsg; Error( code ); @@ -275,24 +275,24 @@ SbiToken SbiTokenizer::Peek() // For decompilation. Numbers and symbols return an empty string. -const ::rtl::OUString& SbiTokenizer::Symbol( SbiToken t ) +const OUString& SbiTokenizer::Symbol( SbiToken t ) { // character token? if( t < FIRSTKWD ) { - aSym = ::rtl::OUString::valueOf(sal::static_int_cast<sal_Unicode>(t)); + aSym = OUString::valueOf(sal::static_int_cast<sal_Unicode>(t)); return aSym; } switch( t ) { case NEG : - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")); + aSym = OUString("-"); return aSym; case EOS : - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":/CRLF")); + aSym = OUString(":/CRLF"); return aSym; case EOLN : - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CRLF")); + aSym = OUString("CRLF"); return aSym; default: break; @@ -302,14 +302,14 @@ const ::rtl::OUString& SbiTokenizer::Symbol( SbiToken t ) { if( tp->t == t ) { - aSym = ::rtl::OStringToOUString(tp->s, RTL_TEXTENCODING_ASCII_US); + aSym = OStringToOUString(tp->s, RTL_TEXTENCODING_ASCII_US); return aSym; } } const sal_Unicode *p = aSym.getStr(); if (*p <= ' ') { - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("???")); + aSym = OUString("???"); } return aSym; } @@ -506,7 +506,7 @@ special: if( bCompatible ) { // #129904 Suppress system - if( eTok == STOP && aSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("system")) ) + if( eTok == STOP && aSym.equalsIgnoreAsciiCase("system") ) { eCurTok = SYMBOL; } |