diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-22 20:37:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-10-22 20:37:35 +0100 |
commit | d7b418b5e53e71555832b79ebe90de141a55e786 (patch) | |
tree | baebd306b215f6bd17f3ed528ef68d42304d9804 /basic | |
parent | 3a99fb0a492c79fed798c32afd275d930e104cf0 (diff) |
startup optimization, move static strings to first use point
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 91a0adf8b0d4..f44d6c5b1008 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -35,9 +35,7 @@ #include <tools/rcid.h> #include <tools/config.hxx> #include <tools/stream.hxx> -#ifndef __RSC //autogen #include <tools/errinf.hxx> -#endif #include <basic/sbx.hxx> #include <tools/list.hxx> #include <tools/shl.hxx> @@ -64,8 +62,6 @@ #include <com/sun/star/script/ModuleInfo.hpp> using namespace ::com::sun::star::script; -// #pragma SW_SEGMENT_CLASS( SBASIC, SBASIC_CODE ) - SV_IMPL_VARARR(SbTextPortions,SbTextPortion) TYPEINIT1(StarBASIC,SbxObject) @@ -77,9 +73,6 @@ using com::sun::star::uno::Any; using com::sun::star::uno::UNO_QUERY; using com::sun::star::lang::XMultiServiceFactory; -const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") ); -const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); - SbxObject* StarBASIC::getVBAGlobals( ) { if ( !pVBAGlobals ) @@ -88,7 +81,7 @@ SbxObject* StarBASIC::getVBAGlobals( ) if ( GetUNOConstant("ThisComponent", aThisDoc) ) { Reference< XMultiServiceFactory > xDocFac( aThisDoc, UNO_QUERY ); - if ( xDocFac.is() ) + if ( xDocFac.is() ) { try { @@ -100,6 +93,7 @@ SbxObject* StarBASIC::getVBAGlobals( ) } } } + const String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); pVBAGlobals = (SbUnoObject*)Find( aVBAHook , SbxCLASS_DONTCARE ); } return pVBAGlobals; @@ -108,6 +102,7 @@ SbxObject* StarBASIC::getVBAGlobals( ) // i#i68894# SbxVariable* StarBASIC::VBAFind( const String& rName, SbxClassType t ) { + const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") ); if( rName == aThisComponent ) return NULL; // rename to init globals |