diff options
Diffstat (limited to 'basic/source/sbx')
-rw-r--r-- | basic/source/sbx/sbxbool.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxbyte.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxchar.cxx | 4 | ||||
-rw-r--r-- | basic/source/sbx/sbxconv.hxx | 16 | ||||
-rw-r--r-- | basic/source/sbx/sbxdbl.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxdec.cxx | 8 | ||||
-rw-r--r-- | basic/source/sbx/sbxdec.hxx | 4 | ||||
-rw-r--r-- | basic/source/sbx/sbxint.cxx | 18 | ||||
-rw-r--r-- | basic/source/sbx/sbxlng.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 34 | ||||
-rw-r--r-- | basic/source/sbx/sbxres.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxres.hxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxscan.cxx | 32 | ||||
-rw-r--r-- | basic/source/sbx/sbxsng.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxstr.cxx | 26 | ||||
-rw-r--r-- | basic/source/sbx/sbxuint.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxulng.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxvalue.cxx | 256 |
18 files changed, 208 insertions, 208 deletions
diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx index 1716037b36ca..426552da7ec5 100644 --- a/basic/source/sbx/sbxbool.cxx +++ b/basic/source/sbx/sbxbool.cxx @@ -174,7 +174,7 @@ void ImpPutBool( SbxValues* p, sal_Int16 n ) case SbxSTRING: case SbxLPSTR: if ( !p->pOUString ) - p->pOUString = new ::rtl::OUString( SbxRes( n ? STRING_TRUE : STRING_FALSE ) ); + p->pOUString = new OUString( SbxRes( n ? STRING_TRUE : STRING_FALSE ) ); else *p->pOUString = SbxRes( n ? STRING_TRUE : STRING_FALSE ); break; diff --git a/basic/source/sbx/sbxbyte.cxx b/basic/source/sbx/sbxbyte.cxx index bcfebdaaf97d..9c9522294023 100644 --- a/basic/source/sbx/sbxbyte.cxx +++ b/basic/source/sbx/sbxbyte.cxx @@ -259,7 +259,7 @@ void ImpPutByte( SbxValues* p, sal_uInt8 n ) case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxchar.cxx b/basic/source/sbx/sbxchar.cxx index 6ab71a64524a..9628be2cbe91 100644 --- a/basic/source/sbx/sbxchar.cxx +++ b/basic/source/sbx/sbxchar.cxx @@ -249,9 +249,9 @@ start: case SbxSTRING: case SbxLPSTR: if ( !p->pOUString ) - p->pOUString = new ::rtl::OUString( n ); + p->pOUString = new OUString( n ); else - *p->pOUString = ::rtl::OUString( n ); + *p->pOUString = OUString( n ); break; case SbxOBJECT: { diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx index 4b369ce70768..433de01ca0e4 100644 --- a/basic/source/sbx/sbxconv.hxx +++ b/basic/source/sbx/sbxconv.hxx @@ -25,13 +25,13 @@ class SbxArray; // SBXSCAN.CXX -extern void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, bool bCoreString=false ); +extern void ImpCvtNum( double nNum, short nPrec, OUString& rRes, bool bCoreString=false ); extern SbxError ImpScan - ( const ::rtl::OUString& rSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, + ( const OUString& rSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, bool bAllowIntntl=false, bool bOnlyIntntl=false ); // with advanced evaluation (International, "TRUE"/"FALSE") -extern bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ); +extern bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType ); void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep ); @@ -93,9 +93,9 @@ void ImpPutDate( SbxValues*, double ); // SBXSTR.CXX -::rtl::OUString ImpGetString( const SbxValues* ); -::rtl::OUString ImpGetCoreString( const SbxValues* ); -void ImpPutString( SbxValues*, const ::rtl::OUString* ); +OUString ImpGetString( const SbxValues* ); +OUString ImpGetCoreString( const SbxValues* ); +void ImpPutString( SbxValues*, const OUString* ); // SBXCHAR.CXX @@ -122,8 +122,8 @@ enum SbxBOOL ImpGetBool( const SbxValues* ); void ImpPutBool( SbxValues*, sal_Int16 ); // ByteArray <--> String -SbxArray* StringToByteArray(const ::rtl::OUString& rStr); -::rtl::OUString ByteArrayToString(SbxArray* pArr); +SbxArray* StringToByteArray(const OUString& rStr); +OUString ByteArrayToString(SbxArray* pArr); #endif diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx index 4add26a22a8a..e349a946c337 100644 --- a/basic/source/sbx/sbxdbl.cxx +++ b/basic/source/sbx/sbxdbl.cxx @@ -194,7 +194,7 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 14, *p->pOUString, bCoreString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 0343d5966f6d..276b78857e56 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -192,7 +192,7 @@ void SbxDecimal::setUInt( unsigned int val ) setULong( (sal_uInt32)val ); } -bool SbxDecimal::setString( ::rtl::OUString* pOUString ) +bool SbxDecimal::setString( OUString* pOUString ) { static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ); @@ -332,7 +332,7 @@ bool SbxDecimal::setSingle( float val ) { (void)val; return false; } bool SbxDecimal::setDouble( double val ) { (void)val; return false; } void SbxDecimal::setInt( int val ) { (void)val; } void SbxDecimal::setUInt( unsigned int val ) { (void)val; } -bool SbxDecimal::setString( ::rtl::OUString* pOUString ) { (void)pOUString; return false; } +bool SbxDecimal::setString( OUString* pOUString ) { (void)pOUString; return false; } bool SbxDecimal::getChar( sal_Unicode& rVal ) { (void)rVal; return false; } bool SbxDecimal::getShort( sal_Int16& rVal ) { (void)rVal; return false; } @@ -344,7 +344,7 @@ bool SbxDecimal::getDouble( double& rVal ) { (void)rVal; return false; } #endif -bool SbxDecimal::getString( ::rtl::OUString& rString ) +bool SbxDecimal::getString( OUString& rString ) { #ifdef WIN32 static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ); @@ -589,7 +589,7 @@ start: case SbxSTRING: case SbxBYREF | SbxSTRING: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; pDec->getString( *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx index 89977091d764..73ba5732e4e3 100644 --- a/basic/source/sbx/sbxdec.hxx +++ b/basic/source/sbx/sbxdec.hxx @@ -75,7 +75,7 @@ public: bool setDouble( double val ); void setInt( int val ); void setUInt( unsigned int val ); - bool setString( ::rtl::OUString* pOUString ); + bool setString( OUString* pOUString ); void setDecimal( SbxDecimal* pDecimal ) { #ifdef WIN32 @@ -95,7 +95,7 @@ public: bool getDouble( double& rVal ); bool getInt( int& rVal ); bool getUInt( unsigned int& rVal ); - bool getString( ::rtl::OUString& rString ); + bool getString( OUString& rString ); bool operator -= ( const SbxDecimal &r ); bool operator += ( const SbxDecimal &r ); diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx index 61b601e3aec8..dc8cd944ba63 100644 --- a/basic/source/sbx/sbxint.cxx +++ b/basic/source/sbx/sbxint.cxx @@ -264,7 +264,7 @@ start: case SbxSTRING: case SbxBYREF | SbxSTRING: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: @@ -433,7 +433,7 @@ start: nRes = 0; else { - ::rtl::OString aOStr = ::rtl::OUStringToOString + ::OString aOStr = OUStringToOString ( *p->pOUString, RTL_TEXTENCODING_ASCII_US ); nRes = aOStr.toInt64(); if( nRes == 0 ) @@ -541,10 +541,10 @@ start: case SbxLPSTR: { if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; - ::rtl::OString aOStr = ::rtl::OString::valueOf( n ); - (*p->pOUString) = ::rtl::OStringToOUString + ::OString aOStr = ::OString::valueOf( n ); + (*p->pOUString) = ::OStringToOUString ( aOStr, RTL_TEXTENCODING_ASCII_US ); break; } @@ -694,7 +694,7 @@ start: nRes = 0; else { - ::rtl::OString aOStr = ::rtl::OUStringToOString + ::OString aOStr = OUStringToOString ( *p->pOUString, RTL_TEXTENCODING_ASCII_US ); sal_Int64 n64 = aOStr.toInt64(); if( n64 == 0 ) @@ -816,13 +816,13 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; if( n > SbxMAXSALINT64 ) SbxBase::SetError( SbxERR_CONVERSION ); else { - ::rtl::OString aOStr = ::rtl::OString::valueOf( (sal_Int64)n ); - (*p->pOUString) = ::rtl::OStringToOUString + ::OString aOStr = ::OString::valueOf( (sal_Int64)n ); + (*p->pOUString) = ::OStringToOUString ( aOStr, RTL_TEXTENCODING_ASCII_US ); } break; diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx index 90cf5f9e0038..5b633cb0e1e3 100644 --- a/basic/source/sbx/sbxlng.cxx +++ b/basic/source/sbx/sbxlng.cxx @@ -225,7 +225,7 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index e72a2821c5f0..2ce01fc4d4ed 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -39,8 +39,8 @@ SbxObject::SbxObject( const OUString& rClass ) aData.pObj = this; if( !nNameHash ) { - pNameProp = ::rtl::OUString::createFromAscii(GetSbxRes( STRING_NAMEPROP )); - pParentProp = ::rtl::OUString::createFromAscii(GetSbxRes( STRING_PARENTPROP )); + pNameProp = OUString::createFromAscii(GetSbxRes( STRING_NAMEPROP )); + pParentProp = OUString::createFromAscii(GetSbxRes( STRING_PARENTPROP )); nNameHash = MakeHashCode( pNameProp ); nParentHash = MakeHashCode( pParentProp ); } @@ -214,8 +214,8 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t ) #ifdef DBG_UTIL static sal_uInt16 nLvl = 0; static const char* pCls[] = { "DontCare","Array","Value","Variable","Method","Property","Object" }; - rtl::OString aNameStr1(rtl::OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr1(OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); DbgOutf( "SBX: Search %.*s %s %s in %s", nLvl++, " ", ( t >= SbxCLASS_DONTCARE && t <= SbxCLASS_OBJECT ) @@ -283,8 +283,8 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t ) nLvl--; if( pRes ) { - rtl::OString aNameStr3(rtl::OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr4(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr3(OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr4(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); DbgOutf( "SBX: Found %.*s %s in %s", nLvl, " ", aNameStr3.getStr(), aNameStr4.getStr() ); } @@ -499,8 +499,8 @@ void SbxObject::Insert( SbxVariable* pVar ) { aVarName = PTR_CAST(SbxObject,pVar)->GetClassName(); } - rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); DbgOutf( "SBX: Insert %s %s in %s", ( pVar->GetClass() >= SbxCLASS_DONTCARE && pVar->GetClass() <= SbxCLASS_OBJECT ) @@ -542,8 +542,8 @@ void SbxObject::QuickInsert( SbxVariable* pVar ) { aVarName = PTR_CAST(SbxObject,pVar)->GetClassName(); } - rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); DbgOutf( "SBX: Insert %s %s in %s", ( pVar->GetClass() >= SbxCLASS_DONTCARE && pVar->GetClass() <= SbxCLASS_OBJECT ) @@ -569,8 +569,8 @@ void SbxObject::Remove( SbxVariable* pVar ) { aVarName = PTR_CAST(SbxObject,pVar)->GetClassName(); } - rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); #endif SbxVariableRef pVar_ = pArray->Get( nIdx ); if( pVar_->IsBroadcaster() ) @@ -823,8 +823,8 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill ) GetAll( SbxCLASS_DONTCARE ); } // Output the data of the object itself - rtl::OString aNameStr(rtl::OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); - rtl::OString aClassNameStr(rtl::OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aClassNameStr(OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US)); rStrm << "Object( " << rtl::OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr()<< "=='" << ( aNameStr.isEmpty() ? "<unnamed>" : aNameStr.getStr() ) << "', " @@ -834,7 +834,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill ) << " refs, "; if ( GetParent() ) { - rtl::OString aParentNameStr(rtl::OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aParentNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); rStrm << "in parent " << rtl::OString::valueOf(reinterpret_cast<sal_Int64>(GetParent())).getStr() << "=='" << ( aParentNameStr.isEmpty() ? "<unnamed>" : aParentNameStr.getStr() ) << "'"; @@ -844,14 +844,14 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill ) rStrm << "no parent "; } rStrm << " )" << endl; - rtl::OString aIndentNameStr(rtl::OUStringToOString(aIndent, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aIndentNameStr(OUStringToOString(aIndent, RTL_TEXTENCODING_ASCII_US)); rStrm << aIndentNameStr.getStr() << "{" << endl; // Flags OUString aAttrs; if( CollectAttrs( this, aAttrs ) ) { - rtl::OString aAttrStr(rtl::OUStringToOString(aAttrs, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aAttrStr(OUStringToOString(aAttrs, RTL_TEXTENCODING_ASCII_US)); rStrm << aIndentNameStr.getStr() << "- Flags: " << aAttrStr.getStr() << endl; } diff --git a/basic/source/sbx/sbxres.cxx b/basic/source/sbx/sbxres.cxx index 3f4ccd9fdfbb..1f588251dab0 100644 --- a/basic/source/sbx/sbxres.cxx +++ b/basic/source/sbx/sbxres.cxx @@ -78,7 +78,7 @@ const char* GetSbxRes( sal_uInt16 nId ) } SbxRes::SbxRes( sal_uInt16 nId ) - : ::rtl::OUString( ::rtl::OUString::createFromAscii( GetSbxRes( nId ) ) ) + : OUString( OUString::createFromAscii( GetSbxRes( nId ) ) ) {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/sbx/sbxres.hxx b/basic/source/sbx/sbxres.hxx index 386fcd238c2e..e2e6eb41660e 100644 --- a/basic/source/sbx/sbxres.hxx +++ b/basic/source/sbx/sbxres.hxx @@ -67,7 +67,7 @@ #define SBXRES_MAX 44 -class SbxRes : public ::rtl::OUString +class SbxRes : public OUString { public: SbxRes( sal_uInt16 ); diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 4f080dd86ea0..4febd4c27935 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -59,10 +59,10 @@ void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep ) // but exponent may also be a D, so data type is SbxDOUBLED // conversion error if data type is fixed and it doesn't fit -SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType, +SbxError ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, bool bAllowIntntl, bool bOnlyIntntl ) { - ::rtl::OString aBStr( ::rtl::OUStringToOString( rWSrc, RTL_TEXTENCODING_ASCII_US ) ); + OString aBStr( OUStringToOString( rWSrc, RTL_TEXTENCODING_ASCII_US ) ); char cIntntlComma, cIntntl1000; char cNonIntntlComma = '.'; @@ -104,7 +104,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType short comma = 0; short ndig = 0; short ncdig = 0; // number of digits after decimal point - rtl::OStringBuffer aSearchStr(RTL_CONSTASCII_STRINGPARAM("0123456789DEde")); + OStringBuffer aSearchStr("0123456789DEde"); aSearchStr.append(cNonIntntlComma); if( cIntntlComma != cNonIntntlComma ) aSearchStr.append(cIntntlComma); @@ -370,7 +370,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth, // This routine is public because it's also used by the Put-functions // in the class SbxImpSTRING. -void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, bool bCoreString ) +void ImpCvtNum( double nNum, short nPrec, OUString& rRes, bool bCoreString ) { char *q; char cBuf[ 40 ], *p = cBuf; @@ -394,13 +394,13 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, bool bCoreStrin if( *p == cDecimalSep ) p--; while( *q ) *++p = *q++; *++p = 0; - rRes = ::rtl::OUString::createFromAscii( cBuf ); + rRes = OUString::createFromAscii( cBuf ); } -bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) +bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType ) { bool bChanged = false; - ::rtl::OUString aNewString; + OUString aNewString; // only special cases are handled, nothing on default switch( eTargetType ) @@ -410,7 +410,7 @@ bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) case SbxDOUBLE: case SbxCURRENCY: { - ::rtl::OString aBStr( ::rtl::OUStringToOString( rSrc, RTL_TEXTENCODING_ASCII_US ) ); + OString aBStr( OUStringToOString( rSrc, RTL_TEXTENCODING_ASCII_US ) ); sal_Unicode cDecimalSep, cThousandSep; ImpGetIntntlSep( cDecimalSep, cThousandSep ); @@ -432,15 +432,15 @@ bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) // check as string in case of sal_Bool sal_True and sal_False case SbxBOOL: { - if( rSrc.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ) + if( rSrc.equalsIgnoreAsciiCase("true") ) { - aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxTRUE ); + aNewString = OUString::valueOf( (sal_Int32)SbxTRUE ); bChanged = true; } else - if( rSrc.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("false")) ) + if( rSrc.equalsIgnoreAsciiCase("false") ) { - aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxFALSE ); + aNewString = OUString::valueOf( (sal_Int32)SbxFALSE ); bChanged = true; } break; @@ -742,7 +742,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const } else { - aFmtStr = rtl::OUString::createFromAscii(pInfo->mpOOoFormat); + aFmtStr = OUString::createFromAscii(pInfo->mpOOoFormat); aFormatter.PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType ); } aFormatter.GetOutputString( nNumber, nIndex, rRes, &pCol ); @@ -789,13 +789,13 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const } else { - rRes = rtl::OUString::valueOf(nMin); + rRes = OUString::valueOf(nMin); } } else if( aFmtStr.equalsIgnoreAsciiCase( VBAFORMAT_W )) { sal_Int32 nWeekDay = implGetWeekDay( nNumber ); - rRes = rtl::OUString::valueOf(nWeekDay); + rRes = OUString::valueOf(nWeekDay); } else if( aFmtStr.equalsIgnoreAsciiCase( VBAFORMAT_Y )) { @@ -803,7 +803,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const double dBaseDate; implDateSerial( nYear, 1, 1, dBaseDate ); sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate ); - rRes = rtl::OUString::valueOf(nYear32); + rRes = OUString::valueOf(nYear32); } else { diff --git a/basic/source/sbx/sbxsng.cxx b/basic/source/sbx/sbxsng.cxx index f48d185e2829..a90dd61784c6 100644 --- a/basic/source/sbx/sbxsng.cxx +++ b/basic/source/sbx/sbxsng.cxx @@ -217,7 +217,7 @@ start: case SbxLPSTR: { if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 6, *p->pOUString ); break; } diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx index e0306fcfb6a3..24175fb1138d 100644 --- a/basic/source/sbx/sbxstr.cxx +++ b/basic/source/sbx/sbxstr.cxx @@ -27,10 +27,10 @@ // The conversion of an item onto String was handled via the Put-Methods // of the several data types to avoid double code. -::rtl::OUString ImpGetString( const SbxValues* p ) +OUString ImpGetString( const SbxValues* p ) { SbxValues aTmp; - ::rtl::OUString aRes; + OUString aRes; aTmp.eType = SbxSTRING; aTmp.pOUString = &aRes; switch( +p->eType ) @@ -100,7 +100,7 @@ case SbxERROR: // Here will be created the String "Error n" aRes = SbxRes( STRING_ERRORMSG ); - aRes += ::rtl::OUString( p->nUShort ); break; + aRes += OUString( p->nUShort ); break; case SbxDATE: ImpPutDate( &aTmp, p->nDouble ); break; @@ -136,13 +136,13 @@ } // From 1997-04-10, new function for SbxValue::GetCoreString() -::rtl::OUString ImpGetCoreString( const SbxValues* p ) +OUString ImpGetCoreString( const SbxValues* p ) { // For now only for double if( ( p->eType & (~SbxBYREF) ) == SbxDOUBLE ) { SbxValues aTmp; - rtl::OUString aRes; + OUString aRes; aTmp.eType = SbxSTRING; aTmp.pOUString = &aRes; if( p->eType == SbxDOUBLE ) @@ -155,15 +155,15 @@ return ImpGetString( p ); } -void ImpPutString( SbxValues* p, const ::rtl::OUString* n ) +void ImpPutString( SbxValues* p, const OUString* n ) { SbxValues aTmp; aTmp.eType = SbxSTRING; - ::rtl::OUString* pTmp = NULL; + OUString* pTmp = NULL; // as a precaution, if a NULL-Ptr appears if( !n ) - n = pTmp = new ::rtl::OUString; - aTmp.pOUString = (::rtl::OUString*)n; + n = pTmp = new OUString; + aTmp.pOUString = (OUString*)n; switch( +p->eType ) { case SbxCHAR: @@ -203,7 +203,7 @@ void ImpPutString( SbxValues* p, const ::rtl::OUString* n ) if( !n->isEmpty() ) { if( !p->pOUString ) - p->pOUString = new ::rtl::OUString( *n ); + p->pOUString = new OUString( *n ); else *p->pOUString = *n; } @@ -255,7 +255,7 @@ void ImpPutString( SbxValues* p, const ::rtl::OUString* n ) // Convert string to an array of bytes, preserving unicode (2bytes per character) -SbxArray* StringToByteArray(const ::rtl::OUString& rStr) +SbxArray* StringToByteArray(const OUString& rStr) { sal_Int32 nArraySize = rStr.getLength() * 2; const sal_Unicode* pSrc = rStr.getStr(); @@ -291,10 +291,10 @@ SbxArray* StringToByteArray(const ::rtl::OUString& rStr) } // Convert an array of bytes to string (2bytes per character) -::rtl::OUString ByteArrayToString(SbxArray* pArr) +OUString ByteArrayToString(SbxArray* pArr) { sal_uInt16 nCount = pArr->Count(); - ::rtl::OUStringBuffer aStrBuf; + OUStringBuffer aStrBuf; sal_Unicode aChar = 0; for( sal_uInt16 i = 0 ; i < nCount ; i++ ) { diff --git a/basic/source/sbx/sbxuint.cxx b/basic/source/sbx/sbxuint.cxx index d9080c760069..e5f62f287cbd 100644 --- a/basic/source/sbx/sbxuint.cxx +++ b/basic/source/sbx/sbxuint.cxx @@ -258,7 +258,7 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxulng.cxx b/basic/source/sbx/sbxulng.cxx index 53b8958221c6..b96d8b41a420 100644 --- a/basic/source/sbx/sbxulng.cxx +++ b/basic/source/sbx/sbxulng.cxx @@ -223,7 +223,7 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index b14735c9890a..6b486669ac49 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -54,7 +54,7 @@ SbxValue::SbxValue( SbxDataType t, void* p ) : SbxBase() case SbxSINGLE: n |= SbxBYREF; aData.pSingle = (float*) p; break; case SbxDATE: case SbxDOUBLE: n |= SbxBYREF; aData.pDouble = (double*) p; break; - case SbxSTRING: n |= SbxBYREF; aData.pOUString = (::rtl::OUString*) p; break; + case SbxSTRING: n |= SbxBYREF; aData.pOUString = (OUString*) p; break; case SbxERROR: case SbxUSHORT: case SbxBOOL: n |= SbxBYREF; aData.pUShort = (sal_uInt16*) p; break; @@ -99,7 +99,7 @@ SbxValue::SbxValue( const SbxValue& r ) { case SbxSTRING: if( aData.pOUString ) - aData.pOUString = new ::rtl::OUString( *aData.pOUString ); + aData.pOUString = new OUString( *aData.pOUString ); break; case SbxOBJECT: if( aData.pObj ) @@ -141,7 +141,7 @@ SbxValue& SbxValue::operator=( const SbxValue& r ) SbxArray* pArr = PTR_CAST(SbxArray, pObj); if( pArr ) { - ::rtl::OUString aStr = ByteArrayToString( pArr ); + OUString aStr = ByteArrayToString( pArr ); PutString(aStr); return *this; } @@ -579,10 +579,10 @@ sal_Bool SbxValue::Put( const SbxValues& rVal ) // if Float were declared with ',' as the decimal seperator or BOOl // explicit with "TRUE" or "FALSE". // Implementation in ImpConvStringExt (SBXSCAN.CXX) -sal_Bool SbxValue::PutStringExt( const ::rtl::OUString& r ) +sal_Bool SbxValue::PutStringExt( const OUString& r ) { // Copy; if it is Unicode convert it immediately - ::rtl::OUString aStr( r ); + OUString aStr( r ); // Identify the own type (not as in Put() with TheRealValue(), // Objects are not handled anyway) @@ -596,9 +596,9 @@ sal_Bool SbxValue::PutStringExt( const ::rtl::OUString& r ) // elsewise take the original (Unicode remain) sal_Bool bRet; if( ImpConvStringExt( aStr, eTargetType ) ) - aRes.pOUString = (::rtl::OUString*)&aStr; + aRes.pOUString = (OUString*)&aStr; else - aRes.pOUString = (::rtl::OUString*)&r; + aRes.pOUString = (OUString*)&r; // #34939: Set a Fixed-Flag at Strings. which contain a number, and // if this has a Num-Type, so that the type will not be changed @@ -673,11 +673,11 @@ sal_Bool SbxValue::fillAutomationDecimal } -sal_Bool SbxValue::PutString( const ::rtl::OUString& r ) +sal_Bool SbxValue::PutString( const OUString& r ) { SbxValues aRes; aRes.eType = SbxSTRING; - aRes.pOUString = (::rtl::OUString*) &r; + aRes.pOUString = (OUString*) &r; Put( aRes ); return sal_Bool( !IsError() ); } @@ -739,7 +739,7 @@ sal_Bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const { if( aData.pOUString ) { - ::rtl::OUString s( *aData.pOUString ); + OUString s( *aData.pOUString ); double n; SbxDataType t2; sal_uInt16 nLen = 0; @@ -924,7 +924,7 @@ sal_Bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) // Not even Left OK? else if( aL.pOUString == NULL ) { - aL.pOUString = new ::rtl::OUString(); + aL.pOUString = new OUString(); } Put( aL ); } @@ -1465,136 +1465,136 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) } case SbxSTRING: { - rtl::OUString aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(r, + OUString aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(r, RTL_TEXTENCODING_ASCII_US); if( aVal.getLength() ) - aData.pOUString = new ::rtl::OUString( aVal ); - else - aData.pOUString = NULL; // JSM 1995-09-22 - break; - } - case SbxERROR: - case SbxUSHORT: - r >> aData.nUShort; break; - case SbxOBJECT: - { - sal_uInt8 nMode; - r >> nMode; - switch( nMode ) + aData.pOUString = new OUString( aVal ); + else + aData.pOUString = NULL; // JSM 1995-09-22 + break; + } + case SbxERROR: + case SbxUSHORT: + r >> aData.nUShort; break; + case SbxOBJECT: { - case 0: - aData.pObj = NULL; - break; - case 1: - aData.pObj = SbxBase::Load( r ); - return sal_Bool( aData.pObj != NULL ); - case 2: - aData.pObj = this; - break; + sal_uInt8 nMode; + r >> nMode; + switch( nMode ) + { + case 0: + aData.pObj = NULL; + break; + case 1: + aData.pObj = SbxBase::Load( r ); + return sal_Bool( aData.pObj != NULL ); + case 2: + aData.pObj = this; + break; + } + break; } - break; - } - case SbxCHAR: - { - char c; - r >> c; - aData.nChar = c; - break; - } - case SbxBYTE: - r >> aData.nByte; break; - case SbxULONG: - r >> aData.nULong; break; - case SbxINT: - { - sal_uInt8 n; - r >> n; - // Match the Int on this system? - if( n > SAL_TYPES_SIZEOFINT ) - r >> aData.nLong, aData.eType = SbxLONG; - else { - sal_Int32 nInt; - r >> nInt; - aData.nInt = nInt; + case SbxCHAR: + { + char c; + r >> c; + aData.nChar = c; + break; } - break; - } - case SbxUINT: - { - sal_uInt8 n; - r >> n; - // Match the UInt on this system? - if( n > SAL_TYPES_SIZEOFINT ) - r >> aData.nULong, aData.eType = SbxULONG; - else { - sal_uInt32 nUInt; - r >> nUInt; - aData.nUInt = nUInt; + case SbxBYTE: + r >> aData.nByte; break; + case SbxULONG: + r >> aData.nULong; break; + case SbxINT: + { + sal_uInt8 n; + r >> n; + // Match the Int on this system? + if( n > SAL_TYPES_SIZEOFINT ) + r >> aData.nLong, aData.eType = SbxLONG; + else { + sal_Int32 nInt; + r >> nInt; + aData.nInt = nInt; + } + break; } - break; + case SbxUINT: + { + sal_uInt8 n; + r >> n; + // Match the UInt on this system? + if( n > SAL_TYPES_SIZEOFINT ) + r >> aData.nULong, aData.eType = SbxULONG; + else { + sal_uInt32 nUInt; + r >> nUInt; + aData.nUInt = nUInt; + } + break; + } + case SbxEMPTY: + case SbxNULL: + case SbxVOID: + break; + case SbxDATAOBJECT: + r >> aData.nLong; + break; + // #78919 For backwards compatibility + case SbxWSTRING: + case SbxWCHAR: + break; + default: + memset (&aData,0,sizeof(aData)); + ResetFlag(SBX_FIXED); + aData.eType = SbxNULL; + DBG_ASSERT( !this, "Nicht unterstuetzer Datentyp geladen" ); + return sal_False; } - case SbxEMPTY: - case SbxNULL: - case SbxVOID: - break; - case SbxDATAOBJECT: - r >> aData.nLong; - break; - // #78919 For backwards compatibility - case SbxWSTRING: - case SbxWCHAR: - break; - default: - memset (&aData,0,sizeof(aData)); - ResetFlag(SBX_FIXED); - aData.eType = SbxNULL; - DBG_ASSERT( !this, "Nicht unterstuetzer Datentyp geladen" ); - return sal_False; + return sal_True; } - return sal_True; -} -sal_Bool SbxValue::StoreData( SvStream& r ) const -{ - sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(aData.eType); - r << nType; - switch( nType & 0x0FFF ) + sal_Bool SbxValue::StoreData( SvStream& r ) const { - case SbxBOOL: - case SbxINTEGER: - r << aData.nInteger; break; - case SbxLONG: - r << aData.nLong; break; - case SbxDATE: - // #49935: Save as double, elsewise an error during the read in - ((SbxValue*)this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE ); - write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); - ((SbxValue*)this)->aData.eType = (SbxDataType)nType; - break; - case SbxSINGLE: - case SbxDOUBLE: - write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); - break; - case SbxSALUINT64: - case SbxSALINT64: - // see comment in SbxValue::StoreData - r << aData.uInt64; - break; - case SbxCURRENCY: + sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(aData.eType); + r << nType; + switch( nType & 0x0FFF ) { - sal_Int32 tmpHi = ( (aData.nInt64 >> 32) & 0xFFFFFFFF ); - sal_Int32 tmpLo = ( sal_Int32 )aData.nInt64; - r << tmpHi << tmpLo; - break; - } - case SbxSTRING: - if( aData.pOUString ) + case SbxBOOL: + case SbxINTEGER: + r << aData.nInteger; break; + case SbxLONG: + r << aData.nLong; break; + case SbxDATE: + // #49935: Save as double, elsewise an error during the read in + ((SbxValue*)this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE ); + write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); + ((SbxValue*)this)->aData.eType = (SbxDataType)nType; + break; + case SbxSINGLE: + case SbxDOUBLE: + write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); + break; + case SbxSALUINT64: + case SbxSALINT64: + // see comment in SbxValue::StoreData + r << aData.uInt64; + break; + case SbxCURRENCY: { - write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US); + sal_Int32 tmpHi = ( (aData.nInt64 >> 32) & 0xFFFFFFFF ); + sal_Int32 tmpLo = ( sal_Int32 )aData.nInt64; + r << tmpHi << tmpLo; + break; } - else - { - write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, rtl::OUString(), RTL_TEXTENCODING_ASCII_US); + case SbxSTRING: + if( aData.pOUString ) + { + write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US); + } + else + { + write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, OUString(), RTL_TEXTENCODING_ASCII_US); } break; case SbxERROR: |