[Libreoffice-commits] .: basctl/source basic/inc basic/source sc/source sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 7 00:16:26 PST 2012


 basctl/source/basicide/baside2b.cxx |   12 
 basctl/source/basicide/basidesh.cxx |    2 
 basic/inc/basic/basmgr.hxx          |    3 
 basic/inc/basic/sbmeth.hxx          |    6 
 basic/inc/basic/sbmod.hxx           |   44 -
 basic/inc/basic/sbobjmod.hxx        |   20 
 basic/inc/basic/sbprop.hxx          |    4 
 basic/inc/basic/sbstar.hxx          |   43 -
 basic/inc/basic/sbstdobj.hxx        |   36 -
 basic/inc/basic/sbuno.hxx           |    2 
 basic/inc/basic/sbx.hxx             |   84 +--
 basic/inc/basic/sbxcore.hxx         |    2 
 basic/inc/basic/sbxform.hxx         |   92 +--
 basic/inc/basic/sbxmeth.hxx         |    2 
 basic/inc/basic/sbxobj.hxx          |   32 -
 basic/inc/basic/sbxprop.hxx         |    2 
 basic/inc/basic/sbxvar.hxx          |   40 -
 basic/source/basmgr/basmgr.cxx      |  309 +++++------
 basic/source/classes/errobject.cxx  |    6 
 basic/source/classes/image.cxx      |   37 -
 basic/source/classes/sb.cxx         |  181 +++---
 basic/source/classes/sbunoobj.cxx   |  437 ++++++++--------
 basic/source/classes/sbxmod.cxx     |  213 ++++---
 basic/source/comp/buffer.cxx        |   91 ++-
 basic/source/comp/codegen.cxx       |   84 +--
 basic/source/comp/dim.cxx           |  173 +++---
 basic/source/comp/exprgen.cxx       |    2 
 basic/source/comp/exprnode.cxx      |   51 -
 basic/source/comp/exprtree.cxx      |   57 +-
 basic/source/comp/loops.cxx         |    4 
 basic/source/comp/parser.cxx        |   25 
 basic/source/comp/sbcomp.cxx        |   80 +-
 basic/source/comp/symtbl.cxx        |   65 +-
 basic/source/comp/token.cxx         |    2 
 basic/source/inc/buffer.hxx         |    7 
 basic/source/inc/errobject.hxx      |    4 
 basic/source/inc/expr.hxx           |   18 
 basic/source/inc/image.hxx          |   39 -
 basic/source/inc/namecont.hxx       |  174 +++---
 basic/source/inc/parser.hxx         |    4 
 basic/source/inc/runtime.hxx        |   30 -
 basic/source/inc/sbintern.hxx       |   14 
 basic/source/inc/sbjsmeth.hxx       |    2 
 basic/source/inc/sbjsmod.hxx        |    2 
 basic/source/inc/sbunoobj.hxx       |   72 +-
 basic/source/inc/stdobj.hxx         |    4 
 basic/source/inc/symtbl.hxx         |   69 +-
 basic/source/runtime/inputbox.cxx   |    6 
 basic/source/runtime/iosys.cxx      |   32 -
 basic/source/runtime/methods.cxx    |  609 +++++++++++-----------
 basic/source/runtime/methods1.cxx   |  165 +++---
 basic/source/runtime/runtime.cxx    |   10 
 basic/source/runtime/sbdiagnose.cxx |    8 
 basic/source/runtime/stdobj.cxx     |   20 
 basic/source/runtime/stdobj1.cxx    |   54 +
 basic/source/runtime/step0.cxx      |  201 ++++---
 basic/source/runtime/step2.cxx      |   17 
 basic/source/sbx/sbxarray.cxx       |   36 -
 basic/source/sbx/sbxcoll.cxx        |   64 +-
 basic/source/sbx/sbxdate.cxx        |  617 ++++++++++++----------
 basic/source/sbx/sbxexec.cxx        |   44 +
 basic/source/sbx/sbxform.cxx        |  977 +++++++++++++++++++-----------------
 basic/source/sbx/sbxobj.cxx         |  273 +++++-----
 basic/source/sbx/sbxscan.cxx        |  301 +++++------
 basic/source/sbx/sbxstr.cxx         |   10 
 basic/source/sbx/sbxvalue.cxx       |   23 
 basic/source/sbx/sbxvar.cxx         |  208 ++++---
 basic/source/uno/namecont.cxx       |  145 +++--
 basic/source/uno/scriptcont.cxx     |   16 
 sc/source/core/tool/interpr4.cxx    |    8 
 sc/source/ui/vba/vbaapplication.cxx |    2 
 sw/source/core/bastyp/calc.cxx      |   11 
 sw/source/core/doc/docbasic.cxx     |    6 
 73 files changed, 3555 insertions(+), 2990 deletions(-)

New commits:
commit 27239ad23006b1fd1ddb21467f4c1fd637b560d5
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Nov 6 23:34:23 2012 -0600

    basic: String -> OUString
    
    Change-Id: I42479b4bade5111e38d69f04c889c166f340d5ba

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index a569565..1ef15c5 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -358,7 +358,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
                             if ( !aHelpText.Len() )     // name is not copied with the passed parameters
                                 aHelpText = aWord;
                             aHelpText += '=';
-                            aHelpText += pVar->GetString();
+                            aHelpText += pVar->GetOUString();
                         }
                     }
                     if ( aHelpText.Len() )
@@ -1567,7 +1567,7 @@ void StackWindow::UpdateCalls()
                 {
                     SbxVariable* pVar = pParams->Get( nParam );
                     DBG_ASSERT( pVar, "Parameter?!" );
-                    if ( pVar->GetName().Len() )
+                    if ( !pVar->GetName().isEmpty() )
                     {
                         aEntry += pVar->GetName();
                     }
@@ -1586,7 +1586,9 @@ void StackWindow::UpdateCalls()
                         aEntry += OUString( "..." );
                     }
                     else if( eType != SbxOBJECT )
-                        aEntry += pVar->GetString();
+                    {
+                        aEntry += pVar->GetOUString();
+                    }
                     if ( nParam < ( pParams->Count() - 1 ) )
                     {
                         aEntry += OUString( ", " );
@@ -2181,8 +2183,10 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
                     bool bString = ((sal_uInt8)eType == (sal_uInt8)SbxSTRING);
                     OUString aStrStr( "\"" );
                     if( bString )
+                    {
                         aWatchStr += aStrStr;
-                    aWatchStr += pVar->GetString();
+                    }
+                    aWatchStr += pVar->GetOUString();
                     if( bString )
                     {
                         aWatchStr += aStrStr;
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 58d71de..ed86cca 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -831,7 +831,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange
             if ( pWindow_->GetDocument().isInVBAMode() )
             {
                 SbModule* pMod = StarBASIC::GetActiveModule();
-                if ( !pMod || ( pMod && ( !pMod->GetName().Equals(pWindow_->GetName()) ) ) )
+                if ( !pMod || ( pMod && ( !pMod->GetName().equals(pWindow_->GetName()) ) ) )
                 {
                     bStop = false;
                 }
diff --git a/basic/inc/basic/basmgr.hxx b/basic/inc/basic/basmgr.hxx
index f59b414..9c73136 100644
--- a/basic/inc/basic/basmgr.hxx
+++ b/basic/inc/basic/basmgr.hxx
@@ -19,7 +19,6 @@
 #ifndef _BASMGR_HXX
 #define _BASMGR_HXX
 
-#include <tools/string.hxx>
 #include <svl/brdcst.hxx>
 #include <basic/sbstar.hxx>
 #include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
@@ -213,7 +212,7 @@ public:
     /// executes a given macro
     ErrCode         ExecuteMacro( OUString const& i_fullyQualifiedName, SbxArray* i_arguments, SbxValue* i_retValue );
     /// executes a given macro
-    ErrCode         ExecuteMacro( OUString const& i_fullyQualifiedName, String const& i_commaSeparatedArgs, SbxValue* i_retValue );
+    ErrCode         ExecuteMacro( OUString const& i_fullyQualifiedName, OUString const& i_commaSeparatedArgs, SbxValue* i_retValue );
 
 private:
     BASIC_DLLPRIVATE sal_Bool IsReference( sal_uInt16 nLib );
diff --git a/basic/inc/basic/sbmeth.hxx b/basic/inc/basic/sbmeth.hxx
index 0f24d4a..9d4afbc 100644
--- a/basic/inc/basic/sbmeth.hxx
+++ b/basic/inc/basic/sbmeth.hxx
@@ -43,8 +43,8 @@ class BASIC_DLLPUBLIC SbMethod : public SbxMethod
     sal_uInt16    nLine1, nLine2;
     sal_uInt32    nStart;
     sal_Bool      bInvalid;
-    SbxArrayRef refStatics;
-    BASIC_DLLPRIVATE SbMethod( const String&, SbxDataType, SbModule* );
+    SbxArrayRef   refStatics;
+    BASIC_DLLPRIVATE SbMethod( const OUString&, SbxDataType, SbModule* );
     BASIC_DLLPRIVATE SbMethod( const SbMethod& );
     virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
     virtual sal_Bool StoreData( SvStream& ) const;
@@ -77,7 +77,7 @@ class BASIC_DLLPUBLIC SbIfaceMapperMethod : public SbMethod
 
 public:
     TYPEINFO();
-    SbIfaceMapperMethod( const String& rName, SbMethod* pImplMeth )
+    SbIfaceMapperMethod( const OUString& rName, SbMethod* pImplMeth )
         : SbMethod( rName, pImplMeth->GetType(), NULL )
         , mxImplMeth( pImplMeth )
     {}
diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx
index 7d32abc..1ff5b11 100644
--- a/basic/inc/basic/sbmod.hxx
+++ b/basic/inc/basic/sbmod.hxx
@@ -51,14 +51,14 @@ class BASIC_DLLPUBLIC SbModule : public SbxObject, private ::boost::noncopyable
     friend class    StarBASIC;
     friend class    SbClassModuleObject;
 
-    std::vector< String > mModuleVariableNames;
+    std::vector< OUString > mModuleVariableNames;
 
     BASIC_DLLPRIVATE void implClearIfVarDependsOnDeletedBasic( SbxVariable* pVar, StarBASIC* pDeletedBasic );
 
 protected:
     com::sun::star::uno::Reference< com::sun::star::script::XInvocation > mxWrapper;
-    ::rtl::OUString     aOUSource;
-    String              aComment;
+    OUString            aOUSource;
+    OUString            aComment;
     SbiImage*           pImage;        // the Image
     SbiBreakpoints*     pBreaks;       // Breakpoints
     SbClassData*        pClassData;
@@ -69,10 +69,10 @@ protected:
 
     static void     implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassModuleRunInitItem& rItem );
     void            StartDefinitions();
-    SbMethod*       GetMethod( const String&, SbxDataType );
-    SbProperty*     GetProperty( const String&, SbxDataType );
-    SbProcedureProperty* GetProcedureProperty( const String&, SbxDataType );
-    SbIfaceMapperMethod* GetIfaceMapperMethod( const String&, SbMethod* );
+    SbMethod*       GetMethod( const OUString&, SbxDataType );
+    SbProperty*     GetProperty( const OUString&, SbxDataType );
+    SbProcedureProperty* GetProcedureProperty( const OUString&, SbxDataType );
+    SbIfaceMapperMethod* GetIfaceMapperMethod( const OUString&, SbMethod* );
     void            EndDefinitions( sal_Bool=sal_False );
     sal_uInt16      Run( SbMethod* );
     void            RunInit();
@@ -93,21 +93,21 @@ protected:
 public:
     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2);
     TYPEINFO();
-                    SbModule( const String&, sal_Bool bCompat = sal_False );
+                    SbModule( const OUString&, sal_Bool bCompat = sal_False );
     virtual void    SetParent( SbxObject* );
     virtual void    Clear();
 
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
 
-    virtual const String&   GetSource() const;
-    const ::rtl::OUString&  GetSource32() const;
-    const String&   GetComment() const            { return aComment; }
-    virtual void    SetSource( const String& r );
-    void            SetSource32( const ::rtl::OUString& r );
+    virtual const OUString& GetSource() const;
+    const OUString&  GetSource32() const;
+    const OUString&  GetComment() const { return aComment; }
+    virtual void     SetSource( const OUString& r );
+    void             SetSource32( const OUString& r );
 
-    virtual sal_Bool    Compile();
-    virtual sal_Bool    IsCompiled() const;
-    const SbxObject* FindType( String aTypeName ) const;
+    virtual sal_Bool Compile();
+    virtual sal_Bool IsCompiled() const;
+    const SbxObject* FindType( OUString aTypeName ) const;
 
     virtual sal_Bool IsBreakable( sal_uInt16 nLine ) const;
     virtual size_t   GetBPCount() const;
@@ -131,10 +131,10 @@ public:
     bool     IsVBACompat() const;
     void     SetVBACompat( bool bCompat );
     sal_Int32 GetModuleType() { return mnType; }
-    void SetModuleType( sal_Int32 nType ) { mnType = nType; }
-    bool isProxyModule() { return bIsProxyModule; }
-    void AddVarName( const String& aName );
-    void RemoveVars();
+    void     SetModuleType( sal_Int32 nType ) { mnType = nType; }
+    bool     isProxyModule() { return bIsProxyModule; }
+    void     AddVarName( const OUString& aName );
+    void     RemoveVars();
     ::com::sun::star::uno::Reference< ::com::sun::star::script::XInvocation > GetUnoModule();
     bool createCOMWrapperForIface( ::com::sun::star::uno::Any& o_rRetAny, SbClassModuleObject* pProxyClassModuleObject );
 };
@@ -153,7 +153,7 @@ public:
     ~SbClassModuleObject();
 
     // Overridden to support NameAccess etc.
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
 
     virtual void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& );
 
diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx
index b3ff31f..768a273 100644
--- a/basic/inc/basic/sbobjmod.hxx
+++ b/basic/inc/basic/sbobjmod.hxx
@@ -40,8 +40,8 @@ protected:
 
 public:
     TYPEINFO();
-    SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible );
-    virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t );
+    SbObjModule( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible );
+    virtual SbxVariable* Find( const OUString& rName, SbxClassType t );
 
     virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
                              const SfxHint& rHint, const TypeId& rHintType );
@@ -59,21 +59,21 @@ class BASIC_DLLPUBLIC SbUserFormModule : public SbObjModule
     ::rtl::Reference< FormObjEventListenerImpl > m_DialogListener;
     css::uno::Reference<css::awt::XDialog> m_xDialog;
     css::uno::Reference<css::frame::XModel> m_xModel;
-    String sFormName;
+    OUString sFormName;
     bool mbInit;
 
 //protected:
     virtual void InitObject();
 public:
     TYPEINFO();
-    SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
+    SbUserFormModule( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
     virtual ~SbUserFormModule();
-    virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t );
+    virtual SbxVariable* Find( const OUString& rName, SbxClassType t );
     void ResetApiObj( bool bTriggerTerminateEvent = true );
     void Unload();
     void Load();
-    void triggerMethod( const String& );
-    void triggerMethod( const String&, css::uno::Sequence< css::uno::Any >&  );
+    void triggerMethod( const OUString& );
+    void triggerMethod( const OUString&, css::uno::Sequence< css::uno::Any >&  );
     void triggerActivateEvent();
     void triggerDeactivateEvent();
     void triggerInitializeEvent();
@@ -94,11 +94,11 @@ class BASIC_DLLPUBLIC SbUserFormModuleInstance : public SbUserFormModule
     SbUserFormModule* m_pParentModule;
 
 public:
-    SbUserFormModuleInstance( SbUserFormModule* pParentModule, const rtl::OUString& rName,
+    SbUserFormModuleInstance( SbUserFormModule* pParentModule, const OUString& rName,
         const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
 
-    virtual sal_Bool IsClass( const rtl::OUString& ) const;
-    virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t );
+    virtual sal_Bool IsClass( const OUString& ) const;
+    virtual SbxVariable* Find( const OUString& rName, SbxClassType t );
 };
 
 #endif
diff --git a/basic/inc/basic/sbprop.hxx b/basic/inc/basic/sbprop.hxx
index 3e66f7e..463fd5d 100644
--- a/basic/inc/basic/sbprop.hxx
+++ b/basic/inc/basic/sbprop.hxx
@@ -33,7 +33,7 @@ class BASIC_DLLPUBLIC SbProperty : public SbxProperty
     friend class SbProcedureProperty;
     SbModule* pMod;
     sal_Bool     bInvalid;
-    BASIC_DLLPRIVATE SbProperty( const String&, SbxDataType, SbModule* );
+    BASIC_DLLPRIVATE SbProperty( const OUString&, SbxDataType, SbModule* );
     virtual ~SbProperty();
 public:
     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICPROP,1);
@@ -50,7 +50,7 @@ class BASIC_DLLPUBLIC SbProcedureProperty : public SbxProperty
     virtual ~SbProcedureProperty();
 
 public:
-    SbProcedureProperty( const String& r, SbxDataType t )
+    SbProcedureProperty( const OUString& r, SbxDataType t )
             : SbxProperty( r, t ) // , pMod( p )
             , mbSet( false )
     {}
diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx
index af3fa60..c84b624 100644
--- a/basic/inc/basic/sbstar.hxx
+++ b/basic/inc/basic/sbstar.hxx
@@ -69,17 +69,16 @@ class BASIC_DLLPUBLIC StarBASIC : public SbxObject
     BASIC_DLLPRIVATE void implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic );
 
 protected:
-    sal_Bool            CError( SbError, const ::rtl::OUString&, xub_StrLen, xub_StrLen, xub_StrLen );
+    sal_Bool            CError( SbError, const OUString&, sal_Int32, sal_Int32, sal_Int32 );
 private:
-    BASIC_DLLPRIVATE sal_Bool           RTError( SbError, xub_StrLen, xub_StrLen, xub_StrLen );
-    BASIC_DLLPRIVATE sal_Bool           RTError( SbError, const String& rMsg, xub_StrLen, xub_StrLen, xub_StrLen );
-    BASIC_DLLPRIVATE sal_uInt16             BreakPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 );
-    BASIC_DLLPRIVATE sal_uInt16             StepPoint( xub_StrLen nLine, xub_StrLen nCol1, xub_StrLen nCol2 );
+    BASIC_DLLPRIVATE sal_Bool           RTError( SbError, sal_Int32, sal_Int32, sal_Int32 );
+    BASIC_DLLPRIVATE sal_Bool           RTError( SbError, const OUString& rMsg, sal_Int32, sal_Int32, sal_Int32 );
+    BASIC_DLLPRIVATE sal_uInt16         BreakPoint( sal_Int32 nLine, sal_Int32 nCol1, sal_Int32 nCol2 );
+    BASIC_DLLPRIVATE sal_uInt16         StepPoint( sal_Int32 nLine, sal_Int32 nCol1, sal_Int32 nCol2 );
     virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
     virtual sal_Bool StoreData( SvStream& ) const;
 
 protected:
-
     virtual sal_Bool    ErrorHdl();
     virtual sal_uInt16  BreakHdl();
     virtual ~StarBASIC();
@@ -107,27 +106,27 @@ public:
     void            SetLibInfo( BasicLibInfo* p )   { pLibInfo = p;     }
 
     // Compiler-Interface
-    SbModule*       MakeModule( const String& rName, const String& rSrc );
-    SbModule*       MakeModule32( const String& rName, const ::rtl::OUString& rSrc );
-    SbModule*       MakeModule32( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, const ::rtl::OUString& rSrc );
-    sal_Bool            Compile( SbModule* );
+    SbModule*       MakeModule( const OUString& rName, const OUString& rSrc );
+    SbModule*       MakeModule32( const OUString& rName, const OUString& rSrc );
+    SbModule*       MakeModule32( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, const OUString& rSrc );
+    sal_Bool        Compile( SbModule* );
     static void     Stop();
     static void     Error( SbError );
-    static void     Error( SbError, const String& rMsg );
+    static void     Error( SbError, const OUString& rMsg );
     static void     FatalError( SbError );
-    static void     FatalError( SbError, const String& rMsg );
+    static void     FatalError( SbError, const OUString& rMsg );
     static bool     IsRunning();
     static SbError  GetErrBasic();
     // #66536 make additional message accessible by RTL function Error
-    static String   GetErrorMsg();
-    static xub_StrLen GetErl();
+    static OUString GetErrorMsg();
+    static sal_Int32 GetErl();
 
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
-    virtual sal_Bool Call( const String&, SbxArray* = NULL );
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
+    virtual sal_Bool Call( const OUString&, SbxArray* = NULL );
 
     SbxArray*       GetModules() { return pModules; }
     SbxObject*      GetRtl()     { return pRtl;     }
-    SbModule*       FindModule( const String& );
+    SbModule*       FindModule( const OUString& );
     // Run init code of all modules (including the inserted Doc-Basics)
     void            InitAllModules( StarBASIC* pBasicNotToInit = NULL );
     void            DeInitAllModules( void );
@@ -141,11 +140,11 @@ public:
                                   sal_uInt16 nCol1, sal_uInt16 nCol2 );
 
     // Specific to error handler
-    static void     MakeErrorText( SbError, const ::rtl::OUString& aMsg );
-    static const    String& GetErrorText();
+    static void     MakeErrorText( SbError, const OUString& aMsg );
+    static const    OUString& GetErrorText();
     static SbError  GetErrorCode();
     static bool     IsCompilerError();
-    static sal_uInt16   GetVBErrorCode( SbError nError );
+    static sal_uInt16 GetVBErrorCode( SbError nError );
     static SbError  GetSfxFromVBError( sal_uInt16 nError );
     bool            IsBreak() const             { return bBreak; }
 
@@ -160,7 +159,7 @@ public:
 
     SbxArrayRef     getUnoListeners( void );
 
-    static SbxBase* FindSBXInCurrentScope( const String& rName );
+    static SbxBase* FindSBXInCurrentScope( const OUString& rName );
     static SbMethod* GetActiveMethod( sal_uInt16 nLevel = 0 );
     static SbModule* GetActiveModule();
     void SetVBAEnabled( bool bEnabled );
@@ -168,7 +167,7 @@ public:
 
     SbxObjectRef getRTL( void ) { return pRtl; }
     bool IsDocBasic() { return bDocBasic; }
-    SbxVariable* VBAFind( const rtl::OUString& rName, SbxClassType t );
+    SbxVariable* VBAFind( const OUString& rName, SbxClassType t );
     bool GetUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut );
     void QuitAndExitApplication();
     bool IsQuitApplication() { return bQuit; };
diff --git a/basic/inc/basic/sbstdobj.hxx b/basic/inc/basic/sbstdobj.hxx
index cd04364..75a5a6e 100644
--- a/basic/inc/basic/sbstdobj.hxx
+++ b/basic/inc/basic/sbstdobj.hxx
@@ -33,7 +33,7 @@ class BASIC_DLLPUBLIC SbStdFactory : public SbxFactory
 public:
     SbStdFactory();
 
-    virtual SbxObject*  CreateObject( const rtl::OUString& rClassName );
+    virtual SbxObject*  CreateObject( const OUString& rClassName );
 };
 
 //--------------------
@@ -56,7 +56,7 @@ public:
     TYPEINFO();
 
     SbStdPicture();
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
 
     Graphic GetGraphic() const { return aGraphic; }
     void    SetGraphic( const Graphic& rGrf ) { aGraphic = rGrf; }
@@ -73,7 +73,7 @@ protected:
     sal_Bool    bStrikeThrough;
     sal_Bool    bUnderline;
     sal_uInt16  nSize;
-    String  aName;
+    OUString  aName;
 
    ~SbStdFont();
     virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
@@ -90,20 +90,20 @@ public:
     TYPEINFO();
 
     SbStdFont();
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
-
-    void    SetBold( sal_Bool bB ) { bBold = bB; }
-    sal_Bool    IsBold() const { return bBold; }
-    void    SetItalic( sal_Bool bI ) { bItalic = bI; }
-    sal_Bool    IsItalic() const { return bItalic; }
-    void    SetStrikeThrough( sal_Bool bS ) { bStrikeThrough = bS; }
-    sal_Bool    IsStrikeThrough() const { return bStrikeThrough; }
-    void    SetUnderline( sal_Bool bU ) { bUnderline = bU; }
-    sal_Bool    IsUnderline() const { return bUnderline; }
-    void    SetSize( sal_uInt16 nS ) { nSize = nS; }
-    sal_uInt16  GetSize() const { return nSize; }
-    void    SetFontName( const String& rName ) { aName = rName; }
-    String  GetFontName() const { return aName; }
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
+
+    void     SetBold( sal_Bool bB ) { bBold = bB; }
+    sal_Bool IsBold() const { return bBold; }
+    void     SetItalic( sal_Bool bI ) { bItalic = bI; }
+    sal_Bool IsItalic() const { return bItalic; }
+    void     SetStrikeThrough( sal_Bool bS ) { bStrikeThrough = bS; }
+    sal_Bool IsStrikeThrough() const { return bStrikeThrough; }
+    void     SetUnderline( sal_Bool bU ) { bUnderline = bU; }
+    sal_Bool IsUnderline() const { return bUnderline; }
+    void     SetSize( sal_uInt16 nS ) { nSize = nS; }
+    sal_uInt16 GetSize() const { return nSize; }
+    void     SetFontName( const OUString& rName ) { aName = rName; }
+    OUString GetFontName() const { return aName; }
 };
 
 //----------------------
@@ -128,7 +128,7 @@ public:
     TYPEINFO();
 
     SbStdClipboard();
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
 };
 
 #endif
diff --git a/basic/inc/basic/sbuno.hxx b/basic/inc/basic/sbuno.hxx
index 9c30991..55d487a 100644
--- a/basic/inc/basic/sbuno.hxx
+++ b/basic/inc/basic/sbuno.hxx
@@ -27,7 +27,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
-BASIC_DLLPUBLIC SbxObjectRef GetSbUnoObject( const ::rtl::OUString& aName, const com::sun::star::uno::Any& aUnoObj_ );
+BASIC_DLLPUBLIC SbxObjectRef GetSbUnoObject( const OUString& aName, const com::sun::star::uno::Any& aUnoObj_ );
 
 // Force creation of all properties for debugging
 BASIC_DLLPUBLIC void createAllObjectProperties( SbxObject* pObj );
diff --git a/basic/inc/basic/sbx.hxx b/basic/inc/basic/sbx.hxx
index f6e924e..d5fba15 100644
--- a/basic/inc/basic/sbx.hxx
+++ b/basic/inc/basic/sbx.hxx
@@ -33,7 +33,6 @@
 
 #include <boost/ptr_container/ptr_vector.hpp>
 
-class String;
 class SvStream;
 class SbxBase;
 class SbxVariable;
@@ -49,13 +48,13 @@ class SfxBroadcaster;
 // Parameter information
 struct SbxParamInfo
 {
-    const String aName;          // Name of the parameter
-    SbxBaseRef   aTypeRef;       // Object, if object type
-    SbxDataType  eType;          // Data type
-    sal_uInt16       nFlags;         // Flag-Bits
-    sal_uInt32       nUserData;      // IDs etc.
-    SbxParamInfo( const String& s, SbxDataType t, sal_uInt16 n, SbxBase* b = NULL )
-    : aName( s ), aTypeRef( b ), eType( t ), nFlags( n ), nUserData( 0 ) {}
+    const OUString aName;          // Name of the parameter
+    SbxBaseRef     aTypeRef;       // Object, if object type
+    SbxDataType    eType;          // Data type
+    sal_uInt16     nFlags;         // Flag-Bits
+    sal_uInt32     nUserData;      // IDs etc.
+    SbxParamInfo( const OUString& s, SbxDataType t, sal_uInt16 n, SbxBase* b = NULL )
+        : aName( s ), aTypeRef( b ), eType( t ), nFlags( n ), nUserData( 0 ) {}
     ~SbxParamInfo() {}
 };
 
@@ -66,8 +65,8 @@ class BASIC_DLLPUBLIC SbxInfo : public SvRefBase
     friend class SbxVariable;
     friend class SbMethod;
 
-    String          aComment;
-    String          aHelpFile;
+    OUString        aComment;
+    OUString        aHelpFile;
     sal_uInt32      nHelpId;
     SbxParams       aParams;
 
@@ -77,16 +76,16 @@ protected:
     virtual ~SbxInfo();
 public:
     SbxInfo();
-    SbxInfo( const String&, sal_uInt32 );
+    SbxInfo( const OUString&, sal_uInt32 );
 
-    void                AddParam( const rtl::OUString&, SbxDataType, sal_uInt16=SBX_READ );
+    void                AddParam( const OUString&, SbxDataType, sal_uInt16=SBX_READ );
     const SbxParamInfo* GetParam( sal_uInt16 n ) const; // index starts with 1!
-    const String&       GetComment() const              { return aComment; }
-    const String&       GetHelpFile() const             { return aHelpFile; }
-    sal_uInt32              GetHelpId() const               { return nHelpId;   }
+    const OUString&     GetComment() const              { return aComment; }
+    const OUString&     GetHelpFile() const             { return aHelpFile; }
+    sal_uInt32          GetHelpId() const               { return nHelpId;   }
 
-    void                SetComment( const String& r )   { aComment = r; }
-    void                SetHelpFile( const String& r )  { aHelpFile = r; }
+    void                SetComment( const OUString& r )   { aComment = r; }
+    void                SetHelpFile( const OUString& r )  { aHelpFile = r; }
     void                SetHelpId( sal_uInt32 nId )         { nHelpId = nId; }
 };
 
@@ -142,28 +141,28 @@ public:
     SbxArray( const SbxArray& );
     SbxArray& operator=( const SbxArray& );
     virtual void Clear();
-    sal_uInt16 Count() const;
-    virtual SbxDataType GetType() const;
+    sal_uInt16           Count() const;
+    virtual SbxDataType  GetType() const;
     virtual SbxClassType GetClass() const;
-    SbxVariableRef& GetRef( sal_uInt16 );
-    SbxVariable* Get( sal_uInt16 );
-    void Put( SbxVariable*, sal_uInt16 );
-    void Insert( SbxVariable*, sal_uInt16 );
-    void Remove( sal_uInt16 );
-    void Remove( SbxVariable* );
-    void Merge( SbxArray* );
-    const String& GetAlias( sal_uInt16 );
-    void PutAlias( const String&, sal_uInt16 );
-    SbxVariable* FindUserData( sal_uInt32 nUserData );
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
+    SbxVariableRef&      GetRef( sal_uInt16 );
+    SbxVariable*         Get( sal_uInt16 );
+    void                 Put( SbxVariable*, sal_uInt16 );
+    void                 Insert( SbxVariable*, sal_uInt16 );
+    void                 Remove( sal_uInt16 );
+    void                 Remove( SbxVariable* );
+    void                 Merge( SbxArray* );
+    const OUString&      GetAlias( sal_uInt16 );
+    void                 PutAlias( const OUString&, sal_uInt16 );
+    SbxVariable*         FindUserData( sal_uInt32 nUserData );
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
 
     // Additional methods for 32-bit indices
-    sal_uInt32 Count32() const;
-    SbxVariableRef& GetRef32( sal_uInt32 );
-    SbxVariable* Get32( sal_uInt32 );
-    void Put32( SbxVariable*, sal_uInt32 );
-    void Insert32( SbxVariable*, sal_uInt32 );
-    void Remove32( sal_uInt32 );
+    sal_uInt32           Count32() const;
+    SbxVariableRef&      GetRef32( sal_uInt32 );
+    SbxVariable*         Get32( sal_uInt32 );
+    void                 Put32( SbxVariable*, sal_uInt32 );
+    void                 Insert32( SbxVariable*, sal_uInt32 );
+    void                 Remove32( sal_uInt32 );
 };
 
 // SbxDimArray is an array that can dimensioned using BASIC conventions.
@@ -229,19 +228,19 @@ protected:
 public:
     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_COLLECTION,1);
     TYPEINFO();
-    SbxCollection( const String& rClassname );
+    SbxCollection( const OUString& rClassname );
     SbxCollection( const SbxCollection& );
     SbxCollection& operator=( const SbxCollection& );
     virtual SbxVariable* FindUserData( sal_uInt32 nUserData );
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
     virtual void Clear();
 };
 
 class BASIC_DLLPUBLIC SbxStdCollection : public SbxCollection
 {
 protected:
-    String aElemClass;
-    sal_Bool   bAddRemoveOk;
+    OUString aElemClass;
+    sal_Bool bAddRemoveOk;
     virtual ~SbxStdCollection();
     virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
     virtual sal_Bool StoreData( SvStream& ) const;
@@ -250,12 +249,11 @@ protected:
 public:
     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_FIXCOLLECTION,1);
     TYPEINFO();
-    SbxStdCollection
-        ( const String& rClassname, const String& rElemClass, sal_Bool=sal_True );
+    SbxStdCollection( const OUString& rClassname, const OUString& rElemClass, sal_Bool=sal_True );
     SbxStdCollection( const SbxStdCollection& );
     SbxStdCollection& operator=( const SbxStdCollection& );
     virtual void Insert( SbxVariable* );
-    const String& GetElementClass() const { return aElemClass; }
+    const OUString& GetElementClass() const { return aElemClass; }
 };
 
 SV_IMPL_REF(SbxBase)
diff --git a/basic/inc/basic/sbxcore.hxx b/basic/inc/basic/sbxcore.hxx
index ce86fd6..5d45d4b 100644
--- a/basic/inc/basic/sbxcore.hxx
+++ b/basic/inc/basic/sbxcore.hxx
@@ -28,8 +28,6 @@
 #include "basicdllapi.h"
 
 class SvStream;
-class String;
-namespace rtl { class OUString; }
 
 // The following Macro defines four (five) necessary methods within a
 // SBX object. LoadPrivateData() and StorePrivateData() must be implemented.
diff --git a/basic/inc/basic/sbxform.hxx b/basic/inc/basic/sbxform.hxx
index 42ff9d6..589f3ec 100644
--- a/basic/inc/basic/sbxform.hxx
+++ b/basic/inc/basic/sbxform.hxx
@@ -75,7 +75,8 @@
 */
 #define _with_sprintf   // use a)
 
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
 #include "basicdllapi.h"
 
 class BASIC_DLLPUBLIC SbxBasicFormater {
@@ -83,14 +84,14 @@ class BASIC_DLLPUBLIC SbxBasicFormater {
     // Constructor takes signs for decimal point, thousand separation sign
     // and necessary resource strings.
     SbxBasicFormater( sal_Unicode _cDecPoint, sal_Unicode _cThousandSep,
-                      String _sOnStrg,
-                      String _sOffStrg,
-                      String _sYesStrg,
-                      String _sNoStrg,
-                      String _sTrueStrg,
-                      String _sFalseStrg,
-                      String _sCurrencyStrg,
-                      String _sCurrencyFormatStrg );
+                      OUString _sOnStrg,
+                      OUString _sOffStrg,
+                      OUString _sYesStrg,
+                      OUString _sNoStrg,
+                      OUString _sTrueStrg,
+                      OUString _sFalseStrg,
+                      OUString _sCurrencyStrg,
+                      OUString _sCurrencyFormatStrg );
 
     /* Basic command: Format$( number,format-string )
 
@@ -101,68 +102,67 @@ class BASIC_DLLPUBLIC SbxBasicFormater {
        Return value:
         String containing the formatted output
     */
-    String  BasicFormat( double dNumber, String sFormatStrg );
-    String  BasicFormatNull( String sFormatStrg );
+    OUString  BasicFormat( double dNumber, OUString sFormatStrg );
+    OUString  BasicFormatNull( OUString sFormatStrg );
 
-    static  sal_Bool isBasicFormat( String sFormatStrg );
+    static  sal_Bool isBasicFormat( OUString sFormatStrg );
 
   private:
-    BASIC_DLLPRIVATE inline void    ShiftString( String& sStrg, sal_uInt16 nStartPos );
-    BASIC_DLLPRIVATE inline void    StrAppendChar( String& sStrg, sal_Unicode ch );
-    BASIC_DLLPRIVATE void   AppendDigit( String& sStrg, short nDigit );
-    BASIC_DLLPRIVATE void   LeftShiftDecimalPoint( String& sStrg );
-    BASIC_DLLPRIVATE void   StrRoundDigit( String& sStrg, short nPos, sal_Bool& bOverflow );
-    BASIC_DLLPRIVATE void   StrRoundDigit( String& sStrg, short nPos );
-    BASIC_DLLPRIVATE void   ParseBack( String& sStrg, const String& sFormatStrg,
-                short nFormatPos );
+    BASIC_DLLPRIVATE inline void ShiftString( OUStringBuffer& sStrg, sal_uInt16 nStartPos );
+    BASIC_DLLPRIVATE void   AppendDigit( OUStringBuffer& sStrg, short nDigit );
+    BASIC_DLLPRIVATE void   LeftShiftDecimalPoint( OUStringBuffer& sStrg );
+    BASIC_DLLPRIVATE void   StrRoundDigit( OUStringBuffer& sStrg, short nPos, sal_Bool& bOverflow );
+    BASIC_DLLPRIVATE void   StrRoundDigit( OUStringBuffer& sStrg, short nPos );
+    BASIC_DLLPRIVATE void   ParseBack( OUStringBuffer& sStrg, const OUString& sFormatStrg,
+                                       short nFormatPos );
 #ifdef _with_sprintf
     // Methods for string conversion with sprintf():
     BASIC_DLLPRIVATE void   InitScan( double _dNum );
     BASIC_DLLPRIVATE void   InitExp( double _dNewExp );
     BASIC_DLLPRIVATE short  GetDigitAtPosScan( short nPos, sal_Bool& bFoundFirstDigit );
     BASIC_DLLPRIVATE short  GetDigitAtPosExpScan( double dNewExponent, short nPos,
-                sal_Bool& bFoundFirstDigit );
+                                                  sal_Bool& bFoundFirstDigit );
     BASIC_DLLPRIVATE short  GetDigitAtPosExpScan( short nPos, sal_Bool& bFoundFirstDigit );
 #else
     // Methods for direct 'calculation' with log10() and pow():
     BASIC_DLLPRIVATE short  GetDigitAtPos( double dNumber, short nPos, double& dNextNumber,
-                sal_Bool& bFoundFirstDigit );
+                                           sal_Bool& bFoundFirstDigit );
     BASIC_DLLPRIVATE short  RoundDigit( double dNumber );
 #endif
-    BASIC_DLLPRIVATE String GetPosFormatString( const String& sFormatStrg, sal_Bool & bFound );
-    BASIC_DLLPRIVATE String GetNegFormatString( const String& sFormatStrg, sal_Bool & bFound );
-    BASIC_DLLPRIVATE String Get0FormatString( const String& sFormatStrg, sal_Bool & bFound );
-    BASIC_DLLPRIVATE String GetNullFormatString( const String& sFormatStrg, sal_Bool & bFound );
-    BASIC_DLLPRIVATE short  AnalyseFormatString( const String& sFormatStrg,
-                short& nNoOfDigitsLeft, short& nNoOfDigitsRight,
-                short& nNoOfOptionalDigitsLeft,
-                short& nNoOfExponentDigits,
-                short& nNoOfOptionalExponentDigits,
-                sal_Bool& bPercent, sal_Bool& bCurrency, sal_Bool& bScientific,
-                sal_Bool& bGenerateThousandSeparator,
-                short& nMultipleThousandSeparators );
-    BASIC_DLLPRIVATE void   ScanFormatString( double dNumber, const String& sFormatStrg,
-                String& sReturnStrg, sal_Bool bCreateSign );
+    BASIC_DLLPRIVATE OUString GetPosFormatString( const OUString& sFormatStrg, sal_Bool & bFound );
+    BASIC_DLLPRIVATE OUString GetNegFormatString( const OUString& sFormatStrg, sal_Bool & bFound );
+    BASIC_DLLPRIVATE OUString Get0FormatString( const OUString& sFormatStrg, sal_Bool & bFound );
+    BASIC_DLLPRIVATE OUString GetNullFormatString( const OUString& sFormatStrg, sal_Bool & bFound );
+    BASIC_DLLPRIVATE short  AnalyseFormatString( const OUString& sFormatStrg,
+                                                 short& nNoOfDigitsLeft, short& nNoOfDigitsRight,
+                                                 short& nNoOfOptionalDigitsLeft,
+                                                 short& nNoOfExponentDigits,
+                                                 short& nNoOfOptionalExponentDigits,
+                                                 sal_Bool& bPercent, sal_Bool& bCurrency, sal_Bool& bScientific,
+                                                 sal_Bool& bGenerateThousandSeparator,
+                                                 short& nMultipleThousandSeparators );
+    BASIC_DLLPRIVATE void   ScanFormatString( double dNumber, const OUString& sFormatStrg,
+                                              OUString& sReturnStrg, sal_Bool bCreateSign );
 
     //*** Data ***
     sal_Unicode cDecPoint;      // sign for the decimal point
     sal_Unicode cThousandSep;   // sign for thousand delimiter
     // Text for output:
-    String  sOnStrg;
-    String  sOffStrg;
-    String  sYesStrg;
-    String  sNoStrg;
-    String  sTrueStrg;
-    String  sFalseStrg;
-    String  sCurrencyStrg;
-    String  sCurrencyFormatStrg;
+    OUString  sOnStrg;
+    OUString  sOffStrg;
+    OUString  sYesStrg;
+    OUString  sNoStrg;
+    OUString  sTrueStrg;
+    OUString  sFalseStrg;
+    OUString  sCurrencyStrg;
+    OUString  sCurrencyFormatStrg;
 
     //*** temporary data for scan loop ***
     //-----------------------------------------------
     // String containing the number in scientific format
-    String  sSciNumStrg;
+    OUString  sSciNumStrg;
     // String containing the exponent of the number
-    String  sNumExpStrg;
+    OUString  sNumExpStrg;
     double  dNum;           // the number that is scanned
     short   nNumExp;        // the exponent of the number
     short   nExpExp;        // the number of digits in the exponent
diff --git a/basic/inc/basic/sbxmeth.hxx b/basic/inc/basic/sbxmeth.hxx
index 3bdde98..227c00c 100644
--- a/basic/inc/basic/sbxmeth.hxx
+++ b/basic/inc/basic/sbxmeth.hxx
@@ -28,7 +28,7 @@ class BASIC_DLLPUBLIC SbxMethod : public SbxVariable
 public:
     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_METHOD,1);
     TYPEINFO();
-    SbxMethod( const String& r, SbxDataType t );
+    SbxMethod( const OUString& r, SbxDataType t );
     SbxMethod( const SbxMethod& r );
     ~SbxMethod();
     SbxMethod& operator=( const SbxMethod& r ) { SbxVariable::operator=( r ); return *this; }
diff --git a/basic/inc/basic/sbxobj.hxx b/basic/inc/basic/sbxobj.hxx
index 378ac20..2dc4aa7 100644
--- a/basic/inc/basic/sbxobj.hxx
+++ b/basic/inc/basic/sbxobj.hxx
@@ -35,8 +35,8 @@ protected:
     SbxArrayRef  pProps;                    // Properties
     SbxArrayRef  pObjs;                     // Objects
     SbxProperty* pDfltProp;                 // Default-Property
-    String       aClassName;                // Classname
-    String       aDfltPropName;
+    OUString     aClassName;                // Classname
+    OUString     aDfltPropName;
     virtual sal_Bool LoadData( SvStream&, sal_uInt16 );
     virtual sal_Bool StoreData( SvStream& ) const;
     virtual ~SbxObject();
@@ -45,41 +45,41 @@ protected:
 public:
     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_OBJECT,1);
     TYPEINFO();
-    SbxObject( const String& rClassname );
+    SbxObject( const OUString& rClassname );
     SbxObject( const SbxObject& );
     SbxObject& operator=( const SbxObject& );
     virtual SbxDataType GetType() const;
     virtual SbxClassType GetClass() const;
     virtual void Clear();
 
-    virtual sal_Bool  IsClass( const rtl::OUString& ) const;
-    const String& GetClassName() const { return aClassName; }
-    void          SetClassName( const String &rNew ) { aClassName = rNew; }
+    virtual sal_Bool  IsClass( const OUString& ) const;
+    const OUString& GetClassName() const { return aClassName; }
+    void SetClassName( const OUString &rNew ) { aClassName = rNew; }
     // Default-Property
     SbxProperty* GetDfltProperty();
-    void SetDfltProperty( const String& r );
+    void SetDfltProperty( const OUString& r );
     // Search for an element
     virtual SbxVariable* FindUserData( sal_uInt32 nUserData );
-    virtual SbxVariable* Find( const rtl::OUString&, SbxClassType );
-    SbxVariable* FindQualified( const String&, SbxClassType );
+    virtual SbxVariable* Find( const OUString&, SbxClassType );
+    SbxVariable* FindQualified( const OUString&, SbxClassType );
     // Quick-Call-Interface for Methods
-    virtual sal_Bool Call( const String&, SbxArray* = NULL );
+    virtual sal_Bool Call( const OUString&, SbxArray* = NULL );
     // Execution of DDE-Commands
-    SbxVariable* Execute( const String& );
+    SbxVariable* Execute( const OUString& );
     // Manage elements
     virtual sal_Bool GetAll( SbxClassType ) { return sal_True; }
-    SbxVariable* Make( const String&, SbxClassType, SbxDataType );
-    virtual SbxObject* MakeObject( const String&, const String& );
+    SbxVariable* Make( const OUString&, SbxClassType, SbxDataType );
+    virtual SbxObject* MakeObject( const OUString&, const OUString& );
     virtual void Insert( SbxVariable* );
     // AB 23.4.1997, Optimization, Insertion without check for duplicate Entries and
     // without Broadcasts, only used in SO2/auto.cxx
     void QuickInsert( SbxVariable* );
-    virtual void Remove( const String&, SbxClassType );
+    virtual void Remove( const OUString&, SbxClassType );
     virtual void Remove( SbxVariable* );
 
     // Macro-Recording
-    virtual String GenerateSource( const String &rLinePrefix,
-                                   const SbxObject *pRelativeTo );
+    virtual OUString GenerateSource( const OUString &rLinePrefix,
+                                     const SbxObject *pRelativeTo );
     // Direct access on arrays
     SbxArray* GetMethods()      { return pMethods;  }
     SbxArray* GetProperties()   { return pProps;    }
diff --git a/basic/inc/basic/sbxprop.hxx b/basic/inc/basic/sbxprop.hxx
index 34e5877..89d774d 100644
--- a/basic/inc/basic/sbxprop.hxx
+++ b/basic/inc/basic/sbxprop.hxx
@@ -28,7 +28,7 @@ class BASIC_DLLPUBLIC SbxProperty : public SbxVariable
 public:
     SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_PROPERTY,1);
     TYPEINFO();
-    SbxProperty( const String& r, SbxDataType t );
+    SbxProperty( const OUString& r, SbxDataType t );
     SbxProperty( const SbxProperty& r ) : SvRefBase( r ), SbxVariable( r ) {}
     virtual ~SbxProperty();
     SbxProperty& operator=( const SbxProperty& r )
diff --git a/basic/inc/basic/sbxvar.hxx b/basic/inc/basic/sbxvar.hxx
index c02c2a1..4d4a8b6 100644
--- a/basic/inc/basic/sbxvar.hxx
+++ b/basic/inc/basic/sbxvar.hxx
@@ -21,7 +21,6 @@
 #define SBXVAR_HXX
 
 #include <rtl/ustring.hxx>
-#include <tools/string.hxx>
 #include <com/sun/star/bridge/oleautomation/Decimal.hpp>
 #include <basic/sbxcore.hxx>
 #include "basicdllapi.h"
@@ -46,7 +45,7 @@ struct SbxValues
         float           nSingle;
         double          nDouble;
 
-        rtl::OUString*  pOUString;
+        OUString*       pOUString;
         SbxDecimal*     pDecimal;
 
         SbxBase*        pObj;
@@ -81,7 +80,7 @@ struct SbxValues
     SbxValues( unsigned int _nUInt ): nUInt( _nUInt ), eType(SbxUINT) {}
     SbxValues( float _nSingle ): nSingle( _nSingle ), eType(SbxSINGLE) {}
     SbxValues( double _nDouble ): nDouble( _nDouble ), eType(SbxDOUBLE) {}
-    SbxValues( const ::rtl::OUString* _pString ): pOUString( (::rtl::OUString*)_pString ), eType(SbxSTRING) {}
+    SbxValues( const OUString* _pString ): pOUString( (OUString*)_pString ), eType(SbxSTRING) {}
     SbxValues( SbxBase* _pObj ): pObj( _pObj ), eType(SbxOBJECT) {}
     SbxValues( sal_Unicode* _pChar ): pChar( _pChar ), eType(SbxLPSTR) {}
     SbxValues( void* _pData ): pData( _pData ), eType(SbxPOINTER) {}
@@ -95,8 +94,8 @@ class BASIC_DLLPUBLIC SbxValue : public SbxBase
     BASIC_DLLPRIVATE SbxValue* TheRealValue() const;
 protected:
     SbxValues aData; // Data
-    ::rtl::OUString aPic;  // Picture-String
-    String          aToolString;  // tool string copy
+    OUString aPic;  // Picture-String
+    OUString aToolString;  // tool string copy
 
     virtual void Broadcast( sal_uIntPtr );      // Broadcast-Call
     virtual ~SbxValue();
@@ -160,10 +159,9 @@ public:
     double      GetDouble() const;
     double      GetDate() const;
 
-    sal_Bool   GetBool() const;
-    const String&   GetString() const;
-    const String&   GetCoreString() const;
-    rtl::OUString   GetOUString() const;
+    sal_Bool    GetBool() const;
+    const OUString&   GetCoreString() const;
+    OUString    GetOUString() const;
 
     SbxBase*    GetObject() const;
     sal_uInt8   GetByte() const;
@@ -177,10 +175,10 @@ public:
     sal_Bool PutDate( double );
     sal_Bool PutBool( sal_Bool );
     sal_Bool PutErr( sal_uInt16 );
-    sal_Bool PutStringExt( const ::rtl::OUString& );     // with extended analysis (International, "sal_True"/"sal_False")
+    sal_Bool PutStringExt( const OUString& );     // with extended analysis (International, "sal_True"/"sal_False")
     sal_Bool PutInt64( sal_Int64 );
     sal_Bool PutUInt64( sal_uInt64 );
-    sal_Bool PutString( const ::rtl::OUString& );
+    sal_Bool PutString( const OUString& );
     sal_Bool PutChar( sal_Unicode );
     sal_Bool PutByte( sal_uInt8 );
     sal_Bool PutUShort( sal_uInt16 );
@@ -194,15 +192,15 @@ public:
     sal_Bool fillAutomationDecimal( com::sun::star::bridge::oleautomation::Decimal& rAutomationDec );
     sal_Bool PutCurrency( const sal_Int64& );
             // Interface for CDbl in Basic
-    static SbxError ScanNumIntnl( const String& rSrc, double& nVal, bool bSingle = false );
+    static SbxError ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle = false );
 
     sal_Bool PutObject( SbxBase* );
 
     virtual sal_Bool Convert( SbxDataType );
     virtual sal_Bool Compute( SbxOperator, const SbxValue& );
     virtual sal_Bool Compare( SbxOperator, const SbxValue& ) const;
-    sal_Bool Scan( const String&, sal_uInt16* = NULL );
-    void Format( String&, const String* = NULL ) const;
+    sal_Bool Scan( const OUString&, sal_uInt16* = NULL );
+    void Format( OUString&, const OUString* = NULL ) const;
 
     // The following operators are definied for easier handling.
     // TODO: Ensure error conditions (overflow, conversions)
@@ -291,7 +289,7 @@ class BASIC_DLLPUBLIC SbxVariable : public SbxValue
 
     SbxVariableImpl* mpSbxVariableImpl; // Impl data
     SfxBroadcaster*  pCst;              // Broadcaster, if needed
-    String           maName;            // Name, if available
+    OUString         maName;            // Name, if available
     SbxArrayRef      mpPar;             // Parameter-Array, if set
     sal_uInt16       nHash;             // Hash-ID for search
 
@@ -314,8 +312,8 @@ public:
 
     void Dump( SvStream&, sal_Bool bDumpAll=sal_False );
 
-    virtual void SetName( const String& );
-    virtual const String& GetName( SbxNameType = SbxNAME_NONE ) const;
+    virtual void SetName( const OUString& );
+    virtual const OUString& GetName( SbxNameType = SbxNAME_NONE ) const;
     sal_uInt16 GetHashCode() const          { return nHash; }
 
     virtual void SetModified( sal_Bool );
@@ -342,13 +340,13 @@ public:
     SbxObject* GetParent();
     virtual void SetParent( SbxObject* );
 
-    const String& GetDeclareClassName( void );
-    void SetDeclareClassName( const String& );
+    const OUString& GetDeclareClassName( void );
+    void SetDeclareClassName( const OUString& );
     void SetComListener( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xComListener,
-        StarBASIC* pParentBasic );
+                         StarBASIC* pParentBasic );
     void ClearComListener( void );
 
-    static sal_uInt16 MakeHashCode( const String& rName );
+    static sal_uInt16 MakeHashCode( const OUString& rName );
 };
 
 SV_DECL_REF(SbxVariable)
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 98b6425..d177d73 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -143,17 +143,17 @@ typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListen
 class BasMgrContainerListenerImpl: public ContainerListenerHelper
 {
     BasicManager* mpMgr;
-    ::rtl::OUString maLibName;      // empty -> no lib, but lib container
+    OUString maLibName;      // empty -> no lib, but lib container
 
 public:
-    BasMgrContainerListenerImpl( BasicManager* pMgr, ::rtl::OUString aLibName )
+    BasMgrContainerListenerImpl( BasicManager* pMgr, OUString aLibName )
         : mpMgr( pMgr )
         , maLibName( aLibName ) {}
 
     static void insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, BasicManager* pMgr,
-        uno::Any aLibAny, ::rtl::OUString aLibName );
+                                   uno::Any aLibAny, OUString aLibName );
     static void addLibraryModulesImpl( BasicManager* pMgr, uno::Reference< container::XNameAccess > xLibNameAccess,
-        ::rtl::OUString aLibName );
+                                       OUString aLibName );
 
 
     // XEventListener
@@ -175,7 +175,7 @@ public:
 //============================================================================
 
 void BasMgrContainerListenerImpl::insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont,
-    BasicManager* pMgr, uno::Any aLibAny, ::rtl::OUString aLibName )
+    BasicManager* pMgr, uno::Any aLibAny, OUString aLibName )
 {
     Reference< container::XNameAccess > xLibNameAccess;
     aLibAny >>= xLibNameAccess;
@@ -208,21 +208,21 @@ void BasMgrContainerListenerImpl::insertLibraryImpl( const uno::Reference< scrip
 
 
 void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr,
-    uno::Reference< container::XNameAccess > xLibNameAccess, ::rtl::OUString aLibName )
+    uno::Reference< container::XNameAccess > xLibNameAccess, OUString aLibName )
 {
-    uno::Sequence< ::rtl::OUString > aModuleNames = xLibNameAccess->getElementNames();
+    uno::Sequence< OUString > aModuleNames = xLibNameAccess->getElementNames();
     sal_Int32 nModuleCount = aModuleNames.getLength();
 
     StarBASIC* pLib = pMgr->GetLib( aLibName );
     DBG_ASSERT( pLib, "BasMgrContainerListenerImpl::addLibraryModulesImpl: Unknown lib!");
     if( pLib )
     {
-        const ::rtl::OUString* pNames = aModuleNames.getConstArray();
+        const OUString* pNames = aModuleNames.getConstArray();
         for( sal_Int32 j = 0 ; j < nModuleCount ; j++ )
         {
-            ::rtl::OUString aModuleName = pNames[ j ];
+            OUString aModuleName = pNames[ j ];
             uno::Any aElement = xLibNameAccess->getByName( aModuleName );
-            ::rtl::OUString aMod;
+            OUString aMod;
             aElement >>= aMod;
             uno::Reference< vba::XVBAModuleInfo > xVBAModuleInfo( xLibNameAccess, uno::UNO_QUERY );
             if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aModuleName ) )
@@ -257,7 +257,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
     throw( uno::RuntimeException )
 {
     sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
-    ::rtl::OUString aName;
+    OUString aName;
     Event.Accessor >>= aName;
 
     if( bLibContainer )
@@ -282,7 +282,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
             SbModule* pMod = pLib->FindModule( aName );
             if( !pMod )
             {
-            ::rtl::OUString aMod;
+            OUString aMod;
             Event.Element >>= aMod;
                 uno::Reference< vba::XVBAModuleInfo > xVBAModuleInfo( Event.Source, uno::UNO_QUERY );
                 if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) )
@@ -303,7 +303,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
 void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::ContainerEvent& Event )
     throw( uno::RuntimeException )
 {
-    ::rtl::OUString aName;
+    OUString aName;
     Event.Accessor >>= aName;
 
     // Replace not possible for library container
@@ -316,7 +316,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::Con
     if( pLib )
     {
         SbModule* pMod = pLib->FindModule( aName );
-        ::rtl::OUString aMod;
+        OUString aMod;
         Event.Element >>= aMod;
 
         if( pMod )
@@ -333,7 +333,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::Con
 void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const container::ContainerEvent& Event )
     throw( uno::RuntimeException )
 {
-    ::rtl::OUString aName;
+    OUString aName;
     Event.Accessor >>= aName;
 
     sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
@@ -380,7 +380,7 @@ class BasicLibInfo
 private:
     StarBASICRef    xLib;
     OUString          aLibName;
-    OUString          aStorageName;   // String is sufficient, unique at runtime
+    OUString          aStorageName;   // string is sufficient, unique at runtime
     OUString          aRelStorageName;
     OUString          aPassword;
 
@@ -529,8 +529,8 @@ BasicLibInfo::BasicLibInfo()
     bPasswordVerified   = sal_False;
     bDoLoad             = sal_False;
     mxScriptCont        = NULL;
-    aStorageName        = rtl::OUString(szImbedded);
-    aRelStorageName     = rtl::OUString(szImbedded);
+    aStorageName        = szImbedded;
+    aRelStorageName     = szImbedded;
 }
 
 BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
@@ -653,7 +653,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star
     else
     {
         ImpCreateStdLib( pParentFromStdLib );
-        if ( rStorage.IsStream( rtl::OUString(szOldManagerStream) ) )
+        if ( rStorage.IsStream( OUString(szOldManagerStream) ) )
             LoadOldBasicManager( rStorage );
     }
 }
@@ -786,8 +786,8 @@ BasicManager::BasicManager( StarBASIC* pSLib, OUString* pLibPath, bool bDocMgr )
     BasicLibInfo* pStdLibInfo = CreateLibInfo();
     pStdLibInfo->SetLib( pSLib );
     StarBASICRef xStdLib = pStdLibInfo->GetLib();
-    xStdLib->SetName(rtl::OUString(szStdLibName));
-    pStdLibInfo->SetLibName( rtl::OUString(szStdLibName) );
+    xStdLib->SetName(OUString(szStdLibName));
+    pStdLibInfo->SetLibName(OUString(szStdLibName) );
     pSLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
 
     // Save is only necessary if basic has changed
@@ -805,8 +805,8 @@ void BasicManager::ImpMgrNotLoaded( const OUString& rStorageName )
     BasicLibInfo* pStdLibInfo = CreateLibInfo();
     pStdLibInfo->SetLib( new StarBASIC( NULL, mbDocMgr ) );
     StarBASICRef xStdLib = pStdLibInfo->GetLib();
-    xStdLib->SetName( rtl::OUString(szStdLibName) );
-    pStdLibInfo->SetLibName( rtl::OUString(szStdLibName) );
+    xStdLib->SetName( OUString(szStdLibName) );
+    pStdLibInfo->SetLibName( OUString(szStdLibName) );
     xStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
     xStdLib->SetModified( sal_False );
 }
@@ -817,8 +817,8 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib )
     BasicLibInfo* pStdLibInfo = CreateLibInfo();
     StarBASIC* pStdLib = new StarBASIC( pParentFromStdLib, mbDocMgr );
     pStdLibInfo->SetLib( pStdLib );
-    pStdLib->SetName( rtl::OUString(szStdLibName) );
-    pStdLibInfo->SetLibName( rtl::OUString(szStdLibName) );
+    pStdLib->SetName( OUString(szStdLibName) );
+    pStdLibInfo->SetLibName( OUString(szStdLibName) );
     pStdLib->SetFlag( SBX_DONTSTORE | SBX_EXTSEARCH );
 }
 
@@ -898,7 +898,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
         // Libs from external files should be loaded only when necessary.
         // But references are loaded at once, otherwise some big customers get into trouble
         if ( bLoadLibs && pInfo->DoLoad() &&
-            ( ( !pInfo->IsExtern() ) || ( pInfo->IsReference() ) ) )
+            ( !pInfo->IsExtern() ||  pInfo->IsReference()))
         {
             ImpLoadLibrary( pInfo, &rStorage );
         }
@@ -1144,7 +1144,7 @@ sal_Bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurS
                         xBasicStream->GetStreamCharSet());
                     pLibInfo->SetPassword( aPassword );
                 }
-                xBasicStream->SetCryptMaskKey(rtl::OString());
+                xBasicStream->SetCryptMaskKey(OString());
                 CheckModules( pLibInfo->GetLib(), pLibInfo->IsReference() );
             }
             return bLoaded;
@@ -1203,7 +1203,7 @@ sal_Bool BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic )
     }
     if ( bProtected )
     {
-        rStrm.SetCryptMaskKey(rtl::OString());
+        rStrm.SetCryptMaskKey(OString());
     }
     return bLoaded;
 }
@@ -1275,7 +1275,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName,
         else
         {
             pLibInfo->GetLib()->SetModified( sal_True ); // Must be saved after Add!
-            pLibInfo->SetStorageName( rtl::OUString(szImbedded) ); // Save in BasicManager-Storage
+            pLibInfo->SetStorageName( OUString(szImbedded) ); // Save in BasicManager-Storage
         }
     }
     else
@@ -1666,16 +1666,16 @@ uno::Any BasicManager::SetGlobalUNOConstant( const sal_Char* _pAsciiName, const
     return aOldValue;
 }
 
