00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #include "precompiled_starmath.hxx"
00038
00039
00040
00041 #include <tools/string.hxx>
00042 #include <sfx2/docfac.hxx>
00043
00044 #ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
00045 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
00046 #endif
00047
00048 #include "smdll.hxx"
00049 #include "document.hxx"
00050
00051 #ifndef _VOS_MUTEX_HXX_
00052 #include <vos/mutex.hxx>
00053 #endif
00054 #ifndef _SV_SVAPP_HXX
00055 #include <vcl/svapp.hxx>
00056 #endif
00057
00058 using namespace ::com::sun::star;
00059
00060 ::rtl::OUString SAL_CALL SmDocument_getImplementationName() throw()
00061 {
00062 return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.FormulaDocument" ) );
00063 }
00064
00065 uno::Sequence< rtl::OUString > SAL_CALL SmDocument_getSupportedServiceNames() throw()
00066 {
00067 uno::Sequence< rtl::OUString > aSeq( 1 );
00068 aSeq[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.formula.FormulaProperties" ));
00069 return aSeq;
00070 }
00071
00072 uno::Reference< uno::XInterface > SAL_CALL SmDocument_createInstance(
00073 const uno::Reference< lang::XMultiServiceFactory > & ) throw( uno::Exception )
00074 {
00075 ::vos::OGuard aGuard( Application::GetSolarMutex() );
00076 if ( !SM_MOD() )
00077 SmDLL::Init();
00078
00079 SfxObjectShell* pShell = new SmDocShell( SFX_CREATE_MODE_STANDARD );
00080 if( pShell )
00081 return uno::Reference< uno::XInterface >( pShell->GetModel() );
00082
00083 return uno::Reference< uno::XInterface >();
00084 }
00085
00086