Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
aba06d6f
Kaydet (Commit)
aba06d6f
authored
May 12, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert EA flags to scoped enum
Change-Id: I7fbd4cea13fc311624804f7acd9dd66955b860d3
üst
5b6b61b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
22 deletions
+27
-22
elementexport.cxx
xmloff/source/forms/elementexport.cxx
+14
-14
elementexport.hxx
xmloff/source/forms/elementexport.hxx
+1
-1
formattributes.hxx
xmloff/source/forms/formattributes.hxx
+12
-7
No files found.
xmloff/source/forms/elementexport.cxx
Dosyayı görüntüle @
aba06d6f
...
...
@@ -237,7 +237,7 @@ namespace xmloff
,
m_nIncludeCommon
(
CCAFlags
::
NONE
)
,
m_nIncludeDatabase
(
DAFlags
::
NONE
)
,
m_nIncludeSpecial
(
0
)
,
m_nIncludeEvents
(
0
)
,
m_nIncludeEvents
(
EAFlags
::
NONE
)
,
m_nIncludeBindings
(
BAFlags
::
NONE
)
,
m_pOuterElement
(
nullptr
)
{
...
...
@@ -1441,7 +1441,7 @@ namespace xmloff
void
OControlExport
::
examine
()
{
OSL_ENSURE
(
(
m_nIncludeCommon
==
CCAFlags
::
NONE
)
&&
(
m_nIncludeSpecial
==
0
)
&&
(
m_nIncludeDatabase
==
DAFlags
::
NONE
)
&&
(
m_nIncludeEvents
==
0
)
&&
(
m_nIncludeBindings
==
BAFlags
::
NONE
),
&&
(
m_nIncludeEvents
==
EAFlags
::
NONE
)
&&
(
m_nIncludeBindings
==
BAFlags
::
NONE
),
"OControlExport::examine: called me twice? Not initialized?"
);
// get the class id to decide which kind of element we need in the XML stream
...
...
@@ -1530,7 +1530,7 @@ namespace xmloff
m_nIncludeDatabase
=
DAFlags
::
DataField
|
DAFlags
::
InputRequired
;
// event attributes
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
|
EA_ON_CHANGE
|
EA_ON_SELECT
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
|
EAFlags
::
OnChange
|
EAFlags
::
OnSelect
;
// only text and pattern fields have a ConvertEmptyToNull property
if
(
(
m_nClassId
==
FormComponentType
::
TEXTFIELD
)
...
...
@@ -1574,7 +1574,7 @@ namespace xmloff
CCAFlags
::
Name
|
CCAFlags
::
ServiceName
|
CCAFlags
::
CurrentValue
|
CCAFlags
::
Disabled
|
CCAFlags
::
Printable
|
CCAFlags
::
TabIndex
|
CCAFlags
::
TabStop
|
CCAFlags
::
Title
|
CCAFlags
::
Value
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
|
EA_ON_CHANGE
|
EA_ON_SELECT
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
|
EAFlags
::
OnChange
|
EAFlags
::
OnSelect
;
break
;
case
FormComponentType
:
:
FIXEDTEXT
:
...
...
@@ -1583,7 +1583,7 @@ namespace xmloff
CCAFlags
::
Name
|
CCAFlags
::
ServiceName
|
CCAFlags
::
Disabled
|
CCAFlags
::
Label
|
CCAFlags
::
Printable
|
CCAFlags
::
Title
|
CCAFlags
::
For
;
m_nIncludeSpecial
=
SCA_MULTI_LINE
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
;
break
;
case
FormComponentType
:
:
COMBOBOX
:
...
...
@@ -1594,7 +1594,7 @@ namespace xmloff
CCAFlags
::
TabIndex
|
CCAFlags
::
TabStop
|
CCAFlags
::
Title
|
CCAFlags
::
Value
;
m_nIncludeSpecial
=
SCA_AUTOMATIC_COMPLETION
;
m_nIncludeDatabase
=
DAFlags
::
ConvertEmpty
|
DAFlags
::
DataField
|
DAFlags
::
InputRequired
|
DAFlags
::
ListSource
|
DAFlags
::
ListSource_TYPE
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
|
EA_ON_CHANGE
|
EA_ON_SELECT
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
|
EAFlags
::
OnChange
|
EAFlags
::
OnSelect
;
break
;
case
FormComponentType
:
:
LISTBOX
:
...
...
@@ -1604,7 +1604,7 @@ namespace xmloff
CCAFlags
::
Printable
|
CCAFlags
::
Size
|
CCAFlags
::
TabIndex
|
CCAFlags
::
TabStop
|
CCAFlags
::
Title
;
m_nIncludeSpecial
=
SCA_MULTIPLE
;
m_nIncludeDatabase
=
DAFlags
::
BoundColumn
|
DAFlags
::
DataField
|
DAFlags
::
InputRequired
|
DAFlags
::
ListSource_TYPE
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
|
EA_ON_CHANGE
|
EA_ON_CLICK
|
EA_ON_DBLCLICK
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
|
EAFlags
::
OnChange
|
EAFlags
::
OnClick
|
EAFlags
::
OnDoubleClick
;
// check if we need to export the ListSource as attribute
{
// for a list box, if the ListSourceType is VALUE_LIST, no ListSource is stored, but instead
...
...
@@ -1636,7 +1636,7 @@ namespace xmloff
CCAFlags
::
Name
|
CCAFlags
::
ServiceName
|
CCAFlags
::
ButtonType
|
CCAFlags
::
Disabled
|
CCAFlags
::
ImageData
|
CCAFlags
::
Printable
|
CCAFlags
::
TabIndex
|
CCAFlags
::
TargetFrame
|
CCAFlags
::
TargetLocation
|
CCAFlags
::
Title
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
|
EA_ON_CLICK
|
EA_ON_DBLCLICK
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
|
EAFlags
::
OnClick
|
EAFlags
::
OnDoubleClick
;
break
;
case
FormComponentType
:
:
CHECKBOX
:
...
...
@@ -1657,7 +1657,7 @@ namespace xmloff
if
(
m_xPropertyInfo
->
hasPropertyByName
(
PROPERTY_GROUP_NAME
)
)
m_nIncludeSpecial
|=
SCA_GROUP_NAME
;
m_nIncludeDatabase
=
DAFlags
::
DataField
|
DAFlags
::
InputRequired
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
|
EA_ON_CHANGE
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
|
EAFlags
::
OnChange
;
break
;
case
FormComponentType
:
:
GROUPBOX
:
...
...
@@ -1665,7 +1665,7 @@ namespace xmloff
m_nIncludeCommon
=
CCAFlags
::
Name
|
CCAFlags
::
ServiceName
|
CCAFlags
::
Disabled
|
CCAFlags
::
Label
|
CCAFlags
::
Printable
|
CCAFlags
::
Title
|
CCAFlags
::
For
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
;
break
;
case
FormComponentType
:
:
IMAGECONTROL
:
...
...
@@ -1674,7 +1674,7 @@ namespace xmloff
CCAFlags
::
Name
|
CCAFlags
::
ServiceName
|
CCAFlags
::
Disabled
|
CCAFlags
::
ImageData
|
CCAFlags
::
Printable
|
CCAFlags
::
ReadOnly
|
CCAFlags
::
Title
;
m_nIncludeDatabase
=
DAFlags
::
DataField
|
DAFlags
::
InputRequired
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
;
break
;
case
FormComponentType
:
:
HIDDENCONTROL
:
...
...
@@ -1688,7 +1688,7 @@ namespace xmloff
m_nIncludeCommon
=
CCAFlags
::
Name
|
CCAFlags
::
ServiceName
|
CCAFlags
::
Disabled
|
CCAFlags
::
Printable
|
CCAFlags
::
TabIndex
|
CCAFlags
::
TabStop
|
CCAFlags
::
Title
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
;
break
;
case
FormComponentType
:
:
SCROLLBAR
:
...
...
@@ -1702,7 +1702,7 @@ namespace xmloff
if
(
m_nClassId
==
FormComponentType
::
SCROLLBAR
)
m_nIncludeSpecial
|=
SCA_PAGE_STEP_SIZE
;
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
;
break
;
default
:
...
...
@@ -1720,7 +1720,7 @@ namespace xmloff
// at least a name should be there, 'cause without a name the control could never have been
// inserted into its parent container
// In addition, the service name is absolutely necessary to create the control upon reading.
m_nIncludeEvents
=
EA
_CONTROL_EVENTS
;
m_nIncludeEvents
=
EA
Flags
::
ControlEvents
;
// we always should be able to export events - this is not control type dependent
break
;
}
...
...
xmloff/source/forms/elementexport.hxx
Dosyayı görüntüle @
aba06d6f
...
...
@@ -97,7 +97,7 @@ namespace xmloff
CCAFlags
m_nIncludeCommon
;
// common control attributes to include
DAFlags
m_nIncludeDatabase
;
// common database attributes to include
sal_Int32
m_nIncludeSpecial
;
// special attributes to include
sal_Int32
m_nIncludeEvents
;
// events to include
EAFlags
m_nIncludeEvents
;
// events to include
BAFlags
m_nIncludeBindings
;
// binding attributes to include
SvXMLElementExport
*
m_pOuterElement
;
// XML element doing the concrete startElement etc. for the outer element
...
...
xmloff/source/forms/formattributes.hxx
Dosyayı görüntüle @
aba06d6f
...
...
@@ -93,17 +93,22 @@ namespace o3tl {
template
<>
struct
typed_flags
<
BAFlags
>
:
is_typed_flags
<
BAFlags
,
0x003f
>
{};
}
// flags for event attributes
enum
class
EAFlags
{
NONE
=
0x0000
,
ControlEvents
=
0x0001
,
OnChange
=
0x0002
,
OnClick
=
0x0004
,
OnDoubleClick
=
0x0008
,
OnSelect
=
0x0010
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
EAFlags
>
:
is_typed_flags
<
EAFlags
,
0x001f
>
{};
}
namespace
xmloff
{
// flags for event attributes
#define EA_CONTROL_EVENTS 0x00000001
#define EA_ON_CHANGE 0x00000002
#define EA_ON_CLICK 0x00000004
#define EA_ON_DBLCLICK 0x00000008
#define EA_ON_SELECT 0x00000010
/// attributes in the xml tag representing a form
enum
FormAttributes
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment