/Users/ericb/Desktop/SRC680_m247/starmath/source/unodoc.cxx

Go to the documentation of this file.
00001 /*************************************************************************
00002  *
00003  *  OpenOffice.org - a multi-platform office productivity suite
00004  *
00005  *  $RCSfile: unodoc.cxx,v $
00006  *
00007  *  $Revision: 1.6 $
00008  *
00009  *  last change: $Author: vg $ $Date: 2007/05/25 12:16:02 $
00010  *
00011  *  The Contents of this file are made available subject to
00012  *  the terms of GNU Lesser General Public License Version 2.1.
00013  *
00014  *
00015  *    GNU Lesser General Public License Version 2.1
00016  *    =============================================
00017  *    Copyright 2005 by Sun Microsystems, Inc.
00018  *    901 San Antonio Road, Palo Alto, CA 94303, USA
00019  *
00020  *    This library is free software; you can redistribute it and/or
00021  *    modify it under the terms of the GNU Lesser General Public
00022  *    License version 2.1, as published by the Free Software Foundation.
00023  *
00024  *    This library is distributed in the hope that it will be useful,
00025  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00026  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00027  *    Lesser General Public License for more details.
00028  *
00029  *    You should have received a copy of the GNU Lesser General Public
00030  *    License along with this library; if not, write to the Free Software
00031  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00032  *    MA  02111-1307  USA
00033  *
00034  ************************************************************************/
00035 
00036 // MARKER(update_precomp.py): autogen include statement, do not remove
00037 #include "precompiled_starmath.hxx"
00038 
00039 // System - Includes -----------------------------------------------------
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 > & /*rSMgr*/ ) 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 

Generated on Wed Feb 20 17:21:57 2008 for maths by  doxygen 1.5.1