xref: /aoo42x/main/xmloff/source/forms/callbacks.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _XMLOFF_FORMS_CALLBACKS_HXX_
29 #define _XMLOFF_FORMS_CALLBACKS_HXX_
30 
31 #include <com/sun/star/container/XIndexAccess.hpp>
32 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
33 #include <com/sun/star/beans/XPropertySet.hpp>
34 #include <com/sun/star/script/ScriptEventDescriptor.hpp>
35 #include <vos/ref.hxx>
36 
37 class SvXMLImport;
38 class SvXMLExport;
39 class SvXMLExportPropertyMapper;
40 class SvXMLStyleContext;
41 
42 //.........................................................................
43 namespace xmloff
44 {
45 //.........................................................................
46 
47 	class OAttribute2Property;
48 
49 	//=====================================================================
50 	//= IFormsExportContext
51 	//=====================================================================
52 	class IFormsExportContext
53 	{
54 	public:
55 		virtual SvXMLExport&								getGlobalContext() = 0;
56 		virtual ::vos::ORef< SvXMLExportPropertyMapper >	getStylePropertyMapper() = 0;
57 
58 		/** steps through a collection and exports all children of this collection
59 		*/
60 		virtual void	exportCollectionElements(
61 			const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxCollection) = 0;
62 
63 		virtual ::rtl::OUString								getObjectStyleName(
64 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject ) = 0;
65 	};
66 
67 	//=====================================================================
68 	//= IEventAttacherManager
69 	//=====================================================================
70 	class IEventAttacherManager
71 	{
72 	public:
73 		virtual void registerEvents(
74 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxElement,
75 			const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& _rEvents
76 			) = 0;
77 	};
78 
79 	//=====================================================================
80 	//= IEventAttacher
81 	//=====================================================================
82 	class IEventAttacher
83 	{
84 	public:
85 		virtual void registerEvents(
86 			const ::com::sun::star::uno::Sequence< ::com::sun::star::script::ScriptEventDescriptor >& _rEvents
87 			) = 0;
88 	};
89 
90 //.........................................................................
91 }	// namespace xmloff
92 //.........................................................................
93 
94 #endif // _XMLOFF_FORMS_CALLBACKS_HXX_
95 
96