diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2010-04-16 10:09:51 +0200 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2010-04-16 10:09:51 +0200 |
commit | cfc78d6b121d82998f4262cbb09ececc25d021d1 (patch) | |
tree | e97deb6df50066439ee03d52e86831b123466397 /basic | |
parent | d969c11d5a005e1bd87f323d8ffbeae2ca125f80 (diff) | |
parent | cd6cdc2be3b081a80c8500a3b71a1ae12dd6bc9a (diff) |
CWS-TOOLING: integrate CWS sb118
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 27 | ||||
-rw-r--r-- | basic/source/classes/sb.cxx | 7 | ||||
-rw-r--r--[-rwxr-xr-x] | basic/source/classes/sbunoobj.cxx | 14 |
3 files changed, 19 insertions, 29 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index da792f269fc9..7646667bc277 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -97,20 +97,13 @@ typedef WeakImplHelper1< XStarBasicAccess > StarBasicAccessHelper; // + BOOL bReference static const char* szStdLibName = "Standard"; -static const char* szBasicStorage = "StarBASIC"; +static const char szBasicStorage[] = "StarBASIC"; static const char* szOldManagerStream = "BasicManager"; -static const char* szManagerStream = "BasicManager2"; +static const char szManagerStream[] = "BasicManager2"; static const char* szImbedded = "LIBIMBEDDED"; static const char* szCryptingKey = "CryptedBasic"; static const char* szScriptLanguage = "StarBasic"; -static const String BasicStreamName( String::CreateFromAscii(szBasicStorage) ); -static const String ManagerStreamName( String::CreateFromAscii(szManagerStream) ); - - -#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII)) - - TYPEINIT1( BasicManager, SfxBroadcaster ); DBG_NAME( BasicManager ); @@ -666,7 +659,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA // DBG_ASSERT(aStorageName.Len() != 0, "Bad storage name"); // If there is no Manager Stream, no further actions are necessary - if ( rStorage.IsStream( ManagerStreamName ) ) + if ( rStorage.IsStream( String(RTL_CONSTASCII_USTRINGPARAM(szManagerStream)) ) ) { LoadBasicManager( rStorage, rBaseURL ); // StdLib contains Parent: @@ -707,12 +700,12 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA // #91626 Save all stream data to save it unmodified if basic isn't modified // in an 6.0+ office. So also the old basic dialogs can be saved. SotStorageStreamRef xManagerStream = rStorage.OpenSotStream - ( ManagerStreamName, eStreamReadMode ); + ( String(RTL_CONSTASCII_USTRINGPARAM(szManagerStream)), eStreamReadMode ); mpImpl->mpManagerStream = new SvMemoryStream(); *static_cast<SvStream*>(&xManagerStream) >> *mpImpl->mpManagerStream; SotStorageRef xBasicStorage = rStorage.OpenSotStorage - ( BasicStreamName, eStorageReadMode, FALSE ); + ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, FALSE ); if( xBasicStorage.Is() && !xBasicStorage->GetError() ) { USHORT nLibs = GetLibCount(); @@ -921,7 +914,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const String& rBaseUR // StreamMode eStreamMode = STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE; SotStorageStreamRef xManagerStream = rStorage.OpenSotStream - ( ManagerStreamName, eStreamReadMode ); + ( String(RTL_CONSTASCII_USTRINGPARAM(szManagerStream)), eStreamReadMode ); String aStorName( rStorage.GetName() ); // #i13114 removed, DBG_ASSERT( aStorName.Len(), "No Storage Name!" ); @@ -1169,7 +1162,7 @@ BOOL BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurStorag xStorage = new SotStorage( FALSE, aStorageName, eStorageReadMode ); SotStorageRef xBasicStorage = xStorage->OpenSotStorage - ( BasicStreamName, eStorageReadMode, FALSE ); + ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), eStorageReadMode, FALSE ); if ( !xBasicStorage.Is() || xBasicStorage->GetError() ) { @@ -1422,10 +1415,10 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage ) else xStorage = new SotStorage( FALSE, pLibInfo->GetStorageName() ); - if ( xStorage->IsStorage( BasicStreamName ) ) + if ( xStorage->IsStorage( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)) ) ) { SotStorageRef xBasicStorage = xStorage->OpenSotStorage - ( BasicStreamName, STREAM_STD_READWRITE, FALSE ); + ( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)), STREAM_STD_READWRITE, FALSE ); if ( !xBasicStorage.Is() || xBasicStorage->GetError() ) { @@ -1445,7 +1438,7 @@ BOOL BasicManager::RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage ) if ( !aInfoList.Count() ) { xBasicStorage.Clear(); - xStorage->Remove( BasicStreamName ); + xStorage->Remove( String(RTL_CONSTASCII_USTRINGPARAM(szBasicStorage)) ); xStorage->Commit(); // If no further Streams or SubStorages available, // delete the Storage, too. diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index c5ac53c43092..86850d9991c6 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -64,20 +64,17 @@ TYPEINIT1(StarBASIC,SbxObject) #define RTLNAME "@SBRTL" // i#i68894# -const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") ); -const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); - SbxObject* StarBASIC::getVBAGlobals( ) { if ( !pVBAGlobals ) - pVBAGlobals = (SbUnoObject*)Find( aVBAHook , SbxCLASS_DONTCARE ); + pVBAGlobals = (SbUnoObject*)Find( String(RTL_CONSTASCII_USTRINGPARAM("VBAGlobals")), SbxCLASS_DONTCARE ); return pVBAGlobals; } // i#i68894# SbxVariable* StarBASIC::VBAFind( const String& rName, SbxClassType t ) { - if( rName == aThisComponent ) + if( rName.EqualsAscii("ThisComponent") ) return NULL; // rename to init globals if ( getVBAGlobals( ) ) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 1e278bf583a7..0e8928bc6c1a 100755..100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -112,9 +112,9 @@ typedef WeakImplHelper1< XAllListener > BasicAllListenerHelper; // Identifier fuer die dbg_-Properies als Strings anlegen -static String ID_DBG_SUPPORTEDINTERFACES( RTL_CONSTASCII_USTRINGPARAM("Dbg_SupportedInterfaces") ); -static String ID_DBG_PROPERTIES( RTL_CONSTASCII_USTRINGPARAM("Dbg_Properties") ); -static String ID_DBG_METHODS( RTL_CONSTASCII_USTRINGPARAM("Dbg_Methods") ); +static char const ID_DBG_SUPPORTEDINTERFACES[] = "Dbg_SupportedInterfaces"; +static char const ID_DBG_PROPERTIES[] = "Dbg_Properties"; +static char const ID_DBG_METHODS[] = "Dbg_Methods"; static ::rtl::OUString aSeqLevelStr( RTL_CONSTASCII_USTRINGPARAM("[]") ); static ::rtl::OUString defaultNameSpace( RTL_CONSTASCII_USTRINGPARAM("ooo.vba") ); @@ -1630,7 +1630,7 @@ String Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj ) String aRet; if( eType != TypeClass_INTERFACE ) { - aRet += ID_DBG_SUPPORTEDINTERFACES; + aRet.AppendAscii( RTL_CONSTASCII_STRINGPARAM(ID_DBG_SUPPORTEDINTERFACES) ); aRet.AppendAscii( " not available.\n(TypeClass is not TypeClass_INTERFACE)\n" ); } else @@ -2653,15 +2653,15 @@ void SbUnoObject::implCreateDbgProperties( void ) Property aProp; // Id == -1: Implementierte Interfaces gemaess ClassProvider anzeigen - SbxVariableRef xVarRef = new SbUnoProperty( ID_DBG_SUPPORTEDINTERFACES, SbxSTRING, aProp, -1, false ); + SbxVariableRef xVarRef = new SbUnoProperty( String(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_SUPPORTEDINTERFACES)), SbxSTRING, aProp, -1, false ); QuickInsert( (SbxVariable*)xVarRef ); // Id == -2: Properties ausgeben - xVarRef = new SbUnoProperty( ID_DBG_PROPERTIES, SbxSTRING, aProp, -2, false ); + xVarRef = new SbUnoProperty( String(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_PROPERTIES)), SbxSTRING, aProp, -2, false ); QuickInsert( (SbxVariable*)xVarRef ); // Id == -3: Methoden ausgeben - xVarRef = new SbUnoProperty( ID_DBG_METHODS, SbxSTRING, aProp, -3, false ); + xVarRef = new SbUnoProperty( String(RTL_CONSTASCII_USTRINGPARAM(ID_DBG_METHODS)), SbxSTRING, aProp, -3, false ); QuickInsert( (SbxVariable*)xVarRef ); } |