diff options
| author | RĂ¼diger Timm <rt@openoffice.org> | 2003-09-19 07:53:59 +0000 |
|---|---|---|
| committer | RĂ¼diger Timm <rt@openoffice.org> | 2003-09-19 07:53:59 +0000 |
| commit | 495f53c8b40170a05ff95e8573131fba599c6cab (patch) | |
| tree | 9f8d66bb49fc4065997619e0fff2b477656add6c | |
| parent | f2d53fd72de2b7e748aedb982f4f203670442e4f (diff) | |
INTEGRATION: CWS fwkq1 (1.24.26); FILE MERGED
2003/07/17 12:21:24 mba 1.24.26.2: #110843#: get rid of factories
2003/07/15 06:25:23 mba 1.24.26.1: #110843#: get rid of factories
| -rw-r--r-- | starmath/source/unomodel.cxx | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 726a57cc2d7d..03b2c7636376 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unomodel.cxx,v $ * - * $Revision: 1.24 $ + * $Revision: 1.25 $ * - * last change: $Author: rt $ $Date: 2003-04-24 14:08:12 $ + * last change: $Author: rt $ $Date: 2003-09-19 08:53:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -142,6 +142,8 @@ #include <config.hxx> #endif +#include <smdll.hxx> + using namespace ::vos; using namespace ::rtl; using namespace ::cppu; @@ -320,7 +322,6 @@ uno::Any SAL_CALL SmModel::queryInterface( const uno::Type& rType ) throw(uno::R static_cast< XMultiPropertySet* > ( this ), //static_cast< XPropertyState* > ( this ), // my own interfaces - static_cast< XUnoTunnel* > ( this ), static_cast< XServiceInfo* > ( this ), static_cast< XRenderable* > ( this ) ); if (!aRet.hasValue()) @@ -351,10 +352,9 @@ uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes( ) throw(uno::RuntimeExce ::vos::OGuard aGuard(Application::GetSolarMutex()); uno::Sequence< uno::Type > aTypes = SfxBaseModel::getTypes(); sal_Int32 nLen = aTypes.getLength(); - aTypes.realloc(nLen + 5); + aTypes.realloc(nLen + 4); uno::Type* pTypes = aTypes.getArray(); pTypes[nLen++] = ::getCppuType((Reference<XServiceInfo>*)0); - pTypes[nLen++] = ::getCppuType((Reference<XUnoTunnel>*)0); pTypes[nLen++] = ::getCppuType((Reference<XPropertySet>*)0); pTypes[nLen++] = ::getCppuType((Reference<XMultiPropertySet>*)0); pTypes[nLen++] = ::getCppuType((Reference<XRenderable>*)0); @@ -392,7 +392,8 @@ sal_Int64 SAL_CALL SmModel::getSomething( const uno::Sequence< sal_Int8 >& rId ) { return (sal_Int64)this; } - return 0; + + return SfxBaseModel::getSomething( rId ); } /*-- 07.01.00 16:32:59--------------------------------------------------- @@ -417,8 +418,15 @@ sal_Int16 lcl_AnyToINT16(const uno::Any& rAny) OUString SmModel::getImplementationName(void) throw( uno::RuntimeException ) { - return C2U("SmModel"); + return getImplementationName_Static(); } + + +::rtl::OUString SmModel::getImplementationName_Static() +{ + return rtl::OUString::createFromAscii("com.sun.star.comp.math.FormulaDocument"); +} + /*-- 07.02.00 13:24:09--------------------------------------------------- -----------------------------------------------------------------------*/ @@ -431,6 +439,11 @@ sal_Bool SmModel::supportsService(const OUString& rServiceName) throw( uno::Runt -----------------------------------------------------------------------*/ uno::Sequence< OUString > SmModel::getSupportedServiceNames(void) throw( uno::RuntimeException ) { + return getSupportedServiceNames_Static(); +} + +uno::Sequence< OUString > SmModel::getSupportedServiceNames_Static(void) +{ ::vos::OGuard aGuard(Application::GetSolarMutex()); uno::Sequence< OUString > aRet(1); @@ -1021,3 +1034,12 @@ void SAL_CALL SmModel::render( } } +uno::Reference< uno::XInterface > SAL_CALL SmModel_createInstance( + const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception ) +{ + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SmDLL::Init(); + SfxObjectShell* pShell = new SmDocShell( SFX_CREATE_MODE_STANDARD ); + return uno::Reference< uno::XInterface >( pShell->GetModel() ); +} + |
