diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-22 16:41:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-05-23 12:35:54 +0100 |
commit | 454e1756a60d9b8eb4f9152b93fe560777a9e01a (patch) | |
tree | 0bb38131e1dea7c428fe2826505dec6bb960bf44 /starmath/source/unodoc.cxx | |
parent | 1adb8f26cb9eeb71fc73029292257258ade7142e (diff) |
make this a non-leaky singleton
Diffstat (limited to 'starmath/source/unodoc.cxx')
-rw-r--r-- | starmath/source/unodoc.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx index 4f0205f5cd38..aa322f9b6810 100644 --- a/starmath/source/unodoc.cxx +++ b/starmath/source/unodoc.cxx @@ -59,14 +59,9 @@ uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance( const uno::Reference< lang::XMultiServiceFactory > & /*rSMgr*/, const sal_uInt64 _nCreationFlags ) throw( uno::Exception ) { SolarMutexGuard aGuard; - if ( !SM_MOD() ) - SmDLL::Init(); - + SmGlobals::ensure(); SfxObjectShell* pShell = new SmDocShell( _nCreationFlags ); - if( pShell ) - return uno::Reference< uno::XInterface >( pShell->GetModel() ); - - return uno::Reference< uno::XInterface >(); + return uno::Reference< uno::XInterface >( pShell->GetModel() ); } |