convert BASIC from String to OUString
Change-Id: I4b046e4c460305acad29862341092af948639215
This commit is contained in:
parent
e8ecf30ea6
commit
41dec09ed3
@ -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() ) )
|
||||
|
@ -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() )
|
||||
|
@ -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 )
|
||||
|
@ -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++;
|
||||
}
|
||||
|
@ -1687,7 +1687,7 @@ bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
|
||||
if( bStorage )
|
||||
{
|
||||
aLibInfoPath = maInfoFileName;
|
||||
aLibInfoPath += String( "-lb.xml" );
|
||||
aLibInfoPath += "-lb.xml";
|
||||
|
||||
try
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user