1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 "controlelement.hxx"
21 #include <xmloff/xmltoken.hxx>
23 using namespace ::xmloff::token
;
29 OUString
OControlElement::getElementName(ElementType _eType
)
33 case TEXT
: return u
"text"_ustr
;
34 case TEXT_AREA
: return u
"textarea"_ustr
;
35 case PASSWORD
: return u
"password"_ustr
;
36 case FILE: return u
"file"_ustr
;
37 case FORMATTED_TEXT
: return u
"formatted-text"_ustr
;
38 case FIXED_TEXT
: return u
"fixed-text"_ustr
;
39 case COMBOBOX
: return u
"combobox"_ustr
;
40 case LISTBOX
: return u
"listbox"_ustr
;
41 case BUTTON
: return u
"button"_ustr
;
42 case IMAGE
: return u
"image"_ustr
;
43 case CHECKBOX
: return u
"checkbox"_ustr
;
44 case RADIO
: return u
"radio"_ustr
;
45 case FRAME
: return u
"frame"_ustr
;
46 case IMAGE_FRAME
: return u
"image-frame"_ustr
;
47 case HIDDEN
: return u
"hidden"_ustr
;
48 case GRID
: return u
"grid"_ustr
;
49 case VALUERANGE
: return u
"value-range"_ustr
;
50 case TIME
: return u
"time"_ustr
;
51 case DATE
: return u
"date"_ustr
;
53 default: return u
"generic-control"_ustr
;
57 sal_Int32
OControlElement::getElementToken(ElementType _eType
)
61 case TEXT
: return XML_TEXT
;
62 case TEXT_AREA
: return XML_TEXTAREA
;
63 case PASSWORD
: return XML_PASSWORD
;
64 case FILE: return XML_FILE
;
65 case FORMATTED_TEXT
: return XML_FORMATTED_TEXT
;
66 case FIXED_TEXT
: return XML_FIXED_TEXT
;
67 case COMBOBOX
: return XML_COMBOBOX
;
68 case LISTBOX
: return XML_LISTBOX
;
69 case BUTTON
: return XML_BUTTON
;
70 case IMAGE
: return XML_IMAGE
;
71 case CHECKBOX
: return XML_CHECKBOX
;
72 case RADIO
: return XML_RADIO
;
73 case FRAME
: return XML_FRAME
;
74 case IMAGE_FRAME
: return XML_IMAGE_FRAME
;
75 case HIDDEN
: return XML_HIDDEN
;
76 case GRID
: return XML_GRID
;
77 case VALUERANGE
: return XML_VALUE_RANGE
;
78 case TIME
: return XML_TIME
;
79 case DATE
: return XML_DATE
;
81 default: return XML_GENERIC_CONTROL
;
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */