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_CONTROLELEMENT_HXX_
25 #define _XMLOFF_FORMS_CONTROLELEMENT_HXX_
26 
27 #include <sal/types.h>
28 
29 //.........................................................................
30 namespace xmloff
31 {
32 //.........................................................................
33 
34 	//=====================================================================
35 	//= OControlElement
36 	//=====================================================================
37 	/** helper for translating between control types and XML tags
38 	*/
39 	class OControlElement
40 	{
41 	public:
42 		enum ElementType
43 		{
44 			TEXT = 0,
45 			TEXT_AREA,
46 			PASSWORD,
47 			FILE,
48 			FORMATTED_TEXT,
49 			FIXED_TEXT,
50 			COMBOBOX,
51 			LISTBOX,
52 			BUTTON,
53 			IMAGE,
54 			CHECKBOX,
55 			RADIO,
56 			FRAME,
57 			IMAGE_FRAME,
58 			HIDDEN,
59 			GRID,
60             VALUERANGE,
61 			GENERIC_CONTROL,
62             TIME,
63             DATE,
64 
65 			UNKNOWN	// must be the last element
66 		};
67 
68 	protected:
69 		/** ctor.
70 			<p>This default constructor is protected, 'cause this class is not intended to be instantiated
71 			directly. Instead, the derived classes should be used.</p>
72 		*/
OControlElement()73 		OControlElement() { }
74 
75 	public:
76 		/** retrieves the tag name to be used to describe a control of the given type
77 
78 			<p>The retuned string is the pure element name, without any namespace.</p>
79 
80 			@param	_eType
81 				the element type
82 		*/
83 		static const sal_Char* getElementName(ElementType _eType);
84 	};
85 
86 //.........................................................................
87 }	// namespace xmloff
88 //.........................................................................
89 
90 #endif // _XMLOFF_FORMS_CONTROLELEMENT_HXX_
91 
92