-bool BasicManager::LegacyPsswdBinaryLimitExceeded( uno::Sequence< rtl::OUString >& _out_rModuleNames )
+bool BasicManager::LegacyPsswdBinaryLimitExceeded( uno::Sequence< OUString >& _out_rModuleNames )
 {
     try
     {
         uno::Reference< container::XNameAccess > xScripts( GetScriptLibraryContainer(), uno::UNO_QUERY_THROW );
         uno::Reference< script::XLibraryContainerPassword > xPassword( GetScriptLibraryContainer(), uno::UNO_QUERY_THROW );
 
-        uno::Sequence< ::rtl::OUString > aNames( xScripts->getElementNames() );
-        const ::rtl::OUString* pNames = aNames.getConstArray();
-        const ::rtl::OUString* pNamesEnd = aNames.getConstArray() + aNames.getLength();
+        uno::Sequence< OUString > aNames( xScripts->getElementNames() );
+        const OUString* pNames = aNames.getConstArray();
+        const OUString* pNamesEnd = aNames.getConstArray() + aNames.getLength();
         for ( ; pNames != pNamesEnd; ++pNames )
         {
             if( !xPassword->isLibraryPasswordProtected( *pNames ) )
@@ -1686,14 +1686,14 @@ bool BasicManager::LegacyPsswdBinaryLimitExceeded( uno::Sequence< rtl::OUString
                 continue;
 
             uno::Reference< container::XNameAccess > xScriptLibrary( xScripts->getByName( *pNames ), uno::UNO_QUERY_THROW );
-            uno::Sequence< ::rtl::OUString > aElementNames( xScriptLibrary->getElementNames() );
+            uno::Sequence< OUString > aElementNames( xScriptLibrary->getElementNames() );
             sal_Int32 nLen = aElementNames.getLength();
 
-            uno::Sequence< ::rtl::OUString > aBigModules( nLen );
+            uno::Sequence< OUString > aBigModules( nLen );
             sal_Int32 nBigModules = 0;
 
-            const ::rtl::OUString* pElementNames = aElementNames.getConstArray();
-            const ::rtl::OUString* pElementNamesEnd = aElementNames.getConstArray() + aElementNames.getLength();
+            const OUString* pElementNames = aElementNames.getConstArray();
+            const OUString* pElementNamesEnd = aElementNames.getConstArray() + aElementNames.getLength();
             for ( ; pElementNames != pElementNamesEnd; ++pElementNames )
             {
                 SbModule* pMod = pBasicLib->FindModule( *pElementNames );
@@ -1790,50 +1790,56 @@ ErrCode BasicManager::ExecuteMacro( OUString const& i_fullyQualifiedName, SbxArr
     return nError;
 }
 
-ErrCode BasicManager::ExecuteMacro( OUString const& i_fullyQualifiedName, String const& i_commaSeparatedArgs, SbxValue* i_retValue )
+ErrCode BasicManager::ExecuteMacro( OUString const& i_fullyQualifiedName, OUString const& i_commaSeparatedArgs, SbxValue* i_retValue )
 {
     SbMethod* pMethod = lcl_queryMacro( this, i_fullyQualifiedName );
     if ( !pMethod )
+    {
         return ERRCODE_BASIC_PROC_UNDEFINED;
-
+    }
     // arguments must be quoted
-    String sQuotedArgs;
-    String sArgs( i_commaSeparatedArgs );
-    if ( sArgs.Len()<2 || sArgs.GetBuffer()[1] == '\"')
+    OUString sQuotedArgs;
+    OUStringBuffer sArgs( i_commaSeparatedArgs );
+    if ( sArgs.getLength()<2 || sArgs[1] == '\"')
+    {
         // no args or already quoted args
-        sQuotedArgs = sArgs;
+        sQuotedArgs = sArgs.makeStringAndClear();
+    }
     else
     {
         // quote parameters
-        sArgs.Erase( 0, 1 );
-        sArgs.Erase( sArgs.Len()-1, 1 );
-
-        sQuotedArgs = '(';
+        sArgs.remove( 0, 1 );
+        sArgs.remove( sArgs.getLength() - 1, 1 );
 
-        sal_Int32 nCount = comphelper::string::getTokenCount(sArgs, ',');
-        for (sal_Int32 n=0; n < nCount; ++n)
+        sQuotedArgs = "(";
+        OUString sArgs2 = sArgs.makeStringAndClear();
+        sal_Int32 nCount = comphelper::string::getTokenCount(sArgs2, ',');
+        for (sal_Int32 n = 0; n < nCount; ++n)
         {
-            sQuotedArgs += '\"';
-            sQuotedArgs += comphelper::string::getToken(sArgs, n, ',');
-            sQuotedArgs += '\"';
-            if ( n<nCount-1 )
-                sQuotedArgs += ',';
+            sQuotedArgs += "\"";
+            sQuotedArgs += comphelper::string::getToken(sArgs2, n, ',');
+            sQuotedArgs += "\"";
+            if ( n < nCount - 1 )
+            {
+                sQuotedArgs += ",";
+            }
         }
 
-        sQuotedArgs += ')';
+        sQuotedArgs += ")";
     }
 
     // add quoted arguments and do the call
-    rtl::OUString sCall = rtl::OUStringBuffer().
-        append('[').
-        append(pMethod->GetName()).
-        append(sQuotedArgs).
-        append(']').
-        makeStringAndClear();
+    OUString sCall;
+    sCall += "[";
+    sCall += pMethod->GetName();
+    sCall += sQuotedArgs;
+    sCall += "]";
 
     SbxVariable* pRet = pMethod->GetParent()->Execute( sCall );
     if ( pRet && ( pRet != pMethod ) )
+    {
         *i_retValue = *pRet;
+    }
     return SbxBase::GetError();
 }
 
@@ -1841,20 +1847,20 @@ ErrCode BasicManager::ExecuteMacro( OUString const& i_fullyQualifiedName, String
 
 class ModuleInfo_Impl : public ModuleInfoHelper
 {
-    ::rtl::OUString maName;
-    ::rtl::OUString maLanguage;
-    ::rtl::OUString maSource;
+    OUString maName;
+    OUString maLanguage;
+    OUString maSource;
 
 public:
-    ModuleInfo_Impl( const ::rtl::OUString& aName, const ::rtl::OUString& aLanguage, const ::rtl::OUString& aSource )
+    ModuleInfo_Impl( const OUString& aName, const OUString& aLanguage, const OUString& aSource )
         : maName( aName ), maLanguage( aLanguage), maSource( aSource ) {}
 
     // Methods XStarBasicModuleInfo
-    virtual ::rtl::OUString SAL_CALL getName() throw(uno::RuntimeException)
+    virtual OUString SAL_CALL getName() throw(uno::RuntimeException)
         { return maName; }
-    virtual ::rtl::OUString SAL_CALL getLanguage() throw(uno::RuntimeException)
+    virtual OUString SAL_CALL getLanguage() throw(uno::RuntimeException)
         { return maLanguage; }
-    virtual ::rtl::OUString SAL_CALL getSource() throw(uno::RuntimeException)
+    virtual OUString SAL_CALL getSource() throw(uno::RuntimeException)
         { return maSource; }
 };
 
@@ -1863,15 +1869,15 @@ public:
 
 class DialogInfo_Impl : public DialogInfoHelper
 {
-    ::rtl::OUString maName;
+    OUString maName;
     uno::Sequence< sal_Int8 > mData;
 
 public:
-    DialogInfo_Impl( const ::rtl::OUString& aName, uno::Sequence< sal_Int8 > Data )
+    DialogInfo_Impl( const OUString& aName, uno::Sequence< sal_Int8 > Data )
         : maName( aName ), mData( Data ) {}
 
     // Methods XStarBasicDialogInfo
-    virtual ::rtl::OUString SAL_CALL getName() throw(uno::RuntimeException)
+    virtual OUString SAL_CALL getName() throw(uno::RuntimeException)
         { return maName; }
     virtual uno::Sequence< sal_Int8 > SAL_CALL getData() throw(uno::RuntimeException)
         { return mData; }
@@ -1882,22 +1888,22 @@ public:
 
 class LibraryInfo_Impl : public LibraryInfoHelper
 {
-    ::rtl::OUString maName;
+    OUString maName;
     uno::Reference< container::XNameContainer > mxModuleContainer;
     uno::Reference< container::XNameContainer > mxDialogContainer;
-    ::rtl::OUString maPassword;
-    ::rtl::OUString maExternaleSourceURL;
-    ::rtl::OUString maLinkTargetURL;
+    OUString maPassword;
+    OUString maExternaleSourceURL;
+    OUString maLinkTargetURL;
 
 public:
     LibraryInfo_Impl
     (
-        const ::rtl::OUString& aName,
+        const OUString& aName,
         uno::Reference< container::XNameContainer > xModuleContainer,
         uno::Reference< container::XNameContainer > xDialogContainer,
-        const ::rtl::OUString& aPassword,
-        const ::rtl::OUString& aExternaleSourceURL,
-        const ::rtl::OUString& aLinkTargetURL
+        const OUString& aPassword,
+        const OUString& aExternaleSourceURL,
+        const OUString& aLinkTargetURL
     )
         : maName( aName )
         , mxModuleContainer( xModuleContainer )
@@ -1908,17 +1914,17 @@ public:
     {}
 
     // Methods XStarBasicLibraryInfo
-    virtual ::rtl::OUString SAL_CALL getName() throw(uno::RuntimeException)
+    virtual OUString SAL_CALL getName() throw(uno::RuntimeException)
         { return maName; }
     virtual uno::Reference< container::XNameContainer > SAL_CALL getModuleContainer() throw(uno::RuntimeException)
         { return mxModuleContainer; }
     virtual uno::Reference< container::XNameContainer > SAL_CALL getDialogContainer() throw(uno::RuntimeException)
         { return mxDialogContainer; }
-    virtual ::rtl::OUString SAL_CALL getPassword() throw(uno::RuntimeException)
+    virtual OUString SAL_CALL getPassword() throw(uno::RuntimeException)
         { return maPassword; }
-    virtual ::rtl::OUString SAL_CALL getExternalSourceURL() throw(uno::RuntimeException)
+    virtual OUString SAL_CALL getExternalSourceURL() throw(uno::RuntimeException)
         { return maExternaleSourceURL; }
-    virtual ::rtl::OUString SAL_CALL getLinkTargetURL() throw(uno::RuntimeException)
+    virtual OUString SAL_CALL getLinkTargetURL() throw(uno::RuntimeException)
         { return maLinkTargetURL; }
 };
 
@@ -1939,23 +1945,23 @@ public:
         throw(uno::RuntimeException);
 
     // Methods XNameAccess
-    virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+    virtual uno::Any SAL_CALL getByName( const OUString& aName )
         throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
-    virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
+    virtual uno::Sequence< OUString > SAL_CALL getElementNames()
         throw(uno::RuntimeException);
-    virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
+    virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
         throw(uno::RuntimeException);
 
     // Methods XNameReplace
-    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement )
         throw(lang::IllegalArgumentException, container::NoSuchElementException,
               lang::WrappedTargetException, uno::RuntimeException);
 
     // Methods XNameContainer
-    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement )
         throw(lang::IllegalArgumentException, container::ElementExistException,
               lang::WrappedTargetException, uno::RuntimeException);
-    virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
+    virtual void SAL_CALL removeByName( const OUString& Name )
         throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 };
 
@@ -1975,7 +1981,7 @@ sal_Bool ModuleContainer_Impl::hasElements()
 }
 
 // Methods XNameAccess
-uno::Any ModuleContainer_Impl::getByName( const ::rtl::OUString& aName )
+uno::Any ModuleContainer_Impl::getByName( const OUString& aName )
     throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     SbModule* pMod = mpLib ? mpLib->FindModule( aName ) : NULL;
@@ -1988,22 +1994,22 @@ uno::Any ModuleContainer_Impl::getByName( const ::rtl::OUString& aName )
     return aRetAny;
 }
 
-uno::Sequence< ::rtl::OUString > ModuleContainer_Impl::getElementNames()
+uno::Sequence< OUString > ModuleContainer_Impl::getElementNames()
     throw(uno::RuntimeException)
 {
     SbxArray* pMods = mpLib ? mpLib->GetModules() : NULL;
     sal_uInt16 nMods = pMods ? pMods->Count() : 0;
-    uno::Sequence< ::rtl::OUString > aRetSeq( nMods );
-    ::rtl::OUString* pRetSeq = aRetSeq.getArray();
+    uno::Sequence< OUString > aRetSeq( nMods );
+    OUString* pRetSeq = aRetSeq.getArray();
     for( sal_uInt16 i = 0 ; i < nMods ; i++ )
     {
         SbxVariable* pMod = pMods->Get( i );
-        pRetSeq[i] = ::rtl::OUString( pMod->GetName() );
+        pRetSeq[i] = OUString( pMod->GetName() );
     }
     return aRetSeq;
 }
 
-sal_Bool ModuleContainer_Impl::hasByName( const ::rtl::OUString& aName )
+sal_Bool ModuleContainer_Impl::hasByName( const OUString& aName )
     throw(uno::RuntimeException)
 {
     SbModule* pMod = mpLib ? mpLib->FindModule( aName ) : NULL;
@@ -2013,7 +2019,7 @@ sal_Bool ModuleContainer_Impl::hasByName( const ::rtl::OUString& aName )
 
 
 // Methods XNameReplace
-void ModuleContainer_Impl::replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+void ModuleContainer_Impl::replaceByName( const OUString& aName, const uno::Any& aElement )
     throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     removeByName( aName );
@@ -2022,24 +2028,28 @@ void ModuleContainer_Impl::replaceByName( const ::rtl::OUString& aName, const un
 
 
 // Methods XNameContainer
-void ModuleContainer_Impl::insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+void ModuleContainer_Impl::insertByName( const OUString& aName, const uno::Any& aElement )
     throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException)
 {
     uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicModuleInfo > *)0 );
     uno::Type aAnyType = aElement.getValueType();
     if( aModuleType != aAnyType )
+    {
         throw lang::IllegalArgumentException();
+    }
     uno::Reference< script::XStarBasicModuleInfo > xMod;
     aElement >>= xMod;
     mpLib->MakeModule32( aName, xMod->getSource() );
 }
 
-void ModuleContainer_Impl::removeByName( const ::rtl::OUString& Name )
+void ModuleContainer_Impl::removeByName( const OUString& Name )
     throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     SbModule* pMod = mpLib ? mpLib->FindModule( Name ) : NULL;
     if( !pMod )
+    {
         throw container::NoSuchElementException();
+    }
     mpLib->Remove( pMod );
 }
 
@@ -2086,21 +2096,21 @@ public:
         throw(uno::RuntimeException);
 
     // Methods XNameAccess
-    virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+    virtual uno::Any SAL_CALL getByName( const OUString& aName )
         throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
-    virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
+    virtual uno::Sequence< OUString > SAL_CALL getElementNames()
         throw(uno::RuntimeException);
-    virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
+    virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
         throw(uno::RuntimeException);
 
     // Methods XNameReplace
-    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement )
         throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 
     // Methods XNameContainer
-    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement )
         throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
-    virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
+    virtual void SAL_CALL removeByName( const OUString& Name )
         throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 };
 
@@ -2132,7 +2142,7 @@ sal_Bool DialogContainer_Impl::hasElements()
 }
 
 // Methods XNameAccess
-uno::Any DialogContainer_Impl::getByName( const ::rtl::OUString& aName )
+uno::Any DialogContainer_Impl::getByName( const OUString& aName )
     throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxCLASS_DONTCARE );
@@ -2151,13 +2161,13 @@ uno::Any DialogContainer_Impl::getByName( const ::rtl::OUString& aName )
     return aRetAny;
 }
 
-uno::Sequence< ::rtl::OUString > DialogContainer_Impl::getElementNames()
+uno::Sequence< OUString > DialogContainer_Impl::getElementNames()
     throw(uno::RuntimeException)
 {
     mpLib->GetAll( SbxCLASS_OBJECT );
     sal_Int16 nCount = mpLib->GetObjects()->Count();
-    uno::Sequence< ::rtl::OUString > aRetSeq( nCount );
-    ::rtl::OUString* pRetSeq = aRetSeq.getArray();
+    uno::Sequence< OUString > aRetSeq( nCount );
+    OUString* pRetSeq = aRetSeq.getArray();
     sal_Int32 nDialogCounter = 0;
 
     for( sal_Int16 nObj = 0; nObj < nCount ; nObj++ )
@@ -2165,7 +2175,7 @@ uno::Sequence< ::rtl::OUString > DialogContainer_Impl::getElementNames()
         SbxVariable* pVar = mpLib->GetObjects()->Get( nObj );
         if ( pVar->ISA( SbxObject ) && ( ((SbxObject*)pVar)->GetSbxId() == SBXID_DIALOG ) )
         {
-            pRetSeq[ nDialogCounter ] = ::rtl::OUString( pVar->GetName() );
+            pRetSeq[ nDialogCounter ] = OUString( pVar->GetName() );
             nDialogCounter++;
         }
     }
@@ -2173,7 +2183,7 @@ uno::Sequence< ::rtl::OUString > DialogContainer_Impl::getElementNames()
     return aRetSeq;
 }
 
-sal_Bool DialogContainer_Impl::hasByName( const ::rtl::OUString& aName )
+sal_Bool DialogContainer_Impl::hasByName( const OUString& aName )
     throw(uno::RuntimeException)
 {
     sal_Bool bRet = sal_False;
@@ -2188,7 +2198,7 @@ sal_Bool DialogContainer_Impl::hasByName( const ::rtl::OUString& aName )
 
 
 // Methods XNameReplace
-void DialogContainer_Impl::replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+void DialogContainer_Impl::replaceByName( const OUString& aName, const uno::Any& aElement )
     throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     removeByName( aName );
@@ -2197,21 +2207,23 @@ void DialogContainer_Impl::replaceByName( const ::rtl::OUString& aName, const un
 
 
 // Methods XNameContainer
-void DialogContainer_Impl::insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+void DialogContainer_Impl::insertByName( const OUString& aName, const uno::Any& aElement )
     throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException)
 {
     (void)aName;
     uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicDialogInfo > *)0 );
     uno::Type aAnyType = aElement.getValueType();
     if( aModuleType != aAnyType )
+    {
         throw lang::IllegalArgumentException();
+    }
     uno::Reference< script::XStarBasicDialogInfo > xMod;
     aElement >>= xMod;
     SbxObjectRef xDialog = implCreateDialog( xMod->getData() );
     mpLib->Insert( xDialog );
 }
 
-void DialogContainer_Impl::removeByName( const ::rtl::OUString& Name )
+void DialogContainer_Impl::removeByName( const OUString& Name )
     throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     (void)Name;
@@ -2243,21 +2255,21 @@ public:
         throw(uno::RuntimeException);
 
     // Methods XNameAccess
-    virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+    virtual uno::Any SAL_CALL getByName( const OUString& aName )
         throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
-    virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
+    virtual uno::Sequence< OUString > SAL_CALL getElementNames()
         throw(uno::RuntimeException);
-    virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
+    virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
         throw(uno::RuntimeException);
 
     // Methods XNameReplace
-    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement )
         throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 
     // Methods XNameContainer
-    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement )
         throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
-    virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
+    virtual void SAL_CALL removeByName( const OUString& Name )
         throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 };
 
@@ -2279,7 +2291,7 @@ sal_Bool LibraryContainer_Impl::hasElements()
 }
 
 // Methods XNameAccess
-uno::Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
+uno::Any LibraryContainer_Impl::getByName( const OUString& aName )
     throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     uno::Any aRetAny;
@@ -2295,16 +2307,19 @@ uno::Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
 
     BasicLibInfo* pLibInfo = mpMgr->FindLibInfo( pLib );
 
-    ::rtl::OUString aPassword = pLibInfo->GetPassword();
+    OUString aPassword = pLibInfo->GetPassword();
 
     // TODO Only provide extern info!
-    ::rtl::OUString aExternaleSourceURL;
-    ::rtl::OUString aLinkTargetURL;
+    OUString aExternaleSourceURL;
+    OUString aLinkTargetURL;
     if( pLibInfo->IsReference() )
+    {
         aLinkTargetURL = pLibInfo->GetStorageName();
+    }
     else if( pLibInfo->IsExtern() )
+    {
         aExternaleSourceURL = pLibInfo->GetStorageName();
-
+    }
     uno::Reference< script::XStarBasicLibraryInfo > xLibInfo = new LibraryInfo_Impl
     (
         aName,
@@ -2319,20 +2334,20 @@ uno::Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
     return aRetAny;
 }
 
-uno::Sequence< ::rtl::OUString > LibraryContainer_Impl::getElementNames()
+uno::Sequence< OUString > LibraryContainer_Impl::getElementNames()
     throw(uno::RuntimeException)
 {
     sal_uInt16 nLibs = mpMgr->GetLibCount();
-    uno::Sequence< ::rtl::OUString > aRetSeq( nLibs );
-    ::rtl::OUString* pRetSeq = aRetSeq.getArray();
+    uno::Sequence< OUString > aRetSeq( nLibs );
+    OUString* pRetSeq = aRetSeq.getArray();
     for( sal_uInt16 i = 0 ; i < nLibs ; i++ )
     {
-        pRetSeq[i] = ::rtl::OUString( mpMgr->GetLibName( i ) );
+        pRetSeq[i] = OUString( mpMgr->GetLibName( i ) );
     }
     return aRetSeq;
 }
 
-sal_Bool LibraryContainer_Impl::hasByName( const ::rtl::OUString& aName )
+sal_Bool LibraryContainer_Impl::hasByName( const OUString& aName )
     throw(uno::RuntimeException)
 {
     sal_Bool bRet = mpMgr->HasLib( aName );
@@ -2340,7 +2355,7 @@ sal_Bool LibraryContainer_Impl::hasByName( const ::rtl::OUString& aName )
 }
 
 // Methods XNameReplace
-void LibraryContainer_Impl::replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+void LibraryContainer_Impl::replaceByName( const OUString& aName, const uno::Any& aElement )
     throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     removeByName( aName );
@@ -2348,7 +2363,7 @@ void LibraryContainer_Impl::replaceByName( const ::rtl::OUString& aName, const u
 }
 
 // Methods XNameContainer
