summaryrefslogtreecommitdiff
path: root/include
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
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')
-rw-r--r--include/sfx2/controlwrapper.hxx12
-rw-r--r--include/sfx2/itemconnect.hxx12
-rw-r--r--include/svtools/ctrlbox.hxx52
-rw-r--r--include/svtools/ivctrl.hxx2
-rw-r--r--include/svtools/svtabbx.hxx16
-rw-r--r--include/svtools/treelist.hxx5
-rw-r--r--include/svtools/treelistbox.hxx8
-rw-r--r--include/svtools/valueset.hxx4
-rw-r--r--include/svx/checklbx.hxx21
-rw-r--r--include/svx/ctredlin.hxx10
-rw-r--r--include/svx/dlgctrl.hxx12
-rw-r--r--include/svx/fontlb.hxx5
-rw-r--r--include/svx/frmdirlbox.hxx2
-rw-r--r--include/svx/galtheme.hxx12
-rw-r--r--include/svx/langbox.hxx14
-rw-r--r--include/svx/numfmtsh.hxx4
-rw-r--r--include/svx/svdpage.hxx5
-rw-r--r--include/svx/txencbox.hxx6
-rw-r--r--include/svx/xtable.hxx4
-rw-r--r--include/tools/contnr.hxx8
-rw-r--r--include/vcl/combobox.h7
-rw-r--r--include/vcl/combobox.hxx52
-rw-r--r--include/vcl/field.hxx10
-rw-r--r--include/vcl/lstbox.h9
-rw-r--r--include/vcl/lstbox.hxx64
25 files changed, 186 insertions, 170 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,
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 2d0f4abacce5..7b3e38d1fbce 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -169,26 +169,26 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt );
using ListBox::InsertEntry;
- virtual sal_uInt16 InsertEntry( const OUString& rStr,
- sal_uInt16 nPos = LISTBOX_APPEND );
- virtual sal_uInt16 InsertEntry( const Color& rColor, const OUString& rStr,
- sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_Int32 InsertEntry( const OUString& rStr,
+ sal_Int32 nPos = LISTBOX_APPEND );
+ virtual sal_Int32 InsertEntry( const Color& rColor, const OUString& rStr,
+ sal_Int32 nPos = LISTBOX_APPEND );
void InsertAutomaticEntryColor(const Color &rAutoColorValue);
bool IsAutomaticSelected() { return !GetSelectEntryPos(); }
using ListBox::RemoveEntry;
- virtual void RemoveEntry( sal_uInt16 nPos );
+ virtual void RemoveEntry( sal_Int32 nPos );
virtual void Clear();
void CopyEntries( const ColorListBox& rBox );
using ListBox::GetEntryPos;
- virtual sal_uInt16 GetEntryPos( const Color& rColor ) const;
- virtual Color GetEntryColor( sal_uInt16 nPos ) const;
+ virtual sal_Int32 GetEntryPos( const Color& rColor ) const;
+ virtual Color GetEntryColor( sal_Int32 nPos ) const;
Size GetImageSize() const { return aImageSize; }
void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True )
{ ListBox::SelectEntry( rStr, bSelect ); }
void SelectEntry( const Color& rColor, sal_Bool bSelect = sal_True );
- Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
+ Color GetSelectEntryColor( sal_Int32 nSelIndex = 0 ) const;
bool IsEntrySelected(const OUString& rStr ) const
{
return ListBox::IsEntrySelected(rStr);
@@ -196,7 +196,7 @@ public:
bool IsEntrySelected(const Color& rColor) const
{
- sal_uInt16 nPos = GetEntryPos( rColor );
+ sal_Int32 nPos = GetEntryPos( rColor );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nPos );
else
@@ -208,20 +208,20 @@ private:
ColorListBox( const ColorListBox& );
ColorListBox& operator =( const ColorListBox& );
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
};
inline void ColorListBox::SelectEntry( const Color& rColor, sal_Bool bSelect )
{
- sal_uInt16 nPos = GetEntryPos( rColor );
+ sal_Int32 nPos = GetEntryPos( rColor );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
ListBox::SelectEntryPos( nPos, bSelect );
}
-inline Color ColorListBox::GetSelectEntryColor( sal_uInt16 nSelIndex ) const
+inline Color ColorListBox::GetSelectEntryColor( sal_Int32 nSelIndex ) const
{
- sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
+ sal_Int32 nPos = GetSelectEntryPos( nSelIndex );
Color aColor;
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
aColor = GetEntryColor( nPos );
@@ -307,7 +307,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
virtual void DataChanged( const DataChangedEvent& rDCEvt );
void UpdateEntries( long nOldWidth );
- sal_uInt16 GetStylePos( sal_uInt16 nListPos, long nWidth );
+ sal_Int32 GetStylePos( sal_Int32 nListPos, long nWidth );
public:
typedef Color (*ColorFunc)(Color);
@@ -322,7 +322,7 @@ public:
void SetNone( const OUString& sNone );
using ListBox::InsertEntry;
- virtual sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_Int32 InsertEntry( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
/** Insert a listbox entry with all widths in Twips. */
void InsertEntry( BorderWidthImpl aWidthImpl,
sal_uInt16 nStyle, long nMinWidth = 0,
@@ -331,23 +331,23 @@ public:
ColorDistFunc pColorDistFn = &sameDistColor );
using ListBox::RemoveEntry;
- virtual void RemoveEntry( sal_uInt16 nPos );
+ virtual void RemoveEntry( sal_Int32 nPos );
virtual void Clear();
using ListBox::GetEntryPos;
- virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const;
- sal_uInt16 GetEntryStyle( sal_uInt16 nPos ) const;
+ virtual sal_Int32 GetEntryPos( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const;
+ sal_uInt16 GetEntryStyle( sal_Int32 nPos ) const;
void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
void SelectEntry( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID, sal_Bool bSelect = sal_True );
- sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const;
+ sal_uInt16 GetSelectEntryStyle( sal_Int32 nSelIndex = 0 ) const;
bool IsEntrySelected(const OUString& rStr) const
{
return ListBox::IsEntrySelected(rStr);
}
bool IsEntrySelected( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const
{
- sal_uInt16 nPos = GetEntryPos( nStyle );
+ sal_Int32 nPos = GetEntryPos( nStyle );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nPos );
else
@@ -365,16 +365,16 @@ public:
protected:
inline const Color& GetPaintColor( void ) const;
- Color GetColorLine1( sal_uInt16 nPos = 0 );
- Color GetColorLine2( sal_uInt16 nPos = 0 );
- Color GetColorDist( sal_uInt16 nPos = 0 );
+ Color GetColorLine1( sal_Int32 nPos = 0 );
+ Color GetColorLine2( sal_Int32 nPos = 0 );
+ Color GetColorDist( sal_Int32 nPos = 0 );
private:
// declared as private because some compilers would generate the default methods
LineListBox( const LineListBox& );
LineListBox& operator =( const LineListBox& );
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
};
inline void LineListBox::SetColor( const Color& rColor )
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index 37df1b01c639..e2b2c9717471 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -283,7 +283,7 @@ public:
SvxIconChoiceCtrlEntry* InsertEntry( const OUString& rText,
const Image& rImage,
- sal_uLong nPos = LIST_APPEND,
+ sal_uLong nPos = CONTAINER_APPEND,
const Point* pPos = 0,
sal_uInt16 nFlags = 0
);
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 8e29e30bfb38..c321e6d35ab3 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -75,7 +75,7 @@ public:
virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = 0,
sal_Bool bChildrenOnDemand = sal_False,
- sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
+ sal_uLong nPos=TREELIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
virtual SvTreeListEntry* InsertEntry( const OUString& rText,
@@ -83,16 +83,16 @@ public:
const Image& rCollapsedEntryBmp,
SvTreeListEntry* pParent = 0,
sal_Bool bChildrenOnDemand = sal_False,
- sal_uLong nPos = LIST_APPEND, void* pUserData = 0,
+ sal_uLong nPos = TREELIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
- virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = LIST_APPEND,
+ virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = TREELIST_APPEND,
sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, SvTreeListEntry* pParent,
sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL );
virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = NULL,
- sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
+ sal_uLong nPos = TREELIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual OUString GetEntryText( SvTreeListEntry* pEntry ) const;
OUString GetEntryText( SvTreeListEntry*, sal_uInt16 nCol ) const;
@@ -147,15 +147,15 @@ public:
void InitHeaderBar( HeaderBar* pHeaderBar );
sal_Bool IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol ) const;
- virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = LIST_APPEND,
+ virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = TREELIST_APPEND,
sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, SvTreeListEntry* pParent,
sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL );
virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = NULL,
- sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
- virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=LIST_APPEND);
- virtual sal_uLong Insert( SvTreeListEntry* pEntry, sal_uLong nRootPos = LIST_APPEND );
+ sal_uLong nPos = TREELIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
+ virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=TREELIST_APPEND);
+ virtual sal_uLong Insert( SvTreeListEntry* pEntry, sal_uLong nRootPos = TREELIST_APPEND );
void RemoveEntry( SvTreeListEntry* _pEntry );
void Clear();
diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx
index 049224d83839..d8cf1ae4e8f4 100644
--- a/include/svtools/treelist.hxx
+++ b/include/svtools/treelist.hxx
@@ -27,6 +27,7 @@
#include <tools/solar.h>
#include <tools/link.hxx>
#include <tools/debug.hxx>
+#include <tools/contnr.hxx>
#include <limits.h>
#include <vector>
@@ -160,8 +161,8 @@ public:
SvTreeListEntry* PrevSibling( SvTreeListEntry* pEntry ) const;
SvTreeListEntry* LastSibling( SvTreeListEntry* pEntry ) const;
- sal_uLong Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pPar,sal_uLong nPos=ULONG_MAX);
- sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = ULONG_MAX )
+ sal_uLong Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pPar,sal_uLong nPos = TREELIST_APPEND);
+ sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = TREELIST_APPEND )
{ return Insert(pEntry, pRootItem, nRootPos ); }
void InsertTree( SvTreeListEntry* pTree, SvTreeListEntry* pTargetParent, sal_uLong nListPos );
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index a5877d0cca60..bac80fcf59a1 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -296,8 +296,8 @@ protected:
// Invalidate children on enable/disable
virtual void StateChanged( StateChangedType eType );
- virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=LIST_APPEND);
- virtual sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = LIST_APPEND );
+ virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=TREELIST_APPEND);
+ virtual sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = TREELIST_APPEND );
// In-place editing
SvInplaceEdit2* pEdCtrl;
@@ -629,7 +629,7 @@ public:
virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = 0,
sal_Bool bChildrenOnDemand = sal_False,
- sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
+ sal_uLong nPos=TREELIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
virtual SvTreeListEntry* InsertEntry( const OUString& rText,
@@ -637,7 +637,7 @@ public:
const Image& rCollapsedEntryBmp,
SvTreeListEntry* pParent = 0,
sal_Bool bChildrenOnDemand = sal_False,
- sal_uLong nPos = LIST_APPEND, void* pUserData = 0,
+ sal_uLong nPos = TREELIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
const Image& GetDefaultExpandedEntryBmp( ) const;
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index f128884d08c2..e3d9207a0902 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -193,8 +193,8 @@ to be set (before Show) with SetStyle().
// - ValueSet -
-#define VALUESET_APPEND ((sal_uInt16)-1)
-#define VALUESET_ITEM_NOTFOUND ((sal_uInt16)-1)
+#define VALUESET_APPEND ((size_t)-1)
+#define VALUESET_ITEM_NOTFOUND ((size_t)-1)
class SVT_DLLPUBLIC ValueSet : public Control
{
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx
index 0061d540aeb0..697f139b54ab 100644
--- a/include/svx/checklbx.hxx
+++ b/include/svx/checklbx.hxx
@@ -22,7 +22,6 @@
#include <svtools/treelistbox.hxx>
#include <svtools/svlbitm.hxx>
-#include <vcl/lstbox.hxx>
#include <svx/svxdllapi.h>
// class SvxCheckListBox -------------------------------------------------
@@ -51,23 +50,23 @@ public:
~SvxCheckListBox();
void InsertEntry ( const OUString& rStr,
- sal_uInt16 nPos = LISTBOX_APPEND,
+ sal_uLong nPos = TREELIST_APPEND,
void* pUserData = NULL,
SvLBoxButtonKind eButtonKind =
SvLBoxButtonKind_enabledCheckbox );
- void RemoveEntry ( sal_uInt16 nPos );
+ void RemoveEntry ( sal_uLong nPos );
- void SelectEntryPos ( sal_uInt16 nPos, sal_Bool bSelect = sal_True );
- sal_uInt16 GetSelectEntryPos () const;
+ void SelectEntryPos ( sal_uLong nPos, sal_Bool bSelect = sal_True );
+ sal_uLong GetSelectEntryPos () const;
- OUString GetText ( sal_uInt16 nPos ) const;
- sal_uInt16 GetCheckedEntryCount() const;
- void CheckEntryPos ( sal_uInt16 nPos, sal_Bool bCheck = sal_True );
- sal_Bool IsChecked ( sal_uInt16 nPos ) const;
+ OUString GetText ( sal_uLong nPos ) const;
+ sal_uLong GetCheckedEntryCount() const;
+ void CheckEntryPos ( sal_uLong nPos, sal_Bool bCheck = sal_True );
+ sal_Bool IsChecked ( sal_uLong nPos ) const;
void ToggleCheckButton ( SvTreeListEntry* pEntry );
- void* SetEntryData ( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData ( sal_uInt16 nPos ) const;
+ void* SetEntryData ( sal_uLong nPos, void* pNewData );
+ void* GetEntryData ( sal_uLong nPos ) const;
virtual void MouseButtonDown ( const MouseEvent& rMEvt );
virtual void KeyInput ( const KeyEvent& rKEvt );
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 0c05252034a3..f74829bf87c0 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -137,10 +137,10 @@ public:
bool IsValidComment(const OUString &rComment);
SvTreeListEntry* InsertEntry(const OUString& ,RedlinData *pUserData,
- SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
+ SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=TREELIST_APPEND);
SvTreeListEntry* InsertEntry(const OUString& ,RedlinData *pUserData,const Color&,
- SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
+ SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=TREELIST_APPEND);
virtual SvTreeListEntry* CreateEntry() const;
@@ -221,10 +221,10 @@ public:
sal_uInt16 GetDateMode();
void ClearAuthors();
- void InsertAuthor( const OUString& rString, sal_uInt16 nPos = LISTBOX_APPEND );
+ void InsertAuthor( const OUString& rString, sal_Int32 nPos = LISTBOX_APPEND );
OUString GetSelectedAuthor()const;
- void SelectedAuthorPos(sal_uInt16 nPos);
- sal_uInt16 SelectAuthor(const OUString& aString);
+ void SelectedAuthorPos(sal_Int32 nPos);
+ sal_Int32 SelectAuthor(const OUString& aString);
void SetComment(const OUString& rComment);
OUString GetComment()const;
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index f13d78744c82..a0b42672645d 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -235,7 +235,7 @@ public:
virtual void Fill( const XColorListRef &pTab );
void Append( const XColorEntry& rEntry );
- void Modify( const XColorEntry& rEntry, sal_uInt16 nPos );
+ void Modify( const XColorEntry& rEntry, sal_Int32 nPos );
};
/************************************************************************/
@@ -249,7 +249,7 @@ public:
virtual void Fill( const XHatchListRef &pList );
void Append( const XHatchEntry& rEntry, const Bitmap& rBitmap );
- void Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
+ void Modify( const XHatchEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap );
};
/************************************************************************/
@@ -263,7 +263,7 @@ public:
virtual void Fill( const XGradientListRef &pList );
void Append( const XGradientEntry& rEntry, const Bitmap& rBitmap );
- void Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
+ void Modify( const XGradientEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap );
void SelectEntryByList( const XGradientListRef &pList, const OUString& rStr,
const XGradient& rXGradient, sal_uInt16 nDist = 0 );
};
@@ -278,7 +278,7 @@ public:
virtual void Fill(const XBitmapListRef &pList);
void Append(const Size& rSize, const XBitmapEntry& rEntry);
- void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos);
+ void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_Int32 nPos);
void SelectEntryByList(const XBitmapList* pList, const OUString& rStr);
private:
@@ -333,7 +333,7 @@ public:
void setAddStandardFields(bool bNew);
void Append(const XDashEntry& rEntry, const Bitmap& rBitmap );
- void Modify(const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
+ void Modify(const XDashEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap );
void SelectEntryByList(const XDashList* pList, const OUString& rStr, const XDash& rDash, sal_uInt16 nDist = 0);
};
@@ -350,7 +350,7 @@ public:
virtual void Fill( const XLineEndListRef &pList, bool bStart = true );
void Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool bStart = true );
- void Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap, bool bStart = true );
+ void Modify( const XLineEndEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap, bool bStart = true );
};
diff --git a/include/svx/fontlb.hxx b/include/svx/fontlb.hxx
index 63fd156a72f6..bee24dfec836 100644
--- a/include/svx/fontlb.hxx
+++ b/include/svx/fontlb.hxx
@@ -78,11 +78,12 @@ public:
const OUString& rString, const Font& rFont, const Color* pColor = NULL );
/** Selects/deselects an entry specified by its position in the list box. */
- void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true );
+ void SelectEntryPos( sal_uLong nPos, bool bSelect = true );
/** Removes a selection. */
void SetNoSelection();
- /** Returns the position of the entry currently selected or LIST_APPEND. */
+ /** Returns the position of the entry currently selected or TREELIST_APPEND.
+ */
sal_uLong GetSelectEntryPos() const;
/** Returns the text of the selected entry or an empty string. */
OUString GetSelectEntry() const;
diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx
index 080a89ccec5d..ff61dd196664 100644
--- a/include/svx/frmdirlbox.hxx
+++ b/include/svx/frmdirlbox.hxx
@@ -46,7 +46,7 @@ public:
void InsertEntryValue(
const OUString& rString,
SvxFrameDirection eDirection,
- sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 nPos = LISTBOX_APPEND );
/** Removes the entry, that represents the specified frame direction. */
void RemoveEntryValue( SvxFrameDirection eDirection );
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index c996c4589fbb..9e40cb4f94f5 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -140,7 +140,7 @@ public:
SVX_DLLPUBLIC SgaObject* AcquireObject( size_t nPos );
SVX_DLLPUBLIC void ReleaseObject( SgaObject* pObj );
- SVX_DLLPUBLIC bool InsertObject( const SgaObject& rObj, sal_uIntPtr nPos = LIST_APPEND );
+ SVX_DLLPUBLIC bool InsertObject( const SgaObject& rObj, sal_uIntPtr nPos = CONTAINER_APPEND );
SVX_DLLPUBLIC bool RemoveObject( size_t nPos );
bool ChangeObjectPos( size_t nOldPos, size_t nNewPos );
@@ -202,17 +202,17 @@ public:
sal_Bool GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, sal_Bool bProgress = sal_False );
SVX_DLLPUBLIC sal_Bool GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool bProgress = sal_False );
- SVX_DLLPUBLIC sal_Bool InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos = LIST_APPEND );
+ SVX_DLLPUBLIC sal_Bool InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
SVX_DLLPUBLIC sal_Bool GetModel( sal_uIntPtr nPos, SdrModel& rModel, sal_Bool bProgress = sal_False );
- SVX_DLLPUBLIC sal_Bool InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos = LIST_APPEND );
+ SVX_DLLPUBLIC sal_Bool InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
sal_Bool GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rModelStreamRef, sal_Bool bProgress = sal_False );
- sal_Bool InsertModelStream( const SotStorageStreamRef& rModelStream, sal_uIntPtr nInsertPos = LIST_APPEND );
+ sal_Bool InsertModelStream( const SotStorageStreamRef& rModelStream, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
sal_Bool GetURL( sal_uIntPtr nPos, INetURLObject& rURL, sal_Bool bProgress = sal_False );
- SVX_DLLPUBLIC sal_Bool InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos = LIST_APPEND );
- sal_Bool InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos = LIST_APPEND );
+ SVX_DLLPUBLIC sal_Bool InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
+ sal_Bool InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
sal_Bool InsertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos );
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index f978e7b35eb5..c6c6de6c8d3e 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -64,8 +64,8 @@ private:
sal_Bool m_bWithCheckmark;
SVX_DLLPRIVATE void Init();
- SVX_DLLPRIVATE sal_uInt16 ImplInsertImgEntry( const OUString& rEntry, sal_uInt16 nPos, bool bChecked );
- SVX_DLLPRIVATE sal_uInt16 ImplInsertLanguage(LanguageType, sal_uInt16, sal_Int16 );
+ SVX_DLLPRIVATE sal_Int32 ImplInsertImgEntry( const OUString& rEntry, sal_Int32 nPos, bool bChecked );
+ SVX_DLLPRIVATE sal_Int32 ImplInsertLanguage(LanguageType, sal_Int32 nPos, sal_Int16 nType);
public:
SvxLanguageBox(Window* pParent, WinBits nBits, sal_Bool bCheck = sal_False);
@@ -75,11 +75,11 @@ public:
sal_Bool bHasLangNone, sal_Bool bLangNoneIsLangAll = sal_False,
sal_Bool bCheckSpellAvail = sal_False );
- sal_uInt16 InsertLanguage( const LanguageType eLangType, sal_uInt16 nPos = LISTBOX_APPEND );
- sal_uInt16 InsertDefaultLanguage( sal_Int16 nType, sal_uInt16 nPos = LISTBOX_APPEND );
- sal_uInt16 InsertSystemLanguage( sal_uInt16 nPos = LISTBOX_APPEND );
- sal_uInt16 InsertLanguage( const LanguageType eLangType,
- sal_Bool bCheckEntry, sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertLanguage( const LanguageType eLangType, sal_Int32 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertSystemLanguage( sal_Int32 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertLanguage( const LanguageType eLangType,
+ sal_Bool bCheckEntry, sal_Int32 nPos = LISTBOX_APPEND );
void RemoveLanguage( const LanguageType eLangType );
void SelectLanguage( const LanguageType eLangType, sal_Bool bSelect = sal_True );
LanguageType GetSelectLanguage() const;
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index 6755aef97469..4610d3039882 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -160,7 +160,7 @@ public:
OUString GetFormat4Entry(short nEntry);
void SetComment4Entry(short nEntry, const OUString& aCommentString);
- void SetCurrencySymbol(sal_uInt16 nPos);
+ void SetCurrencySymbol(sal_uInt32 nPos);
sal_uInt32 GetCurrencySymbol();
sal_uInt16 FindCurrencyFormat( const OUString& rFmtString );
sal_uInt16 FindCurrencyFormat(const NfCurrencyEntry* pTmpCurrencyEntry,bool bTmpBanking);
@@ -195,7 +195,7 @@ private:
std::vector<sal_uInt16> aCurCurrencyList;
NfCurrencyEntry* pCurCurrencyEntry;
bool bBankingSymbol;
- sal_uInt16 nCurCurrencyEntryPos;
+ sal_uInt32 nCurCurrencyEntryPos;
std::vector<OUString> aCurrencyFormatList;
bool bUseStarFormat;
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index bfab233f158f..465c540f1454 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -25,6 +25,7 @@
#include <vcl/print.hxx>
#include <vcl/gdimtf.hxx>
#include <tools/weakbase.hxx>
+#include <tools/contnr.hxx>
#include <cppuhelper/weakref.hxx>
#include <svx/svdtypes.hxx>
#include <svx/svdlayer.hxx>
@@ -126,10 +127,10 @@ public:
// Neuberechnung der Objekt-Ordnungsnummern
void RecalcObjOrdNums();
bool IsObjOrdNumsDirty() const { return bObjOrdNumsDirty; }
- virtual void NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos=0xFFFF
+ virtual void NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND
, const SdrInsertReason* pReason=NULL
);
- virtual void InsertObject(SdrObject* pObj, sal_uIntPtr nPos=0xFFFF
+ virtual void InsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND
, const SdrInsertReason* pReason=NULL
);
// aus Liste entfernen ohne delete
diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx
index df5778a1e6c6..92bc35baa105 100644
--- a/include/svx/txencbox.hxx
+++ b/include/svx/txencbox.hxx
@@ -30,7 +30,7 @@ class SVX_DLLPUBLIC SvxTextEncodingBox : public ListBox
private:
const SvxTextEncodingTable* m_pEncTable;
- SVX_DLLPRIVATE sal_uInt16 EncodingToPos_Impl( rtl_TextEncoding nEnc ) const;
+ SVX_DLLPRIVATE sal_Int32 EncodingToPos_Impl( rtl_TextEncoding nEnc ) const;
public:
SvxTextEncodingBox( Window* pParent, WinBits nBits );
@@ -87,11 +87,11 @@ public:
{ return m_pEncTable; }
void InsertTextEncoding( const rtl_TextEncoding nEnc,
- sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 nPos = LISTBOX_APPEND );
void InsertTextEncoding( const rtl_TextEncoding nEnc,
const OUString& rEntry,
- sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 nPos = LISTBOX_APPEND );
void SelectTextEncoding( const rtl_TextEncoding nEnc,
sal_Bool bSelect = sal_True );
diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index 791583da7ed2..a400a5677c02 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -40,6 +40,8 @@
#include <svtools/grfmgr.hxx>
#include <svx/XPropertyEntry.hxx>
+#include <limits>
+
class Color;
class Bitmap;
class VirtualDevice;
@@ -218,7 +220,7 @@ public:
XPropertyListType Type() const { return meType; }
long Count() const;
- void Insert(XPropertyEntry* pEntry, long nIndex = CONTAINER_APPEND);
+ void Insert(XPropertyEntry* pEntry, long nIndex = ::std::numeric_limits<long>::max());
XPropertyEntry* Replace(XPropertyEntry* pEntry, long nIndex);
XPropertyEntry* Remove(long nIndex);
diff --git a/include/tools/contnr.hxx b/include/tools/contnr.hxx
index 6903d67a7c35..9fe673af92f2 100644
--- a/include/tools/contnr.hxx
+++ b/include/tools/contnr.hxx
@@ -24,9 +24,11 @@
#include <limits.h>
-#define CONTAINER_APPEND ULONG_MAX
-#define CONTAINER_ENTRY_NOTFOUND ULONG_MAX
-#define LIST_APPEND CONTAINER_APPEND
+#define CONTAINER_APPEND (ULONG_MAX)
+#define CONTAINER_ENTRY_NOTFOUND (ULONG_MAX)
+
+#define TREELIST_APPEND (ULONG_MAX)
+#define TREELIST_ENTRY_NOTFOUND (ULONG_MAX)
#endif
diff --git a/include/vcl/combobox.h b/include/vcl/combobox.h
index 0127b3dee4eb..047a24cd9d41 100644
--- a/include/vcl/combobox.h
+++ b/include/vcl/combobox.h
@@ -22,9 +22,10 @@
#include <vcl/lstbox.h>
-#define COMBOBOX_APPEND ((sal_uInt16)0xFFFF)
-#define COMBOBOX_ENTRY_NOTFOUND ((sal_uInt16)0xFFFF)
-#define COMBOBOX_ERROR ((sal_uInt16)0xFFFF)
+#define COMBOBOX_APPEND (SAL_MAX_INT32)
+#define COMBOBOX_ENTRY_NOTFOUND (SAL_MAX_INT32)
+#define COMBOBOX_ERROR (SAL_MAX_INT32)
+#define COMBOBOX_MAX_ENTRIES (SAL_MAX_INT32 - 1)
#endif // INCLUDED_VCL_COMBOBOX_H
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index 7809188db1bb..b9bde8c2b1bb 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -42,7 +42,7 @@ private:
ImplListBox* mpImplLB;
ImplBtn* mpBtn;
ImplListBoxFloatingWindow* mpFloatWin;
- sal_uInt16 mnDDHeight;
+ sal_uInt16 mnDDHeight;
sal_Unicode mcMultiSep;
bool mbDDAutoSize : 1;
bool mbSyntheticModify : 1;
@@ -129,21 +129,21 @@ public:
virtual void SetText( const OUString& rStr );
virtual void SetText( const OUString& rStr, const Selection& rNewSelection );
- virtual sal_uInt16 InsertEntry(const OUString& rStr, sal_uInt16 nPos = COMBOBOX_APPEND);
- void InsertEntryWithImage( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = COMBOBOX_APPEND );
+ virtual sal_Int32 InsertEntry(const OUString& rStr, sal_Int32 nPos = COMBOBOX_APPEND);
+ void InsertEntryWithImage( const OUString& rStr, const Image& rImage, sal_Int32 nPos = COMBOBOX_APPEND );
void RemoveEntry( const OUString& rStr );
- virtual void RemoveEntryAt(sal_uInt16 nPos);
+ virtual void RemoveEntryAt(sal_Int32 nPos);
void Clear();
- sal_uInt16 GetEntryPos( const OUString& rStr ) const;
- Image GetEntryImage( sal_uInt16 nPos ) const;
- OUString GetEntry( sal_uInt16 nPos ) const;
- sal_uInt16 GetEntryCount() const;
+ sal_Int32 GetEntryPos( const OUString& rStr ) const;
+ Image GetEntryImage( sal_Int32 nPos ) const;
+ OUString GetEntry( sal_Int32 nPos ) const;
+ sal_Int32 GetEntryCount() const;
- bool IsTravelSelect() const;
- bool IsInDropDown() const;
+ bool IsTravelSelect() const;
+ bool IsInDropDown() const;
void ToggleDropDown();
long CalcWindowSizePixel( sal_uInt16 nLines ) const;
@@ -154,13 +154,13 @@ public:
void DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false );
void SetBorderStyle( sal_uInt16 nBorderStyle );
- void SetSeparatorPos( sal_uInt16 n = LISTBOX_ENTRY_NOTFOUND );
+ void SetSeparatorPos( sal_Int32 n = LISTBOX_ENTRY_NOTFOUND );
void EnableAutocomplete( bool bEnable, bool bMatchCase = false );
- bool IsAutocompleteEnabled() const;
+ bool IsAutocompleteEnabled() const;
void EnableMultiSelection( bool bMulti );
- bool IsMultiSelectionEnabled() const;
+ bool IsMultiSelectionEnabled() const;
void SetMultiSelectionSeparator( sal_Unicode cSep ) { mcMultiSep = cSep; }
sal_Unicode GetMultiSelectionSeparator() const { return mcMultiSep; }
@@ -177,24 +177,24 @@ public:
void SetMRUEntries( const OUString& rEntries, sal_Unicode cSep = ';' );
OUString GetMRUEntries( sal_Unicode cSep = ';' ) const;
- void SetMaxMRUCount( sal_uInt16 n );
- sal_uInt16 GetMaxMRUCount() const;
- sal_uInt16 GetMRUCount() const;
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetMaxMRUCount( sal_Int32 n );
+ sal_Int32 GetMaxMRUCount() const;
+ sal_Int32 GetMRUCount() const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
- sal_uInt16 GetTopEntry() const;
+ sal_Int32 GetTopEntry() const;
void SetProminentEntryType( ProminentEntry eType );
- sal_uInt16 GetDisplayLineCount() const;
+ sal_uInt16 GetDisplayLineCount() const;
- sal_uInt16 GetSelectEntryCount() const;
- sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
- bool IsEntryPosSelected( sal_uInt16 nPos ) const;
- void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true );
+ sal_Int32 GetSelectEntryCount() const;
+ sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const;
+ bool IsEntryPosSelected( sal_Int32 nPos ) const;
+ void SelectEntryPos( sal_Int32 nPos, bool bSelect = true );
void SetNoSelection();
- Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const;
+ Rectangle GetBoundingRectangle( sal_Int32 nItem ) const;
/** checks whether a certain point lies within the bounds of
a list item and returns the item as well as the character position
@@ -215,7 +215,7 @@ public:
if no item is at that point.
*/
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
sal_Int32 getMaxWidthChars() const { return m_nMaxWidthChars; }
void setMaxWidthChars(sal_Int32 nWidth);
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 47b77abda784..e9bd9e5f4440 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -128,7 +128,7 @@ public:
const OUString& GetLiteralMask() const { return maLiteralMask; }
void SetFormatFlags( sal_uInt16 nFlags ) { mnFormatFlags = nFlags; }
- sal_uInt16 GetFormatFlags() const { return mnFormatFlags; }
+ sal_uInt16 GetFormatFlags() const { return mnFormatFlags; }
void SetString( const OUString& rStr );
OUString GetString() const;
@@ -732,7 +732,7 @@ public:
virtual void ReformatAll();
- void InsertValue( sal_Int64 nValue, sal_uInt16 nPos = COMBOBOX_APPEND );
+ void InsertValue( sal_Int64 nValue, sal_Int32 nPos = COMBOBOX_APPEND );
};
@@ -758,9 +758,9 @@ public:
virtual void ReformatAll();
void InsertValue( sal_Int64 nValue, FieldUnit eInUnit = FUNIT_NONE,
- sal_uInt16 nPos = COMBOBOX_APPEND );
- sal_Int64 GetValue( sal_uInt16 nPos, FieldUnit eOutUnit = FUNIT_NONE ) const;
- sal_uInt16 GetValuePos( sal_Int64 nValue,
+ sal_Int32 nPos = COMBOBOX_APPEND );
+ sal_Int64 GetValue( sal_Int32 nPos, FieldUnit eOutUnit = FUNIT_NONE ) const;
+ sal_Int32 GetValuePos( sal_Int64 nValue,
FieldUnit eInUnit = FUNIT_NONE ) const;
// Needed, because GetValue() with nPos hide these functions
diff --git a/include/vcl/lstbox.h b/include/vcl/lstbox.h
index 80383cfec234..50e121fad6fc 100644
--- a/include/vcl/lstbox.h
+++ b/include/vcl/lstbox.h
@@ -20,9 +20,12 @@
#ifndef INCLUDED_VCL_LSTBOX_H
#define INCLUDED_VCL_LSTBOX_H
-#define LISTBOX_APPEND ((sal_uInt16)0xFFFF)
-#define LISTBOX_ENTRY_NOTFOUND ((sal_uInt16)0xFFFF)
-#define LISTBOX_ERROR ((sal_uInt16)0xFFFF)
+#include <sal/types.h>
+
+#define LISTBOX_APPEND (SAL_MAX_INT32)
+#define LISTBOX_ENTRY_NOTFOUND (SAL_MAX_INT32)
+#define LISTBOX_ERROR (SAL_MAX_INT32)
+#define LISTBOX_MAX_ENTRIES (SAL_MAX_INT32 - 1)
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index bfba165e8466..c81b52a5b916 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -42,8 +42,8 @@ private:
ImplWin* mpImplWin;
ImplBtn* mpBtn;
sal_uInt16 mnDDHeight;
- sal_uInt16 mnSaveValue;
- sal_Int32 m_nMaxWidthChars;
+ sal_Int32 mnSaveValue;
+ sal_Int32 m_nMaxWidthChars;
Link maSelectHdl;
Link maDoubleClickHdl;
sal_uInt16 mnLineCount;
@@ -115,32 +115,32 @@ public:
void EnableDDAutoWidth( bool b );
- sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
- sal_uInt16 InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertEntry( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertEntry( const OUString& rStr, const Image& rImage, sal_Int32 nPos = LISTBOX_APPEND );
void RemoveEntry( const OUString& rStr );
- void RemoveEntry( sal_uInt16 nPos );
+ void RemoveEntry( sal_Int32 nPos );
void Clear();
- sal_uInt16 GetEntryPos( const OUString& rStr ) const;
- sal_uInt16 GetEntryPos( const void* pData ) const;
- Image GetEntryImage( sal_uInt16 nPos ) const;
- OUString GetEntry( sal_uInt16 nPos ) const;
- sal_uInt16 GetEntryCount() const;
+ sal_Int32 GetEntryPos( const OUString& rStr ) const;
+ sal_Int32 GetEntryPos( const void* pData ) const;
+ Image GetEntryImage( sal_Int32 nPos ) const;
+ OUString GetEntry( sal_Int32 nPos ) const;
+ sal_Int32 GetEntryCount() const;
void SelectEntry( const OUString& rStr, bool bSelect = true );
- void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true );
+ void SelectEntryPos( sal_Int32 nPos, bool bSelect = true );
- sal_uInt16 GetSelectEntryCount() const;
- OUString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const;
- sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
+ sal_Int32 GetSelectEntryCount() const;
+ OUString GetSelectEntry( sal_Int32 nSelIndex = 0 ) const;
+ sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const;
bool IsEntrySelected(const OUString& rStr) const;
- bool IsEntryPosSelected( sal_uInt16 nPos ) const;
+ bool IsEntryPosSelected( sal_Int32 nPos ) const;
void SetNoSelection();
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
/** this methods stores a combination of flags from the
LISTBOX_ENTRY_FLAG_* defines at the given entry.
@@ -150,36 +150,36 @@ public:
to change the internal behaviour of the ListBox implementation
for specific entries.
*/
- void SetEntryFlags( sal_uInt16 nPos, long nFlags );
+ void SetEntryFlags( sal_Int32 nPos, long nFlags );
/** this methods gets the current combination of flags from the
LISTBOX_ENTRY_FLAG_* defines from the given entry.
See description of the possible LISTBOX_ENTRY_FLAG_* flags
for details.
*/
- long GetEntryFlags( sal_uInt16 nPos ) const;
+ long GetEntryFlags( sal_Int32 nPos ) const;
- void SetTopEntry( sal_uInt16 nPos );
- sal_uInt16 GetTopEntry() const;
+ void SetTopEntry( sal_Int32 nPos );
+ sal_Int32 GetTopEntry() const;
void SaveValue() { mnSaveValue = GetSelectEntryPos(); }
- sal_uInt16 GetSavedValue() const { return mnSaveValue; }
+ sal_Int32 GetSavedValue() const { return mnSaveValue; }
- void SetSeparatorPos( sal_uInt16 n = LISTBOX_ENTRY_NOTFOUND );
- sal_uInt16 GetSeparatorPos() const;
+ void SetSeparatorPos( sal_Int32 n = LISTBOX_ENTRY_NOTFOUND );
+ sal_Int32 GetSeparatorPos() const;
- bool IsTravelSelect() const;
- bool IsInDropDown() const;
+ bool IsTravelSelect() const;
+ bool IsInDropDown() const;
void ToggleDropDown();
void EnableMultiSelection( bool bMulti, bool bStackSelection );
void EnableMultiSelection( bool bMulti );
- bool IsMultiSelectionEnabled() const;
+ bool IsMultiSelectionEnabled() const;
void SetReadOnly( bool bReadOnly = true );
- bool IsReadOnly() const;
+ bool IsReadOnly() const;
- Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const;
+ Rectangle GetBoundingRectangle( sal_Int32 nItem ) const;
void SetUserItemSize( const Size& rSz );
@@ -199,7 +199,7 @@ public:
Size CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const;
- sal_uInt16 GetMRUCount() const;
+ sal_Int32 GetMRUCount() const;
sal_uInt16 GetDisplayLineCount() const;
void EnableMirroring();
@@ -226,7 +226,7 @@ public:
if no item is at that point.
*/
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
sal_Int32 getMaxWidthChars() const { return m_nMaxWidthChars; }
void setMaxWidthChars(sal_Int32 nWidth);
@@ -248,7 +248,7 @@ public:
private:
// Bei MultiListBox nicht erlaubt...
void SaveValue();
- sal_uInt16 GetSavedValue();
+ sal_Int32 GetSavedValue();
public:
explicit MultiListBox( Window* pParent, WinBits nStyle = 0 );