1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef _XMLOFF_FORMATTRIBUTES_HXX_
29*cdf0e10cSrcweir #define _XMLOFF_FORMATTRIBUTES_HXX_
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
32*cdf0e10cSrcweir #include <sal/types.h>
33*cdf0e10cSrcweir #include <vos/refernce.hxx>
34*cdf0e10cSrcweir #include <comphelper/stl_types.hxx>
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir class SvXMLExport;
37*cdf0e10cSrcweir struct SvXMLEnumMapEntry;
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir //.........................................................................
40*cdf0e10cSrcweir namespace xmloff
41*cdf0e10cSrcweir {
42*cdf0e10cSrcweir //.........................................................................
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir 	// flags for common control attributes
45*cdf0e10cSrcweir 	#define CCA_NAME					0x00000001
46*cdf0e10cSrcweir 	#define CCA_SERVICE_NAME			0x00000002
47*cdf0e10cSrcweir 	#define CCA_BUTTON_TYPE				0x00000004
48*cdf0e10cSrcweir 	#define CCA_CONTROL_ID				0x00000008
49*cdf0e10cSrcweir 	#define CCA_CURRENT_SELECTED		0x00000010
50*cdf0e10cSrcweir 	#define CCA_CURRENT_VALUE			0x00000020
51*cdf0e10cSrcweir 	#define CCA_DISABLED				0x00000040
52*cdf0e10cSrcweir 	#define CCA_DROPDOWN				0x00000080
53*cdf0e10cSrcweir 	#define CCA_FOR						0x00000100
54*cdf0e10cSrcweir 	#define CCA_IMAGE_DATA				0x00000200
55*cdf0e10cSrcweir 	#define CCA_LABEL					0x00000400
56*cdf0e10cSrcweir 	#define CCA_MAX_LENGTH				0x00000800
57*cdf0e10cSrcweir 	#define CCA_PRINTABLE				0x00001000
58*cdf0e10cSrcweir 	#define CCA_READONLY				0x00002000
59*cdf0e10cSrcweir 	#define CCA_SELECTED				0x00004000
60*cdf0e10cSrcweir 	#define CCA_SIZE					0x00008000
61*cdf0e10cSrcweir 	#define CCA_TAB_INDEX				0x00010000
62*cdf0e10cSrcweir 	#define CCA_TARGET_FRAME			0x00020000
63*cdf0e10cSrcweir 	#define CCA_TARGET_LOCATION			0x00040000
64*cdf0e10cSrcweir 	#define CCA_TAB_STOP				0x00080000
65*cdf0e10cSrcweir 	#define CCA_TITLE					0x00100000
66*cdf0e10cSrcweir 	#define CCA_VALUE					0x00200000
67*cdf0e10cSrcweir     #define CCA_ORIENTATION             0x00400000
68*cdf0e10cSrcweir     #define CCA_VISUAL_EFFECT           0x00800000
69*cdf0e10cSrcweir     #define CCA_ENABLEVISIBLE                 0x01000000
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir 	// flags for database control atttributes
72*cdf0e10cSrcweir 	#define DA_BOUND_COLUMN				0x00000001
73*cdf0e10cSrcweir 	#define DA_CONVERT_EMPTY			0x00000002
74*cdf0e10cSrcweir 	#define DA_DATA_FIELD				0x00000004
75*cdf0e10cSrcweir 	#define DA_LIST_SOURCE				0x00000008
76*cdf0e10cSrcweir 	#define DA_LIST_SOURCE_TYPE			0x00000010
77*cdf0e10cSrcweir 	#define DA_INPUT_REQUIRED           0x00000020
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir     // flags for binding related control attributes
80*cdf0e10cSrcweir     #define BA_LINKED_CELL              0x00000001
81*cdf0e10cSrcweir     #define BA_LIST_LINKING_TYPE        0x00000002
82*cdf0e10cSrcweir     #define BA_LIST_CELL_RANGE          0x00000004
83*cdf0e10cSrcweir     #define BA_XFORMS_BIND              0x00000008
84*cdf0e10cSrcweir     #define BA_XFORMS_LISTBIND          0x00000010
85*cdf0e10cSrcweir     #define BA_XFORMS_SUBMISSION        0x00000020
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir 	// flags for event attributes
88*cdf0e10cSrcweir 	#define EA_CONTROL_EVENTS			0x00000001
89*cdf0e10cSrcweir 	#define EA_ON_CHANGE				0x00000002
90*cdf0e10cSrcweir 	#define EA_ON_CLICK					0x00000004
91*cdf0e10cSrcweir 	#define EA_ON_DBLCLICK				0x00000008
92*cdf0e10cSrcweir 	#define EA_ON_SELECT				0x00000010
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir 	/// attributes in the xml tag representing a form
95*cdf0e10cSrcweir 	enum FormAttributes
96*cdf0e10cSrcweir 	{
97*cdf0e10cSrcweir 		faName,
98*cdf0e10cSrcweir 		faServiceName,
99*cdf0e10cSrcweir 		faAction,
100*cdf0e10cSrcweir 		faEnctype,
101*cdf0e10cSrcweir 		faMethod,
102*cdf0e10cSrcweir 		faTargetFrame,
103*cdf0e10cSrcweir 		faAllowDeletes,
104*cdf0e10cSrcweir 		faAllowInserts,
105*cdf0e10cSrcweir 		faAllowUpdates,
106*cdf0e10cSrcweir 		faApplyFilter,
107*cdf0e10cSrcweir 		faCommand,
108*cdf0e10cSrcweir 		faCommandType,
109*cdf0e10cSrcweir 		faEscapeProcessing,
110*cdf0e10cSrcweir 		faDatasource,
111*cdf0e10cSrcweir 		faConnectionResource,
112*cdf0e10cSrcweir 		faDetailFiels,
113*cdf0e10cSrcweir 		faFilter,
114*cdf0e10cSrcweir 		faIgnoreResult,
115*cdf0e10cSrcweir 		faMasterFields,
116*cdf0e10cSrcweir 		faNavigationMode,
117*cdf0e10cSrcweir 		faOrder,
118*cdf0e10cSrcweir 		faTabbingCycle
119*cdf0e10cSrcweir 	};
120*cdf0e10cSrcweir 
121*cdf0e10cSrcweir 	// any other attributes, which are special to some control types
122*cdf0e10cSrcweir 	#define SCA_ECHO_CHAR				0x00000001
123*cdf0e10cSrcweir 	#define SCA_MAX_VALUE				0x00000002
124*cdf0e10cSrcweir 	#define SCA_MIN_VALUE				0x00000004
125*cdf0e10cSrcweir 	#define SCA_VALIDATION				0x00000008
126*cdf0e10cSrcweir 	#define SCA_MULTI_LINE				0x00000020
127*cdf0e10cSrcweir 	#define SCA_AUTOMATIC_COMPLETION	0x00000080
128*cdf0e10cSrcweir 	#define SCA_MULTIPLE				0x00000100
129*cdf0e10cSrcweir 	#define SCA_DEFAULT_BUTTON			0x00000200
130*cdf0e10cSrcweir 	#define SCA_CURRENT_STATE			0x00000400
131*cdf0e10cSrcweir 	#define SCA_IS_TRISTATE				0x00000800
132*cdf0e10cSrcweir 	#define SCA_STATE					0x00001000
133*cdf0e10cSrcweir 	#define SCA_COLUMN_STYLE_NAME		0x00002000
134*cdf0e10cSrcweir 	#define SCA_STEP_SIZE               0x00004000
135*cdf0e10cSrcweir 	#define SCA_PAGE_STEP_SIZE          0x00008000
136*cdf0e10cSrcweir 	#define SCA_REPEAT_DELAY            0x00010000
137*cdf0e10cSrcweir     #define SCA_TOGGLE                  0x00020000
138*cdf0e10cSrcweir     #define SCA_FOCUS_ON_CLICK          0x00040000
139*cdf0e10cSrcweir     #define SCA_IMAGE_POSITION          0x00080000
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir 	// attributes of the office:forms element
142*cdf0e10cSrcweir 	enum OfficeFormsAttributes
143*cdf0e10cSrcweir 	{
144*cdf0e10cSrcweir 		ofaAutomaticFocus,
145*cdf0e10cSrcweir 		ofaApplyDesignMode
146*cdf0e10cSrcweir 	};
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir 	//=====================================================================
149*cdf0e10cSrcweir 	//= OAttributeMetaData
150*cdf0e10cSrcweir 	//=====================================================================
151*cdf0e10cSrcweir 	/** allows the translation of attribute ids into strings.
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir 		<p>This class does not allow to connect xml attributes to property names or
154*cdf0e10cSrcweir 		something like that, it only deals with the xml side</p>
155*cdf0e10cSrcweir 	*/
156*cdf0e10cSrcweir 	class OAttributeMetaData
157*cdf0e10cSrcweir 	{
158*cdf0e10cSrcweir 	public:
159*cdf0e10cSrcweir 		/** calculates the xml attribute representation of a common control attribute.
160*cdf0e10cSrcweir 			@param _nId
161*cdf0e10cSrcweir 				the id of the attribute. Has to be one of the CCA_* constants.
162*cdf0e10cSrcweir 		*/
163*cdf0e10cSrcweir 		static const sal_Char* getCommonControlAttributeName(sal_Int32 _nId);
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir 		/** calculates the xml namespace key to use for a common control attribute
166*cdf0e10cSrcweir 			@param _nId
167*cdf0e10cSrcweir 				the id of the attribute. Has to be one of the CCA_* constants.
168*cdf0e10cSrcweir 		*/
169*cdf0e10cSrcweir 		static sal_uInt16 getCommonControlAttributeNamespace(sal_Int32 _nId);
170*cdf0e10cSrcweir 
171*cdf0e10cSrcweir 		/** retrieves the name of an attribute of a form xml representation
172*cdf0e10cSrcweir 			@param	_eAttrib
173*cdf0e10cSrcweir 				enum value specifying the attribute
174*cdf0e10cSrcweir 		*/
175*cdf0e10cSrcweir 		static const sal_Char* getFormAttributeName(FormAttributes _eAttrib);
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir 		/** calculates the xml namespace key to use for a attribute of a form xml representation
178*cdf0e10cSrcweir 			@param	_eAttrib
179*cdf0e10cSrcweir 				enum value specifying the attribute
180*cdf0e10cSrcweir 		*/
181*cdf0e10cSrcweir 		static sal_uInt16 getFormAttributeNamespace(FormAttributes _eAttrib);
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir 		/** calculates the xml attribute representation of a database attribute.
184*cdf0e10cSrcweir 			@param _nId
185*cdf0e10cSrcweir 				the id of the attribute. Has to be one of the DA_* constants.
186*cdf0e10cSrcweir 		*/
187*cdf0e10cSrcweir 		static const sal_Char* getDatabaseAttributeName(sal_Int32 _nId);
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir 		/** calculates the xml namespace key to use for a database attribute.
190*cdf0e10cSrcweir 			@param _nId
191*cdf0e10cSrcweir 				the id of the attribute. Has to be one of the DA_* constants.
192*cdf0e10cSrcweir 		*/
193*cdf0e10cSrcweir 		static sal_uInt16 getDatabaseAttributeNamespace(sal_Int32 _nId);
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 		/** calculates the xml attribute representation of a special attribute.
196*cdf0e10cSrcweir 			@param _nId
197*cdf0e10cSrcweir 				the id of the attribute. Has to be one of the SCA_* constants.
198*cdf0e10cSrcweir 		*/
199*cdf0e10cSrcweir 		static const sal_Char* getSpecialAttributeName(sal_Int32 _nId);
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir 		/** calculates the xml attribute representation of a binding attribute.
202*cdf0e10cSrcweir 			@param _nId
203*cdf0e10cSrcweir 				the id of the attribute. Has to be one of the BA_* constants.
204*cdf0e10cSrcweir 		*/
205*cdf0e10cSrcweir 		static const sal_Char* getBindingAttributeName(sal_Int32 _nId);
206*cdf0e10cSrcweir 
207*cdf0e10cSrcweir         /** calculates the xml namespace key to use for a binding attribute.
208*cdf0e10cSrcweir 			@param _nId
209*cdf0e10cSrcweir 				the id of the attribute. Has to be one of the BA_* constants.
210*cdf0e10cSrcweir 		*/
211*cdf0e10cSrcweir 		static sal_uInt16 getBindingAttributeNamespace(sal_Int32 _nId);
212*cdf0e10cSrcweir 
213*cdf0e10cSrcweir         /** calculates the xml namespace key to use for a special attribute.
214*cdf0e10cSrcweir 			@param _nId
215*cdf0e10cSrcweir 				the id of the attribute. Has to be one of the SCA_* constants.
216*cdf0e10cSrcweir 		*/
217*cdf0e10cSrcweir 		static sal_uInt16 getSpecialAttributeNamespace(sal_Int32 _nId);
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir 		/** calculates the xml attribute representation of a attribute of the office:forms element
220*cdf0e10cSrcweir 			@param _nId
221*cdf0e10cSrcweir 				the id of the attribute
222*cdf0e10cSrcweir 		*/
223*cdf0e10cSrcweir 		static const sal_Char* getOfficeFormsAttributeName(OfficeFormsAttributes _eAttrib);
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir 		/** calculates the xml namedspace key of a attribute of the office:forms element
226*cdf0e10cSrcweir 			@param _nId
227*cdf0e10cSrcweir 				the id of the attribute
228*cdf0e10cSrcweir 		*/
229*cdf0e10cSrcweir 		static sal_uInt16 getOfficeFormsAttributeNamespace(OfficeFormsAttributes _eAttrib);
230*cdf0e10cSrcweir 	};
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir 	//=====================================================================
233*cdf0e10cSrcweir 	//= OAttribute2Property
234*cdf0e10cSrcweir 	//=====================================================================
235*cdf0e10cSrcweir 	/** some kind of opposite to the OAttributeMetaData class. Able to translate
236*cdf0e10cSrcweir 		attributes into property names/types
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir 		<p>The construction of this class is rather expensive (or at least it's initialization from outside),
239*cdf0e10cSrcweir 		so it should be shared</p>
240*cdf0e10cSrcweir 	*/
241*cdf0e10cSrcweir 	class OAttribute2Property
242*cdf0e10cSrcweir 	{
243*cdf0e10cSrcweir 	public:
244*cdf0e10cSrcweir 		// TODO: maybe the following struct should be used for exports, too. In this case we would not need to
245*cdf0e10cSrcweir 		// store it's instances in a map, but in a vector for faster access.
246*cdf0e10cSrcweir 		struct AttributeAssignment
247*cdf0e10cSrcweir 		{
248*cdf0e10cSrcweir 			::rtl::OUString					sAttributeName;			// the attribute name
249*cdf0e10cSrcweir 			::rtl::OUString					sPropertyName;			// the property name
250*cdf0e10cSrcweir 			::com::sun::star::uno::Type		aPropertyType;			// the property type
251*cdf0e10cSrcweir 			::rtl::OUString					sAttributeDefault;		// the default if the attribute is not present
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir 			// entries which are special to some value types
254*cdf0e10cSrcweir 			const SvXMLEnumMapEntry*		pEnumMap;				// the enum map, if appliable
255*cdf0e10cSrcweir 			sal_Bool						bInverseSemantics;		// for booleanss: attribute and property value have the same or an inverse semantics?
256*cdf0e10cSrcweir 
257*cdf0e10cSrcweir 			AttributeAssignment() : pEnumMap(NULL), bInverseSemantics(sal_False) { }
258*cdf0e10cSrcweir 		};
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir 	protected:
261*cdf0e10cSrcweir 		DECLARE_STL_USTRINGACCESS_MAP( AttributeAssignment, AttributeAssignments );
262*cdf0e10cSrcweir 		AttributeAssignments		m_aKnownProperties;
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir 	public:
265*cdf0e10cSrcweir 		OAttribute2Property();
266*cdf0e10cSrcweir 		virtual ~OAttribute2Property();
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir 		/** return the AttributeAssignment which corresponds to the given attribute
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir 			@param _rAttribName
271*cdf0e10cSrcweir 				the name of the attrribute
272*cdf0e10cSrcweir 			@return
273*cdf0e10cSrcweir 				a pointer to the <type>AttributeAssignment</type> structure as requested, NULL if the attribute
274*cdf0e10cSrcweir 				does not represent a property.
275*cdf0e10cSrcweir 		*/
276*cdf0e10cSrcweir 		const AttributeAssignment* getAttributeTranslation(
277*cdf0e10cSrcweir 			const ::rtl::OUString& _rAttribName);
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir 		/** add a attribute assignment referring to a string property to the map
280*cdf0e10cSrcweir 			@param _pAttributeName
281*cdf0e10cSrcweir 				the name of the attrribute
282*cdf0e10cSrcweir 			@param _rPropertyName
283*cdf0e10cSrcweir 				the name of the property assigned to the attribute
284*cdf0e10cSrcweir 			@param _pAttributeDefault
285*cdf0e10cSrcweir 				the default value for the attribute, if any. May be NULL, in this case the default is assumed to be
286*cdf0e10cSrcweir 				an empty string.
287*cdf0e10cSrcweir 		*/
288*cdf0e10cSrcweir 		void	addStringProperty(
289*cdf0e10cSrcweir 			const sal_Char* _pAttributeName, const ::rtl::OUString& _rPropertyName,
290*cdf0e10cSrcweir 			const sal_Char* _pAttributeDefault = NULL);
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir 		/** add a attribute assignment referring to a boolean property to the map
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir 			@param _pAttributeName
295*cdf0e10cSrcweir 				the name of the attrribute
296*cdf0e10cSrcweir 			@param _rPropertyName
297*cdf0e10cSrcweir 				the name of the property assigned to the attribute
298*cdf0e10cSrcweir 			@param _bAttributeDefault
299*cdf0e10cSrcweir 				the default value for the attribute.
300*cdf0e10cSrcweir 			@param _bInverseSemantics
301*cdf0e10cSrcweir 				if <TRUE/>, a attribute value of <TRUE/> means a property value of <FALSE/> and vice verse.<br/>
302*cdf0e10cSrcweir 				if <FALSE/>, the attribute value is used as property value directly
303*cdf0e10cSrcweir 		*/
304*cdf0e10cSrcweir 		void	addBooleanProperty(
305*cdf0e10cSrcweir 			const sal_Char* _pAttributeName, const ::rtl::OUString& _rPropertyName,
306*cdf0e10cSrcweir 			const sal_Bool _bAttributeDefault, const sal_Bool _bInverseSemantics = sal_False);
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir 		/** add a attribute assignment referring to an int16 property to the map
309*cdf0e10cSrcweir 
310*cdf0e10cSrcweir 			@param _pAttributeName
311*cdf0e10cSrcweir 				the name of the attrribute
312*cdf0e10cSrcweir 			@param _rPropertyName
313*cdf0e10cSrcweir 				the name of the property assigned to the attribute
314*cdf0e10cSrcweir 			@param _nAttributeDefault
315*cdf0e10cSrcweir 				the default value for the attribute.
316*cdf0e10cSrcweir 		*/
317*cdf0e10cSrcweir 		void	addInt16Property(
318*cdf0e10cSrcweir 			const sal_Char* _pAttributeName, const ::rtl::OUString& _rPropertyName,
319*cdf0e10cSrcweir 			const sal_Int16 _nAttributeDefault);
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir 		/** add a attribute assignment referring to an int32 property to the map
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir 			@param _pAttributeName
324*cdf0e10cSrcweir 				the name of the attrribute
325*cdf0e10cSrcweir 			@param _rPropertyName
326*cdf0e10cSrcweir 				the name of the property assigned to the attribute
327*cdf0e10cSrcweir 			@param _nAttributeDefault
328*cdf0e10cSrcweir 				the default value for the attribute.
329*cdf0e10cSrcweir 		*/
330*cdf0e10cSrcweir 		void	addInt32Property(
331*cdf0e10cSrcweir 			const sal_Char* _pAttributeName, const ::rtl::OUString& _rPropertyName,
332*cdf0e10cSrcweir 			const sal_Int32 _nAttributeDefault );
333*cdf0e10cSrcweir 
334*cdf0e10cSrcweir 		/** add a attribute assignment referring to an enum property to the map
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir 			@param _pAttributeName
337*cdf0e10cSrcweir 				the name of the attrribute
338*cdf0e10cSrcweir 			@param _rPropertyName
339*cdf0e10cSrcweir 				the name of the property assigned to the attribute
340*cdf0e10cSrcweir 			@param _nAttributeDefault
341*cdf0e10cSrcweir 				the default value for the attribute, as (32bit) integer
342*cdf0e10cSrcweir 			@param _pValueMap
343*cdf0e10cSrcweir 				the map to translate strings into enum values
344*cdf0e10cSrcweir 			@param _pType
345*cdf0e10cSrcweir 				the type of the property. May be NULL, in this case 32bit integer is assumed.
346*cdf0e10cSrcweir 		*/
347*cdf0e10cSrcweir 		void	addEnumProperty(
348*cdf0e10cSrcweir 			const sal_Char* _pAttributeName, const ::rtl::OUString& _rPropertyName,
349*cdf0e10cSrcweir 			const sal_uInt16 _nAttributeDefault, const SvXMLEnumMapEntry* _pValueMap,
350*cdf0e10cSrcweir 			const ::com::sun::star::uno::Type* _pType = NULL);
351*cdf0e10cSrcweir 
352*cdf0e10cSrcweir 	protected:
353*cdf0e10cSrcweir 		/// some common code for the various add*Property methods
354*cdf0e10cSrcweir 		AttributeAssignment& implAdd(
355*cdf0e10cSrcweir 			const sal_Char* _pAttributeName, const ::rtl::OUString& _rPropertyName,
356*cdf0e10cSrcweir 			const ::com::sun::star::uno::Type& _rType, const ::rtl::OUString& _rDefaultString);
357*cdf0e10cSrcweir 	};
358*cdf0e10cSrcweir //.........................................................................
359*cdf0e10cSrcweir }	// namespace xmloff
360*cdf0e10cSrcweir //.........................................................................
361*cdf0e10cSrcweir 
362*cdf0e10cSrcweir #endif // _XMLOFF_FORMATTRIBUTES_HXX_
363*cdf0e10cSrcweir 
364