summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-11-06 23:34:23 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-07 02:14:53 -0600
commit27239ad23006b1fd1ddb21467f4c1fd637b560d5 (patch)
tree605b30a50f25ef7e8f0d6511d6df24790ece90b9 /sw
parentf510217832a6edaf6a44169cabdf739985d00125 (diff)
basic: String -> OUString
Change-Id: I42479b4bade5111e38d69f04c889c166f340d5ba
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/bastyp/calc.cxx11
-rw-r--r--sw/source/core/doc/docbasic.cxx6
2 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 03149d5eeff4..434069dbe116 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -421,8 +421,9 @@ SwSbxValue SwCalc::Calculate( const String& rStr )
String SwCalc::GetStrResult( const SwSbxValue& rVal, sal_Bool bRound )
{
if( !rVal.IsDouble() )
- return rVal.GetString();
-
+ {
+ return rVal.GetOUString();
+ }
return GetStrResult( rVal.GetDouble(), bRound );
}
@@ -1285,7 +1286,7 @@ SwSbxValue SwCalc::Prim()
nErg = Prim();
if( SbxSTRING == nErg.GetType() )
{
- nErg.PutBool( 0 == nErg.GetString().Len() );
+ nErg.PutBool( nErg.GetOUString().isEmpty() );
}
else if(SbxBOOL == nErg.GetType() )
{
@@ -1612,7 +1613,7 @@ SwSbxValue::~SwSbxValue()
sal_Bool SwSbxValue::GetBool() const
{
- return SbxSTRING == GetType() ? 0 != GetString().Len()
+ return SbxSTRING == GetType() ? !GetOUString().isEmpty()
: 0 != SbxValue::GetBool();
}
@@ -1622,7 +1623,7 @@ double SwSbxValue::GetDouble() const
if( SbxSTRING == GetType() )
{
xub_StrLen nStt = 0;
- SwCalc::Str2Double( GetString(), nStt, nRet );
+ SwCalc::Str2Double( GetOUString(), nStt, nRet );
}
else if (IsBool())
{
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index b6bc7ae712c2..232c0b282908 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -60,7 +60,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
switch( pVar->GetType() )
{
case SbxSTRING:
- pUnoArgs[i] <<= OUString( pVar->GetString() );
+ pUnoArgs[i] <<= OUString( pVar->GetOUString() );
break;
case SbxCHAR:
pUnoArgs[i] <<= (sal_Int16)pVar->GetChar() ;
@@ -97,8 +97,10 @@ bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
if( pRet && SbxNULL < pRetValue->GetType() &&
SbxVOID != pRetValue->GetType() )
+ {
// valid value, so set it
- *pRet = pRetValue->GetString();
+ *pRet = pRetValue->GetOUString();
+ }
}
break;
case JAVASCRIPT: