Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello,

It's the first time I do it so I searched for previous commits  in order to
get a referent. i couldn't find any example for String.AssignAscii so I
replace it with OUStringBuffer.appendAscii. Another doubt i have is how can
I replace String.ConvertLineEnd() ?

Greetings
From 8bfae4bcd5966a7875615e205e745ac257d38bcc Mon Sep 17 00:00:00 2001
From: Xisco Fauli <anistenis@gmail.com>
Date: Sun, 13 Mar 2011 23:22:08 +0100
Subject: [PATCH] Replace String with rtl::OUString

---
 basic/inc/basic/sbdef.hxx         |    6 +-
 basic/inc/basic/sbuno.hxx         |    2 +-
 basic/source/app/mybasic.cxx      |    2 +-
 basic/source/classes/sb.cxx       |    6 +-
 basic/source/classes/sbunoobj.cxx |  381 +++++++++++++++++--------------------
 basic/source/inc/runtime.hxx      |    4 +-
 basic/source/inc/sbunoobj.hxx     |   28 ++--
 basic/source/runtime/step1.cxx    |   10 +-
 8 files changed, 208 insertions(+), 231 deletions(-)

diff --git a/basic/inc/basic/sbdef.hxx b/basic/inc/basic/sbdef.hxx
index 03ae7c4..9ff9ca1 100644
--- a/basic/inc/basic/sbdef.hxx
+++ b/basic/inc/basic/sbdef.hxx
@@ -31,6 +31,9 @@
 
 #include <basic/sbxdef.hxx>
 #include <svl/svarray.hxx>
+#include <rtl/ustring.hxx>
+
+using rtl::OUString;
 
 #define _BASIC_TEXTPORTIONS
 
@@ -76,7 +79,7 @@ String getBasicTypeName( SbxDataType eType );
 // important for SbUnoObj instances
 // implementation: basic/source/classes/sbunoobj.cxx
 class SbxObject;
-String getBasicObjectTypeName( SbxObject* pObj );
+::rtl::OUString getBasicObjectTypeName( SbxObject* pObj );
 
 // Allows Basic IDE to set watch mode to suppress errors
 // implementation: basic/source/runtime/runtime.cxx
@@ -99,7 +102,6 @@ void setBasicWatchMode( bool bOn );
 #define SBX_HINT_BASICSTART            SFX_HINT_USER04
 #define SBX_HINT_BASICSTOP             SFX_HINT_USER05
 
-// #115826
 enum PropertyMode
 {
     PROPERTY_MODE_NONE,
diff --git a/basic/inc/basic/sbuno.hxx b/basic/inc/basic/sbuno.hxx
index cb0c670..8e782b3 100644
--- a/basic/inc/basic/sbuno.hxx
+++ b/basic/inc/basic/sbuno.hxx
@@ -35,7 +35,7 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; }}}}
 
 // Returns a SbxObject that wrapps an Uno Interface
 // Implementation in basic/source/classes/sbunoobj.cxx
-SbxObjectRef GetSbUnoObject( const String& aName, const com::sun::star::uno::Any& aUnoObj_ );
+SbxObjectRef GetSbUnoObject( const ::rtl::OUString& aName, const com::sun::star::uno::Any& 
aUnoObj_ );
 
 // Force creation of all properties for debugging
 void createAllObjectProperties( SbxObject* pObj );
diff --git a/basic/source/app/mybasic.cxx b/basic/source/app/mybasic.cxx
index 727a1e1..4fa2181 100644
--- a/basic/source/app/mybasic.cxx
+++ b/basic/source/app/mybasic.cxx
@@ -99,7 +99,7 @@ MyBasic::MyBasic() : StarBASIC()
     UsrAny aObjAny = getIntrospectionTestObject();
 
     // Box object into SbUnoObject
-    String aName( "UnoObject" );
+    ::rtl:OUString aName( "UnoObject" );
     SbxObjectRef xSbUnoObj = GetSbUnoObject( aName, aObjAny );
     //SbxObjectRef xSbUnoObj = new SbUnoObject( aName, aObjAny );
     Insert( (SbxObject*)xSbUnoObj );
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 193cbfa..7f62e61 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -299,7 +299,7 @@ class SbOLEFactory : public SbxFactory
 {
 public:
     virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
-    virtual SbxObject* CreateObject( const String& );
+    virtual SbxObject* CreateObject( const ::rtl::OUString& );
 };
 
 SbxBase* SbOLEFactory::Create( UINT16, UINT32 )
@@ -308,9 +308,9 @@ SbxBase* SbOLEFactory::Create( UINT16, UINT32 )
     return NULL;
 }
 
-SbUnoObject* createOLEObject_Impl( const String& aType );      // sbunoobj.cxx
+SbUnoObject* createOLEObject_Impl( const ::rtl::OUString& aType );     // sbunoobj.cxx
 
-SbxObject* SbOLEFactory::CreateObject( const String& rClassName )
+SbxObject* SbOLEFactory::CreateObject( const ::rtl::OUString& rClassName )
 {
     SbxObject* pRet = createOLEObject_Impl( rClassName );
     return pRet;
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 9dffcf2..bf241d7 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -124,14 +124,14 @@ static ::rtl::OUString defaultNameSpace( 
RTL_CONSTASCII_USTRINGPARAM("ooo.vba")
 // redirection built in. The property name specifies the name
 // of the default property.
 
-bool SbUnoObject::getDefaultPropName( SbUnoObject* pUnoObj, String& sDfltProp )
+bool SbUnoObject::getDefaultPropName( SbUnoObject* pUnoObj, ::rtl::OUString& sDfltProp )
 {
     bool result = false;
     Reference< XDefaultProperty> xDefaultProp( pUnoObj->maTmpUnoObj, UNO_QUERY );
     if ( xDefaultProp.is() )
     {
         sDfltProp = xDefaultProp->getDefaultPropertyName();
-        if ( sDfltProp.Len() )
+        if ( sDfltProp.getLength() )
             result = true;
     }
     return result;
@@ -162,7 +162,7 @@ void SetSbUnoObjectDfltPropName( SbxObject* pObj )
     SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxObject*) pObj);
     if ( pUnoObj )
     {
-        String sDfltPropName;
+        ::rtl::OUString sDfltPropName;
 
         if ( SbUnoObject::getDefaultPropName( pUnoObj, sDfltPropName ) )
         {
@@ -292,7 +292,7 @@ Reference< XTypeConverter > getTypeConverter_Impl( void )
 
 
 // #111851 factory function to create an OLE object
-SbUnoObject* createOLEObject_Impl( const String& aType )
+SbUnoObject* createOLEObject_Impl( const ::rtl::OUString& aType )
 {
     static Reference< XMultiServiceFactory > xOLEFactory;
     static bool bNeedsInit = true;
@@ -367,7 +367,7 @@ void implAppendExceptionMsg( ::rtl::OUStringBuffer& _inout_rBuffer, const Except
     return aMessageBuf.makeStringAndClear();
 }
 
-String implGetExceptionMsg( const Any& _rCaughtException )
+::rtl::OUString implGetExceptionMsg( const Any& _rCaughtException )
 {
     OSL_PRECOND( _rCaughtException.getValueTypeClass() == TypeClass_EXCEPTION, 
"implGetExceptionMsg: illegal argument!" );
     if ( _rCaughtException.getValueTypeClass() != TypeClass_EXCEPTION )
@@ -392,7 +392,7 @@ Any convertAny( const Any& rVal, const Type& aDestType )
     }
     catch( CannotConvertException& e2 )
     {
-        String aCannotConvertExceptionName
+        ::rtl::OUString aCannotConvertExceptionName
             ( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.IllegalArgumentException" ) );
         StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
             implGetExceptionMsg( e2, aCannotConvertExceptionName ) );
@@ -425,15 +425,15 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType )
 
 // Exception type unknown
 template< class EXCEPTION >
-String implGetExceptionMsg( const EXCEPTION& e )
+::rtl::OUString implGetExceptionMsg( const EXCEPTION& e )
 {
     return implGetExceptionMsg( e, ::getCppuType( &e ).getTypeName() );
 }
 
 // Error-Message fuer WrappedTargetExceptions
-String implGetWrappedMsg( const WrappedTargetException& e )
+::rtl::OUString implGetWrappedMsg( const WrappedTargetException& e )
 {
-    String aMsg;
+    ::rtl::OUString aMsg;
     Any aWrappedAny = e.TargetException;
     Type aExceptionType = aWrappedAny.getValueType();
 
@@ -441,7 +441,7 @@ String implGetWrappedMsg( const WrappedTargetException& e )
     if( aExceptionType.getTypeClass() == TypeClass_EXCEPTION )
     {
         Exception& e_ = *( (Exception*)aWrappedAny.getValue() );
-        aMsg = implGetExceptionMsg( e_, String( aExceptionType.getTypeName() ) );
+        aMsg = implGetExceptionMsg( e_, ::rtl::OUString( aExceptionType.getTypeName() ) );
     }
     // Otherwise use WrappedTargetException itself
     else
@@ -713,7 +713,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
             aClassAny <<= xClass;
 
             // instantiate SbUnoObject
-            String aName;
+            ::rtl::OUString aName;
             SbUnoObject* pSbUnoObject = new SbUnoObject( aName, aClassAny );
             SbxObjectRef xWrapper = (SbxObject*)pSbUnoObject;
 
@@ -788,7 +788,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
                 }
             }
             // instantiate a SbUnoObject
-            String aName;
+            ::rtl::OUString aName;
             SbUnoObject* pSbUnoObject = new SbUnoObject( aName, aValue );
             //If this is called externally e.g. from the scripting
             //framework then there is no 'active' runtime the default property will not be set up
@@ -796,7 +796,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
             //test seems a bit of overkill
             //if ( SbiRuntime::isVBAEnabled() )
             {
-                String sDfltPropName;
+                ::rtl::OUString sDfltPropName;
 
                 if ( SbUnoObject::getDefaultPropName( pSbUnoObject, sDfltPropName ) )
                         pSbUnoObject->SetDfltProperty( sDfltPropName );
@@ -900,7 +900,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
             pVar->PutChar( *(sal_Unicode*)aValue.getValue() );
             break;
         }
-        case TypeClass_STRING:          { ::rtl::OUString val; aValue >>= val; pVar->PutString( 
String( val ) ); }  break;
+        case TypeClass_STRING:          { ::rtl::OUString val; aValue >>= val; pVar->PutString( 
val); }  break;
         case TypeClass_FLOAT:           { float val = 0; aValue >>= val; pVar->PutSingle( val ); } 
break;
         case TypeClass_DOUBLE:          { double val = 0; aValue >>= val; pVar->PutDouble( val ); 
} break;
         //case TypeClass_OCTET:         break;
@@ -1584,7 +1584,7 @@ enum INVOKETYPE
    SetProp,
    Func
 };
-Any invokeAutomationMethod( const String& Name, Sequence< Any >& args, SbxArray* pParams, UINT32 
nParamCount, Reference< XInvocation >& rxInvocation, INVOKETYPE invokeType = Func )
+Any invokeAutomationMethod( const ::rtl::OUString& Name, Sequence< Any >& args, SbxArray* pParams, 
UINT32 nParamCount, Reference< XInvocation >& rxInvocation, INVOKETYPE invokeType = Func )
 {
     Sequence< INT16 > OutParamIndex;
     Sequence< Any > OutParam;
@@ -1628,27 +1628,27 @@ Any invokeAutomationMethod( const String& Name, Sequence< Any >& args, 
SbxArray*
 }
 
 // Debugging help method to readout the imlemented interfaces of an object
-String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< XIdlClass >& 
xClass, USHORT nRekLevel )
+::rtl::OUString Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< 
XIdlClass >& xClass, USHORT nRekLevel )
 {
     Type aIfaceType = ::getCppuType( (const Reference< XInterface > *)0 );
     static Reference< XIdlClass > xIfaceClass = TypeToIdlClass( aIfaceType );
 
-    String aRetStr;
+    ::rtl::OUStringBuffer aRetStr;
     for( USHORT i = 0 ; i < nRekLevel ; i++ )
-        aRetStr.AppendAscii( "    " );
-    aRetStr += String( xClass->getName() );
+        aRetStr.appendAscii( "    " );
+    aRetStr.append( xClass->getName() );
     ::rtl::OUString aClassName = xClass->getName();
     Type aClassType( xClass->getTypeClass(), aClassName.getStr() );
 
     // checking if the interface is realy supported
     if( !x->queryInterface( aClassType ).hasValue() )
     {
-        aRetStr.AppendAscii( " (ERROR: Not really supported!)\n" );
+        aRetStr.appendAscii( " (ERROR: Not really supported!)\n" );
     }
     // Are there super interfaces?
     else
     {
-        aRetStr.AppendAscii( "\n" );
+        aRetStr.appendAscii( "\n" );
 
         // get the super interfaces
         Sequence< Reference< XIdlClass > > aSuperClassSeq = xClass->getSuperclasses();
@@ -1658,19 +1658,19 @@ String Impl_GetInterfaceInfo( const Reference< XInterface >& x, const 
Reference<
         {
             const Reference< XIdlClass >& rxIfaceClass = pClasses[j];
             if( !rxIfaceClass->equals( xIfaceClass ) )
-                aRetStr += Impl_GetInterfaceInfo( x, rxIfaceClass, nRekLevel + 1 );
+                aRetStr.append( Impl_GetInterfaceInfo( x, rxIfaceClass, nRekLevel + 1 ) );
         }
     }
-    return aRetStr;
+    return aRetStr.makeStringAndClear();
 }
 
-String getDbgObjectNameImpl( SbUnoObject* pUnoObj )
+::rtl::OUString getDbgObjectNameImpl( SbUnoObject* pUnoObj )
 {
-    String aName;
+    ::rtl::OUString aName;
     if( pUnoObj )
     {
         aName = pUnoObj->GetClassName();
-        if( !aName.Len() )
+        if( !aName.getLength() )
         {
             Any aToInspectObj = pUnoObj->getUnoAny();
             TypeClass eType = aToInspectObj.getValueType().getTypeClass();
@@ -1688,24 +1688,24 @@ String getDbgObjectNameImpl( SbUnoObject* pUnoObj )
     return aName;
 }
 
-String getDbgObjectName( SbUnoObject* pUnoObj )
+::rtl::OUString getDbgObjectName( SbUnoObject* pUnoObj )
 {
-    String aName = getDbgObjectNameImpl( pUnoObj );
-    if( !aName.Len() )
-        aName.AppendAscii( "Unknown" );
-
-    String aRet;
-    if( aName.Len() > 20 )
-        aRet.AppendAscii( "\n" );
-    aRet.AppendAscii( "\"" );
-    aRet += aName;
-    aRet.AppendAscii( "\":" );
-    return aRet;
+    ::rtl::OUString aName = getDbgObjectNameImpl( pUnoObj );
+    if( !aName.getLength() )
+        aName += ::rtl::OUString::createFromAscii( "Unknown" );
+
+    ::rtl::OUStringBuffer aRet;
+    if( aName.getLength() > 20 )
+        aRet.appendAscii( "\n" );
+    aRet.appendAscii( "\"" );
+    aRet.append( aName );
+    aRet.appendAscii( "\":" );
+    return aRet.makeStringAndClear();
 }
 
-String getBasicObjectTypeName( SbxObject* pObj )
+::rtl::OUString getBasicObjectTypeName( SbxObject* pObj )
 {
-    String aName;
+    ::rtl::OUString aName;
     if( pObj )
     {
         SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,pObj);
@@ -1716,7 +1716,7 @@ String getBasicObjectTypeName( SbxObject* pObj )
 }
 
 bool checkUnoObjectType( SbUnoObject* pUnoObj,
-    const String& aClass )
+    const ::rtl::OUString& aClass )
 {
     Any aToInspectObj = pUnoObj->getUnoAny();
     TypeClass eType = aToInspectObj.getValueType().getTypeClass();
@@ -1784,17 +1784,17 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj,
 }
 
 // Debugging help method to readout the imlemented interfaces of an object
-String Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj )
+::rtl::OUString Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj )
 {
     Any aToInspectObj = pUnoObj->getUnoAny();
 
     // allow only TypeClass interface
     TypeClass eType = aToInspectObj.getValueType().getTypeClass();
-    String aRet;
+    ::rtl::OUStringBuffer aRet;
     if( eType != TypeClass_INTERFACE )
     {
-        aRet.AppendAscii( RTL_CONSTASCII_STRINGPARAM(ID_DBG_SUPPORTEDINTERFACES) );
-        aRet.AppendAscii( " not available.\n(TypeClass is not TypeClass_INTERFACE)\n" );
+        aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM(ID_DBG_SUPPORTEDINTERFACES) );
+        aRet.appendAscii( " not available.\n(TypeClass is not TypeClass_INTERFACE)\n" );
     }
     else
     {
@@ -1805,10 +1805,9 @@ String Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj )
         Reference< XIdlClassProvider > xClassProvider( x, UNO_QUERY );
         Reference< XTypeProvider > xTypeProvider( x, UNO_QUERY );
 
-        aRet.AssignAscii( "Supported interfaces by object " );
-        String aObjName = getDbgObjectName( pUnoObj );
-        aRet += aObjName;
-        aRet.AppendAscii( "\n" );
+        aRet.appendAscii( "Supported interfaces by object " );
+        aRet.append( getDbgObjectName( pUnoObj ) );
+        aRet.appendAscii( "\n" );
         if( xTypeProvider.is() )
         {
             // get the interfaces of the implementation
@@ -1822,17 +1821,16 @@ String Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj )
                 Reference<XIdlClass> xClass = TypeToIdlClass( rType );
                 if( xClass.is() )
                 {
-                    aRet += Impl_GetInterfaceInfo( x, xClass, 1 );
+                    aRet.append( Impl_GetInterfaceInfo( x, xClass, 1 ) );
                 }
                 else
                 {
                     typelib_TypeDescription * pTD = 0;
                     rType.getDescription( &pTD );
-                    String TypeName( ::rtl::OUString( pTD->pTypeName ) );
 
-                    aRet.AppendAscii( "*** ERROR: No IdlClass for type \"" );
-                    aRet += TypeName;
-                    aRet.AppendAscii( "\"\n*** Please check type library\n" );
+                    aRet.appendAscii( "*** ERROR: No IdlClass for type \"" );
+                    aRet.append( pTD->pTypeName );
+                    aRet.appendAscii( "\"\n*** Please check type library\n" );
                 }
             }
         }
@@ -1842,61 +1840,62 @@ String Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj )
             OSL_FAIL( "XClassProvider not supported in UNO3" );
         }
     }
-    return aRet;
+    return aRet.makeStringAndClear();
 }
 
 
 
 // Debugging help method SbxDataType -> String
-String Dbg_SbxDataType2String( SbxDataType eType )
+::rtl::OUString Dbg_SbxDataType2String( SbxDataType eType )
 {
-    String aRet( RTL_CONSTASCII_USTRINGPARAM("Unknown Sbx-Type!") );
+    ::rtl::OUStringBuffer aRet;
+    aRet.appendAscii("Unknown Sbx-Type!");
     switch( +eType )
     {
-        case SbxEMPTY:      aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxEMPTY") ); break;
-        case SbxNULL:       aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxNULL") ); break;
-        case SbxINTEGER:    aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxINTEGER") ); break;
-        case SbxLONG:       aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxLONG") ); break;
-        case SbxSINGLE:     aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxSINGLE") ); break;
-        case SbxDOUBLE:     aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxDOUBLE") ); break;
-        case SbxCURRENCY:   aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxCURRENCY") ); break;
-        case SbxDECIMAL:    aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxDECIMAL") ); break;
-        case SbxDATE:       aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxDATE") ); break;
-        case SbxSTRING:     aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxSTRING") ); break;
-        case SbxOBJECT:     aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxOBJECT") ); break;
-        case SbxERROR:      aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxERROR") ); break;
-        case SbxBOOL:       aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxBOOL") ); break;
-        case SbxVARIANT:    aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxVARIANT") ); break;
-        case SbxDATAOBJECT: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxDATAOBJECT") ); break;
-        case SbxCHAR:       aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxCHAR") ); break;
-        case SbxBYTE:       aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxBYTE") ); break;
-        case SbxUSHORT:     aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxUSHORT") ); break;
-        case SbxULONG:      aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxULONG") ); break;
-        case SbxSALINT64:   aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxINT64") ); break;
-        case SbxSALUINT64:  aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxUINT64") ); break;
-        case SbxINT:        aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxINT") ); break;
-        case SbxUINT:       aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxUINT") ); break;
-        case SbxVOID:       aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxVOID") ); break;
-        case SbxHRESULT:    aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxHRESULT") ); break;
-        case SbxPOINTER:    aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxPOINTER") ); break;
-        case SbxDIMARRAY:   aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxDIMARRAY") ); break;
-        case SbxCARRAY:     aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxCARRAY") ); break;
-        case SbxUSERDEF:    aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxUSERDEF") ); break;
-        case SbxLPSTR:      aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxLPSTR") ); break;
-        case SbxLPWSTR:     aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxLPWSTR") ); break;
-        case SbxCoreSTRING: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxCoreSTRING" ) ); break;
-        case SbxOBJECT | SbxARRAY: aRet = String( RTL_CONSTASCII_USTRINGPARAM("SbxARRAY") ); break;
+        case SbxEMPTY:      aRet.appendAscii("SbxEMPTY"); break;
+        case SbxNULL:       aRet.appendAscii("SbxNULL"); break;
+        case SbxINTEGER:    aRet.appendAscii("SbxINTEGER"); break;
+        case SbxLONG:       aRet.appendAscii("SbxLONG"); break;
+        case SbxSINGLE:     aRet.appendAscii("SbxSINGLE"); break;
+        case SbxDOUBLE:     aRet.appendAscii("SbxDOUBLE"); break;
+        case SbxCURRENCY:   aRet.appendAscii("SbxCURRENCY"); break;
+        case SbxDECIMAL:    aRet.appendAscii("SbxDECIMAL"); break;
+        case SbxDATE:       aRet.appendAscii("SbxDATE"); break;
+        case SbxSTRING:     aRet.appendAscii("SbxSTRING"); break;
+        case SbxOBJECT:     aRet.appendAscii("SbxOBJECT"); break;
+        case SbxERROR:      aRet.appendAscii("SbxERROR"); break;
+        case SbxBOOL:       aRet.appendAscii("SbxBOOL"); break;
+        case SbxVARIANT:    aRet.appendAscii("SbxVARIANT"); break;
+        case SbxDATAOBJECT: aRet.appendAscii("SbxDATAOBJECT"); break;
+        case SbxCHAR:       aRet.appendAscii("SbxCHAR"); break;
+        case SbxBYTE:       aRet.appendAscii("SbxBYTE"); break;
+        case SbxUSHORT:     aRet.appendAscii("SbxUSHORT"); break;
+        case SbxULONG:      aRet.appendAscii("SbxULONG"); break;
+        case SbxSALINT64:   aRet.appendAscii("SbxINT64"); break;
+        case SbxSALUINT64:  aRet.appendAscii("SbxUINT64"); break;
+        case SbxINT:        aRet.appendAscii("SbxINT"); break;
+        case SbxUINT:       aRet.appendAscii("SbxUINT"); break;
+        case SbxVOID:       aRet.appendAscii("SbxVOID"); break;
+        case SbxHRESULT:    aRet.appendAscii("SbxHRESULT"); break;
+        case SbxPOINTER:    aRet.appendAscii("SbxPOINTER"); break;
+        case SbxDIMARRAY:   aRet.appendAscii("SbxDIMARRAY"); break;
+        case SbxCARRAY:     aRet.appendAscii("SbxCARRAY"); break;
+        case SbxUSERDEF:    aRet.appendAscii("SbxUSERDEF"); break;
+        case SbxLPSTR:      aRet.appendAscii("SbxLPSTR"); break;
+        case SbxLPWSTR:     aRet.appendAscii("SbxLPWSTR"); break;
+        case SbxCoreSTRING: aRet.appendAscii("SbxCoreSTRING"); break;
+        case SbxOBJECT | SbxARRAY: aRet.appendAscii("SbxARRAY"); break;
         default: break;
     }
-    return aRet;
+    return aRet.makeStringAndClear();
 }
 
 // Debugging help method to display the properties of a SbUnoObjects
-String Impl_DumpProperties( SbUnoObject* pUnoObj )
+::rtl::OUString Impl_DumpProperties( SbUnoObject* pUnoObj )
 {
-    String aRet( RTL_CONSTASCII_USTRINGPARAM("Properties of object ") );
-    String aObjName = getDbgObjectName( pUnoObj );
-    aRet += aObjName;
+    ::rtl::OUStringBuffer aRet;
+    aRet.appendAscii("Properties of object ");
+    aRet.append( getDbgObjectName( pUnoObj ) );
 
     // analyse the Uno-Infos to recognise the arrays
     Reference< XIntrospectionAccess > xAccess = pUnoObj->getIntrospectionAccess();
@@ -1908,8 +1907,8 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj )
     }
     if( !xAccess.is() )
     {
-        aRet.AppendAscii( "\nUnknown, no introspection available\n" );
-        return aRet;
+        aRet.appendAscii( "\nUnknown, no introspection available\n" );
+        return aRet.makeStringAndClear();
     }
 
     Sequence<Property> props = xAccess->getProperties( PropertyConcept::ALL - 
PropertyConcept::DANGEROUS );
@@ -1924,9 +1923,9 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj )
         SbxVariable* pVar = pProps->Get( i );
         if( pVar )
         {
-            String aPropStr;
+            ::rtl::OUStringBuffer aPropStr;
             if( (i % nPropsPerLine) == 0 )
-                aPropStr.AppendAscii( "\n" );
+                aPropStr.appendAscii( "\n" );
 
             // output the type and name
             // Is it in Uno a sequence?
@@ -1951,29 +1950,29 @@ String Impl_DumpProperties( SbUnoObject* pUnoObj )
                         eType = (SbxDataType) ( SbxOBJECT | SbxARRAY );
                 }
             }
-            aPropStr += Dbg_SbxDataType2String( eType );
+            aPropStr.append( Dbg_SbxDataType2String( eType ) );
             if( bMaybeVoid )
-                aPropStr.AppendAscii( "/void" );
-            aPropStr.AppendAscii( " " );
-            aPropStr += pVar->GetName();
+                aPropStr.appendAscii( "/void" );
+            aPropStr.appendAscii( " " );
+            aPropStr.append( pVar->GetName() );
 
             if( i == nPropCount - 1 )
-                aPropStr.AppendAscii( "\n" );
+                aPropStr.appendAscii( "\n" );
             else
-                aPropStr.AppendAscii( "; " );
+                aPropStr.appendAscii( "; " );
 
-            aRet += aPropStr;
+            aRet.append( aPropStr.makeStringAndClear() );
         }
     }
-    return aRet;
+    return aRet.makeStringAndClear();
 }
 
 // Debugging help method to display the methods of an SbUnoObjects
-String Impl_DumpMethods( SbUnoObject* pUnoObj )
+::rtl::OUString Impl_DumpMethods( SbUnoObject* pUnoObj )
 {
-    String aRet( RTL_CONSTASCII_USTRINGPARAM("Methods of object ") );
-    String aObjName = getDbgObjectName( pUnoObj );
-    aRet += aObjName;
+    ::rtl::OUStringBuffer aRet;
+    aRet.appendAscii("Methods of object ");
+    aRet.append( getDbgObjectName( pUnoObj ) );
 
     // XIntrospectionAccess, so that the types of the parameter could be outputed
     Reference< XIntrospectionAccess > xAccess = pUnoObj->getIntrospectionAccess();
@@ -1985,8 +1984,8 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj )
     }
     if( !xAccess.is() )
     {
-        aRet.AppendAscii( "\nUnknown, no introspection available\n" );
-        return aRet;
+        aRet.appendAscii( "\nUnknown, no introspection available\n" );
+        return aRet.makeStringAndClear();
     }
     Sequence< Reference< XIdlMethod > > methods = xAccess->getMethods
         ( MethodConcept::ALL - MethodConcept::DANGEROUS );
@@ -1996,8 +1995,8 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj )
     USHORT nMethodCount = pMethods->Count();
     if( !nMethodCount )
     {
-        aRet.AppendAscii( "\nNo methods found\n" );
-        return aRet;
+        aRet.appendAscii( "\nNo methods found\n" );
+        return aRet.makeStringAndClear();
     }
     USHORT nPropsPerLine = 1 + nMethodCount / 30;
     for( USHORT i = 0; i < nMethodCount; i++ )
@@ -2005,9 +2004,9 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj )
         SbxVariable* pVar = pMethods->Get( i );
         if( pVar )
         {
-            String aPropStr;
+            ::rtl::OUStringBuffer aPropStr;
             if( (i % nPropsPerLine) == 0 )
-                aPropStr.AppendAscii( "\n" );
+                aPropStr.appendAscii( "\n" );
 
             // address the method
             const Reference< XIdlMethod >& rxMethod = pUnoMethods[i];
@@ -2021,10 +2020,10 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj )
                     eType = (SbxDataType) ( SbxOBJECT | SbxARRAY );
             }
             // output the name and the type
-            aPropStr += Dbg_SbxDataType2String( eType );
-            aPropStr.AppendAscii( " " );
-            aPropStr += pVar->GetName();
-            aPropStr.AppendAscii( " ( " );
+            aPropStr.append( Dbg_SbxDataType2String( eType ) );
+            aPropStr.appendAscii( " " );
+            aPropStr.append ( pVar->GetName() );
+            aPropStr.appendAscii( " ( " );
 
             // the get-method mustn't have a parameter
             Sequence< Reference< XIdlClass > > aParamsSeq = rxMethod->getParameterTypes();
@@ -2035,27 +2034,26 @@ String Impl_DumpMethods( SbUnoObject* pUnoObj )
             {
                 for( USHORT j = 0; j < nParamCount; j++ )
                 {
-                    String aTypeStr = Dbg_SbxDataType2String( unoToSbxType( pParams[ j ] ) );
-                    aPropStr += aTypeStr;
+                    aPropStr.append ( Dbg_SbxDataType2String( unoToSbxType( pParams[ j ] ) ) );
 
                     if( j < nParamCount - 1 )
-                        aPropStr.AppendAscii( ", " );
+                        aPropStr.appendAscii( ", " );
                 }
             }
             else
-                aPropStr.AppendAscii( "void" );
+                aPropStr.appendAscii( "void" );
 
-            aPropStr.AppendAscii( " ) " );
+            aPropStr.appendAscii( " ) " );
 
             if( i == nMethodCount - 1 )
-                aPropStr.AppendAscii( "\n" );
+                aPropStr.appendAscii( "\n" );
             else
-                aPropStr.AppendAscii( "; " );
+                aPropStr.appendAscii( "; " );
 
-            aRet += aPropStr;
+            aRet.append( aPropStr.makeStringAndClear() );
         }
     }
-    return aRet;
+    return aRet.makeStringAndClear();
 }
 
 TYPEINIT1(AutomationNamedArgsSbxArray,SbxArray)
@@ -2086,7 +2084,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
                     // Id == -1: Display implemented interfaces according the ClassProvider
                     if( nId == -1 )     // Property ID_DBG_SUPPORTEDINTERFACES"
                     {
-                        String aRetStr = Impl_GetSupportedInterfaces( this );
+                        ::rtl::OUString aRetStr = Impl_GetSupportedInterfaces( this );
                         pVar->PutString( aRetStr );
                     }
                     // Id == -2: output properties
@@ -2094,7 +2092,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
                     {
                         // by now all properties must be established
                         implCreateAll();
-                        String aRetStr = Impl_DumpProperties( this );
+                        ::rtl::OUString aRetStr = Impl_DumpProperties( this );
                         pVar->PutString( aRetStr );
                     }
                     // Id == -3: output the methods
@@ -2102,7 +2100,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
                     {
                         // y now all properties must be established
                         implCreateAll();
-                        String aRetStr = Impl_DumpMethods( this );
+                        ::rtl::OUString aRetStr = Impl_DumpMethods( this );
                         pVar->PutString( aRetStr );
                     }
                     return;
@@ -2335,7 +2333,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
 Reference< XInvocation > createDynamicInvocationFor( const Any& aAny );
 #endif
 
-SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
+SbUnoObject::SbUnoObject( const ::rtl::OUString& aName_, const Any& aUnoObj_ )
     : SbxObject( aName_ )
     , bNeedIntrospection( TRUE )
     , bIgnoreNativeCOMObjectMembers( FALSE )
@@ -2400,16 +2398,16 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
 
     // Is it an interface or a struct?
     BOOL bSetClassName = FALSE;
-    String aClassName_;
+    ::rtl::OUString aClassName_;
     if( eType == TypeClass_STRUCT || eType == TypeClass_EXCEPTION )
     {
         // Struct is Ok
         bFatalError = FALSE;
 
         // insert the real name of the class
-        if( aName_.Len() == 0 )
+        if( aName_.getLength() == 0 )
         {
-            aClassName_ = String( aUnoObj_.getValueType().getTypeName() );
+            aClassName_ = aUnoObj_.getValueType().getTypeName();
             bSetClassName = TRUE;
         }
     }
@@ -2423,7 +2421,7 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
         if( xClassProvider.is() )
         {
             // Insert the real name of the class
-            if( aName_.Len() == 0 )
+            if( aName_.getLength() == 0 )
             {
                 Sequence< Reference< XIdlClass > > szClasses = xClassProvider->getIdlClasses();
                 UINT32 nLen = szClasses.getLength();
@@ -2432,7 +2430,7 @@ SbUnoObject::SbUnoObject( const String& aName_, const Any& aUnoObj_ )
                     const Reference< XIdlClass > xImplClass = szClasses.getConstArray()[ 0 ];
                     if( xImplClass.is() )
                     {
-                        aClassName_ = String( xImplClass->getName() );
+                        aClassName_ = xImplClass->getName();
                         bSetClassName = TRUE;
                     }
                 }
@@ -2526,7 +2524,7 @@ void clearUnoMethods( void )
 
 SbUnoMethod::SbUnoMethod
 (
-    const String& aName_,
+    const ::rtl::OUString& aName_,
     SbxDataType eSbxType,
     Reference< XIdlMethod > xUnoMethod_,
     bool bInvocation
@@ -2597,7 +2595,7 @@ const Sequence<ParamInfo>& SbUnoMethod::getParamInfos( void )
 
 SbUnoProperty::SbUnoProperty
 (
-    const String& aName_,
+    const ::rtl::OUString& aName_,
     SbxDataType eSbxType,
     const Property& aUnoProp_,
     INT32 nId_,
@@ -2618,7 +2616,7 @@ SbUnoProperty::~SbUnoProperty()
 {}
 
 
-SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t )
+SbxVariable* SbUnoObject::Find( const ::rtl::OUString& rName, SbxClassType t )
 {
     static Reference< XIdlMethod > xDummyMethod;
     static Property aDummyProp;
@@ -2750,9 +2748,9 @@ SbxVariable* SbUnoObject::Find( const String& rName, SbxClassType t )
 
     if( !pRes )
     {
-        if( rName.EqualsIgnoreCaseAscii( ID_DBG_SUPPORTEDINTERFACES ) ||
-            rName.EqualsIgnoreCaseAscii( ID_DBG_PROPERTIES ) ||
-            rName.EqualsIgnoreCaseAscii( ID_DBG_METHODS ) )
+        if( rName.equalsIgnoreAsciiCase( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_SUPPORTEDINTERFACES))) ||
+            rName.equalsIgnoreAsciiCase( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_PROPERTIES))) ||
+            rName.equalsIgnoreAsciiCase( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_METHODS))) )
         {
             // Create
             implCreateDbgProperties();
@@ -2771,15 +2769,15 @@ void SbUnoObject::implCreateDbgProperties( void )
     Property aProp;
 
     // Id == -1: display the implemented interfaces corresponding the ClassProvider
-    SbxVariableRef xVarRef = new SbUnoProperty( 
String(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_SUPPORTEDINTERFACES)), SbxSTRING, aProp, -1, false );
+    SbxVariableRef xVarRef = new SbUnoProperty( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_SUPPORTEDINTERFACES)), SbxSTRING, aProp, -1, 
false );
     QuickInsert( (SbxVariable*)xVarRef );
 
     // Id == -2: output the properties
