summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-16 10:06:54 +0200
committerNoel Grandin <noel@peralex.com>2013-09-17 09:05:52 +0200
commit41dec09ed3469d1e4dc53aeb7034a45bcff8e1e5 (patch)
tree2b87b58d2e22118b414001e457d7ce8a8505d765 /basic
parente8ecf30ea61625c3397a635c5c409bbc004685bc (diff)
convert BASIC from String to OUString
Change-Id: I4b046e4c460305acad29862341092af948639215
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basmgr.cxx4
-rw-r--r--basic/source/runtime/inputbox.cxx20
-rw-r--r--basic/source/runtime/methods.cxx6
-rw-r--r--basic/source/sbx/sbxscan.cxx14
-rw-r--r--basic/source/uno/namecont.cxx2
5 files changed, 23 insertions, 23 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index d4bcac2afbb5..6621a4014b36 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1315,7 +1315,7 @@ sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage
if ( !pLibInfo || !nLib )
{
- StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, String(), ERRCODE_BUTTON_OK );
+ StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, OUString(), ERRCODE_BUTTON_OK );
aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_STDLIB, pLibInfo->GetLibName()));
return sal_False;
}
@@ -1342,7 +1342,7 @@ sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage
if ( !xBasicStorage.Is() || xBasicStorage->GetError() )
{
- StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, String(), ERRCODE_BUTTON_OK );
+ StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, OUString(), ERRCODE_BUTTON_OK );
aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_OPENLIBSTORAGE, pLibInfo->GetLibName()));
}
else if ( xBasicStorage->IsStream( pLibInfo->GetLibName() ) )
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx
index c009f88818d0..db457608495b 100644
--- a/basic/source/runtime/inputbox.cxx
+++ b/basic/source/runtime/inputbox.cxx
@@ -38,18 +38,18 @@ class SvRTLInputBox : public ModalDialog
void PositionDialog( long nXTwips, long nYTwips, const Size& rDlgSize );
void InitButtons( const Size& rDlgSize );
void PositionEdit( const Size& rDlgSize );
- void PositionPrompt( const String& rPrompt, const Size& rDlgSize );
+ void PositionPrompt( const OUString& rPrompt, const Size& rDlgSize );
DECL_LINK( OkHdl, Button * );
DECL_LINK( CancelHdl, Button * );
public:
- SvRTLInputBox( Window* pParent, const String& rPrompt, const String& rTitle,
- const String& rDefault, long nXTwips = -1, long nYTwips = -1 );
+ SvRTLInputBox( Window* pParent, const OUString& rPrompt, const OUString& rTitle,
+ const OUString& rDefault, long nXTwips = -1, long nYTwips = -1 );
OUString GetText() const { return aText; }
};
-SvRTLInputBox::SvRTLInputBox( Window* pParent, const String& rPrompt,
- const String& rTitle, const String& rDefault,
+SvRTLInputBox::SvRTLInputBox( Window* pParent, const OUString& rPrompt,
+ const OUString& rTitle, const OUString& rDefault,
long nXTwips, long nYTwips ) :
ModalDialog( pParent,WB_3DLOOK | WB_MOVEABLE | WB_CLOSEABLE ),
aEdit( this, WB_LEFT | WB_BORDER ),
@@ -103,9 +103,9 @@ void SvRTLInputBox::PositionEdit( const Size& rDlgSize )
}
-void SvRTLInputBox::PositionPrompt(const String& rPrompt,const Size& rDlgSize)
+void SvRTLInputBox::PositionPrompt(const OUString& rPrompt,const Size& rDlgSize)
{
- if ( rPrompt.Len() == 0 )
+ if ( rPrompt.isEmpty() )
return;
OUString aText_(convertLineEnd(rPrompt, LINEEND_CR));
aPromptText.SetPosPixel( LogicToPixel(Point(5,5)));
@@ -153,10 +153,10 @@ RTLFUNC(InputBox)
StarBASIC::Error( SbERR_BAD_ARGUMENT );
else
{
- String aTitle;
- String aDefault;
+ OUString aTitle;
+ OUString aDefault;
sal_Int32 nX = -1, nY = -1; // center
- const String& rPrompt = rPar.Get(1)->GetOUString();
+ const OUString& rPrompt = rPar.Get(1)->GetOUString();
if ( nArgCount > 2 && !rPar.Get(2)->IsErr() )
aTitle = rPar.Get(2)->GetOUString();
if ( nArgCount > 3 && !rPar.Get(3)->IsErr() )
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 048ca0c3a716..1180a81a4f85 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3617,7 +3617,7 @@ RTLFUNC(Shell)
// #55735 if there are parameters, they have to be separated
// #72471 also separate the single parameters
- std::list<String> aTokenList;
+ std::list<OUString> aTokenList;
OUString aToken;
sal_Int32 i = 0;
sal_Unicode c;
@@ -3699,7 +3699,7 @@ RTLFUNC(Shell)
}
// #72471 work parameter(s) up
- std::list<String>::const_iterator iter = aTokenList.begin();
+ std::list<OUString>::const_iterator iter = aTokenList.begin();
const OUString& rStr = *iter;
OUString aOUStrProg( rStr.getStr(), rStr.getLength() );
OUString aOUStrProgURL = getFullPath( aOUStrProg );
@@ -3824,7 +3824,7 @@ OUString getBasicTypeName( SbxDataType eType )
return OUString::createFromAscii(pTypeNames[nPos]);
}
-String getObjectTypeName( SbxVariable* pVar )
+OUString getObjectTypeName( SbxVariable* pVar )
{
OUString sRet( "Object" );
if ( pVar )
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index e3545ef1a130..4c919d5923ff 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -680,16 +680,16 @@ enum VbaFormatType
struct VbaFormatInfo
{
VbaFormatType meType;
- const char* mpVbaFormat; // Format string in vba
+ OUString mpVbaFormat; // Format string in vba
NfIndexTableOffset meOffset; // SvNumberFormatter format index, if meType = VBA_FORMAT_TYPE_OFFSET
const char* mpOOoFormat; // if meType = VBA_FORMAT_TYPE_USERDEFINED
};
#define VBA_FORMAT_OFFSET( pcUtf8, eOffset ) \
- { VBA_FORMAT_TYPE_OFFSET, pcUtf8, eOffset, 0 }
+ { VBA_FORMAT_TYPE_OFFSET, OUString(pcUtf8), eOffset, 0 }
#define VBA_FORMAT_USERDEFINED( pcUtf8, pcDefinedUtf8 ) \
- { VBA_FORMAT_TYPE_USERDEFINED, pcUtf8, NF_NUMBER_STANDARD, pcDefinedUtf8 }
+ { VBA_FORMAT_TYPE_USERDEFINED, OUString(pcUtf8), NF_NUMBER_STANDARD, pcDefinedUtf8 }
static VbaFormatInfo pFormatInfoTable[] =
{
@@ -703,16 +703,16 @@ static VbaFormatInfo pFormatInfoTable[] =
VBA_FORMAT_OFFSET( "dddddd", NF_DATE_SYSTEM_LONG ),
VBA_FORMAT_USERDEFINED( "ttttt", "H:MM:SS AM/PM" ),
VBA_FORMAT_OFFSET( "ww", NF_DATE_WW ),
- { VBA_FORMAT_TYPE_NULL, 0, NF_INDEX_TABLE_ENTRIES, 0 }
+ { VBA_FORMAT_TYPE_NULL, OUString(""), NF_INDEX_TABLE_ENTRIES, 0 }
};
-VbaFormatInfo* getFormatInfo( const String& rFmt )
+VbaFormatInfo* getFormatInfo( const OUString& rFmt )
{
VbaFormatInfo* pInfo = NULL;
sal_Int16 i = 0;
- while( (pInfo = pFormatInfoTable + i )->mpVbaFormat != NULL )
+ while( (pInfo = pFormatInfoTable + i )->meType != VBA_FORMAT_TYPE_NULL )
{
- if( rFmt.EqualsIgnoreCaseAscii( pInfo->mpVbaFormat ) )
+ if( rFmt.equalsIgnoreAsciiCase( pInfo->mpVbaFormat ) )
break;
i++;
}
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index f2e6656d684b..62896ac4d4ff 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1687,7 +1687,7 @@ bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
if( bStorage )
{
aLibInfoPath = maInfoFileName;
- aLibInfoPath += String( "-lb.xml" );
+ aLibInfoPath += "-lb.xml";
try
{