xref: /trunk/main/xmloff/source/forms/controlelement.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*ecfe53c5SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ecfe53c5SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ecfe53c5SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ecfe53c5SAndrew Rist  * distributed with this work for additional information
6*ecfe53c5SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ecfe53c5SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ecfe53c5SAndrew Rist  * "License"); you may not use this file except in compliance
9*ecfe53c5SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*ecfe53c5SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*ecfe53c5SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ecfe53c5SAndrew Rist  * software distributed under the License is distributed on an
15*ecfe53c5SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ecfe53c5SAndrew Rist  * KIND, either express or implied.  See the License for the
17*ecfe53c5SAndrew Rist  * specific language governing permissions and limitations
18*ecfe53c5SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*ecfe53c5SAndrew Rist  *************************************************************/
21*ecfe53c5SAndrew Rist 
22*ecfe53c5SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _XMLOFF_FORMS_CONTROLELEMENT_HXX_
25cdf0e10cSrcweir #define _XMLOFF_FORMS_CONTROLELEMENT_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <sal/types.h>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir //.........................................................................
30cdf0e10cSrcweir namespace xmloff
31cdf0e10cSrcweir {
32cdf0e10cSrcweir //.........................................................................
33cdf0e10cSrcweir 
34cdf0e10cSrcweir     //=====================================================================
35cdf0e10cSrcweir     //= OControlElement
36cdf0e10cSrcweir     //=====================================================================
37cdf0e10cSrcweir     /** helper for translating between control types and XML tags
38cdf0e10cSrcweir     */
39cdf0e10cSrcweir     class OControlElement
40cdf0e10cSrcweir     {
41cdf0e10cSrcweir     public:
42cdf0e10cSrcweir         enum ElementType
43cdf0e10cSrcweir         {
44cdf0e10cSrcweir             TEXT = 0,
45cdf0e10cSrcweir             TEXT_AREA,
46cdf0e10cSrcweir             PASSWORD,
47cdf0e10cSrcweir             FILE,
48cdf0e10cSrcweir             FORMATTED_TEXT,
49cdf0e10cSrcweir             FIXED_TEXT,
50cdf0e10cSrcweir             COMBOBOX,
51cdf0e10cSrcweir             LISTBOX,
52cdf0e10cSrcweir             BUTTON,
53cdf0e10cSrcweir             IMAGE,
54cdf0e10cSrcweir             CHECKBOX,
55cdf0e10cSrcweir             RADIO,
56cdf0e10cSrcweir             FRAME,
57cdf0e10cSrcweir             IMAGE_FRAME,
58cdf0e10cSrcweir             HIDDEN,
59cdf0e10cSrcweir             GRID,
60cdf0e10cSrcweir             VALUERANGE,
61cdf0e10cSrcweir             GENERIC_CONTROL,
62cdf0e10cSrcweir             TIME,
63cdf0e10cSrcweir             DATE,
64cdf0e10cSrcweir 
65cdf0e10cSrcweir             UNKNOWN // must be the last element
66cdf0e10cSrcweir         };
67cdf0e10cSrcweir 
68cdf0e10cSrcweir     protected:
69cdf0e10cSrcweir         /** ctor.
70cdf0e10cSrcweir             <p>This default constructor is protected, 'cause this class is not intended to be instantiated
71cdf0e10cSrcweir             directly. Instead, the derived classes should be used.</p>
72cdf0e10cSrcweir         */
OControlElement()73cdf0e10cSrcweir         OControlElement() { }
74cdf0e10cSrcweir 
75cdf0e10cSrcweir     public:
76cdf0e10cSrcweir         /** retrieves the tag name to be used to describe a control of the given type
77cdf0e10cSrcweir 
78cdf0e10cSrcweir             <p>The retuned string is the pure element name, without any namespace.</p>
79cdf0e10cSrcweir 
80cdf0e10cSrcweir             @param  _eType
81cdf0e10cSrcweir                 the element type
82cdf0e10cSrcweir         */
83cdf0e10cSrcweir         static const sal_Char* getElementName(ElementType _eType);
84cdf0e10cSrcweir     };
85cdf0e10cSrcweir 
86cdf0e10cSrcweir //.........................................................................
87cdf0e10cSrcweir }   // namespace xmloff
88cdf0e10cSrcweir //.........................................................................
89cdf0e10cSrcweir 
90cdf0e10cSrcweir #endif // _XMLOFF_FORMS_CONTROLELEMENT_HXX_
91