summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-03-01 03:13:28 +0100
committerEike Rathke <erack@redhat.com>2014-03-05 07:31:19 -0600
commit68ec95b3f80408ae50897b043eed69a07d084df9 (patch)
tree5d32076e843fae44f28e3c8d9dbbacf7648fecbc /include/sfx2
parentc3403ac888c2e62edaf8befe7982f5f8cc95c16f (diff)
made ListBox handle more than 64k elements, fdo#61520 related
ListBox and related now handle up to sal_Int32 elements correctly. sal_Int32 instead of sal_Size or size_t because of UNO and a11y API. Also disentangled some of the mess of SvTreeList and other containers regarding sal_uInt16, sal_uLong, long, size_t, ... type mixtures. Change-Id: Idb6e0ae689dc5bc2cf980721972b57b0261e688a Reviewed-on: https://gerrit.libreoffice.org/8460 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/controlwrapper.hxx12
-rw-r--r--include/sfx2/itemconnect.hxx12
2 files changed, 15 insertions, 9 deletions
diff --git a/include/sfx2/controlwrapper.hxx b/include/sfx2/controlwrapper.hxx
index 96dfd7280123..531ad502d8d6 100644
--- a/include/sfx2/controlwrapper.hxx
+++ b/include/sfx2/controlwrapper.hxx
@@ -334,10 +334,12 @@ typedef MetricFieldWrapper< sal_uIntPtr > ULongMetricFieldWrapper;
+#define WRAPPER_LISTBOX_ENTRY_NOTFOUND 0xFFFF /* XXX was value of LISTBOX_ENTRY_NOTFOUND */
+
/** A wrapper for the VCL ListBox.
If a position<->value map is passed to the constructor, it MUST be
- terminated with an entry containing LISTBOX_ENTRY_NOTFOUND as list
+ terminated with an entry containing WRAPPER_LISTBOX_ENTRY_NOTFOUND as list
position. See documentation of the PosValueMapper template for details.
*/
template< typename ValueT >
@@ -353,7 +355,7 @@ public:
/** @param pMap Optional list position <-> value map.
See PosValueMapper documentation for details. */
inline explicit ListBoxWrapper( ListBox& rListBox, const MapEntryType* pMap = 0 ) :
- SingleControlWrapper< ListBox, ValueT >( rListBox ), MapperType( LISTBOX_ENTRY_NOTFOUND, pMap ) {}
+ SingleControlWrapper< ListBox, ValueT >( rListBox ), MapperType( WRAPPER_LISTBOX_ENTRY_NOTFOUND, pMap ) {}
virtual bool IsControlDontKnow() const
{ return this->GetControl().GetSelectEntryCount() == 0; }
@@ -376,10 +378,12 @@ typedef ListBoxWrapper< sal_uIntPtr > ULongListBoxWrapper;
+#define WRAPPER_VALUESET_ITEM_NOTFOUND 0xFFFF /* XXX was value of VALUESET_ITEM_NOTFOUND */
+
/** A wrapper for the SVTOOLS ValueSet.
If a position<->value map is passed to the constructor, it MUST be
- terminated with an entry containing VALUESET_ITEM_NOTFOUND as list
+ terminated with an entry containing WRAPPER_VALUESET_ITEM_NOTFOUND as list
position. See documentation of the PosValueMapper template for details.
*/
template< typename ValueT >
@@ -395,7 +399,7 @@ public:
/** @param pMap Optional position <-> value map.
See PosValueMapper documentation for details. */
inline explicit ValueSetWrapper( ValueSet& rValueSet, const MapEntryType* pMap = 0 ) :
- SingleControlWrapper< ValueSet, ValueT >( rValueSet ), MapperType( VALUESET_ITEM_NOTFOUND, pMap ) {}
+ SingleControlWrapper< ValueSet, ValueT >( rValueSet ), MapperType( WRAPPER_VALUESET_ITEM_NOTFOUND, pMap ) {}
virtual bool IsControlDontKnow() const
{ return this->GetControl().IsNoSelection(); }
diff --git a/include/sfx2/itemconnect.hxx b/include/sfx2/itemconnect.hxx
index 789a7085cab6..7dc7f5948345 100644
--- a/include/sfx2/itemconnect.hxx
+++ b/include/sfx2/itemconnect.hxx
@@ -364,9 +364,10 @@ typedef MetricConnection< UInt32ItemWrapper > UInt32MetricConnection;
/** Connection between an item and a VCL ListBox.
Optionally a map can be passed that maps list box positions to item values.
- This map MUST be terminated with an entry containing LISTBOX_ENTRY_NOTFOUND
- as list box position. The item value contained in this last entry is used
- as default item value in case of an error.
+ This map MUST be terminated with an entry containing
+ WRAPPER_LISTBOX_ENTRY_NOTFOUND as list box position. The item value
+ contained in this last entry is used as default item value in case of an
+ error.
*/
template< typename ItemWrpT >
class ListBoxConnection : public ItemControlConnection< ItemWrpT,
@@ -397,8 +398,9 @@ typedef ListBoxConnection< UInt32ItemWrapper > UInt32ListBoxConnection;
Optionally a map can be passed that maps value set identifiers to item
values. This map MUST be terminated with an entry containing
- VALUESET_ITEM_NOTFOUND as value set identifier. The item value contained in
- this last entry is used as default item value in case of an error.
+ WRAPPER_VALUESET_ITEM_NOTFOUND as value set identifier. The item value
+ contained in this last entry is used as default item value in case of an
+ error.
*/
template< typename ItemWrpT >
class ValueSetConnection : public ItemControlConnection< ItemWrpT,