Update ooo320-m1
[ooovba.git] / ucb / source / ucp / tdoc / tdoc_documentcontentfactory.hxx
blob4960777adbec058c9e24be754c13ca831b44e9e0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tdoc_documentcontentfactory.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_TDOC_DOCUMENTCONTENTFACTORY_HXX
32 #define INCLUDED_TDOC_DOCUMENTCONTENTFACTORY_HXX
34 #include "com/sun/star/lang/XServiceInfo.hpp"
35 #include "com/sun/star/lang/XSingleServiceFactory.hpp"
36 #include "com/sun/star/frame/XTransientDocumentsDocumentContentFactory.hpp"
38 #include "cppuhelper/implbase2.hxx"
40 namespace tdoc_ucp {
42 class DocumentContentFactory :
43 public cppu::WeakImplHelper2<
44 com::sun::star::frame::XTransientDocumentsDocumentContentFactory,
45 com::sun::star::lang::XServiceInfo >
47 public:
48 DocumentContentFactory( const com::sun::star::uno::Reference<
49 com::sun::star::lang::XMultiServiceFactory >& rXSMgr );
50 virtual ~DocumentContentFactory();
52 // XServiceInfo
53 virtual ::rtl::OUString SAL_CALL getImplementationName()
54 throw ( com::sun::star::uno::RuntimeException );
56 virtual sal_Bool SAL_CALL
57 supportsService( const ::rtl::OUString& ServiceName )
58 throw ( com::sun::star::uno::RuntimeException );
60 virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
61 getSupportedServiceNames()
62 throw ( com::sun::star::uno::RuntimeException );
64 // XTransientDocumentsDocumentContentFactory
65 virtual com::sun::star::uno::Reference<
66 com::sun::star::ucb::XContent > SAL_CALL
67 createDocumentContent( const ::com::sun::star::uno::Reference<
68 com::sun::star::frame::XModel >& Model )
69 throw ( com::sun::star::lang::IllegalArgumentException,
70 com::sun::star::uno::RuntimeException );
72 // Non-UNO interfaces
73 static rtl::OUString
74 getImplementationName_Static();
75 static com::sun::star::uno::Sequence< rtl::OUString >
76 getSupportedServiceNames_Static();
78 static com::sun::star::uno::Reference<
79 com::sun::star::lang::XSingleServiceFactory >
80 createServiceFactory( const com::sun::star::uno::Reference<
81 com::sun::star::lang::XMultiServiceFactory > & rxServiceMgr );
82 private:
83 com::sun::star::uno::Reference<
84 com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
87 } // namespace tdoc_ucp
89 #endif /* !INCLUDED_TDOC_DOCUMENTCONTENTFACTORY_HXX */