-void LibraryContainer_Impl::insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+void LibraryContainer_Impl::insertByName( const OUString& aName, const uno::Any& aElement )
     throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException)
 {
     (void)aName;
@@ -2356,7 +2371,7 @@ void LibraryContainer_Impl::insertByName( const ::rtl::OUString& aName, const un
     // TODO: Insert a complete Library?!
 }
 
-void LibraryContainer_Impl::removeByName( const ::rtl::OUString& Name )
+void LibraryContainer_Impl::removeByName( const OUString& Name )
     throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     StarBASIC* pLib = mpMgr->GetLib( Name );
@@ -2386,13 +2401,13 @@ public:
     // Methods
     virtual uno::Reference< container::XNameContainer > SAL_CALL getLibraryContainer()
         throw(uno::RuntimeException);
-    virtual void SAL_CALL createLibrary( const ::rtl::OUString& LibName, const ::rtl::OUString& Password,
-        const ::rtl::OUString& ExternalSourceURL, const ::rtl::OUString& LinkTargetURL )
+    virtual void SAL_CALL createLibrary( const OUString& LibName, const OUString& Password,
+        const OUString& ExternalSourceURL, const OUString& LinkTargetURL )
             throw(container::ElementExistException, uno::RuntimeException);
-    virtual void SAL_CALL addModule( const ::rtl::OUString& LibraryName, const ::rtl::OUString& ModuleName,
-        const ::rtl::OUString& Language, const ::rtl::OUString& Source )
+    virtual void SAL_CALL addModule( const OUString& LibraryName, const OUString& ModuleName,
+        const OUString& Language, const OUString& Source )
             throw(container::NoSuchElementException, uno::RuntimeException);
-    virtual void SAL_CALL addDialog( const ::rtl::OUString& LibraryName, const ::rtl::OUString& DialogName,
+    virtual void SAL_CALL addDialog( const OUString& LibraryName, const OUString& DialogName,
         const uno::Sequence< sal_Int8 >& Data )
             throw(container::NoSuchElementException, uno::RuntimeException);
 };
@@ -2407,10 +2422,10 @@ uno::Reference< container::XNameContainer > SAL_CALL StarBasicAccess_Impl::getLi
 
 void SAL_CALL StarBasicAccess_Impl::createLibrary
 (
-    const ::rtl::OUString& LibName,
-    const ::rtl::OUString& Password,
-    const ::rtl::OUString& ExternalSourceURL,
-    const ::rtl::OUString& LinkTargetURL
+    const OUString& LibName,
+    const OUString& Password,
+    const OUString& ExternalSourceURL,
+    const OUString& LinkTargetURL
 )
     throw(container::ElementExistException, uno::RuntimeException)
 {
@@ -2424,10 +2439,10 @@ void SAL_CALL StarBasicAccess_Impl::createLibrary
 
 void SAL_CALL StarBasicAccess_Impl::addModule
 (
-    const ::rtl::OUString& LibraryName,
-    const ::rtl::OUString& ModuleName,
-    const ::rtl::OUString& Language,
-    const ::rtl::OUString& Source
+    const OUString& LibraryName,
+    const OUString& ModuleName,
+    const OUString& Language,
+    const OUString& Source
 )
     throw(container::NoSuchElementException, uno::RuntimeException)
 {
@@ -2442,8 +2457,8 @@ void SAL_CALL StarBasicAccess_Impl::addModule
 
 void SAL_CALL StarBasicAccess_Impl::addDialog
 (
-    const ::rtl::OUString& LibraryName,
-    const ::rtl::OUString& DialogName,
+    const OUString& LibraryName,
+    const OUString& DialogName,
     const uno::Sequence< sal_Int8 >& Data
 )
     throw(container::NoSuchElementException, uno::RuntimeException)
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx
index c5bd012..5572957 100644
--- a/basic/source/classes/errobject.cxx
+++ b/basic/source/classes/errobject.cxx
@@ -173,7 +173,7 @@ void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const u
 }
 
 // SbxErrObject
-SbxErrObject::SbxErrObject( const String& rName, const Any& rUnoObj )
+SbxErrObject::SbxErrObject( const OUString& rName, const Any& rUnoObj )
     : SbUnoObject( rName, rUnoObj )
     , m_pErrObject( NULL )
 {
@@ -202,11 +202,11 @@ SbxErrObject::getUnoErrObject()
 SbxVariableRef
 SbxErrObject::getErrObject()
 {
-    static SbxVariableRef pGlobErr = new SbxErrObject( String(  RTL_CONSTASCII_USTRINGPARAM("Err")), uno::makeAny( uno::Reference< vba::XErrObject >( new ErrObject() ) ) );
+    static SbxVariableRef pGlobErr = new SbxErrObject( OUString("Err"), uno::makeAny( uno::Reference< vba::XErrObject >( new ErrObject() ) ) );
     return pGlobErr;
 }
 
-void SbxErrObject::setNumberAndDescription( ::sal_Int32 _number, const ::rtl::OUString& _description )
+void SbxErrObject::setNumberAndDescription( ::sal_Int32 _number, const OUString& _description )
     throw (uno::RuntimeException)
 {
     if( m_pErrObject != NULL )
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 1d75670..cdc2239 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -153,8 +153,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
             {
                 for( sal_uInt16 j = 0 ; j < nCount ; j++ )
                 {
-                    String aTmp = r.ReadUniOrByteString(eCharSet);
-                    aOUSource += aTmp;
+                    aOUSource += r.ReadUniOrByteString(eCharSet);
                 }
                 break;
             }
@@ -209,8 +208,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
                     for( short j = 0; j < nStrings; j++ )
                     {
                         sal_uInt16 nOff2 = (sal_uInt16) pStringOff[ j ];
-                        String aStr( pByteStrings + nOff2, eCharSet );
-                        memcpy( pStrings + nOff2, aStr.GetBuffer(), (aStr.Len() + 1) * sizeof( sal_Unicode ) );
+                        OUString aStr( pByteStrings + nOff2, strlen(pByteStrings + nOff2), eCharSet );
+                        memcpy( pStrings + nOff2, aStr.getStr(), (aStr.getLength() + 1) * sizeof( sal_Unicode ) );
                     }
                     delete[] pByteStrings;
                 }
@@ -270,14 +269,14 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
        << (sal_Int32) 0;
 
     // Name?
-    if( aName.Len() && SbiGood( r ) )
+    if( !aName.isEmpty() && SbiGood( r ) )
     {
         nPos = SbiOpenRecord( r, B_NAME, 1 );
         r.WriteUniOrByteString( aName, eCharSet );
         SbiCloseRecord( r, nPos );
     }
     // Comment?
-    if( aComment.Len() && SbiGood( r ) )
+    if( !aComment.isEmpty() && SbiGood( r ) )
     {
         nPos = SbiOpenRecord( r, B_COMMENT, 1 );
         r.WriteUniOrByteString( aComment, eCharSet );
@@ -287,7 +286,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
     if( !aOUSource.isEmpty() && SbiGood( r ) )
     {
         nPos = SbiOpenRecord( r, B_SOURCE, 1 );
-        String aTmp;
+        OUString aTmp;
         sal_Int32 nLen = aOUSource.getLength();
         const sal_Int32 nMaxUnitSize = STRING_MAXLEN - 1;
         if( nLen > STRING_MAXLEN )
@@ -308,9 +307,8 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
             nPos = SbiOpenRecord( r, B_EXTSOURCE, nUnitCount );
             for( sal_uInt16 i = 0 ; i < nUnitCount ; i++ )
             {
-                sal_Int32 nCopyLen =
-                    (nRemainingLen > nMaxUnitSize) ? nMaxUnitSize : nRemainingLen;
-                String aTmp2 = aOUSource.copy( (i+1) * nMaxUnitSize, nCopyLen );
+                sal_Int32 nCopyLen = (nRemainingLen > nMaxUnitSize) ? nMaxUnitSize : nRemainingLen;
+                OUString aTmp2 = aOUSource.copy( (i+1) * nMaxUnitSize, nCopyLen );
                 nRemainingLen -= nCopyLen;
                 r.WriteUniOrByteString( aTmp2, eCharSet );
             }
@@ -399,7 +397,7 @@ void SbiImage::MakeStrings( short nSize )
 
 // Add a string to StringPool. The String buffer is dynamically
 // growing in 1K-Steps
-void SbiImage::AddString( const String& r )
+void SbiImage::AddString( const OUString& r )
 {
     if( nStringIdx >= nStrings )
     {
@@ -407,7 +405,7 @@ void SbiImage::AddString( const String& r )
     }
     if( !bError )
     {
-        xub_StrLen  len = r.Len() + 1;
+        sal_Int32  len = r.getLength() + 1;
         sal_uInt32 needed = nStringOff + len;
         if( needed > 0xFFFFFF00L )
         {
@@ -437,7 +435,7 @@ void SbiImage::AddString( const String& r )
         if( !bError )
         {
             pStringOff[ nStringIdx++ ] = nStringOff;
-            memcpy( pStrings + nStringOff, r.GetBuffer(), len * sizeof( sal_Unicode ) );
+            memcpy( pStrings + nStringOff, r.getStr(), len * sizeof( sal_Unicode ) );
             nStringOff = nStringOff + len;
             // Last String? The update the size of the buffer
             if( nStringIdx >= nStrings )
@@ -486,7 +484,7 @@ void SbiImage::AddEnum(SbxObject* pObject) // Register enum type
 **************************************************************************/
 
 // Note: IDs start with 1
-String SbiImage::GetString( short nId ) const
+OUString SbiImage::GetString( short nId ) const
 {
     if( nId && nId <= nStrings )
     {
@@ -501,18 +499,19 @@ String SbiImage::GetString( short nId ) const
             if( nLen == 1 )
             {
                 // Force length 1 and make char 0 afterwards
-                String aNullCharStr( rtl::OUString(" ") );
-                aNullCharStr.SetChar( 0, 0 );
+                OUString aNullCharStr( (sal_Unicode)0);
                 return aNullCharStr;
             }
         }
         else
-            return rtl::OUString(pStr);
+        {
+            return OUString(pStr);
+        }
     }
-    return rtl::OUString();
+    return OUString();
 }
 
-const SbxObject* SbiImage::FindType (String aTypeName) const
+const SbxObject* SbiImage::FindType (OUString aTypeName) const
 {
     return rTypes.Is() ? (SbxObject*)rTypes->Find(aTypeName,SbxCLASS_OBJECT) : NULL;
 }
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 24cc887..9906515 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -94,7 +94,7 @@ private:
 
 DocBasicItem::DocBasicItem( StarBASIC& rDocBasic ) :
     mrDocBasic( rDocBasic ),
-    mxClassModules( new SbxObject( String() ) ),
+    mxClassModules( new SbxObject( OUString() ) ),
     mbDocClosed( false ),
     mbDisposed( false )
 {
@@ -229,7 +229,7 @@ SbxObject* StarBASIC::getVBAGlobals( )
                 }
             }
         }
-        const String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) );
+        const OUString aVBAHook("VBAGlobals");
         pVBAGlobals = (SbUnoObject*)Find( aVBAHook , SbxCLASS_DONTCARE );
     }
     return pVBAGlobals;
@@ -393,7 +393,7 @@ SbxBase* SbiFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator )
 {
     if( nCreator ==  SBXCR_SBX )
     {
-        String aEmpty;
+        OUString aEmpty;
         switch( nSbxId )
         {
         case SBXID_BASIC:
@@ -413,7 +413,7 @@ SbxBase* SbiFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator )
     return NULL;
 }
 
-SbxObject* SbiFactory::CreateObject( const rtl::OUString& rClass )
+SbxObject* SbiFactory::CreateObject( const OUString& rClass )
 {
     if( rClass.equalsIgnoreAsciiCase( "StarBASIC" ) )
     {
@@ -421,18 +421,18 @@ SbxObject* SbiFactory::CreateObject( const rtl::OUString& rClass )
     }
     else if( rClass.equalsIgnoreAsciiCase( "StarBASICModule" ) )
     {
-        return new SbModule( rtl::OUString() );
+        return new SbModule( OUString() );
     }
     else if( rClass.equalsIgnoreAsciiCase( "Collection" ) )
     {
-        return new BasicCollection( rtl::OUString("Collection"));
+        return new BasicCollection( OUString("Collection"));
     }
     else if( rClass.equalsIgnoreAsciiCase( "FileSystemObject" ) )
     {
         try
         {
             Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), UNO_SET_THROW );
-            ::rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.FileSystemObject" ) );
+            OUString aServiceName("ooo.vba.FileSystemObject");
             Reference< XInterface > xInterface( xFactory->createInstance( aServiceName ), UNO_SET_THROW );
             return new SbUnoObject( aServiceName, uno::makeAny( xInterface ) );
         }
@@ -449,7 +449,7 @@ class SbOLEFactory : public SbxFactory
 {
 public:
     virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
-    virtual SbxObject* CreateObject( const rtl::OUString& );
+    virtual SbxObject* CreateObject( const OUString& );
 };
 
 SbxBase* SbOLEFactory::Create( sal_uInt16, sal_uInt32 )
@@ -458,9 +458,9 @@ SbxBase* SbOLEFactory::Create( sal_uInt16, sal_uInt32 )
     return NULL;
 }
 
-SbUnoObject* createOLEObject_Impl( const ::rtl::OUString& aType );  // sbunoobj.cxx
+SbUnoObject* createOLEObject_Impl( const OUString& aType );  // sbunoobj.cxx
 
-SbxObject* SbOLEFactory::CreateObject( const rtl::OUString& rClassName )
+SbxObject* SbOLEFactory::CreateObject( const OUString& rClassName )
 {
     SbxObject* pRet = createOLEObject_Impl( rClassName );
     return pRet;
@@ -474,7 +474,7 @@ class SbFormFactory : public SbxFactory
 {
 public:
     virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
-    virtual SbxObject* CreateObject( const rtl::OUString& );
+    virtual SbxObject* CreateObject( const OUString& );
 };
 
 SbxBase* SbFormFactory::Create( sal_uInt16, sal_uInt32 )
@@ -483,7 +483,7 @@ SbxBase* SbFormFactory::Create( sal_uInt16, sal_uInt32 )
     return NULL;
 }
 
-SbxObject* SbFormFactory::CreateObject( const rtl::OUString& rClassName )
+SbxObject* SbFormFactory::CreateObject( const OUString& rClassName )
 {
     if( SbModule* pMod = GetSbData()->pMod )
     {
@@ -578,7 +578,7 @@ class SbTypeFactory : public SbxFactory
 {
 public:
     virtual SbxBase* Create( sal_uInt16 nSbxId, sal_uInt32 = SBXCR_SBX );
-    virtual SbxObject* CreateObject( const rtl::OUString& );
+    virtual SbxObject* CreateObject( const OUString& );
 };
 
 SbxBase* SbTypeFactory::Create( sal_uInt16, sal_uInt32 )
@@ -587,7 +587,7 @@ SbxBase* SbTypeFactory::Create( sal_uInt16, sal_uInt32 )
     return NULL;
 }
 
-SbxObject* SbTypeFactory::CreateObject( const rtl::OUString& rClassName )
+SbxObject* SbTypeFactory::CreateObject( const OUString& rClassName )
 {
     SbxObject* pRet = NULL;
     SbModule* pMod = GetSbData()->pMod;
@@ -671,8 +671,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
             }
 
             // Search for own copy of ImplMethod
-            String aImplMethodName = pImplMethod->GetName();
-            SbxVariable* p = pMethods->Find( aImplMethodName, SbxCLASS_METHOD );
+            SbxVariable* p = pMethods->Find( pImplMethod->GetName(), SbxCLASS_METHOD );
             SbMethod* pImplMethodCopy = p ? PTR_CAST(SbMethod,p) : NULL;
             if( !pImplMethodCopy )
             {
@@ -722,7 +721,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
                     SbxObject* pObj = PTR_CAST(SbxObject,pObjBase);
                     if( pObj != NULL )
                     {
-                        String aObjClass = pObj->GetClassName();
+                        OUString aObjClass = pObj->GetClassName();
 
                         SbClassModuleObject* pClassModuleObj = PTR_CAST(SbClassModuleObject,pObjBase);
                         if( pClassModuleObj != NULL )
@@ -733,9 +732,9 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
                             pNewObj->SetParent( pLclClassModule->pParent );
                             pNewProp->PutObject( pNewObj );
                         }
-                        else if( aObjClass.EqualsIgnoreCaseAscii( "Collection" ) )
+                        else if( aObjClass.equalsIgnoreAsciiCase( "Collection" ) )
                         {
-                            String aCollectionName( RTL_CONSTASCII_USTRINGPARAM("Collection") );
+                            OUString aCollectionName("Collection");
                             BasicCollection* pNewCollection = new BasicCollection( aCollectionName );
                             pNewCollection->SetName( pProp->GetName() );
                             pNewCollection->SetParent( pClassModule->pParent );
@@ -776,7 +775,7 @@ void SbClassModuleObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType
     handleProcedureProperties( rBC, rHint );
 }
 
-SbxVariable* SbClassModuleObject::Find( const rtl::OUString& rName, SbxClassType t )
+SbxVariable* SbClassModuleObject::Find( const OUString& rName, SbxClassType t )
 {
     SbxVariable* pRes = SbxObject::Find( rName, t );
     if( pRes )
@@ -803,7 +802,7 @@ void SbClassModuleObject::triggerInitializeEvent( void )
     mbInitializeEventDone = true;
 
     // Search method
-    SbxVariable* pMeth = SbxObject::Find(rtl::OUString("Class_Initialize"), SbxCLASS_METHOD);
+    SbxVariable* pMeth = SbxObject::Find(OUString("Class_Initialize"), SbxCLASS_METHOD);
     if( pMeth )
     {
         SbxValues aVals;
@@ -818,7 +817,7 @@ void SbClassModuleObject::triggerTerminateEvent( void )
         return;
     }
     // Search method
-    SbxVariable* pMeth = SbxObject::Find( rtl::OUString("Class_Terminate"), SbxCLASS_METHOD );
+    SbxVariable* pMeth = SbxObject::Find(OUString("Class_Terminate"), SbxCLASS_METHOD );
     if( pMeth )
     {
         SbxValues aVals;
@@ -840,7 +839,7 @@ void SbClassData::clear( void )
 
 SbClassFactory::SbClassFactory( void )
 {
-    String aDummyName;
+    OUString aDummyName;
     xClassModules = new SbxObject( aDummyName );
 }
 
@@ -871,7 +870,7 @@ SbxBase* SbClassFactory::Create( sal_uInt16, sal_uInt32 )
     return NULL;
 }
 
-SbxObject* SbClassFactory::CreateObject( const rtl::OUString& rClassName )
+SbxObject* SbClassFactory::CreateObject( const OUString& rClassName )
 {
     SbxObjectRef xToUseClassModules = xClassModules;
 
@@ -895,7 +894,7 @@ SbxObject* SbClassFactory::CreateObject( const rtl::OUString& rClassName )
     return pRet;
 }
 
-SbModule* SbClassFactory::FindClass( const String& rClassName )
+SbModule* SbClassFactory::FindClass( const OUString& rClassName )
 {
     SbxVariable* pVar = xClassModules->Find( rClassName, SbxCLASS_DONTCARE );
     SbModule* pMod = pVar ? (SbModule*)pVar : NULL;
@@ -903,7 +902,7 @@ SbModule* SbClassFactory::FindClass( const String& rClassName )
 }
 
 StarBASIC::StarBASIC( StarBASIC* p, bool bIsDocBasic  )
-    : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic )
+    : SbxObject( OUString("StarBASIC") ), bDocBasic( bIsDocBasic )
 {
     SetParent( p );
     pLibInfo = NULL;
@@ -926,7 +925,7 @@ StarBASIC::StarBASIC( StarBASIC* p, bool bIsDocBasic  )
         GetSbData()->pUnoFac = new SbUnoFactory;
         AddFactory( GetSbData()->pUnoFac );
     }
-    pRtl = new SbiStdObject( String( RTL_CONSTASCII_USTRINGPARAM(RTLNAME) ), this );
+    pRtl = new SbiStdObject(OUString(RTLNAME), this );
     // Search via StarBasic is always global
     SetFlag( SBX_GBLSEARCH );
     pVBAGlobals = NULL;
@@ -1050,18 +1049,18 @@ void StarBASIC::implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic )
 *
 **************************************************************************/
 
-SbModule* StarBASIC::MakeModule( const String& rName, const String& rSrc )
+SbModule* StarBASIC::MakeModule( const OUString& rName, const OUString& rSrc )
 {
     return MakeModule32( rName, rSrc );
 }
 
-SbModule* StarBASIC::MakeModule32( const String& rName, const ::rtl::OUString& rSrc )
+SbModule* StarBASIC::MakeModule32( const OUString& rName, const OUString& rSrc )
 {
     ModuleInfo mInfo;
     mInfo.ModuleType = ModuleType::NORMAL;
     return MakeModule32(  rName, mInfo, rSrc );
 }
-SbModule* StarBASIC::MakeModule32( const String& rName, const ModuleInfo& mInfo, const rtl::OUString& rSrc )
+SbModule* StarBASIC::MakeModule32( const OUString& rName, const ModuleInfo& mInfo, const OUString& rSrc )
 {
 
     OSL_TRACE("create module %s type mInfo %d", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr(), mInfo.ModuleType );
@@ -1140,12 +1139,12 @@ void StarBASIC::Clear()
     }
 }
 
-SbModule* StarBASIC::FindModule( const String& rName )
+SbModule* StarBASIC::FindModule( const OUString& rName )
 {
     for( sal_uInt16 i = 0; i < pModules->Count(); i++ )
     {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list