summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxchar.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/sbx/sbxchar.cxx')
-rw-r--r--basic/source/sbx/sbxchar.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/basic/source/sbx/sbxchar.cxx b/basic/source/sbx/sbxchar.cxx
index 9f0bb41ce6..ca52057a7c 100644
--- a/basic/source/sbx/sbxchar.cxx
+++ b/basic/source/sbx/sbxchar.cxx
@@ -39,7 +39,7 @@ using namespace rtl;
xub_Unicode ImpGetChar( const SbxValues* p )
{
SbxValues aTmp;
- xub_Unicode nRes;
+ xub_Unicode nRes = 0;
start:
switch( +p->eType )
{
@@ -156,13 +156,11 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- nRes = 0;
- else
+ if ( p->pOUString )
{
double d;
SbxDataType t;
- if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
nRes = 0;
else if( d > SbxMAXCHAR )
{
@@ -274,9 +272,10 @@ start:
case SbxBYREF | SbxSTRING:
case SbxSTRING:
case SbxLPSTR:
- if( !p->pString )
- p->pString = new XubString;
- *p->pString = n;
+ if ( !p->pOUString )
+ p->pOUString = new ::rtl::OUString( n );
+ else
+ *p->pOUString = ::rtl::OUString( n );
break;
case SbxOBJECT:
{