diff options
author | Rüdiger Timm <rt@openoffice.org> | 2003-09-19 07:25:48 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2003-09-19 07:25:48 +0000 |
commit | a6db8a42b1367b684e12def5b7e5e1c5b1415fef (patch) | |
tree | af08bf8a27d4837f7ca6b54e5e6e612285df6211 | |
parent | 4aaee519df650bacdb6afb230f7e7f039f76e016 (diff) |
INTEGRATION: CWS fwkq1 (1.3.66); FILE MERGED
2003/07/14 16:28:11 mba 1.3.66.1: #110843#: get rid of factories
-rw-r--r-- | sc/source/ui/unoobj/unodoc.cxx | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/sc/source/ui/unoobj/unodoc.cxx b/sc/source/ui/unoobj/unodoc.cxx index 9068caa2a801..9285699354df 100644 --- a/sc/source/ui/unoobj/unodoc.cxx +++ b/sc/source/ui/unoobj/unodoc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unodoc.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: hr $ $Date: 2003-04-04 19:19:51 $ + * last change: $Author: rt $ $Date: 2003-09-19 08:25:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,6 +77,8 @@ #include <vcl/svapp.hxx> #endif +#include "docsh.hxx" + using namespace ::com::sun::star; ::rtl::OUString SAL_CALL ScDocument_getImplementationName() throw() @@ -96,23 +98,9 @@ uno::Reference< uno::XInterface > SAL_CALL ScDocument_createInstance( const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception ) { ::vos::OGuard aGuard( Application::GetSolarMutex() ); - - // to create the service the SW_MOD should be already initialized - DBG_ASSERT( SC_MOD(), "No StarCalc module!" ); - - if ( SC_MOD() ) - { - ::rtl::OUString aFactoryURL( RTL_CONSTASCII_USTRINGPARAM ( "private:factory/scalc" ) ); - const SfxObjectFactory* pFactory = SfxObjectFactory::GetFactory( aFactoryURL ); - if ( pFactory ) - { - SfxObjectShell* pShell = pFactory->CreateObject(); - if( pShell ) - return uno::Reference< uno::XInterface >( pShell->GetModel() ); - } - } - - return uno::Reference< uno::XInterface >(); + ScDLL::Init(); + SfxObjectShell* pShell = new ScDocShell( SFX_CREATE_MODE_STANDARD ); + return uno::Reference< uno::XInterface >( pShell->GetModel() ); } |