bump product version to 7.6.3.2-android
[LibreOffice.git] / xmloff / source / forms / controlelement.cxx
blobaf752ae4bdc59e629291a50640590d78a64c9269
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 "controlelement.hxx"
21 #include <xmloff/xmltoken.hxx>
23 using namespace ::xmloff::token;
25 namespace xmloff
28 //= OControlElement
29 const char* OControlElement::getElementName(ElementType _eType)
31 switch (_eType)
33 case TEXT: return "text";
34 case TEXT_AREA: return "textarea";
35 case PASSWORD: return "password";
36 case FILE: return "file";
37 case FORMATTED_TEXT: return "formatted-text";
38 case FIXED_TEXT: return "fixed-text";
39 case COMBOBOX: return "combobox";
40 case LISTBOX: return "listbox";
41 case BUTTON: return "button";
42 case IMAGE: return "image";
43 case CHECKBOX: return "checkbox";
44 case RADIO: return "radio";
45 case FRAME: return "frame";
46 case IMAGE_FRAME: return "image-frame";
47 case HIDDEN: return "hidden";
48 case GRID: return "grid";
49 case VALUERANGE: return "value-range";
50 case TIME: return "time";
51 case DATE: return "date";
53 default: return "generic-control";
57 sal_Int32 OControlElement::getElementToken(ElementType _eType)
59 switch (_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;
85 } // namespace xmloff
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */