diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-06-07 10:13:44 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-06-07 10:13:44 +0200 |
commit | 37a8224e7a1eb9084623f023a0830c9818e3d311 (patch) | |
tree | 2a727f2aef718d2d06ae20f7f228065da422f8a5 /basic/source/uno/namecont.cxx | |
parent | d0202ebd4e1be56cf1230a93a6d11cfc57050a5e (diff) | |
parent | 44ada130c3857b167e954b63c7a5490268b72c5b (diff) |
jl152 merge with DEV300_m80
Diffstat (limited to 'basic/source/uno/namecont.cxx')
-rw-r--r-- | basic/source/uno/namecont.cxx | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 21142dcd0e..530380e9aa 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -73,7 +73,6 @@ #include <cppuhelper/exc_hlp.hxx> #include <basic/sbmod.hxx> - namespace basic { @@ -327,6 +326,7 @@ DBG_NAME( SfxLibraryContainer ) // Ctor SfxLibraryContainer::SfxLibraryContainer( void ) : LibraryContainerHelper( maMutex ) + , mbVBACompat( sal_False ) , maModifiable( *this, maMutex ) , maNameContainer( getCppuType( (Reference< XNameAccess >*) NULL ) ) , mbOldInfoFormat( sal_False ) @@ -2789,6 +2789,7 @@ OUString SfxLibraryContainer::expand_url( const OUString& url ) } } + //XLibraryContainer3 OUString SAL_CALL SfxLibraryContainer::getOriginalLibraryLinkURL( const OUString& Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException) @@ -2801,6 +2802,29 @@ OUString SAL_CALL SfxLibraryContainer::getOriginalLibraryLinkURL( const OUString OUString aRetStr = pImplLib->maOrignialStorageURL; return aRetStr; } + + +::sal_Bool SAL_CALL SfxLibraryContainer::getVBACompatModeOn() throw (RuntimeException) +{ + return mbVBACompat; +} + +void SAL_CALL SfxLibraryContainer::setVBACompatModeOn( ::sal_Bool _vbacompatmodeon ) throw (RuntimeException) +{ + BasicManager* pBasMgr = getBasicManager(); + if( pBasMgr ) + { + // get the standard library + String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) ); + if ( pBasMgr->GetName().Len() ) + aLibName = pBasMgr->GetName(); + + StarBASIC* pBasic = pBasMgr->GetLib( aLibName ); + if( pBasic ) + pBasic->SetVBAEnabled( _vbacompatmodeon ); + } + mbVBACompat = _vbacompatmodeon; +} // Methods XServiceInfo ::sal_Bool SAL_CALL SfxLibraryContainer::supportsService( const ::rtl::OUString& _rServiceName ) |