LibreOffice Module xmloff (master)
1
xmloff
source
forms
controlelement.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 "
controlelement.hxx
"
21
#include <
xmloff/xmltoken.hxx
>
22
23
using namespace
::
xmloff::token
;
24
25
namespace
xmloff
26
{
27
28
//= OControlElement
29
const
char
*
OControlElement::getElementName
(
ElementType
_eType)
30
{
31
switch
(_eType)
32
{
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"
;
52
53
default
:
return
"generic-control"
;
54
}
55
}
56
57
sal_Int32
OControlElement::getElementToken
(
ElementType
_eType)
58
{
59
switch
(_eType)
60
{
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
;
80
81
default
:
return
XML_GENERIC_CONTROL
;
82
}
83
}
84
85
}
// namespace xmloff
86
87
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
xmloff::OControlElement::ElementType
ElementType
Definition:
controlelement.hxx:34
xmloff::OControlElement::TEXT_AREA
@ TEXT_AREA
Definition:
controlelement.hxx:36
xmloff::OControlElement::TIME
@ TIME
Definition:
controlelement.hxx:53
xmloff::OControlElement::COMBOBOX
@ COMBOBOX
Definition:
controlelement.hxx:41
xmloff::OControlElement::CHECKBOX
@ CHECKBOX
Definition:
controlelement.hxx:45
xmloff::OControlElement::DATE
@ DATE
Definition:
controlelement.hxx:54
xmloff::OControlElement::FIXED_TEXT
@ FIXED_TEXT
Definition:
controlelement.hxx:40
xmloff::OControlElement::FRAME
@ FRAME
Definition:
controlelement.hxx:47
xmloff::OControlElement::IMAGE_FRAME
@ IMAGE_FRAME
Definition:
controlelement.hxx:48
xmloff::OControlElement::BUTTON
@ BUTTON
Definition:
controlelement.hxx:43
xmloff::OControlElement::RADIO
@ RADIO
Definition:
controlelement.hxx:46
xmloff::OControlElement::TEXT
@ TEXT
Definition:
controlelement.hxx:35
xmloff::OControlElement::LISTBOX
@ LISTBOX
Definition:
controlelement.hxx:42
xmloff::OControlElement::VALUERANGE
@ VALUERANGE
Definition:
controlelement.hxx:51
xmloff::OControlElement::GRID
@ GRID
Definition:
controlelement.hxx:50
xmloff::OControlElement::FORMATTED_TEXT
@ FORMATTED_TEXT
Definition:
controlelement.hxx:39
xmloff::OControlElement::IMAGE
@ IMAGE
Definition:
controlelement.hxx:44
xmloff::OControlElement::FILE
@ FILE
Definition:
controlelement.hxx:38
xmloff::OControlElement::PASSWORD
@ PASSWORD
Definition:
controlelement.hxx:37
xmloff::OControlElement::HIDDEN
@ HIDDEN
Definition:
controlelement.hxx:49
xmloff::OControlElement::getElementToken
static sal_Int32 getElementToken(ElementType _eType)
retrieves the tag name to be used to describe a control of the given type
Definition:
controlelement.cxx:57
xmloff::OControlElement::getElementName
static const char * getElementName(ElementType _eType)
retrieves the tag name to be used to describe a control of the given type
Definition:
controlelement.cxx:29
controlelement.hxx
xmloff::token
Handling of tokens in XML:
Definition:
fasttokenhandler.cxx:31
xmloff::token::XML_PASSWORD
@ XML_PASSWORD
Definition:
xmltoken.hxx:1507
xmloff::token::XML_FORMATTED_TEXT
@ XML_FORMATTED_TEXT
Definition:
xmltoken.hxx:2731
xmloff::token::XML_TEXTAREA
@ XML_TEXTAREA
Definition:
xmltoken.hxx:2728
xmloff::token::XML_FRAME
@ XML_FRAME
Definition:
xmltoken.hxx:939
xmloff::token::XML_IMAGE_FRAME
@ XML_IMAGE_FRAME
Definition:
xmltoken.hxx:2737
xmloff::token::XML_LISTBOX
@ XML_LISTBOX
Definition:
xmltoken.hxx:2735
xmloff::token::XML_BUTTON
@ XML_BUTTON
Definition:
xmltoken.hxx:2732
xmloff::token::XML_GRID
@ XML_GRID
Definition:
xmltoken.hxx:995
xmloff::token::XML_HIDDEN
@ XML_HIDDEN
Definition:
xmltoken.hxx:1019
xmloff::token::XML_RADIO
@ XML_RADIO
Definition:
xmltoken.hxx:2734
xmloff::token::XML_CHECKBOX
@ XML_CHECKBOX
Definition:
xmltoken.hxx:2733
xmloff::token::XML_TEXT
@ XML_TEXT
Definition:
xmltoken.hxx:1954
xmloff::token::XML_FIXED_TEXT
@ XML_FIXED_TEXT
Definition:
xmltoken.hxx:2729
xmloff::token::XML_TIME
@ XML_TIME
Definition:
xmltoken.hxx:1998
xmloff::token::XML_GENERIC_CONTROL
@ XML_GENERIC_CONTROL
Definition:
xmltoken.hxx:2739
xmloff::token::XML_IMAGE
@ XML_IMAGE
Definition:
xmltoken.hxx:1076
xmloff::token::XML_DATE
@ XML_DATE
Definition:
xmltoken.hxx:623
xmloff::token::XML_FILE
@ XML_FILE
Definition:
xmltoken.hxx:2730
xmloff::token::XML_COMBOBOX
@ XML_COMBOBOX
Definition:
xmltoken.hxx:2736
xmloff::token::XML_VALUE_RANGE
@ XML_VALUE_RANGE
Definition:
xmltoken.hxx:2738
xmloff
Definition:
ColorPropertySet.cxx:77
xmltoken.hxx
Generated on Sun Jul 30 2023 04:40:30 for LibreOffice Module xmloff (master) by
1.9.3