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
a31e1f1a
Kaydet (Commit)
a31e1f1a
authored
Kas 23, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert PROPERTY_FLAG to o3tl::typed_flags
Change-Id: Ib652b83b1beed048cabce91aee22fc98605fd654
üst
76ab8c76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
76 deletions
+84
-76
OfficeControlAccess.cxx
fpicker/source/office/OfficeControlAccess.cxx
+61
-71
OfficeControlAccess.hxx
fpicker/source/office/OfficeControlAccess.hxx
+23
-5
No files found.
fpicker/source/office/OfficeControlAccess.cxx
Dosyayı görüntüle @
a31e1f1a
...
...
@@ -49,21 +49,11 @@ namespace svt
namespace
{
#define PROPERTY_FLAG_TEXT 0x00000001
#define PROPERTY_FLAG_ENDBALED 0x00000002
#define PROPERTY_FLAG_VISIBLE 0x00000004
#define PROPERTY_FLAG_HELPURL 0x00000008
#define PROPERTY_FLAG_LISTITEMS 0x00000010
#define PROPERTY_FLAG_SELECTEDITEM 0x00000020
#define PROPERTY_FLAG_SELECTEDITEMINDEX 0x00000040
#define PROPERTY_FLAG_CHECKED 0x00000080
struct
ControlDescription
{
const
sal_Char
*
pControlName
;
sal_Int16
nControlId
;
sal_Int32
nPropertyFlags
;
PropFlags
nPropertyFlags
;
};
...
...
@@ -71,38 +61,38 @@ namespace svt
typedef
::
std
::
pair
<
ControlDescIterator
,
ControlDescIterator
>
ControlDescRange
;
#define PROPERTY_FLAGS_COMMON ( P
ROPERTY_FLAG_ENDBALED | PROPERTY_FLAG_VISIBLE | PROPERTY_FLAG_HELPURL
)
#define PROPERTY_FLAGS_LISTBOX ( P
ROPERTY_FLAG_LISTITEMS | PROPERTY_FLAG_SELECTEDITEM | PROPERTY_FLAG_SELECTEDITEMINDEX
)
#define PROPERTY_FLAGS_CHECKBOX ( P
ROPERTY_FLAG_CHECKED | PROPERTY_FLAG_TEXT
)
#define PROPERTY_FLAGS_COMMON ( P
ropFlags::Enabled | PropFlags::Visible | PropFlags::HelpUrl
)
#define PROPERTY_FLAGS_LISTBOX ( P
ropFlags::ListItems | PropFlags::SelectedItem | PropFlags::SelectedItemIndex
)
#define PROPERTY_FLAGS_CHECKBOX ( P
ropFlags::Checked | PropFlags::Text
)
// Note: this array MUST be sorted by name!
static
const
ControlDescription
aDescriptions
[]
=
{
{
"AutoExtensionBox"
,
CHECKBOX_AUTOEXTENSION
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_CHECKBOX
},
{
"CancelButton"
,
PUSHBUTTON_CANCEL
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"CurrentFolderText"
,
FIXEDTEXT_CURRENTFOLDER
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"CancelButton"
,
PUSHBUTTON_CANCEL
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"CurrentFolderText"
,
FIXEDTEXT_CURRENTFOLDER
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"DefaultLocationButton"
,
TOOLBOXBUTOON_DEFAULT_LOCATION
,
PROPERTY_FLAGS_COMMON
},
{
"FileURLEdit"
,
EDIT_FILEURL
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"FileURLEditLabel"
,
EDIT_FILEURL_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"FileURLEdit"
,
EDIT_FILEURL
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"FileURLEditLabel"
,
EDIT_FILEURL_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"FileView"
,
CONTROL_FILEVIEW
,
PROPERTY_FLAGS_COMMON
},
{
"FilterList"
,
LISTBOX_FILTER
,
PROPERTY_FLAGS_COMMON
},
{
"FilterListLabel"
,
LISTBOX_FILTER_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"FilterListLabel"
,
LISTBOX_FILTER_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"FilterOptionsBox"
,
CHECKBOX_FILTEROPTIONS
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_CHECKBOX
},
{
"HelpButton"
,
PUSHBUTTON_HELP
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"HelpButton"
,
PUSHBUTTON_HELP
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"ImageTemplateList"
,
LISTBOX_IMAGE_TEMPLATE
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_LISTBOX
},
{
"ImageTemplateListLabel"
,
LISTBOX_IMAGE_TEMPLATE_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"ImageTemplateListLabel"
,
LISTBOX_IMAGE_TEMPLATE_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"LevelUpButton"
,
TOOLBOXBUTOON_LEVEL_UP
,
PROPERTY_FLAGS_COMMON
},
{
"LinkBox"
,
CHECKBOX_LINK
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_CHECKBOX
},
{
"NewFolderButton"
,
TOOLBOXBUTOON_NEW_FOLDER
,
PROPERTY_FLAGS_COMMON
},
{
"OkButton"
,
PUSHBUTTON_OK
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"OkButton"
,
PUSHBUTTON_OK
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"PasswordBox"
,
CHECKBOX_PASSWORD
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_CHECKBOX
},
{
"PlayButton"
,
PUSHBUTTON_PLAY
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"PlayButton"
,
PUSHBUTTON_PLAY
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"PreviewBox"
,
CHECKBOX_PREVIEW
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_CHECKBOX
},
{
"ReadOnlyBox"
,
CHECKBOX_READONLY
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_CHECKBOX
},
{
"SelectionBox"
,
CHECKBOX_SELECTION
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_CHECKBOX
},
{
"TemplateList"
,
LISTBOX_TEMPLATE
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_LISTBOX
},
{
"TemplateListLabel"
,
LISTBOX_TEMPLATE_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
},
{
"TemplateListLabel"
,
LISTBOX_TEMPLATE_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
},
{
"VersionList"
,
LISTBOX_VERSION
,
PROPERTY_FLAGS_COMMON
|
PROPERTY_FLAGS_LISTBOX
},
{
"VersionListLabel"
,
LISTBOX_VERSION_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ROPERTY_FLAG_TEXT
}
{
"VersionListLabel"
,
LISTBOX_VERSION_LABEL
,
PROPERTY_FLAGS_COMMON
|
P
ropFlags
::
Text
}
};
...
...
@@ -124,21 +114,21 @@ namespace svt
struct
ControlProperty
{
const
sal_Char
*
pPropertyName
;
sal_Int16
nPropertyId
;
PropFlags
nPropertyId
;
};
typedef
const
ControlProperty
*
ControlPropertyIterator
;
static
const
ControlProperty
aProperties
[]
=
{
{
"Text"
,
P
ROPERTY_FLAG_TEXT
},
{
"Enabled"
,
P
ROPERTY_FLAG_ENDBALED
},
{
"Visible"
,
P
ROPERTY_FLAG_VISIBLE
},
{
"HelpURL"
,
P
ROPERTY_FLAG_HELPURL
},
{
"ListItems"
,
P
ROPERTY_FLAG_LISTITEMS
},
{
"SelectedItem"
,
P
ROPERTY_FLAG_SELECTEDITEM
},
{
"SelectedItemIndex"
,
P
ROPERTY_FLAG_SELECTEDITEMINDEX
},
{
"Checked"
,
P
ROPERTY_FLAG_CHECKED
}
{
"Text"
,
P
ropFlags
::
Text
},
{
"Enabled"
,
P
ropFlags
::
Enabled
},
{
"Visible"
,
P
ropFlags
::
Visible
},
{
"HelpURL"
,
P
ropFlags
::
HelpUrl
},
{
"ListItems"
,
P
ropFlags
::
ListItems
},
{
"SelectedItem"
,
P
ropFlags
::
SelectedItem
},
{
"SelectedItemIndex"
,
P
ropFlags
::
SelectedItemIndex
},
{
"Checked"
,
P
ropFlags
::
Checked
}
};
...
...
@@ -217,7 +207,7 @@ namespace svt
{
// look up the control
sal_Int16
nControlId
=
-
1
;
sal_Int32
nPropertyMask
=
0
;
PropFlags
nPropertyMask
=
PropFlags
::
NONE
;
Control
*
pControl
=
implGetControl
(
_rControlName
,
&
nControlId
,
&
nPropertyMask
);
// will throw an IllegalArgumentException if the name is not valid
...
...
@@ -227,7 +217,7 @@ namespace svt
// it's a completely unknown property
lcl_throwIllegalArgumentException
();
if
(
0
==
(
nPropertyMask
&
aPropDesc
->
nPropertyId
)
)
if
(
!
(
nPropertyMask
&
aPropDesc
->
nPropertyId
)
)
// it's a property which is known, but not allowed for this control
lcl_throwIllegalArgumentException
();
...
...
@@ -235,7 +225,7 @@ namespace svt
}
Control
*
OControlAccess
::
implGetControl
(
const
OUString
&
_rControlName
,
sal_Int16
*
_pId
,
sal_Int32
*
_pPropertyMask
)
const
Control
*
OControlAccess
::
implGetControl
(
const
OUString
&
_rControlName
,
sal_Int16
*
_pId
,
PropFlags
*
_pPropertyMask
)
const
{
Control
*
pControl
=
nullptr
;
ControlDescription
tmpDesc
;
...
...
@@ -301,7 +291,7 @@ namespace svt
Sequence
<
OUString
>
OControlAccess
::
getSupportedControlProperties
(
const
OUString
&
_rControlName
)
{
sal_Int16
nControlId
=
-
1
;
sal_Int32
nPropertyMask
=
0
;
PropFlags
nPropertyMask
=
PropFlags
::
NONE
;
implGetControl
(
_rControlName
,
&
nControlId
,
&
nPropertyMask
);
// will throw an IllegalArgumentException if the name is not valid
...
...
@@ -310,7 +300,7 @@ namespace svt
OUString
*
pProperty
=
aProps
.
getArray
();
for
(
ControlPropertyIterator
aProp
=
s_pProperties
;
aProp
!=
s_pPropertiesEnd
;
++
aProp
)
if
(
0
!=
(
nPropertyMask
&
aProp
->
nPropertyId
)
)
if
(
nPropertyMask
&
aProp
->
nPropertyId
)
*
pProperty
++
=
OUString
::
createFromAscii
(
aProp
->
pPropertyName
);
aProps
.
realloc
(
pProperty
-
aProps
.
getArray
()
);
...
...
@@ -331,7 +321,7 @@ namespace svt
{
// look up the control
sal_Int16
nControlId
=
-
1
;
sal_Int32
nPropertyMask
=
0
;
PropFlags
nPropertyMask
=
PropFlags
::
NONE
;
implGetControl
(
_rControlName
,
&
nControlId
,
&
nPropertyMask
);
// will throw an IllegalArgumentException if the name is not valid
...
...
@@ -341,7 +331,7 @@ namespace svt
// it's a property which is completely unknown
return
false
;
return
0
!=
(
aPropDesc
->
nPropertyId
&
nPropertyMask
);
return
bool
(
aPropDesc
->
nPropertyId
&
nPropertyMask
);
}
...
...
@@ -351,10 +341,10 @@ namespace svt
DBG_ASSERT
(
pControl
,
"OControlAccess::SetValue: don't have this control in the current mode!"
);
if
(
pControl
)
{
sal_Int16
nPropertyId
=
-
1
;
PropFlags
nPropertyId
=
PropFlags
::
Unknown
;
if
(
ControlActions
::
SET_HELP_URL
==
_nControlAction
)
{
nPropertyId
=
P
ROPERTY_FLAG_HELPURL
;
nPropertyId
=
P
ropFlags
::
HelpUrl
;
}
else
{
...
...
@@ -367,7 +357,7 @@ namespace svt
case
CHECKBOX_LINK
:
case
CHECKBOX_PREVIEW
:
case
CHECKBOX_SELECTION
:
nPropertyId
=
P
ROPERTY_FLAG_CHECKED
;
nPropertyId
=
P
ropFlags
::
Checked
;
break
;
case
LISTBOX_FILTER
:
...
...
@@ -379,7 +369,7 @@ namespace svt
case
LISTBOX_IMAGE_TEMPLATE
:
if
(
ControlActions
::
SET_SELECT_ITEM
==
_nControlAction
)
{
nPropertyId
=
P
ROPERTY_FLAG_SELECTEDITEMINDEX
;
nPropertyId
=
P
ropFlags
::
SelectedItemIndex
;
}
else
{
...
...
@@ -390,7 +380,7 @@ namespace svt
}
}
if
(
-
1
!=
nPropertyId
)
if
(
PropFlags
::
Unknown
!=
nPropertyId
)
implSetControlProperty
(
_nControlId
,
pControl
,
nPropertyId
,
_rValue
);
}
}
...
...
@@ -404,10 +394,10 @@ namespace svt
DBG_ASSERT
(
pControl
,
"OControlAccess::GetValue: don't have this control in the current mode!"
);
if
(
pControl
)
{
sal_Int16
nPropertyId
=
-
1
;
PropFlags
nPropertyId
=
PropFlags
::
Unknown
;
if
(
ControlActions
::
SET_HELP_URL
==
_nControlAction
)
{
nPropertyId
=
P
ROPERTY_FLAG_HELPURL
;
nPropertyId
=
P
ropFlags
::
HelpUrl
;
}
else
{
...
...
@@ -420,7 +410,7 @@ namespace svt
case
CHECKBOX_LINK
:
case
CHECKBOX_PREVIEW
:
case
CHECKBOX_SELECTION
:
nPropertyId
=
P
ROPERTY_FLAG_CHECKED
;
nPropertyId
=
P
ropFlags
::
Checked
;
break
;
case
LISTBOX_FILTER
:
...
...
@@ -440,13 +430,13 @@ namespace svt
switch
(
_nControlAction
)
{
case
ControlActions
:
:
GET_SELECTED_ITEM
:
nPropertyId
=
P
ROPERTY_FLAG_SELECTEDITEM
;
nPropertyId
=
P
ropFlags
::
SelectedItem
;
break
;
case
ControlActions
:
:
GET_SELECTED_ITEM_INDEX
:
nPropertyId
=
P
ROPERTY_FLAG_SELECTEDITEMINDEX
;
nPropertyId
=
P
ropFlags
::
SelectedItemIndex
;
break
;
case
ControlActions
:
:
GET_ITEMS
:
nPropertyId
=
P
ROPERTY_FLAG_LISTITEMS
;
nPropertyId
=
P
ropFlags
::
ListItems
;
break
;
default
:
SAL_WARN
(
"fpicker.office"
,
"OControlAccess::GetValue: invalid control action for the listbox!"
);
...
...
@@ -456,7 +446,7 @@ namespace svt
}
}
if
(
-
1
!=
nPropertyId
)
if
(
PropFlags
::
Unknown
!=
nPropertyId
)
aRet
=
implGetControlProperty
(
pControl
,
nPropertyId
);
}
...
...
@@ -536,7 +526,7 @@ namespace svt
}
void
OControlAccess
::
implSetControlProperty
(
sal_Int16
_nControlId
,
Control
*
_pControl
,
sal_Int16
_nProperty
,
const
Any
&
_rValue
,
bool
_bIgnoreIllegalArgument
)
void
OControlAccess
::
implSetControlProperty
(
sal_Int16
_nControlId
,
Control
*
_pControl
,
PropFlags
_nProperty
,
const
Any
&
_rValue
,
bool
_bIgnoreIllegalArgument
)
{
if
(
!
_pControl
)
_pControl
=
m_pFilePickerController
->
getControl
(
_nControlId
);
...
...
@@ -549,7 +539,7 @@ namespace svt
switch
(
_nProperty
)
{
case
P
ROPERTY_FLAG_TEXT
:
case
P
ropFlags
:
:
Text
:
{
OUString
sText
;
if
(
_rValue
>>=
sText
)
...
...
@@ -563,7 +553,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_ENDBALED
:
case
P
ropFlags
:
:
Enabled
:
{
bool
bEnabled
=
false
;
if
(
_rValue
>>=
bEnabled
)
...
...
@@ -577,7 +567,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_VISIBLE
:
case
P
ropFlags
:
:
Visible
:
{
bool
bVisible
=
false
;
if
(
_rValue
>>=
bVisible
)
...
...
@@ -591,7 +581,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_HELPURL
:
case
P
ropFlags
:
:
HelpUrl
:
{
OUString
sHelpURL
;
if
(
_rValue
>>=
sHelpURL
)
...
...
@@ -605,7 +595,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_LISTITEMS
:
case
P
ropFlags
:
:
ListItems
:
{
DBG_ASSERT
(
WINDOW_LISTBOX
==
_pControl
->
GetType
(),
"OControlAccess::implSetControlProperty: invalid control/property combination!"
);
...
...
@@ -635,7 +625,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_SELECTEDITEM
:
case
P
ropFlags
:
:
SelectedItem
:
{
DBG_ASSERT
(
WINDOW_LISTBOX
==
_pControl
->
GetType
(),
"OControlAccess::implSetControlProperty: invalid control/property combination!"
);
...
...
@@ -652,7 +642,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_SELECTEDITEMINDEX
:
case
P
ropFlags
:
:
SelectedItemIndex
:
{
DBG_ASSERT
(
WINDOW_LISTBOX
==
_pControl
->
GetType
(),
"OControlAccess::implSetControlProperty: invalid control/property combination!"
);
...
...
@@ -669,7 +659,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_CHECKED
:
case
P
ropFlags
:
:
Checked
:
{
DBG_ASSERT
(
WINDOW_CHECKBOX
==
_pControl
->
GetType
(),
"OControlAccess::implSetControlProperty: invalid control/property combination!"
);
...
...
@@ -692,30 +682,30 @@ namespace svt
}
Any
OControlAccess
::
implGetControlProperty
(
Control
*
_pControl
,
sal_Int16
_nProperty
)
const
Any
OControlAccess
::
implGetControlProperty
(
Control
*
_pControl
,
PropFlags
_nProperty
)
const
{
DBG_ASSERT
(
_pControl
,
"OControlAccess::implGetControlProperty: invalid argument, this will crash!"
);
Any
aReturn
;
switch
(
_nProperty
)
{
case
P
ROPERTY_FLAG_TEXT
:
case
P
ropFlags
:
:
Text
:
aReturn
<<=
OUString
(
_pControl
->
GetText
()
);
break
;
case
P
ROPERTY_FLAG_ENDBALED
:
case
P
ropFlags
:
:
Enabled
:
aReturn
<<=
_pControl
->
IsEnabled
();
break
;
case
P
ROPERTY_FLAG_VISIBLE
:
case
P
ropFlags
:
:
Visible
:
aReturn
<<=
_pControl
->
IsVisible
();
break
;
case
P
ROPERTY_FLAG_HELPURL
:
case
P
ropFlags
:
:
HelpUrl
:
aReturn
<<=
getHelpURL
(
_pControl
,
m_pFileView
==
_pControl
);
break
;
case
P
ROPERTY_FLAG_LISTITEMS
:
case
P
ropFlags
:
:
ListItems
:
{
DBG_ASSERT
(
WINDOW_LISTBOX
==
_pControl
->
GetType
(),
"OControlAccess::implGetControlProperty: invalid control/property combination!"
);
...
...
@@ -729,7 +719,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_SELECTEDITEM
:
case
P
ropFlags
:
:
SelectedItem
:
{
DBG_ASSERT
(
WINDOW_LISTBOX
==
_pControl
->
GetType
(),
"OControlAccess::implGetControlProperty: invalid control/property combination!"
);
...
...
@@ -742,7 +732,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_SELECTEDITEMINDEX
:
case
P
ropFlags
:
:
SelectedItemIndex
:
{
DBG_ASSERT
(
WINDOW_LISTBOX
==
_pControl
->
GetType
(),
"OControlAccess::implGetControlProperty: invalid control/property combination!"
);
...
...
@@ -755,7 +745,7 @@ namespace svt
}
break
;
case
P
ROPERTY_FLAG_CHECKED
:
case
P
ropFlags
:
:
Checked
:
DBG_ASSERT
(
WINDOW_CHECKBOX
==
_pControl
->
GetType
(),
"OControlAccess::implGetControlProperty: invalid control/property combination!"
);
...
...
fpicker/source/office/OfficeControlAccess.hxx
Dosyayı görüntüle @
a31e1f1a
...
...
@@ -24,6 +24,24 @@
#include <vcl/lstbox.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include "pickercallbacks.hxx"
#include <o3tl/typed_flags_set.hxx>
enum
class
PropFlags
{
Unknown
=
-
1
,
// used as an error sentinel
NONE
=
0x0000
,
Text
=
0x0001
,
Enabled
=
0x0002
,
Visible
=
0x0004
,
HelpUrl
=
0x0008
,
ListItems
=
0x0010
,
SelectedItem
=
0x0020
,
SelectedItemIndex
=
0x0040
,
Checked
=
0x0080
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
PropFlags
>
:
is_typed_flags
<
PropFlags
,
0x00ff
>
{};
}
namespace
svt
...
...
@@ -79,7 +97,7 @@ namespace svt
the affected control. Must be the same as referred by <arg>_nControlId</arg>, or NULL.
@param _nProperty
the property to set
See P
ROPERTY_FLAG_
*
See P
ropFlags::
*
@param _rValue
the value to set
@param _bIgnoreIllegalArgument
...
...
@@ -87,10 +105,10 @@ namespace svt
*/
void
implSetControlProperty
(
sal_Int16
_nControlId
,
Control
*
_pControl
,
sal_Int16
_nProperty
,
const
css
::
uno
::
Any
&
_rValue
,
Control
*
_pControl
,
PropFlags
_nProperty
,
const
css
::
uno
::
Any
&
_rValue
,
bool
_bIgnoreIllegalArgument
=
true
);
Control
*
implGetControl
(
const
OUString
&
_rControlName
,
sal_Int16
*
_pId
,
sal_Int32
*
_pPropertyMask
=
nullptr
)
const
;
Control
*
implGetControl
(
const
OUString
&
_rControlName
,
sal_Int16
*
_pId
,
PropFlags
*
_pPropertyMask
=
nullptr
)
const
;
/** implements the various methods for retrieving properties from controls
...
...
@@ -99,10 +117,10 @@ namespace svt
@PRECOND not <NULL/>
@param _nProperty
the property to retrieve
See P
ROPERTY_FLAG_
*
See P
ropFlags::
*
@return
*/
css
::
uno
::
Any
implGetControlProperty
(
Control
*
_pControl
,
sal_Int16
_nProperty
)
const
;
css
::
uno
::
Any
implGetControlProperty
(
Control
*
_pControl
,
PropFlags
_nProperty
)
const
;
static
void
implDoListboxAction
(
ListBox
*
_pListbox
,
sal_Int16
_nCtrlAction
,
const
css
::
uno
::
Any
&
_rValue
);
...
...
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