-    xVarRef = new SbUnoProperty( String(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_PROPERTIES)), 
SbxSTRING, aProp, -2, false );
+    xVarRef = new SbUnoProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_PROPERTIES)), 
SbxSTRING, aProp, -2, false );
     QuickInsert( (SbxVariable*)xVarRef );
 
     // Id == -3: output the Methods
-    xVarRef = new SbUnoProperty( String(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_METHODS)), SbxSTRING, 
aProp, -3, false );
+    xVarRef = new SbUnoProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_METHODS)), 
SbxSTRING, aProp, -3, false );
     QuickInsert( (SbxVariable*)xVarRef );
 }
 
@@ -2859,7 +2857,7 @@ Any SbUnoObject::getUnoAny( void )
 }
 
 // help method to create an Uno-Struct per CoreReflection
-SbUnoObject* Impl_CreateUnoStruct( const String& aClassName )
+SbUnoObject* Impl_CreateUnoStruct( const ::rtl::OUString& aClassName )
 {
     // get CoreReflection
     Reference< XIdlReflection > xCoreReflection = getCoreReflection_Impl();
@@ -2897,7 +2895,7 @@ SbxBase* SbUnoFactory::Create( UINT16, UINT32 )
     return NULL;
 }
 
-SbxObject* SbUnoFactory::CreateObject( const String& rClassName )
+SbxObject* SbUnoFactory::CreateObject( const ::rtl::OUString& rClassName )
 {
     return Impl_CreateUnoStruct( rClassName );
 }
@@ -2905,7 +2903,7 @@ SbxObject* SbUnoFactory::CreateObject( const String& rClassName )
 
 // Provisional interface for the UNO-Connection
 // Deliver a SbxObject, that wrap an Uno-Interface
-SbxObjectRef GetSbUnoObject( const String& aName, const Any& aUnoObj_ )
+SbxObjectRef GetSbUnoObject( const ::rtl::OUString& aName, const Any& aUnoObj_ )
 {
     return new SbUnoObject( aName, aUnoObj_ );
 }
@@ -2937,7 +2935,7 @@ void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite 
)
     }
 
     // get the name of the class of the struct
-    String aClassName = rPar.Get(1)->GetString();
+    ::rtl::OUString aClassName = rPar.Get(1)->GetString();
 
     // try to create Struct with the same name
     SbUnoObjectRef xUnoObj = Impl_CreateUnoStruct( aClassName );
@@ -2962,7 +2960,7 @@ void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, BOOL 
bWrite )
     }
 
     // get the name of the class of the struct
-    String aServiceName = rPar.Get(1)->GetString();
+    ::rtl::OUString aServiceName = rPar.Get(1)->GetString();
 
     // search for the service and instatiate it
     Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() );
@@ -3016,7 +3014,7 @@ void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& 
rPar,
     }
 
     // get the name of the class of the struct
-    String aServiceName = rPar.Get(1)->GetString();
+    ::rtl::OUString aServiceName = rPar.Get(1)->GetString();
     Any aArgAsAny = sbxToUnoValue( rPar.Get(2),
                 getCppuType( (Sequence<Any>*)0 ) );
     Sequence< Any > aArgs;
@@ -3076,7 +3074,7 @@ void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, 
BOOL
         aAny <<= xFactory;
 
         // Create a SbUnoObject out of it and return it
-        SbUnoObjectRef xUnoObj = new SbUnoObject( String( 
RTL_CONSTASCII_USTRINGPARAM("ProcessServiceManager") ), aAny );
+        SbUnoObjectRef xUnoObj = new SbUnoObject( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM("ProcessServiceManager") ), aAny );
         refVar->PutObject( (SbUnoObject*)xUnoObj );
     }
     else
@@ -3122,7 +3120,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
     for( USHORT i = 2 ; i < nParCount ; i++ )
     {
         // get the name of the interface of the struct
-        String aIfaceName = rPar.Get( i )->GetString();
+        ::rtl::OUString aIfaceName = rPar.Get( i )->GetString();
 
         // search for the class
         Reference< XIdlClass > xClass = xCoreReflection->forName( aIfaceName );
@@ -3300,7 +3298,7 @@ VBAConstantHelper::init()
 }
 
 bool
-VBAConstantHelper::isVBAConstantType( const String& rName )
+VBAConstantHelper::isVBAConstantType( const ::rtl::OUString& rName )
 {
     init();
     bool bConstant = false;
@@ -3319,7 +3317,7 @@ VBAConstantHelper::isVBAConstantType( const String& rName )
 }
 
 SbxVariable*
-VBAConstantHelper::getVBAConstant( const String& rName )
+VBAConstantHelper::getVBAConstant( const ::rtl::OUString& rName )
 {
     SbxVariable* pConst = NULL;
     init();
@@ -3340,7 +3338,7 @@ VBAConstantHelper::getVBAConstant( const String& rName )
 
 // Function to search for a global identifier in the
 // UnoScope and to wrap it for Sbx
-SbUnoClass* findUnoClass( const String& rName )
+SbUnoClass* findUnoClass( const ::rtl::OUString& rName )
 {
     // #105550 Check if module exists
     SbUnoClass* pUnoClass = NULL;
@@ -3399,8 +3397,8 @@ SbxVariable* SbUnoClass::Find( const XubString& rName, SbxClassType t )
         else
         {
             // expand fully qualified name
-            String aNewName = GetName();
-            aNewName.AppendAscii( "." );
+            ::rtl::OUString aNewName = GetName();
+            aNewName += ::rtl::OUString::createFromAscii( "." );
             aNewName += rName;
 
             // get CoreReflection
@@ -3436,7 +3434,7 @@ SbxVariable* SbUnoClass::Find( const XubString& rName, SbxClassType t )
                     }
                     catch( NoSuchElementException& e1 )
                     {
-                        String aMsg = implGetExceptionMsg( e1 );
+                        ::rtl::OUString aMsg = implGetExceptionMsg( e1 );
                     }
                 }
 
@@ -3495,7 +3493,7 @@ SbxVariable* SbUnoClass::Find( const XubString& rName, SbxClassType t )
 }
 
 
-SbUnoService* findUnoService( const String& rName )
+SbUnoService* findUnoService( const ::rtl::OUString& rName )
 {
     SbUnoService* pSbUnoService = NULL;
 
@@ -3520,7 +3518,7 @@ SbUnoService* findUnoService( const String& rName )
     return pSbUnoService;
 }
 
