summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-01-31 02:18:11 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-01-31 02:29:23 +0900
commit6073c31fe8c500066bb033cdb646e9d1cca9b94a (patch)
tree095e17d1abff7e6196211b3822ed92db27cfa6c5 /basic
parent458d56d9b35f2ecb2eea2589737079390b10ee26 (diff)
Replaced String by rtl::OUString in SbiScanner
Diffstat (limited to 'basic')
-rw-r--r--basic/inc/basic/sbstar.hxx4
-rw-r--r--basic/source/classes/sb.cxx8
-rw-r--r--basic/source/comp/scanner.cxx6
-rw-r--r--basic/source/comp/token.cxx4
-rw-r--r--basic/source/inc/scanner.hxx5
-rw-r--r--basic/source/inc/token.hxx2
6 files changed, 14 insertions, 15 deletions
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index dc6622e7f274..7cf87ea3bfad 100644
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -82,7 +82,7 @@ class BASIC_DLLPUBLIC StarBASIC : public SbxObject
BASIC_DLLPRIVATE void implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic );
protected:
- sal_Bool CError( SbError, const String&, xub_StrLen, xub_StrLen, xub_StrLen );
+ sal_Bool CError( SbError, const ::rtl::OUString&, xub_StrLen, xub_StrLen, xub_StrLen );
private:
BASIC_DLLPRIVATE sal_Bool RTError( SbError, xub_StrLen, xub_StrLen, xub_StrLen );
BASIC_DLLPRIVATE sal_Bool RTError( SbError, const String& rMsg, xub_StrLen, xub_StrLen, xub_StrLen );
@@ -154,7 +154,7 @@ public:
sal_uInt16 nCol1, sal_uInt16 nCol2 );
// Specific to error handler
- static void MakeErrorText( SbError, const String& aMsg );
+ static void MakeErrorText( SbError, const ::rtl::OUString& aMsg );
static const String& GetErrorText();
static SbError GetErrorCode();
static sal_Bool IsCompilerError();
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index a0b3bb8a0a92..816c7d3ad0dd 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1575,7 +1575,7 @@ struct BasicStringList_Impl : private Resource
};
//----------------------------------------------------------------
-void StarBASIC::MakeErrorText( SbError nId, const String& aMsg )
+void StarBASIC::MakeErrorText( SbError nId, const ::rtl::OUString& aMsg )
{
SolarMutexGuard aSolarGuard;
sal_uInt16 nOldID = GetVBErrorCode( nId );
@@ -1612,7 +1612,7 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg )
}
sal_Bool StarBASIC::CError
- ( SbError code, const String& rMsg, sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 )
+ ( SbError code, const ::rtl::OUString& rMsg, sal_uInt16 l, sal_uInt16 c1, sal_uInt16 c2 )
{
SolarMutexGuard aSolarGuard;
@@ -1634,8 +1634,8 @@ sal_Bool StarBASIC::CError
MakeErrorText( code, rMsg );
// Implementation of the code for the string transport to SFX-Error
- if( rMsg.Len() )
- code = (sal_uIntPtr)*new StringErrorInfo( code, String(rMsg) );
+ if( !rMsg.isEmpty() )
+ code = (sal_uIntPtr)*new StringErrorInfo( code, rMsg );
SetErrorData( code, l, c1, c2 );
GetSbData()->bCompiler = sal_True;
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 5768ed44388e..872bdd7d9a85 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -369,7 +369,7 @@ bool SbiScanner::NextSym()
aSym = p; bNumber = true;
if( comma > 1 || exp > 1 )
- { aError = '.';
+ { aError = ::rtl::OUString('.');
GenError( SbERR_BAD_CHAR_IN_NUMBER ); }
// #57844 use localized function
@@ -437,7 +437,7 @@ bool SbiScanner::NextSym()
*p++ = ch;
else
{
- aError = ch;
+ aError = ::rtl::OUString(ch);
GenError( SbERR_BAD_CHAR_IN_NUMBER );
}
}
@@ -474,7 +474,7 @@ bool SbiScanner::NextSym()
{
pLine++; nCol++;
if( *pLine != cSep || cSep == ']' ) break;
- } else aError = cSep, GenError( SbERR_EXPECTED );
+ } else aError = ::rtl::OUString(cSep), GenError( SbERR_EXPECTED );
}
// If VBA Interop then doen't eat the [] chars
if ( cSep == ']' && bVBASupportOn )
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index d18953dd77d2..63c98678fcdc 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -244,11 +244,11 @@ void SbiTokenizer::Push( SbiToken t )
void SbiTokenizer::Error( SbError code, const char* pMsg )
{
- aError = String::CreateFromAscii( pMsg );
+ aError = ::rtl::OUString::createFromAscii( pMsg );
Error( code );
}
-void SbiTokenizer::Error( SbError code, String aMsg )
+void SbiTokenizer::Error( SbError code, const ::rtl::OUString &aMsg )
{
aError = aMsg;
Error( code );
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx
index 69c3d87ba3ec..926706cc2af5 100644
--- a/basic/source/inc/scanner.hxx
+++ b/basic/source/inc/scanner.hxx
@@ -29,12 +29,11 @@
#ifndef _SCANNER_HXX
#define _SCANNER_HXX
-#include <tools/string.hxx>
#include <basic/sberrors.hxx>
// The scanner is stand-alone, i. e. it can be used from everywhere.
// A BASIC-instance is necessary for error messages. Without BASIC
-// the errors are only counted. Also the BASICC is necessary when an
+// the errors are only counted. Also the BASIC is necessary when an
// advanced SBX-variable shall be used for data type recognition etc.
class StarBASIC;
@@ -51,7 +50,7 @@ class SbiScanner
bool readLine();
protected:
::rtl::OUString aSym;
- String aError;
+ ::rtl::OUString aError;
SbxDataType eScanType;
StarBASIC* pBasic; // instance for error callbacks
double nVal; // numeric value
diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx
index d5bb4a292e98..31de0f6fd812 100644
--- a/basic/source/inc/token.hxx
+++ b/basic/source/inc/token.hxx
@@ -164,7 +164,7 @@ public:
void Error( SbError c ) { GenError( c ); }
void Error( SbError, SbiToken );
void Error( SbError, const char* );
- void Error( SbError, String );
+ void Error( SbError, const ::rtl::OUString &);
void Keywords( sal_Bool b ) { bKeywords = b; }