summaryrefslogtreecommitdiff
path: root/include/svx
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/svx
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/svx')
-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
11 files changed, 49 insertions, 46 deletions
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);