-SbxVariable* SbUnoService::Find( const String& rName, SbxClassType )
+SbxVariable* SbUnoService::Find( const ::rtl::OUString& rName, SbxClassType )
 {
     SbxVariable* pRes = SbxObject::Find( rName, SbxCLASS_METHOD );
 
@@ -3538,14 +3536,14 @@ SbxVariable* SbUnoService::Find( const String& rName, SbxClassType )
             {
                 Reference< XServiceConstructorDescription > xCtor = pCtorSeq[i];
 
-                String aName( xCtor->getName() );
-                if( !aName.Len() )
+                ::rtl::OUString aName( xCtor->getName() );
+                if( !aName.getLength() )
                 {
                     if( xCtor->isDefaultConstructor() )
-                        aName = String::CreateFromAscii( "create" );
+                        aName += ::rtl::OUString::createFromAscii( "create" );
                 }
 
-                if( aName.Len() )
+                if( aName.getLength() )
                 {
                     // Create and insert SbUnoServiceCtor
                     SbxVariableRef xSbCtorRef = new SbUnoServiceCtor( aName, xCtor );
@@ -3687,7 +3685,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
                 Any aRetAny;
                 if( xServiceMgr.is() )
                 {
-                    String aServiceName = GetName();
+                    ::rtl::OUString aServiceName = GetName();
                     Reference < XInterface > xRet;
                     try
                     {
@@ -3737,7 +3735,7 @@ void clearUnoServiceCtors( void )
     }
 }
 
-SbUnoServiceCtor::SbUnoServiceCtor( const String& aName_, Reference< 
XServiceConstructorDescription > xServiceCtorDesc )
+SbUnoServiceCtor::SbUnoServiceCtor( const ::rtl::OUString& aName_, Reference< 
XServiceConstructorDescription > xServiceCtorDesc )
     : SbxMethod( aName_, SbxOBJECT )
     , m_xServiceCtorDesc( xServiceCtorDesc )
 {
@@ -3755,7 +3753,7 @@ SbxInfo* SbUnoServiceCtor::GetInfo()
 }
 
 
-SbUnoSingleton* findUnoSingleton( const String& rName )
+SbUnoSingleton* findUnoSingleton( const ::rtl::OUString& rName )
 {
     SbUnoSingleton* pSbUnoSingleton = NULL;
 
@@ -3780,13 +3778,13 @@ SbUnoSingleton* findUnoSingleton( const String& rName )
     return pSbUnoSingleton;
 }
 
-SbUnoSingleton::SbUnoSingleton( const String& aName_,
+SbUnoSingleton::SbUnoSingleton( const ::rtl::OUString& aName_,
     const Reference< XSingletonTypeDescription >& xSingletonTypeDesc )
         : SbxObject( aName_ )
         , m_xSingletonTypeDesc( xSingletonTypeDesc )
 {
     SbxVariableRef xGetMethodRef =
-        new SbxMethod( String( RTL_CONSTASCII_USTRINGPARAM( "get" ) ), SbxOBJECT );
+        new SbxMethod( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "get" ) ), SbxOBJECT );
     QuickInsert( (SbxVariable*)xGetMethodRef );
 }
 
@@ -3827,7 +3825,7 @@ void SbUnoSingleton::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
         Any aRetAny;
         if( xContextToUse.is() )
         {
-            String aSingletonName( RTL_CONSTASCII_USTRINGPARAM("/singletons/") );
+            ::rtl::OUString aSingletonName( RTL_CONSTASCII_USTRINGPARAM("/singletons/") );
             aSingletonName += GetName();
             Reference < XInterface > xRet;
             xContextToUse->getValueByName( aSingletonName ) >>= xRet;
@@ -4130,8 +4128,8 @@ void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
     }
 
     // get the name of the class of the struct
-    String aPrefixName = rPar.Get(1)->GetString();
-    String aListenerClassName = rPar.Get(2)->GetString();
+    ::rtl::OUString aPrefixName = rPar.Get(1)->GetString();
+    ::rtl::OUString aListenerClassName = rPar.Get(2)->GetString();
 
     // get the CoreReflection
     Reference< XIdlReflection > xCoreReflection = getCoreReflection_Impl();
@@ -4193,10 +4191,10 @@ void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL 
bWrite
     if( xPSMPropertySet.is() )
     {
         Any aContextAny = xPSMPropertySet->getPropertyValue(
-            String( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) );
+            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) );
 
         SbUnoObjectRef xUnoObj = new SbUnoObject
-            ( String( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ),
+            ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ),
               aContextAny );
         refVar->PutObject( (SbUnoObject*)xUnoObj );
     }
@@ -4222,7 +4220,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
     }
 
     // get the name of the class of the struct
-    String aTypeName = rPar.Get(1)->GetString();
+    ::rtl::OUString aTypeName = rPar.Get(1)->GetString();
     SbxVariable* pVal = rPar.Get(2);
 
     // Check the type
@@ -4234,7 +4232,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
     }
     catch( NoSuchElementException& e1 )
     {
-        String aNoSuchElementExceptionName
+        ::rtl::OUString aNoSuchElementExceptionName
             ( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.container.NoSuchElementException" ) );
         StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
             implGetExceptionMsg( e1, aNoSuchElementExceptionName ) );
@@ -4250,29 +4248,6 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite 
)
     Any aVal = sbxToUnoValueImpl( pVal );
     Any aConvertedVal = convertAny( aVal, aDestType );
 
-    /*
-    // Convert
-    Reference< XTypeConverter > xConverter = getTypeConverter_Impl();
-    try
-    {
-        aConvertedVal = xConverter->convertTo( aVal, aDestType );
-    }
-    catch( IllegalArgumentException& e1 )
-    {
-        StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
-            implGetExceptionMsg( ::cppu::getCaughtException() ) );
-        return;
-    }
-    catch( CannotConvertException& e2 )
-    {
-        String aCannotConvertExceptionName
-            ( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.IllegalArgumentException" ) );
-        StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
-            implGetExceptionMsg( e2, aCannotConvertExceptionName ) );
-        return;
-    }
-    */
-
     SbxVariableRef refVar = rPar.Get(0);
     SbxObjectRef xUnoAnyObject = new SbUnoAnyObject( aConvertedVal );
     refVar->PutObject( xUnoAnyObject );
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index 24af07f..b2bd100 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -379,7 +379,7 @@ class SbiRuntime
     void DimImpl( SbxVariableRef refVar );
 
     // #115829
-    bool implIsClass( SbxObject* pObj, const String& aClass );
+    bool implIsClass( SbxObject* pObj, const ::rtl::OUString& aClass );
 
     void StepSETCLASS_impl( UINT32 nOp1, bool bHandleDflt = false );
 
@@ -411,7 +411,7 @@ class SbiRuntime
     void StepGOSUB( UINT32 ),   StepRETURN( UINT32 );
     void StepTESTFOR( UINT32 ), StepCASETO( UINT32 ),   StepERRHDL( UINT32 );
     void StepRESUME( UINT32 ),  StepSETCLASS( UINT32 ),        StepVBASETCLASS( UINT32 ),      
