LibreOffice Module xmloff (master)  1
formenums.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include "formenums.hxx"
21 #include <com/sun/star/form/FormSubmitEncoding.hpp>
22 #include <com/sun/star/form/FormSubmitMethod.hpp>
23 #include <com/sun/star/sdb/CommandType.hpp>
24 #include <com/sun/star/form/NavigationBarMode.hpp>
25 #include <com/sun/star/form/TabulatorCycle.hpp>
26 #include <com/sun/star/form/FormButtonType.hpp>
27 #include <com/sun/star/form/ListSourceType.hpp>
28 #include <com/sun/star/awt/TextAlign.hpp>
29 #include <com/sun/star/awt/FontEmphasisMark.hpp>
30 #include <com/sun/star/awt/FontRelief.hpp>
31 #include <com/sun/star/awt/ScrollBarOrientation.hpp>
32 #include <com/sun/star/awt/VisualEffect.hpp>
33 #include <com/sun/star/awt/ImageScaleMode.hpp>
34 #include <tools/gen.hxx>
35 #include <xmloff/xmltoken.hxx>
36 
37 namespace xmloff
38 {
39 
40 using namespace ::com::sun::star::form;
41 using namespace ::com::sun::star::sdb;
42 using namespace ::com::sun::star::awt;
43 using namespace ::com::sun::star;
44 using namespace ::xmloff::token;
45 
47 {
48  { XML_APPLICATION_X_WWW_FORM_URLENCODED, FormSubmitEncoding_URL },
49  { XML_MULTIPART_FORMDATA, FormSubmitEncoding_MULTIPART },
50  { XML_APPLICATION_TEXT, FormSubmitEncoding_TEXT },
51  { XML_TOKEN_INVALID, FormSubmitEncoding(0) }
52 };
54 {
55  { XML_GET, FormSubmitMethod_GET },
56  { XML_POST, FormSubmitMethod_POST },
57  { XML_TOKEN_INVALID, FormSubmitMethod(0) }
58 };
60 {
61  { XML_TABLE, CommandType::TABLE },
62  { XML_QUERY, CommandType::QUERY },
63  { XML_COMMAND, CommandType::COMMAND },
64  { XML_TOKEN_INVALID, 0 }
65 };
67 {
68  { XML_NONE, NavigationBarMode_NONE },
69  { XML_CURRENT, NavigationBarMode_CURRENT },
70  { XML_PARENT, NavigationBarMode_PARENT },
71  { XML_TOKEN_INVALID, NavigationBarMode(0) }
72 };
74 {
75  { XML_RECORDS, TabulatorCycle_RECORDS },
76  { XML_CURRENT, TabulatorCycle_CURRENT },
77  { XML_PAGE, TabulatorCycle_PAGE },
78  { XML_TOKEN_INVALID, TabulatorCycle(0) }
79 };
81 {
82  { XML_PUSH, FormButtonType_PUSH },
83  { XML_SUBMIT, FormButtonType_SUBMIT },
84  { XML_RESET, FormButtonType_RESET },
85  { XML_URL, FormButtonType_URL },
86  { XML_TOKEN_INVALID, FormButtonType(0) }
87 };
89 {
90  { XML_VALUE_LIST, ListSourceType_VALUELIST },
91  { XML_TABLE, ListSourceType_TABLE },
92  { XML_QUERY, ListSourceType_QUERY },
93  { XML_SQL, ListSourceType_SQL },
94  { XML_SQL_PASS_THROUGH, ListSourceType_SQLPASSTHROUGH },
95  { XML_TABLE_FIELDS, ListSourceType_TABLEFIELDS },
96  { XML_TOKEN_INVALID, ListSourceType(0) }
97 };
98 // check state of a checkbox
100 {
105 };
107 {
108  { XML_START, sal_uInt16(awt::TextAlign::LEFT) },
109  { XML_CENTER, sal_uInt16(awt::TextAlign::CENTER) },
110  { XML_END, sal_uInt16(awt::TextAlign::RIGHT) },
111  { XML_JUSTIFY, -1 },
112  { XML_JUSTIFIED, -1 },
113  { XML_TOKEN_INVALID, 0 }
114 };
116 {
117  { XML_NONE, 0 },
118  { XML_HIDDEN, 0 },
119  { XML_SOLID, 2 },
120  { XML_DOUBLE, 2 },
121  { XML_DOTTED, 2 },
122  { XML_DASHED, 2 },
123  { XML_GROOVE, 1 },
124  { XML_RIDGE, 1 },
125  { XML_INSET, 1 },
126  { XML_OUTSET, 1 },
127  { XML_TOKEN_INVALID, 0 }
128 };
130 {
131  { XML_NONE, awt::FontEmphasisMark::NONE },
132  { XML_DOT, awt::FontEmphasisMark::DOT },
133  { XML_CIRCLE, awt::FontEmphasisMark::CIRCLE },
134  { XML_DISC, awt::FontEmphasisMark::DISC },
135  { XML_ACCENT, awt::FontEmphasisMark::ACCENT },
136  { XML_TOKEN_INVALID, 0 }
137 };
139 {
140  { XML_NONE, FontRelief::NONE },
141  { XML_ENGRAVED, FontRelief::ENGRAVED },
142  { XML_EMBOSSED, FontRelief::EMBOSSED },
143  { XML_TOKEN_INVALID, 0 }
144 };
146 {
147  { XML_SELECTION, 0 },
148  { XML_SELECTION_INDEXES, 1 },
149  { XML_TOKEN_INVALID, 0 }
150 };
152 {
153  { XML_HORIZONTAL, ScrollBarOrientation::HORIZONTAL },
154  { XML_VERTICAL, ScrollBarOrientation::VERTICAL },
155  { XML_TOKEN_INVALID, 0 }
156 };
158 {
159  { XML_NONE, VisualEffect::NONE },
160  { XML_3D, VisualEffect::LOOK3D },
161  { XML_FLAT, VisualEffect::FLAT },
162  { XML_TOKEN_INVALID, 0 }
163 };
165 {
166  { XML_START, 0 },
167  { XML_END, 1 },
168  { XML_TOP, 2 },
169  { XML_BOTTOM, 3 },
170  { XML_CENTER, -1 },
171  { XML_TOKEN_INVALID, 0 }
172 };
174 {
175  { XML_START, 0 },
176  { XML_CENTER, 1 },
177  { XML_END, 2 },
178  { XML_TOKEN_INVALID, 0 }
179 };
181 {
182  { XML_BACKGROUND_NO_REPEAT, ImageScaleMode::NONE },
183  { XML_REPEAT, ImageScaleMode::NONE }, // repeating the image is not supported
184  { XML_STRETCH, ImageScaleMode::ANISOTROPIC },
185  { XML_SCALE, ImageScaleMode::ISOTROPIC },
186  { XML_TOKEN_INVALID, 0 }
187 };
188 
189 } // namespace xmloff
190 
191 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SvXMLEnumMapEntry< sal_Int32 > aCommandTypeMap[]
Definition: formenums.cxx:59
const SvXMLEnumMapEntry< sal_Int32 > aOrientationMap[]
Definition: formenums.cxx:151
const SvXMLEnumMapEntry< NavigationBarMode > aNavigationTypeMap[]
Definition: formenums.cxx:66
const SvXMLEnumMapEntry< FormSubmitEncoding > aSubmitEncodingMap[]
Definition: formenums.cxx:46
const SvXMLEnumMapEntry< FormSubmitMethod > aSubmitMethodMap[]
Definition: formenums.cxx:53
TRISTATE_TRUE
const SvXMLEnumMapEntry< TriState > aCheckStateMap[]
Definition: formenums.cxx:99
const SvXMLEnumMapEntry< ListSourceType > aListSourceTypeMap[]
Definition: formenums.cxx:88
const SvXMLEnumMapEntry< sal_Int16 > aImagePositionMap[]
Definition: formenums.cxx:164
TRISTATE_INDET
const SvXMLEnumMapEntry< FormButtonType > aFormButtonTypeMap[]
Definition: formenums.cxx:80
TRISTATE_FALSE
const SvXMLEnumMapEntry< sal_uInt16 > aBorderTypeMap[]
Definition: formenums.cxx:115
const SvXMLEnumMapEntry< sal_uInt16 > aImageAlignMap[]
Definition: formenums.cxx:173
const SvXMLEnumMapEntry< sal_Int16 > aTextAlignMap[]
Definition: formenums.cxx:106
Map an XMLTokenEnum to an enum value.
Definition: ximpshap.hxx:40
Handling of tokens in XML:
const SvXMLEnumMapEntry< sal_Int16 > aListLinkageMap[]
Definition: formenums.cxx:145
const SvXMLEnumMapEntry< sal_uInt16 > aFontReliefMap[]
Definition: formenums.cxx:138
const SvXMLEnumMapEntry< sal_uInt16 > aFontEmphasisMap[]
Definition: formenums.cxx:129
const SvXMLEnumMapEntry< sal_Int16 > aVisualEffectMap[]
Definition: formenums.cxx:157
const SvXMLEnumMapEntry< TabulatorCycle > aTabulatorCycleMap[]
Definition: formenums.cxx:73
const SvXMLEnumMapEntry< sal_uInt16 > aScaleModeMap[]
Definition: formenums.cxx:180
TriState