1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _XMLOFF_FORMS_OFFICEFORMS_HXX_
25 #define _XMLOFF_FORMS_OFFICEFORMS_HXX_
26 
27 #include "formattributes.hxx"
28 #include <xmloff/xmlictxt.hxx>
29 #include "logging.hxx"
30 
31 class SvXMLElementExport;
32 class SvXMLExport;
33 
34 //.........................................................................
35 namespace xmloff
36 {
37 //.........................................................................
38 
39 	//=====================================================================
40 	//= OFormsRootImport
41 	//=====================================================================
42 	class OFormsRootImport
43 				:public SvXMLImportContext
44 				,public OStackedLogging
45 	{
46 	public:
47 		TYPEINFO();
48 
49 		OFormsRootImport( SvXMLImport& _rImport, sal_uInt16 _nPrfx, const rtl::OUString& _rLocalName);
50 		virtual ~OFormsRootImport();
51 
52 		// SvXMLImportContext overriabled
53 		virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName,
54 			const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
55 		virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttrList );
56 		virtual void EndElement();
57 
58 	protected:
59 		void implImportBool(
60 			const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttributes,
61 			OfficeFormsAttributes _eAttribute,
62 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxProps,
63 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >& _rxPropInfo,
64 			const ::rtl::OUString& _rPropName,
65 			sal_Bool _bDefault
66 			);
67 	};
68 
69 	//=====================================================================
70 	//= OFormsRootExport
71 	//=====================================================================
72 	class OFormsRootExport
73 	{
74 	private:
75 		SvXMLElementExport*		m_pImplElement;
76 
77 	public:
78 		OFormsRootExport( SvXMLExport& _rExp );
79 		~OFormsRootExport();
80 
81 	private:
82 		void addModelAttributes(SvXMLExport& _rExp) SAL_THROW(());
83 
84 		void implExportBool(
85 			SvXMLExport& _rExp,
86 			OfficeFormsAttributes _eAttribute,
87 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxProps,
88 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >& _rxPropInfo,
89 			const ::rtl::OUString& _rPropName,
90 			sal_Bool _bDefault
91 			);
92 	};
93 
94 //.........................................................................
95 }	// namespace xmloff
96 //.........................................................................
97 
98 #endif // _XMLOFF_FORMS_OFFICEFORMS_HXX_
99 
100 
101