Better, Faster, Freer

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: i386 ]
Version: HEAD ]

001 /*************************************************************************
002  *
003  *  OpenOffice.org - a multi-platform office productivity suite
004  *
005  *  $RCSfile: unodoc.cxx,v $
006  *
007  *  $Revision: 1.8 $
008  *
009  *  last change: $Author: hr $ $Date: 2007/09/27 12:42:32 $
010  *
011  *  The Contents of this file are made available subject to
012  *  the terms of GNU Lesser General Public License Version 2.1.
013  *
014  *
015  *    GNU Lesser General Public License Version 2.1
016  *    =============================================
017  *    Copyright 2005 by Sun Microsystems, Inc.
018  *    901 San Antonio Road, Palo Alto, CA 94303, USA
019  *
020  *    This library is free software; you can redistribute it and/or
021  *    modify it under the terms of the GNU Lesser General Public
022  *    License version 2.1, as published by the Free Software Foundation.
023  *
024  *    This library is distributed in the hope that it will be useful,
025  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
026  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
027  *    Lesser General Public License for more details.
028  *
029  *    You should have received a copy of the GNU Lesser General Public
030  *    License along with this library; if not, write to the Free Software
031  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
032  *    MA  02111-1307  USA
033  *
034  ************************************************************************/
035 
036 // MARKER(update_precomp.py): autogen include statement, do not remove
037 #include "precompiled_sw.hxx"
038 // System - Includes -----------------------------------------------------
039 
040 #include <tools/string.hxx>
041 #include <sfx2/docfac.hxx>
042 #include "swdll.hxx"
043 #include "docsh.hxx"
044 #include "globdoc.hxx"
045 #include "wdocsh.hxx"
046 
047 #ifndef _VOS_MUTEX_HXX_
048 #include <vos/mutex.hxx>
049 #endif
050 #ifndef _SV_SVAPP_HXX
051 #include <vcl/svapp.hxx>
052 #endif
053 
054 using namespace ::com::sun::star;
055 
056 //============================================================
057 // com.sun.star.comp.Writer.TextDocument
058 
059 uno::Sequence< ::rtl::OUString > SAL_CALL SwTextDocument_getSupportedServiceNames() throw()
060 {
061     // return only top level services here! All others must be
062     // resolved by rtti!
063     uno::Sequence< ::rtl::OUString > aRet ( 1 );
064         ::rtl::OUString* pArray = aRet.getArray();
065         pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.TextDocument" ) );
066 
067         return aRet;
068 }
069 
070 ::rtl::OUString SAL_CALL SwTextDocument_getImplementationName() throw()
071 {
072         return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.TextDocument" ) );
073 }
074 
075 uno::Reference< uno::XInterface > SAL_CALL SwTextDocument_createInstance(
076                             const uno::Reference< lang::XMultiServiceFactory > & )
077         throw( uno::Exception )
078 {
079     ::vos::OGuard aGuard( Application::GetSolarMutex() );
080         SwDLL::Init();
081         SfxObjectShell* pShell = new SwDocShell( SFX_CREATE_MODE_STANDARD );
082         return uno::Reference< uno::XInterface >( pShell->GetModel() );
083 }
084 
085 //============================================================
086 // com.sun.star.comp.Writer.WebDocument
087 
088 uno::Sequence< ::rtl::OUString > SAL_CALL SwWebDocument_getSupportedServiceNames() throw()
089 {
090     // return only top level services here! All others must be
091     // resolved by rtti!
092     uno::Sequence< ::rtl::OUString > aRet ( 1 );
093         ::rtl::OUString* pArray = aRet.getArray();
094     pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.WebDocument" ) );
095 
096         return aRet;
097 }
098 
099 ::rtl::OUString SAL_CALL SwWebDocument_getImplementationName() throw()
100 {
101         return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.WebDocument" ) );
102 }
103 
104 uno::Reference< uno::XInterface > SAL_CALL SwWebDocument_createInstance(
105     const uno::Reference< lang::XMultiServiceFactory > & )
106         throw( uno::Exception )
107 {
108     ::vos::OGuard aGuard( Application::GetSolarMutex() );
109         SwDLL::Init();
110         SfxObjectShell* pShell = new SwWebDocShell( SFX_CREATE_MODE_STANDARD );
111         return uno::Reference< uno::XInterface >( pShell->GetModel() );
112 }
113 
114 //============================================================
115 // com.sun.star.comp.Writer.GlobalDocument
116 
117 uno::Sequence< ::rtl::OUString > SAL_CALL SwGlobalDocument_getSupportedServiceNames() throw()
118 {
119     uno::Sequence< ::rtl::OUString > aRet ( 1 );
120         ::rtl::OUString* pArray = aRet.getArray();
121     pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.GlobalDocument" ) );
122 
123         return aRet;
124 }
125 
126 ::rtl::OUString SAL_CALL SwGlobalDocument_getImplementationName() throw()
127 {
128         return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.GlobalDocument" ) );
129 }
130 
131 uno::Reference< uno::XInterface > SAL_CALL SwGlobalDocument_createInstance(
132     const uno::Reference< lang::XMultiServiceFactory > &)
133         throw( uno::Exception )
134 {
135     ::vos::OGuard aGuard( Application::GetSolarMutex() );
136         SwDLL::Init();
137         SfxObjectShell* pShell = new SwGlobalDocShell( SFX_CREATE_MODE_STANDARD );
138         return uno::Reference< uno::XInterface >( pShell->GetModel() );
139 }
140 

source navigation ] diff markup ] identifier search ] general search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!