StepTESTCLASS( UINT32 ), StepLIB( UINT32 );
-    bool checkClass_Impl( const SbxVariableRef& refVal, const String& aClass, bool bRaiseErrors, 
bool bDefault = true );
+    bool checkClass_Impl( const SbxVariableRef& refVal, const rtl::OUString& aClass, bool 
bRaiseErrors, bool bDefault = true );
     void StepCLOSE( UINT32 ),   StepPRCHAR( UINT32 ),   StepARGTYP( UINT32 );
     // Alle Opcodes mit zwei Operanden
     void StepRTL( UINT32, UINT32 ),            StepPUBLIC( UINT32, UINT32 ),   StepPUBLIC_P( 
UINT32, UINT32 );
diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx
index 02f9cb9..e638ac9 100644
--- a/basic/source/inc/sbunoobj.hxx
+++ b/basic/source/inc/sbunoobj.hxx
@@ -64,16 +64,16 @@ class SbUnoObject: public SbxObject
     void implCreateAll( void );
 
 public:
-    static bool getDefaultPropName( SbUnoObject* pUnoObj, String& sDfltProp );
+    static bool getDefaultPropName( SbUnoObject* pUnoObj, ::rtl::OUString& sDfltProp );
     TYPEINFO();
-    SbUnoObject( const String& aName_, const ::com::sun::star::uno::Any& aUnoObj_ );
+    SbUnoObject( const ::rtl::OUString& aName_, const ::com::sun::star::uno::Any& aUnoObj_ );
     ~SbUnoObject();
 
     // #76470 Introspection on Demand durchfuehren
     void doIntrospection( void );
 
     // Find ueberladen, um z.B. NameAccess zu unterstuetzen
-    virtual SbxVariable* Find( const String&, SbxClassType );
+    virtual SbxVariable* Find( const ::rtl::OUString&, SbxClassType );
 
     // Force creation of all properties for debugging
     void createAllProperties( void  )
@@ -109,7 +109,7 @@ class SbUnoMethod : public SbxMethod
 public:
     TYPEINFO();
 
-    SbUnoMethod( const String& aName_, SbxDataType eSbxType, ::com::sun::star::uno::Reference< 
::com::sun::star::reflection::XIdlMethod > xUnoMethod_,
+    SbUnoMethod( const ::rtl::OUString& aName_, SbxDataType eSbxType, 
::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlMethod > xUnoMethod_,
         bool bInvocation );
     virtual ~SbUnoMethod();
     virtual SbxInfo* GetInfo();
@@ -134,7 +134,7 @@ class SbUnoProperty : public SbxProperty
     virtual ~SbUnoProperty();
 public:
     TYPEINFO();
-    SbUnoProperty( const String& aName_, SbxDataType eSbxType,
+    SbUnoProperty( const ::rtl::OUString& aName_, SbxDataType eSbxType,
         const ::com::sun::star::beans::Property& aUnoProp_, INT32 nId_, bool bInvocation );
 
     bool isInvocationBased( void )
@@ -146,7 +146,7 @@ class SbUnoFactory : public SbxFactory
 {
 public:
     virtual SbxBase* Create( UINT16 nSbxId, UINT32 = SBXCR_SBX );
-    virtual SbxObject* CreateObject( const String& );
+    virtual SbxObject* CreateObject( const ::rtl::OUString& );
 };
 
 // Wrapper fuer eine Uno-Klasse
@@ -178,7 +178,7 @@ SV_DECL_IMPL_REF(SbUnoClass);
 
 // Funktion, um einen globalen Bezeichner im
 // UnoScope zu suchen und fuer Sbx zu wrappen
-SbUnoClass* findUnoClass( const String& rName );
+SbUnoClass* findUnoClass( const ::rtl::OUString& rName );
 
 
 // Wrapper for UNO Service
@@ -196,13 +196,13 @@ public:
             , m_bNeedsInit( true )
     {}
 
-    virtual SbxVariable* Find( const String&, SbxClassType );
+    virtual SbxVariable* Find( const ::rtl::OUString&, SbxClassType );
 
     void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& );
 };
 SV_DECL_IMPL_REF(SbUnoService);
 
-SbUnoService* findUnoService( const String& rName );
+SbUnoService* findUnoService( const ::rtl::OUString& rName );
 
 
 void clearUnoServiceCtors( void );
@@ -220,7 +220,7 @@ class SbUnoServiceCtor : public SbxMethod
 public:
     TYPEINFO();
 
-    SbUnoServiceCtor( const String& aName_, ::com::sun::star::uno::Reference< 
::com::sun::star::reflection::XServiceConstructorDescription > xServiceCtorDesc );
+    SbUnoServiceCtor( const::rtl::OUString& aName_, ::com::sun::star::uno::Reference< 
::com::sun::star::reflection::XServiceConstructorDescription > xServiceCtorDesc );
     virtual ~SbUnoServiceCtor();
     virtual SbxInfo* GetInfo();
 
@@ -236,14 +236,14 @@ class SbUnoSingleton : public SbxObject
 
 public:
     TYPEINFO();
-    SbUnoSingleton( const String& aName_,
+    SbUnoSingleton( const ::rtl::OUString& aName_,
         const ::com::sun::star::uno::Reference< 
::com::sun::star::reflection::XSingletonTypeDescription >& xSingletonTypeDesc );
 
     void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& );
 };
 SV_DECL_IMPL_REF(SbUnoSingleton);
 
-SbUnoSingleton* findUnoSingleton( const String& rName );
+SbUnoSingleton* findUnoSingleton( const ::rtl::OUString& rName );
 
 
 // #105565 Special Object to wrap a strongly typed Uno Any
@@ -338,8 +338,8 @@ private:
     void init();
 public:
     static VBAConstantHelper& instance();
-    SbxVariable* getVBAConstant( const String& rName );
-    bool isVBAConstantType( const String& rName );
+    SbxVariable* getVBAConstant( const ::rtl::OUString& rName );
+    bool isVBAConstantType( const ::rtl::OUString& rName );
 };
 
 #endif
diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx
index a619a01..9654fae 100644
--- a/basic/source/runtime/step1.cxx
+++ b/basic/source/runtime/step1.cxx
@@ -40,7 +40,7 @@
 #include "errobject.hxx"
 
 bool checkUnoObjectType( SbUnoObject* refVal,
-    const String& aClass );
+    const ::rtl::OUString& aClass );
 
 // Laden einer numerischen Konstanten (+ID)
 
@@ -439,15 +439,15 @@ void SbiRuntime::StepPRCHAR( UINT32 nOp1 )
 
 // Check, ob TOS eine bestimmte Objektklasse ist (+StringID)
 
-bool SbiRuntime::implIsClass( SbxObject* pObj, const String& aClass )
+bool SbiRuntime::implIsClass( SbxObject* pObj, const ::rtl::OUString& aClass )
 {
     bool bRet = true;
 
-    if( aClass.Len() != 0 )
+    if( aClass.getLength() != 0 )
     {
         bRet = pObj->IsClass( aClass );
         if( !bRet )
-            bRet = aClass.EqualsIgnoreCaseAscii( String( RTL_CONSTASCII_USTRINGPARAM("object") ) );
+            bRet = aClass.equalsIgnoreAsciiCase( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM("object") ) );
         if( !bRet )
         {
             String aObjClass = pObj->GetClassName();
@@ -465,7 +465,7 @@ bool SbiRuntime::implIsClass( SbxObject* pObj, const String& aClass )
 }
 
 bool SbiRuntime::checkClass_Impl( const SbxVariableRef& refVal,
-    const String& aClass, bool bRaiseErrors, bool bDefault )
+    const ::rtl::OUString& aClass, bool bRaiseErrors, bool bDefault )
 {
     bool bOk = bDefault;
 
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.