tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / xmloff / source / forms / formenums.cxx
blob7f2e6a253f8156e6442951593756b71b935d7a48
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include "formenums.hxx"
21 #include <com/sun/star/sdb/CommandType.hpp>
22 #include <com/sun/star/awt/TextAlign.hpp>
23 #include <com/sun/star/awt/FontEmphasisMark.hpp>
24 #include <com/sun/star/awt/FontRelief.hpp>
25 #include <com/sun/star/awt/ScrollBarOrientation.hpp>
26 #include <com/sun/star/awt/VisualEffect.hpp>
27 #include <com/sun/star/awt/ImageScaleMode.hpp>
28 #include <tools/gen.hxx>
29 #include <xmloff/xmltoken.hxx>
31 namespace xmloff
34 using namespace ::com::sun::star::form;
35 using namespace ::com::sun::star::sdb;
36 using namespace ::com::sun::star::awt;
37 using namespace ::com::sun::star;
38 using namespace ::xmloff::token;
40 const SvXMLEnumMapEntry<FormSubmitEncoding> aSubmitEncodingMap[] =
42 { XML_APPLICATION_X_WWW_FORM_URLENCODED, FormSubmitEncoding_URL },
43 { XML_MULTIPART_FORMDATA, FormSubmitEncoding_MULTIPART },
44 { XML_APPLICATION_TEXT, FormSubmitEncoding_TEXT },
45 { XML_TOKEN_INVALID, FormSubmitEncoding(0) }
47 const SvXMLEnumMapEntry<FormSubmitMethod> aSubmitMethodMap[] =
49 { XML_GET, FormSubmitMethod_GET },
50 { XML_POST, FormSubmitMethod_POST },
51 { XML_TOKEN_INVALID, FormSubmitMethod(0) }
53 const SvXMLEnumMapEntry<sal_Int32> aCommandTypeMap[] =
55 { XML_TABLE, CommandType::TABLE },
56 { XML_QUERY, CommandType::QUERY },
57 { XML_COMMAND, CommandType::COMMAND },
58 { XML_TOKEN_INVALID, 0 }
60 const SvXMLEnumMapEntry<NavigationBarMode> aNavigationTypeMap[] =
62 { XML_NONE, NavigationBarMode_NONE },
63 { XML_CURRENT, NavigationBarMode_CURRENT },
64 { XML_PARENT, NavigationBarMode_PARENT },
65 { XML_TOKEN_INVALID, NavigationBarMode(0) }
67 const SvXMLEnumMapEntry<TabulatorCycle> aTabulatorCycleMap[] =
69 { XML_RECORDS, TabulatorCycle_RECORDS },
70 { XML_CURRENT, TabulatorCycle_CURRENT },
71 { XML_PAGE, TabulatorCycle_PAGE },
72 { XML_TOKEN_INVALID, TabulatorCycle(0) }
74 const SvXMLEnumMapEntry<FormButtonType> aFormButtonTypeMap[] =
76 { XML_PUSH, FormButtonType_PUSH },
77 { XML_SUBMIT, FormButtonType_SUBMIT },
78 { XML_RESET, FormButtonType_RESET },
79 { XML_URL, FormButtonType_URL },
80 { XML_TOKEN_INVALID, FormButtonType(0) }
82 const SvXMLEnumMapEntry<ListSourceType> aListSourceTypeMap[] =
84 { XML_VALUE_LIST, ListSourceType_VALUELIST },
85 { XML_TABLE, ListSourceType_TABLE },
86 { XML_QUERY, ListSourceType_QUERY },
87 { XML_SQL, ListSourceType_SQL },
88 { XML_SQL_PASS_THROUGH, ListSourceType_SQLPASSTHROUGH },
89 { XML_TABLE_FIELDS, ListSourceType_TABLEFIELDS },
90 { XML_TOKEN_INVALID, ListSourceType(0) }
92 // check state of a checkbox
93 const SvXMLEnumMapEntry<TriState> aCheckStateMap[] =
95 { XML_UNCHECKED, TRISTATE_FALSE },
96 { XML_CHECKED, TRISTATE_TRUE },
97 { XML_UNKNOWN, TRISTATE_INDET },
98 { XML_TOKEN_INVALID, TriState(0) }
100 const SvXMLEnumMapEntry<sal_Int16> aTextAlignMap[] =
102 { XML_START, sal_uInt16(awt::TextAlign::LEFT) },
103 { XML_CENTER, sal_uInt16(awt::TextAlign::CENTER) },
104 { XML_END, sal_uInt16(awt::TextAlign::RIGHT) },
105 { XML_JUSTIFY, -1 },
106 { XML_JUSTIFIED, -1 },
107 { XML_TOKEN_INVALID, 0 }
109 const SvXMLEnumMapEntry<sal_uInt16> aBorderTypeMap[] =
111 { XML_NONE, 0 },
112 { XML_HIDDEN, 0 },
113 { XML_SOLID, 2 },
114 { XML_DOUBLE, 2 },
115 { XML_DOTTED, 2 },
116 { XML_DASHED, 2 },
117 { XML_GROOVE, 1 },
118 { XML_RIDGE, 1 },
119 { XML_INSET, 1 },
120 { XML_OUTSET, 1 },
121 { XML_TOKEN_INVALID, 0 }
123 const SvXMLEnumMapEntry<sal_uInt16> aFontEmphasisMap[] =
125 { XML_NONE, awt::FontEmphasisMark::NONE },
126 { XML_DOT, awt::FontEmphasisMark::DOT },
127 { XML_CIRCLE, awt::FontEmphasisMark::CIRCLE },
128 { XML_DISC, awt::FontEmphasisMark::DISC },
129 { XML_ACCENT, awt::FontEmphasisMark::ACCENT },
130 { XML_TOKEN_INVALID, 0 }
132 const SvXMLEnumMapEntry<sal_uInt16> aFontReliefMap[] =
134 { XML_NONE, FontRelief::NONE },
135 { XML_ENGRAVED, FontRelief::ENGRAVED },
136 { XML_EMBOSSED, FontRelief::EMBOSSED },
137 { XML_TOKEN_INVALID, 0 }
139 const SvXMLEnumMapEntry<sal_Int16> aListLinkageMap[] =
141 { XML_SELECTION, 0 },
142 { XML_SELECTION_INDEXES, 1 },
143 { XML_TOKEN_INVALID, 0 }
145 const SvXMLEnumMapEntry<sal_Int32> aOrientationMap[] =
147 { XML_HORIZONTAL, ScrollBarOrientation::HORIZONTAL },
148 { XML_VERTICAL, ScrollBarOrientation::VERTICAL },
149 { XML_TOKEN_INVALID, 0 }
151 const SvXMLEnumMapEntry<sal_Int16> aVisualEffectMap[] =
153 { XML_NONE, VisualEffect::NONE },
154 { XML_3D, VisualEffect::LOOK3D },
155 { XML_FLAT, VisualEffect::FLAT },
156 { XML_TOKEN_INVALID, 0 }
158 const SvXMLEnumMapEntry<sal_Int16> aImagePositionMap[] =
160 { XML_START, 0 },
161 { XML_END, 1 },
162 { XML_TOP, 2 },
163 { XML_BOTTOM, 3 },
164 { XML_CENTER, -1 },
165 { XML_TOKEN_INVALID, 0 }
167 const SvXMLEnumMapEntry<sal_uInt16> aImageAlignMap[] =
169 { XML_START, 0 },
170 { XML_CENTER, 1 },
171 { XML_END, 2 },
172 { XML_TOKEN_INVALID, 0 }
174 const SvXMLEnumMapEntry<sal_uInt16> aScaleModeMap[] =
176 { XML_BACKGROUND_NO_REPEAT, ImageScaleMode::NONE },
177 { XML_REPEAT, ImageScaleMode::NONE }, // repeating the image is not supported
178 { XML_STRETCH, ImageScaleMode::ANISOTROPIC },
179 { XML_SCALE, ImageScaleMode::ISOTROPIC },
180 { XML_TOKEN_INVALID, 0 }
183 } // namespace xmloff
185 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */