[Libreoffice-commits] core.git: accessibility/inc accessibility/source basctl/source chart2/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source formula/source fpicker/source framework/source include/sfx2 include/svtools include/svx include/tools include/vcl padmin/source reportdesign/source sc/source sd/source sfx2/source starmath/source svtools/source svx/source sw/inc sw/source tools/source vcl/inc vcl/source xmlsecurity/source

Eike Rathke erack at redhat.com
Wed Mar 5 05:31:50 PST 2014


 accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx        |   18 
 accessibility/inc/accessibility/helper/listboxhelper.hxx              |   20 
 accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx       |    4 
 accessibility/source/standard/vclxaccessiblelist.cxx                  |   24 
 accessibility/source/standard/vclxaccessiblelistitem.cxx              |    4 
 basctl/source/basicide/basicbox.cxx                                   |   18 
 basctl/source/basicide/baside2b.cxx                                   |   16 
 basctl/source/basicide/bastype2.cxx                                   |    2 
 basctl/source/basicide/brkdlg.cxx                                     |    4 
 chart2/source/controller/dialogs/tp_AxisPositions.cxx                 |   18 
 cui/source/customize/acccfg.cxx                                       |   36 -
 cui/source/dialogs/cuifmsearch.cxx                                    |    6 
 cui/source/dialogs/hangulhanjadlg.cxx                                 |    4 
 cui/source/dialogs/hldocntp.cxx                                       |    4 
 cui/source/dialogs/hlmarkwn.cxx                                       |    6 
 cui/source/dialogs/hltpbase.cxx                                       |    4 
 cui/source/dialogs/linkdlg.cxx                                        |   54 -
 cui/source/dialogs/scriptdlg.cxx                                      |    6 
 cui/source/inc/acccfg.hxx                                             |    2 
 cui/source/inc/cfg.hxx                                                |    2 
 cui/source/inc/cuifmsearch.hxx                                        |    4 
 cui/source/inc/cuitabarea.hxx                                         |   20 
 cui/source/inc/cuitabline.hxx                                         |   20 
 cui/source/inc/iconcdlg.hxx                                           |    2 
 cui/source/inc/linkdlg.hxx                                            |    6 
 cui/source/inc/optdict.hxx                                            |    2 
 cui/source/options/optchart.cxx                                       |    8 
 cui/source/options/optdict.cxx                                        |   32 -
 cui/source/options/optinet2.cxx                                       |   10 
 cui/source/options/optjava.cxx                                        |   30 -
 cui/source/options/optlingu.cxx                                       |   36 -
 cui/source/tabpages/align.cxx                                         |    6 
 cui/source/tabpages/autocdlg.cxx                                      |   77 +-
 cui/source/tabpages/backgrnd.cxx                                      |   16 
 cui/source/tabpages/border.cxx                                        |    2 
 cui/source/tabpages/borderconn.cxx                                    |    2 
 cui/source/tabpages/chardlg.cxx                                       |   52 -
 cui/source/tabpages/connect.cxx                                       |    4 
 cui/source/tabpages/measure.cxx                                       |   10 
 cui/source/tabpages/numfmt.cxx                                        |   42 -
 cui/source/tabpages/numpages.cxx                                      |   94 +--
 cui/source/tabpages/page.cxx                                          |   22 
 cui/source/tabpages/paragrph.cxx                                      |   16 
 cui/source/tabpages/swpossizetabpage.cxx                              |   18 
 cui/source/tabpages/tabstpge.cxx                                      |   18 
 cui/source/tabpages/textanim.cxx                                      |    6 
 cui/source/tabpages/tparea.cxx                                        |   22 
 cui/source/tabpages/tpbitmap.cxx                                      |   12 
 cui/source/tabpages/tpcolor.cxx                                       |   20 
 cui/source/tabpages/tpgradnt.cxx                                      |   14 
 cui/source/tabpages/tphatch.cxx                                       |   14 
 cui/source/tabpages/tpline.cxx                                        |   18 
 cui/source/tabpages/tplnedef.cxx                                      |    8 
 cui/source/tabpages/tplneend.cxx                                      |    8 
 cui/source/tabpages/tpshadow.cxx                                      |    8 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx                        |    4 
 dbaccess/source/ui/browser/unodatbr.cxx                               |    6 
 dbaccess/source/ui/control/FieldDescControl.cxx                       |    2 
 dbaccess/source/ui/control/opendoccontrols.cxx                        |    8 
 dbaccess/source/ui/control/tabletree.cxx                              |   18 
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx                       |    2 
 dbaccess/source/ui/dlg/directsql.cxx                                  |    4 
 dbaccess/source/ui/dlg/dlgsave.cxx                                    |    4 
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx                         |    2 
 dbaccess/source/ui/dlg/paramdialog.cxx                                |   16 
 dbaccess/source/ui/inc/paramdialog.hxx                                |    2 
 dbaccess/source/ui/misc/WNameMatch.cxx                                |    2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx                 |   16 
 dbaccess/source/ui/tabledesign/TEditControl.cxx                       |    6 
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx                 |    4 
 editeng/source/outliner/outliner.cxx                                  |    6 
 extensions/source/bibliography/toolbar.cxx                            |    2 
 extensions/source/bibliography/toolbar.hxx                            |    2 
 extensions/source/dbpilots/gridwizard.cxx                             |    6 
 extensions/source/propctrlr/browserlistbox.cxx                        |    2 
 extensions/source/propctrlr/pcrcommon.hxx                             |    5 
 extensions/source/propctrlr/propcontroller.cxx                        |    8 
 extensions/source/propctrlr/propertyeditor.cxx                        |    4 
 extensions/source/propctrlr/taborder.cxx                              |    2 
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx                  |    2 
 formula/source/ui/dlg/formula.cxx                                     |   13 
 formula/source/ui/dlg/funcpage.cxx                                    |   18 
 formula/source/ui/dlg/funcpage.hxx                                    |   14 
 formula/source/ui/dlg/structpg.hxx                                    |    2 
 fpicker/source/office/OfficeControlAccess.cxx                         |   10 
 framework/source/uielement/comboboxtoolbarcontroller.cxx              |   10 
 framework/source/uielement/dropdownboxtoolbarcontroller.cxx           |   10 
 include/sfx2/controlwrapper.hxx                                       |   12 
 include/sfx2/itemconnect.hxx                                          |   12 
 include/svtools/ctrlbox.hxx                                           |   52 -
 include/svtools/ivctrl.hxx                                            |    2 
 include/svtools/svtabbx.hxx                                           |   16 
 include/svtools/treelist.hxx                                          |    5 
 include/svtools/treelistbox.hxx                                       |    8 
 include/svtools/valueset.hxx                                          |    4 
 include/svx/checklbx.hxx                                              |   21 
 include/svx/ctredlin.hxx                                              |   10 
 include/svx/dlgctrl.hxx                                               |   12 
 include/svx/fontlb.hxx                                                |    5 
 include/svx/frmdirlbox.hxx                                            |    2 
 include/svx/galtheme.hxx                                              |   12 
 include/svx/langbox.hxx                                               |   14 
 include/svx/numfmtsh.hxx                                              |    4 
 include/svx/svdpage.hxx                                               |    5 
 include/svx/txencbox.hxx                                              |    6 
 include/svx/xtable.hxx                                                |    4 
 include/tools/contnr.hxx                                              |    8 
 include/vcl/combobox.h                                                |    7 
 include/vcl/combobox.hxx                                              |   52 -
 include/vcl/field.hxx                                                 |   10 
 include/vcl/lstbox.h                                                  |    9 
 include/vcl/lstbox.hxx                                                |   64 +-
 padmin/source/prtsetup.cxx                                            |    4 
 reportdesign/source/ui/dlg/AddField.cxx                               |   10 
 reportdesign/source/ui/dlg/GroupsSorting.cxx                          |    6 
 reportdesign/source/ui/dlg/Navigator.cxx                              |   16 
 sc/source/ui/cctrl/checklistmenu.cxx                                  |    2 
 sc/source/ui/condformat/condformatmgr.cxx                             |    2 
 sc/source/ui/dbgui/pfiltdlg.cxx                                       |    4 
 sc/source/ui/dbgui/pvfundlg.cxx                                       |   10 
 sc/source/ui/dbgui/tpsort.cxx                                         |    2 
 sc/source/ui/dbgui/tpsubt.cxx                                         |    6 
 sc/source/ui/formdlg/dwfunctr.cxx                                     |   10 
 sc/source/ui/inc/acredlin.hxx                                         |    6 
 sc/source/ui/inc/tpsubt.hxx                                           |    1 
 sc/source/ui/inc/tpusrlst.hxx                                         |    6 
 sc/source/ui/miscdlgs/acredlin.cxx                                    |    2 
 sc/source/ui/namedlg/namemgrtable.cxx                                 |    2 
 sc/source/ui/optdlg/calcoptionsdlg.hxx                                |    1 
 sc/source/ui/optdlg/opredlin.cxx                                      |    2 
 sc/source/ui/optdlg/tpusrlst.cxx                                      |   10 
 sc/source/ui/optdlg/tpview.cxx                                        |   14 
 sc/source/ui/view/gridwin.cxx                                         |   10 
 sd/source/core/anminfo.cxx                                            |    4 
 sd/source/ui/animations/CustomAnimationCreateDialog.cxx               |   30 -
 sd/source/ui/animations/CustomAnimationDialog.cxx                     |   46 -
 sd/source/ui/animations/SlideTransitionPane.cxx                       |   28 -
 sd/source/ui/dlg/animobjs.cxx                                         |   10 
 sd/source/ui/dlg/copydlg.cxx                                          |    2 
 sd/source/ui/dlg/custsdlg.cxx                                         |   20 
 sd/source/ui/dlg/navigatr.cxx                                         |    2 
 sd/source/ui/dlg/present.cxx                                          |    4 
 sd/source/ui/dlg/sdtreelb.cxx                                         |   16 
 sd/source/ui/dlg/tpaction.cxx                                         |    8 
 sd/source/ui/dlg/tpoption.cxx                                         |    8 
 sd/source/ui/func/fulinend.cxx                                        |    2 
 sd/source/ui/func/fumorph.cxx                                         |    4 
 sd/source/ui/view/outlview.cxx                                        |    4 
 sfx2/source/appl/newhelp.cxx                                          |   20 
 sfx2/source/dialog/mgetempl.cxx                                       |    2 
 sfx2/source/dialog/srchdlg.cxx                                        |    4 
 starmath/source/dialog.cxx                                            |   14 
 svtools/source/brwbox/ebbcontrols.cxx                                 |   28 -
 svtools/source/contnr/treelist.cxx                                    |    8 
 svtools/source/contnr/treelistbox.cxx                                 |   12 
 svtools/source/control/ctrlbox.cxx                                    |   77 +-
 svtools/source/control/toolbarmenu.cxx                                |   14 
 svtools/source/uno/treecontrolpeer.cxx                                |    8 
 svtools/source/uno/treecontrolpeer.hxx                                |    2 
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx                 |    2 
 svx/source/dialog/checklbx.cxx                                        |   30 -
 svx/source/dialog/ctredlin.cxx                                        |    6 
 svx/source/dialog/dlgctrl.cxx                                         |   12 
 svx/source/dialog/fontlb.cxx                                          |    4 
 svx/source/dialog/frmdirlbox.cxx                                      |   10 
 svx/source/dialog/langbox.cxx                                         |   40 -
 svx/source/dialog/txencbox.cxx                                        |   18 
 svx/source/form/datanavi.cxx                                          |   22 
 svx/source/form/filtnav.cxx                                           |   12 
 svx/source/form/navigatortree.cxx                                     |    6 
 svx/source/form/navigatortreemodel.cxx                                |    8 
 svx/source/form/tabwin.cxx                                            |    4 
 svx/source/inc/datanavi.hxx                                           |    2 
 svx/source/inc/fmexpl.hxx                                             |    4 
 svx/source/items/numfmtsh.cxx                                         |    2 
 svx/source/sidebar/area/AreaPropertyPanel.cxx                         |   14 
 svx/source/sidebar/area/AreaPropertyPanel.hxx                         |    6 
 svx/source/sidebar/line/LinePropertyPanel.cxx                         |   20 
 svx/source/tbxctrls/fillctrl.cxx                                      |   18 
 svx/source/tbxctrls/itemwin.cxx                                       |    6 
 svx/source/tbxctrls/tbcontrl.cxx                                      |    3 
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx |    2 
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx |    2 
 sw/inc/editsh.hxx                                                     |    6 
 sw/source/core/edit/edglbldc.cxx                                      |    6 
 sw/source/ui/cctrl/swlbox.cxx                                         |   30 -
 sw/source/ui/chrdlg/break.cxx                                         |    6 
 sw/source/ui/config/optload.cxx                                       |   34 -
 sw/source/ui/config/optpage.cxx                                       |   25 
 sw/source/ui/dbui/customizeaddresslistdialog.cxx                      |   12 
 sw/source/ui/dbui/dbinsdlg.cxx                                        |   21 
 sw/source/ui/dbui/mmgreetingspage.cxx                                 |   10 
 sw/source/ui/dochdl/gloshdl.cxx                                       |    2 
 sw/source/ui/fldui/flddb.cxx                                          |   13 
 sw/source/ui/fldui/flddinf.cxx                                        |   16 
 sw/source/ui/fldui/flddinf.hxx                                        |    4 
 sw/source/ui/fldui/flddok.cxx                                         |   29 -
 sw/source/ui/fldui/flddok.hxx                                         |    4 
 sw/source/ui/fldui/fldfunc.cxx                                        |   17 
 sw/source/ui/fldui/fldpage.cxx                                        |    2 
 sw/source/ui/fldui/fldpage.hxx                                        |   12 
 sw/source/ui/fldui/fldref.cxx                                         |   28 -
 sw/source/ui/fldui/fldref.hxx                                         |    6 
 sw/source/ui/fldui/fldvar.cxx                                         |   64 +-
 sw/source/ui/fldui/fldvar.hxx                                         |    2 
 sw/source/ui/frmdlg/column.cxx                                        |    2 
 sw/source/ui/frmdlg/frmpage.cxx                                       |   68 +-
 sw/source/ui/inc/bookmark.hxx                                         |   10 
 sw/source/ui/inc/frmpage.hxx                                          |    8 
 sw/source/ui/inc/optload.hxx                                          |    2 
 sw/source/ui/inc/swlbox.hxx                                           |   16 
 sw/source/ui/index/cnttab.cxx                                         |   49 -
 sw/source/ui/index/swuiidxmrk.cxx                                     |   14 
 sw/source/ui/misc/bookmark.cxx                                        |   24 
 sw/source/ui/misc/docfnote.cxx                                        |    6 
 sw/source/ui/misc/linenum.cxx                                         |    4 
 sw/source/ui/misc/numberingtypelistbox.cxx                            |   10 
 sw/source/ui/misc/pgfnote.cxx                                         |    4 
 sw/source/ui/utlui/content.cxx                                        |   14 
 sw/source/ui/utlui/glbltree.cxx                                       |   46 -
 tools/source/inet/inetmsg.cxx                                         |    4 
 vcl/inc/ilstbox.hxx                                                   |  178 +++---
 vcl/source/control/combobox.cxx                                       |  130 ++--
 vcl/source/control/field.cxx                                          |   24 
 vcl/source/control/ilstbox.cxx                                        |  280 +++++-----
 vcl/source/control/lstbox.cxx                                         |   86 +--
 xmlsecurity/source/dialogs/macrosecurity.cxx                          |    8 
 227 files changed, 1846 insertions(+), 1745 deletions(-)

New commits:
commit 68ec95b3f80408ae50897b043eed69a07d084df9
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Mar 1 03:13:28 2014 +0100

    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 at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
index 5944369..ce59181 100644
--- a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
+++ b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
@@ -38,28 +38,28 @@ namespace accessibility
     public:
         virtual ~IComboListBoxHelper() = 0;
 
-        virtual OUString        GetEntry( sal_uInt16 nPos ) const = 0;
+        virtual OUString        GetEntry( sal_Int32  nPos ) const = 0;
         virtual Rectangle       GetDropDownPosSizePixel( ) const = 0;
         virtual Rectangle       GetBoundingRectangle( sal_uInt16 nItem ) const = 0;
         virtual Rectangle       GetWindowExtentsRelative( Window* pRelativeWindow ) = 0;
         virtual bool            IsActive() const = 0;
         virtual bool            IsEnabled() const = 0;
-        virtual bool            IsEntryVisible( sal_uInt16 nPos ) const = 0;
+        virtual bool            IsEntryVisible( sal_Int32  nPos ) const = 0;
         virtual sal_uInt16      GetDisplayLineCount() const = 0;
         virtual void            GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const = 0;
         virtual WinBits         GetStyle() const = 0;
         virtual bool            IsMultiSelectionEnabled() const = 0;
-        virtual sal_uInt16      GetTopEntry() const = 0;
-        virtual bool            IsEntryPosSelected( sal_uInt16 nPos ) const = 0;
-        virtual sal_uInt16      GetEntryCount() const = 0;
+        virtual sal_Int32       GetTopEntry() const = 0;
+        virtual bool            IsEntryPosSelected( sal_Int32  nPos ) const = 0;
+        virtual sal_Int32       GetEntryCount() const = 0;
         virtual void            Select() = 0;
-        virtual void            SelectEntryPos( sal_uInt16 nPos, bool bSelect = true ) = 0;
-        virtual sal_uInt16      GetSelectEntryCount() const = 0;
+        virtual void            SelectEntryPos( sal_Int32  nPos, bool bSelect = true ) = 0;
+        virtual sal_Int32       GetSelectEntryCount() const = 0;
         virtual void            SetNoSelection() = 0;
-        virtual sal_uInt16      GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const = 0;
+        virtual sal_Int32       GetSelectEntryPos( sal_Int32  nSelIndex = 0 ) const = 0;
         virtual bool            IsInDropDown() const = 0;
         virtual Rectangle       GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const = 0;
-        virtual long            GetIndexForPoint( const Point& rPoint, sal_uInt16& nPos ) const = 0;
+        virtual long            GetIndexForPoint( const Point& rPoint, sal_Int32 & nPos ) const = 0;
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >
                                 GetClipboard() = 0;
     };
diff --git a/accessibility/inc/accessibility/helper/listboxhelper.hxx b/accessibility/inc/accessibility/helper/listboxhelper.hxx
index a95acf6..84e9d54 100644
--- a/accessibility/inc/accessibility/helper/listboxhelper.hxx
+++ b/accessibility/inc/accessibility/helper/listboxhelper.hxx
@@ -46,7 +46,7 @@ public:
         m_aComboListBox( _pListBox ){}
 
 
-    virtual OUString        GetEntry( sal_uInt16 nPos ) const
+    virtual OUString        GetEntry( sal_Int32  nPos ) const
     {
         return m_aComboListBox.GetEntry( nPos );
     }
@@ -91,9 +91,9 @@ public:
         return m_aComboListBox.IsEnabled();
     }
 
-    virtual bool            IsEntryVisible( sal_uInt16 nPos ) const
+    virtual bool            IsEntryVisible( sal_Int32  nPos ) const
     {
-        sal_uInt16 nTopEntry = m_aComboListBox.GetTopEntry();
+        sal_Int32  nTopEntry = m_aComboListBox.GetTopEntry();
         sal_uInt16 nLines = m_aComboListBox.GetDisplayLineCount();
         return ( nPos >= nTopEntry && nPos < ( nTopEntry + nLines ) );
     }
@@ -118,17 +118,17 @@ public:
         return m_aComboListBox.IsMultiSelectionEnabled();
     }
 
-    virtual sal_uInt16      GetTopEntry() const
+    virtual sal_Int32       GetTopEntry() const
     {
         return m_aComboListBox.GetTopEntry();
     }
 
-    virtual bool            IsEntryPosSelected( sal_uInt16 nPos ) const
+    virtual bool            IsEntryPosSelected( sal_Int32  nPos ) const
     {
         return m_aComboListBox.IsEntryPosSelected(nPos);
     }
 
-    virtual sal_uInt16      GetEntryCount() const
+    virtual sal_Int32       GetEntryCount() const
     {
         return m_aComboListBox.GetEntryCount();
     }
@@ -138,12 +138,12 @@ public:
         m_aComboListBox.Select();
     }
 
-    virtual void            SelectEntryPos( sal_uInt16 nPos, bool bSelect = true )
+    virtual void            SelectEntryPos( sal_Int32  nPos, bool bSelect = true )
     {
         m_aComboListBox.SelectEntryPos(nPos,bSelect);
     }
 
-    virtual sal_uInt16      GetSelectEntryCount() const
+    virtual sal_Int32       GetSelectEntryCount() const
     {
         return m_aComboListBox.GetSelectEntryCount();
     }
@@ -153,7 +153,7 @@ public:
         m_aComboListBox.SetNoSelection();
     }
 
-    virtual sal_uInt16      GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const
+    virtual sal_Int32       GetSelectEntryPos( sal_Int32  nSelIndex = 0 ) const
     {
         return m_aComboListBox.GetSelectEntryPos(nSelIndex);
     }
@@ -176,7 +176,7 @@ public:
         return aRect;
     }
 
-    long GetIndexForPoint( const Point& rPoint, sal_uInt16& nPos ) const
+    long GetIndexForPoint( const Point& rPoint, sal_Int32& nPos ) const
     {
         return m_aComboListBox.GetIndexForPoint( rPoint, nPos );
     }
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx
index d9fd0a5..d5a5eaa 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx
@@ -152,10 +152,10 @@ protected:
     /// Index in parent.  This is settable from the outside.
     sal_Int32   m_nIndexInParent;
     sal_Int32   m_nLastTopEntry;
-    sal_uInt16      m_nLastSelectedPos;
+    sal_Int32   m_nLastSelectedPos;
     bool        m_bDisableProcessEvent;
     bool        m_bVisible;
-    sal_uInt16  m_nCurSelectedPos;
+    sal_Int32   m_nCurSelectedPos;
 
 
     /// The currently selected item.
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 75fec91..2db7e9b 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -62,7 +62,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType
       m_nLastSelectedPos        ( LISTBOX_ENTRY_NOTFOUND ),
       m_bDisableProcessEvent    ( false ),
       m_bVisible                ( true ),
-    m_nCurSelectedPos       ( LISTBOX_ENTRY_NOTFOUND ),
+      m_nCurSelectedPos         ( LISTBOX_ENTRY_NOTFOUND ),
       m_xParent                 ( _xParent )
 {
     // Because combo boxes and list boxes don't have a common interface for
@@ -192,12 +192,14 @@ void VCLXAccessibleList::UpdateSelection_Acc (::rtl::OUString sTextOfSelectedIte
         ComboBox* pBox = static_cast<ComboBox*>(GetWindow());
         if ( pBox != NULL )
         {
-        // Find the index of the selected item inside the VCL control...
-        sal_uInt16 nIndex = pBox->GetEntryPos(sTextOfSelectedItem);
-        // ...and then find the associated accessibility object.
-        if ( nIndex == LISTBOX_ENTRY_NOTFOUND )
-            nIndex = 0;
-        UpdateSelection_Impl_Acc(b_IsDropDownList);
+            // Find the index of the selected item inside the VCL control...
+            sal_Int32 nIndex = pBox->GetEntryPos(sTextOfSelectedItem);
+            // ...and then find the associated accessibility object.
+            if ( nIndex == LISTBOX_ENTRY_NOTFOUND )
+                nIndex = 0;
+            /* FIXME: is there something missing here? nIndex is unused. Looks 
+             * like copy-paste from VCLXAccessibleList::UpdateSelection() */
+            UpdateSelection_Impl_Acc(b_IsDropDownList);
         }
     }
 }
@@ -213,7 +215,7 @@ void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool b_IsDropDownList)
             Reference< XAccessible > xNewAcc;
         if ( m_pListBoxHelper )
         {
-            sal_uInt16 i=0;
+            sal_uInt32 i=0;
             m_nCurSelectedPos = LISTBOX_ENTRY_NOTFOUND;
             for ( ListItems::iterator aIter = m_aAccessibleChildren.begin();
                   aIter != m_aAccessibleChildren.end(); ++aIter,++i)
@@ -372,7 +374,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve
                     {
                         uno::Any    aOldValue,
                                     aNewValue;
-                        sal_uInt16 nPos = m_nCurSelectedPos; //m_pListBoxHelper->GetSelectEntryPos();
+                        sal_Int32 nPos = m_nCurSelectedPos; //m_pListBoxHelper->GetSelectEntryPos();
 
                         if ( nPos == LISTBOX_ENTRY_NOTFOUND )
                             nPos = m_pListBoxHelper->GetTopEntry();
@@ -447,7 +449,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve
                     {
                         uno::Any    aOldValue,
                                     aNewValue;
-                        sal_uInt16 nPos = m_nCurSelectedPos;
+                        sal_Int32 nPos = m_nCurSelectedPos;
 
                         if ( nPos == LISTBOX_ENTRY_NOTFOUND )
                             nPos = m_pListBoxHelper->GetTopEntry();
@@ -497,7 +499,7 @@ void VCLXAccessibleList::UpdateSelection (OUString sTextOfSelectedItem)
         if ( pBox != NULL )
         {
             // Find the index of the selected item inside the VCL control...
-            sal_uInt16 nIndex = pBox->GetEntryPos(sTextOfSelectedItem);
+            sal_Int32 nIndex = pBox->GetEntryPos(sTextOfSelectedItem);
             // ...and then find the associated accessibility object.
             if ( nIndex == LISTBOX_ENTRY_NOTFOUND )
                 nIndex = 0;
diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx
index f829093..fb507be 100644
--- a/accessibility/source/standard/vclxaccessiblelistitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx
@@ -486,12 +486,12 @@ sal_Int32 SAL_CALL VCLXAccessibleListItem::getIndexAtPoint( const awt::Point& aP
     sal_Int32 nIndex = -1;
     if ( m_pListBoxHelper )
     {
-        sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+        sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
         Rectangle aItemRect = m_pListBoxHelper->GetBoundingRectangle( (sal_uInt16)m_nIndexInParent );
         Point aPnt( VCLPoint( aPoint ) );
         aPnt += aItemRect.TopLeft();
         sal_Int32 nI = m_pListBoxHelper->GetIndexForPoint( aPnt, nPos );
-        if ( nI != -1 && (sal_uInt16)m_nIndexInParent == nPos )
+        if ( nI != -1 && m_nIndexInParent == nPos )
             nIndex = nI;
     }
     return nIndex;
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 1c98157..59d438c 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -209,7 +209,7 @@ void LibBox::FillBox()
     ClearBox();
 
     // create list box entries
-    sal_uInt16 nPos = InsertEntry( OUString( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND );
+    sal_Int32 nPos = InsertEntry( OUString( IDEResId( RID_STR_ALL ) ), LISTBOX_APPEND );
     SetEntryData( nPos, new LibEntry( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_UNKNOWN, OUString() ) );
     InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_USER );
     InsertEntries( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_SHARE );
@@ -248,7 +248,7 @@ void LibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLo
         {
             OUString aName( rDocument.getTitle( eLocation ) );
             OUString aEntryText( CreateMgrAndLibStr( aName, aLibName ) );
-            sal_uInt16 nPos = InsertEntry( aEntryText, LISTBOX_APPEND );
+            sal_Int32 nPos = InsertEntry( aEntryText, LISTBOX_APPEND );
             SetEntryData( nPos, new LibEntry( rDocument, eLocation, aLibName ) );
         }
     }
@@ -312,7 +312,7 @@ void LibBox::Select()
 
 void LibBox::NotifyIDE()
 {
-    sal_uInt16 nSelPos = GetSelectEntryPos();
+    sal_Int32 nSelPos = GetSelectEntryPos();
     if (LibEntry* pEntry = static_cast<LibEntry*>(GetEntryData(nSelPos)))
     {
         ScriptDocument aDocument( pEntry->GetDocument() );
@@ -330,8 +330,8 @@ void LibBox::NotifyIDE()
 
 void LibBox::ClearBox()
 {
-    sal_uInt16 nCount = GetEntryCount();
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
+    sal_Int32 nCount = GetEntryCount();
+    for ( sal_Int32 i = 0; i < nCount; ++i )
     {
         LibEntry* pEntry = static_cast<LibEntry*>(GetEntryData( i ));
         delete pEntry;
@@ -411,7 +411,7 @@ void LanguageBox::FillBox()
         Sequence< Locale > aLocaleSeq = pCurMgr->getStringResourceManager()->getLocales();
         const Locale* pLocale = aLocaleSeq.getConstArray();
         sal_Int32 i, nCount = aLocaleSeq.getLength();
-        sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
+        sal_Int32 nSelPos = LISTBOX_ENTRY_NOTFOUND;
         for ( i = 0;  i < nCount;  ++i )
         {
             bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] );
@@ -423,7 +423,7 @@ void LanguageBox::FillBox()
                 sLanguage += " ";
                 sLanguage += m_sDefaultLanguageStr;
             }
-            sal_uInt16 nPos = InsertEntry( sLanguage );
+            sal_Int32 nPos = InsertEntry( sLanguage );
             SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) );
 
             if ( bIsCurrent )
@@ -449,8 +449,8 @@ void LanguageBox::FillBox()
 
 void LanguageBox::ClearBox()
 {
-    sal_uInt16 nCount = GetEntryCount();
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
+    sal_Int32 nCount = GetEntryCount();
+    for ( sal_Int32 i = 0; i < nCount; ++i )
     {
         LanguageEntry* pEntry = (LanguageEntry*)GetEntryData(i);
         delete pEntry;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 233bb65..c7e81a1 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1754,7 +1754,7 @@ void WatchWindow::AddWatch( const OUString& rVName )
 
     OUString aWatchStr_( aVar );
     aWatchStr_ += "\t\t";
-    SvTreeListEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, true, LIST_APPEND );
+    SvTreeListEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, true, TREELIST_APPEND );
     pNewEntry->SetUserData( pWatchItem );
 
     aTreeListBox.Select(pNewEntry, true);
@@ -1886,7 +1886,7 @@ StackWindow::StackWindow (Layout* pParent) :
     aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) );
     aTreeListBox.SetHighlightRange();
     aTreeListBox.SetSelectionMode( NO_SELECTION );
-    aTreeListBox.InsertEntry( OUString(), 0, false, LIST_APPEND );
+    aTreeListBox.InsertEntry( OUString(), 0, false, TREELIST_APPEND );
     aTreeListBox.Show();
 
     SetText(IDEResId(RID_STR_STACKNAME).toString());
@@ -1986,7 +1986,7 @@ void StackWindow::UpdateCalls()
                 }
                 aEntry += ")";
             }
-            aTreeListBox.InsertEntry( aEntry, 0, false, LIST_APPEND );
+            aTreeListBox.InsertEntry( aEntry, 0, false, TREELIST_APPEND );
             nScope++;
             pMethod = StarBASIC::GetActiveMethod( nScope );
         }
@@ -1998,7 +1998,7 @@ void StackWindow::UpdateCalls()
     else
     {
         aTreeListBox.SetSelectionMode( NO_SELECTION );
-        aTreeListBox.InsertEntry( OUString(), 0, false, LIST_APPEND );
+        aTreeListBox.InsertEntry( OUString(), 0, false, TREELIST_APPEND );
     }
 
     aTreeListBox.SetUpdateMode(true);
@@ -2719,13 +2719,13 @@ void CodeCompleteListBox::KeyInput( const KeyEvent& rKeyEvt )
                 OUString sTypedText = pCodeCompleteWindow->pParent->GetEditEngine()->GetText(aTextSelection);
                 if( !aFuncBuffer.isEmpty() )
                 {
-                    sal_uInt16 nInd = GetSelectEntryPos();
+                    sal_Int32 nInd = GetSelectEntryPos();
                     if( nInd != LISTBOX_ENTRY_NOTFOUND )
                     {//if there is something selected
                         bool bFound = false;
                         if( nInd == GetEntryCount() )
                             nInd = 0;
-                        for( sal_uInt16 i = nInd; i != GetEntryCount(); ++i )
+                        for( sal_Int32 i = nInd; i != GetEntryCount(); ++i )
                         {
                             OUString sEntry = (OUString) GetEntry(i);
                             if( sEntry.startsWithIgnoreAsciiCase( aFuncBuffer.toString() )
@@ -2836,14 +2836,14 @@ void CodeCompleteWindow::ResizeAndPositionListBox()
         aPos.Y() = (aPos.Y() - nViewYOffset) + nBasePad;
 
         OUString aLongestEntry = pListBox->GetEntry( 0 );// grab the longest one: max search
-        for( sal_uInt16 i=1; i< pListBox->GetEntryCount(); ++i )
+        for( sal_Int32 i=1; i< pListBox->GetEntryCount(); ++i )
         {
             if( ((OUString) pListBox->GetEntry( i )).getLength() > aLongestEntry.getLength() )
                 aLongestEntry = pListBox->GetEntry( i );
         }
         // get column/line count
         const sal_uInt16& nColumns = aLongestEntry.getLength();
-        const sal_uInt16& nLines = std::min( (sal_uInt16) 6, pListBox->GetEntryCount() );
+        const sal_uInt16  nLines = static_cast<sal_uInt16>( std::min( (sal_Int32) 6, pListBox->GetEntryCount() ));
 
         Size aSize = pListBox->CalcBlockSize( nColumns, nLines );
         //set the size
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 633962f..8f848a8 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -746,7 +746,7 @@ SvTreeListEntry* TreeListBox::AddEntry(
 {
     assert(aUserData != 0);
     SvTreeListEntry* p = InsertEntry(
-        rText, rImage, rImage, pParent, bChildrenOnDemand, LIST_APPEND,
+        rText, rImage, rImage, pParent, bChildrenOnDemand, TREELIST_APPEND,
         aUserData->get()
     );
     aUserData->release();
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index f41616f..77c4c77 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -154,7 +154,7 @@ IMPL_LINK( BreakPointDialog, ComboBoxHighlightHdl, ComboBox *, pBox )
     m_pOKButton->Enable();
     m_pDelButton->Enable();
 
-    sal_uInt16 nEntry = pBox->GetEntryPos( pBox->GetText() );
+    sal_Int32 nEntry = pBox->GetEntryPos( pBox->GetText() );
     BreakPoint* pBrk = m_aModifiedBreakPointList.at( nEntry );
     DBG_ASSERT( pBrk, "Kein passender Breakpoint zur Liste ?" );
     UpdateFields( pBrk );
@@ -212,7 +212,7 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
     }
     else if (pButton == m_pDelButton)
     {
-        size_t nEntry = m_pComboBox->GetEntryPos( m_pComboBox->GetText() );
+        sal_Int32 nEntry = m_pComboBox->GetEntryPos( m_pComboBox->GetText() );
         BreakPoint* pBrk = m_aModifiedBreakPointList.at( nEntry );
         if ( pBrk )
         {
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index b087aaf..bee38f1 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -101,7 +101,7 @@ SfxTabPage* AxisPositionsTabPage::Create(Window* pWindow,const SfxItemSet& rOutA
 sal_Bool AxisPositionsTabPage::FillItemSet(SfxItemSet& rOutAttrs)
 {
     // axis line
-    sal_uInt16 nPos = m_pLB_CrossesAt->GetSelectEntryPos();
+    sal_Int32 nPos = m_pLB_CrossesAt->GetSelectEntryPos();
     rOutAttrs.Put( SfxInt32Item( SCHATTR_AXIS_POSITION, nPos+1 ));
     if( 2==nPos )
     {
@@ -112,7 +112,7 @@ sal_Bool AxisPositionsTabPage::FillItemSet(SfxItemSet& rOutAttrs)
     }
 
     // labels
-    sal_uInt16 nLabelPos = m_pLB_PlaceLabels->GetSelectEntryPos();
+    sal_Int32 nLabelPos = m_pLB_PlaceLabels->GetSelectEntryPos();
     if( nLabelPos != LISTBOX_ENTRY_NOTFOUND )
         rOutAttrs.Put( SfxInt32Item( SCHATTR_AXIS_LABEL_POSITION, nLabelPos ));
 
@@ -132,7 +132,7 @@ sal_Bool AxisPositionsTabPage::FillItemSet(SfxItemSet& rOutAttrs)
     rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_TICKS,nTicks));
     rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_HELPTICKS,nMinorTicks));
 
-    sal_uInt16 nMarkPos = m_pLB_PlaceTicks->GetSelectEntryPos();
+    sal_Int32 nMarkPos = m_pLB_PlaceTicks->GetSelectEntryPos();
     if( nMarkPos != LISTBOX_ENTRY_NOTFOUND )
         rOutAttrs.Put( SfxInt32Item( SCHATTR_AXIS_MARK_POSITION, nMarkPos ));
 
@@ -171,7 +171,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs)
     if(rInAttrs.GetItemState(SCHATTR_AXIS_POSITION,true, &pPoolItem)== SFX_ITEM_SET)
     {
         bool bZero = false;
-        sal_uInt16 nPos = (sal_uInt16)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+        sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
         if(nPos==0)
         {
             //switch to value
@@ -210,7 +210,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs)
     // Labels
     if( rInAttrs.GetItemState( SCHATTR_AXIS_LABEL_POSITION, false, &pPoolItem ) == SFX_ITEM_SET )
     {
-        sal_uInt16 nPos = (sal_uInt16)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+        sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
         if( nPos < m_pLB_PlaceLabels->GetEntryCount() )
             m_pLB_PlaceLabels->SelectEntryPos( nPos );
     }
@@ -233,7 +233,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs)
     // Tick position
     if( rInAttrs.GetItemState( SCHATTR_AXIS_MARK_POSITION, false, &pPoolItem ) == SFX_ITEM_SET )
     {
-        sal_uInt16 nPos = (sal_uInt16)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
+        sal_Int32 nPos = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue();
         if( nPos < m_pLB_PlaceTicks->GetEntryCount() )
             m_pLB_PlaceTicks->SelectEntryPos( nPos );
     }
@@ -300,7 +300,7 @@ void AxisPositionsTabPage::SupportAxisPositioning( bool bSupportAxisPositioning
 
 IMPL_LINK_NOARG(AxisPositionsTabPage, CrossesAtSelectHdl)
 {
-    sal_uInt16 nPos = m_pLB_CrossesAt->GetSelectEntryPos();
+    sal_Int32 nPos = m_pLB_CrossesAt->GetSelectEntryPos();
     m_pED_CrossesAt->Show( (2==nPos) && !m_bCrossingAxisIsCategoryAxis );
     m_pED_CrossesAtCategory->Show( (2==nPos) && m_bCrossingAxisIsCategoryAxis );
 
@@ -315,12 +315,12 @@ IMPL_LINK_NOARG(AxisPositionsTabPage, CrossesAtSelectHdl)
 
 IMPL_LINK_NOARG(AxisPositionsTabPage, PlaceLabelsSelectHdl)
 {
-    sal_uInt16 nLabelPos = m_pLB_PlaceLabels->GetSelectEntryPos();
+    sal_Int32 nLabelPos = m_pLB_PlaceLabels->GetSelectEntryPos();
 
     bool bEnableTickmarkPlacement = (nLabelPos>1);
     if( bEnableTickmarkPlacement )
     {
-        sal_uInt16 nAxisPos = m_pLB_CrossesAt->GetSelectEntryPos();
+        sal_Int32 nAxisPos = m_pLB_CrossesAt->GetSelectEntryPos();
         if( nLabelPos-2 == nAxisPos )
             bEnableTickmarkPlacement=false;
     }
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 29d409e..3a24e10 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -904,9 +904,9 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler
     // Insert all editable accelerators into list box. It is possible
     // that some accelerators are not mapped on the current system/keyboard
     // but we don't want to lose these mappings.
-    sal_uInt16 c1       = KEYCODE_ARRAY_SIZE;
-    sal_uInt16 i1       = 0;
-    sal_uInt16 nListPos = 0;
+    sal_Int32 c1       = KEYCODE_ARRAY_SIZE;
+    sal_Int32 i1       = 0;
+    sal_Int32 nListPos = 0;
     for (i1=0; i1<c1; ++i1)
     {
         KeyCode aKey = KEYCODE_ARRAY[i1];
@@ -914,7 +914,7 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler
         if (sKey.isEmpty())
             continue;
         TAccInfo*    pEntry   = new TAccInfo(i1, nListPos, aKey);
-        SvTreeListEntry* pLBEntry = aEntriesBox.InsertEntryToColumn(sKey, 0L, LIST_APPEND, 0xFFFF);
+        SvTreeListEntry* pLBEntry = aEntriesBox.InsertEntryToColumn(sKey, 0L, TREELIST_APPEND, 0xFFFF);
         pLBEntry->SetUserData(pEntry);
     }
 
@@ -930,9 +930,9 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler
               OUString     sCommand = xAccMgr->getCommandByKeyEvent(aAWTKey);
               OUString     sLabel   = GetLabel4Command(sCommand);
               KeyCode             aKeyCode = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(aAWTKey);
-              sal_uInt16              nPos     = MapKeyCodeToPos(aKeyCode);
+              sal_uLong              nPos     = MapKeyCodeToPos(aKeyCode);
 
-        if (nPos == LISTBOX_ENTRY_NOTFOUND)
+        if (nPos == TREELIST_ENTRY_NOTFOUND)
             continue;
 
         aEntriesBox.SetEntryText(sLabel, nPos, nCol);
@@ -951,9 +951,9 @@ void SfxAcceleratorConfigPage::Init(const css::uno::Reference< css::ui::XAcceler
     for (i3=0; i3<c3; ++i3)
     {
         const KeyCode* pKeyCode = Application::GetReservedKeyCode(i3);
-              sal_uInt16   nPos     = MapKeyCodeToPos(*pKeyCode);
+              sal_uLong   nPos     = MapKeyCodeToPos(*pKeyCode);
 
-        if (nPos == LISTBOX_ENTRY_NOTFOUND)
+        if (nPos == TREELIST_ENTRY_NOTFOUND)
             continue;
 
         // Hardcoded function mapped so no ID possible and mark entry as not changeable
@@ -1044,7 +1044,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, Default)
 
 IMPL_LINK_NOARG(SfxAcceleratorConfigPage, ChangeHdl)
 {
-    sal_uInt16    nPos        = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+    sal_uLong    nPos        = aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
     TAccInfo* pEntry      = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
     OUString    sNewCommand = pFunctionBox->GetCurCommand();
     OUString    sLabel      = pFunctionBox->GetCurLabel();
@@ -1063,7 +1063,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, ChangeHdl)
 IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RemoveHdl)
 {
     // get selected entry
-    sal_uInt16    nPos   = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+    sal_uLong    nPos   = aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
     TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
 
     // remove function name from selected entry
@@ -1082,7 +1082,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox )
     Help::ShowBalloon( this, Point(), OUString() );
     if ( pListBox == &aEntriesBox )
     {
-        sal_uInt16          nPos                = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+        sal_uLong          nPos                = aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
         TAccInfo*       pEntry              = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
         OUString sPossibleNewCommand = pFunctionBox->GetCurCommand();
 
@@ -1111,7 +1111,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox )
         SvTreeListEntry*    pLBEntry = aEntriesBox.FirstSelected();
         if ( pLBEntry != 0 )
         {
-            sal_uInt16          nPos                = (sal_uInt16) aEntriesBox.GetModel()->GetRelPos( pLBEntry );
+            sal_uLong          nPos                = aEntriesBox.GetModel()->GetRelPos( pLBEntry );
             TAccInfo*       pEntry              = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
             OUString sPossibleNewCommand = pFunctionBox->GetCurCommand();
 
@@ -1131,7 +1131,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox )
                 if ( pUserData && pUserData->m_sCommand == sPossibleNewCommand )
                 {
                     TAccInfo*    pU1 = new TAccInfo(-1, -1, pUserData->m_aKey);
-                    SvTreeListEntry* pE1 = aKeyBox.InsertEntry( pUserData->m_aKey.GetName(), 0L, sal_True, LIST_APPEND );
+                    SvTreeListEntry* pE1 = aKeyBox.InsertEntry( pUserData->m_aKey.GetName(), 0L, sal_True, TREELIST_APPEND );
                     pE1->SetUserData(pU1);
                     pE1->EnableChildrenOnDemand( false );
                 }
@@ -1144,7 +1144,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox )
         // goto selected "key" entry of the key box
         SvTreeListEntry* pE2 = 0;
         TAccInfo*    pU2 = 0;
-        sal_uInt16       nP2 = LISTBOX_ENTRY_NOTFOUND;
+        sal_uLong       nP2 = TREELIST_ENTRY_NOTFOUND;
         SvTreeListEntry* pE3 = 0;
 
         pE2 = aKeyBox.FirstSelected();
@@ -1152,7 +1152,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox )
             pU2 = (TAccInfo*)pE2->GetUserData();
         if (pU2)
             nP2 = MapKeyCodeToPos(pU2->m_aKey);
-        if (nP2 != LISTBOX_ENTRY_NOTFOUND)
+        if (nP2 != TREELIST_ENTRY_NOTFOUND)
             pE3 = aEntriesBox.GetEntry( 0, nP2 );
         if (pE3)
         {
@@ -1462,11 +1462,11 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet )
 }
 
 
-sal_uInt16 SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const
+sal_uLong SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const
 {
     sal_uInt16       nCode1 = aKey.GetCode()+aKey.GetModifier();
     SvTreeListEntry* pEntry = aEntriesBox.First();
-    sal_uInt16       i      = 0;
+    sal_uLong       i      = 0;
 
     while (pEntry)
     {
@@ -1481,7 +1481,7 @@ sal_uInt16 SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const
         ++i;
     }
 
-    return LISTBOX_ENTRY_NOTFOUND;
+    return TREELIST_ENTRY_NOTFOUND;
 }
 
 
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 23e362a8..0d79f33 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -807,8 +807,8 @@ void FmSearchDialog::LoadParams()
     // that way the data is handed on to the SearchEngine and all dependent settings are done
 
     // current field
-    sal_uInt16 nInitialField = m_lbField.GetEntryPos( OUString( aParams.sSingleSearchField ) );
-    if (nInitialField == COMBOBOX_ENTRY_NOTFOUND)
+    sal_Int32 nInitialField = m_lbField.GetEntryPos( OUString( aParams.sSingleSearchField ) );
+    if (nInitialField == LISTBOX_ENTRY_NOTFOUND)
         nInitialField = 0;
     m_lbField.SelectEntryPos(nInitialField);
     LINK(this, FmSearchDialog, OnFieldSelected).Call(&m_lbField);
@@ -894,7 +894,7 @@ void FmSearchDialog::SaveParams() const
 
     aCurrentSettings.aHistory.realloc( m_cmbSearchText.GetEntryCount() );
     OUString* pHistory = aCurrentSettings.aHistory.getArray();
-    for (sal_uInt16 i=0; i<m_cmbSearchText.GetEntryCount(); ++i, ++pHistory)
+    for (sal_Int32 i=0; i<m_cmbSearchText.GetEntryCount(); ++i, ++pHistory)
         *pHistory = m_cmbSearchText.GetEntry(i);
 
     aCurrentSettings.sSingleSearchField         = m_lbField.GetSelectEntry();
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index b3b2e0a..aadceba 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1072,8 +1072,8 @@ namespace svx
 
     IMPL_LINK_NOARG(HangulHanjaOptionsDialog, DeleteDictHdl)
     {
-        sal_uInt16 nSelPos = m_pDictsLB->GetSelectEntryPos();
-        if( nSelPos != LISTBOX_ENTRY_NOTFOUND )
+        sal_uLong nSelPos = m_pDictsLB->GetSelectEntryPos();
+        if( nSelPos != TREELIST_ENTRY_NOTFOUND )
         {
             Reference< XConversionDictionary >  xDic( m_aDictList[ nSelPos ] );
             if( m_xConversionDictionaryList.is() && xDic.is() )
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 464454c..d6320a4 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -84,7 +84,7 @@ sal_Bool SvxHyperlinkNewDocTp::ImplGetURLObject( const OUString& rPath, const OU
         }
         if ( bIsValidURL )
         {
-            sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos();
+            sal_Int32 nPos = maLbDocTypes.GetSelectEntryPos();
             if ( nPos != LISTBOX_ENTRY_NOTFOUND )
                 aURLObject.SetExtension( ((DocumentTypeData*)maLbDocTypes.GetEntryData( nPos ))->aStrExt );
         }
@@ -330,7 +330,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
                 if ( aStrNewName != aEmptyStr )
                 {
                     // get private-url
-                    sal_uInt16 nPos = maLbDocTypes.GetSelectEntryPos();
+                    sal_Int32 nPos = maLbDocTypes.GetSelectEntryPos();
                     if( nPos == LISTBOX_ENTRY_NOTFOUND )
                         nPos=0;
                     OUString aStrDocName ( ( ( DocumentTypeData* )
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 32db420..67903b4 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -433,7 +433,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink
                         pEntry = maLbTree.InsertEntry ( aStrDisplayname,
                                                         aBmp, aBmp,
                                                         pParentEntry,
-                                                        sal_False, LIST_APPEND,
+                                                        sal_False, TREELIST_APPEND,
                                                         (void*)pData );
                         nEntries++;
                     }
@@ -442,7 +442,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink
                         // insert Displayname into treelist without bitmaps
                         pEntry = maLbTree.InsertEntry ( aStrDisplayname,
                                                         pParentEntry,
-                                                        sal_False, LIST_APPEND,
+                                                        sal_False, TREELIST_APPEND,
                                                         (void*)pData );
                         nEntries++;
                     }
@@ -452,7 +452,7 @@ int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLink
                     // insert Displayname into treelist without bitmaps
                     pEntry = maLbTree.InsertEntry ( aStrDisplayname,
                                                     pParentEntry,
-                                                    sal_False, LIST_APPEND,
+                                                    sal_False, TREELIST_APPEND,
                                                     (void*)pData );
                     nEntries++;
                 }
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index d62be75..4b6bfb4 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -255,8 +255,8 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd ()
 void SvxHyperlinkTabPageBase::FillStandardDlgFields ( SvxHyperlinkItem* pHyperlinkItem )
 {
     // Frame
-    sal_uInt16 nPos = mpCbbFrame->GetEntryPos ( pHyperlinkItem->GetTargetFrame() );
-    if ( nPos != LISTBOX_ENTRY_NOTFOUND)
+    sal_Int32 nPos = mpCbbFrame->GetEntryPos ( pHyperlinkItem->GetTargetFrame() );
+    if ( nPos != COMBOBOX_ENTRY_NOTFOUND)
         mpCbbFrame->SetText ( pHyperlinkItem->GetTargetFrame() );
 
     // Form
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index d3938c3..e219e18 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -151,8 +151,8 @@ SvBaseLinksDlg::~SvBaseLinksDlg()
 *************************************************************************/
 IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
 {
-    sal_uInt16 nSelectionCount = pSvTabListBox ?
-        (sal_uInt16)pSvTabListBox->GetSelectionCount() : 0;
+    sal_uLong nSelectionCount = pSvTabListBox ?
+        pSvTabListBox->GetSelectionCount() : 0;
     if(nSelectionCount > 1)
     {
         // possibly deselect old entries in case of multi-selection
@@ -169,7 +169,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
         }
         else
         {
-            for( sal_uInt16 i = 0; i < nSelectionCount; i++)
+            for( sal_uLong i = 0; i < nSelectionCount; i++)
             {
                 pEntry = i == 0 ? pSvTabListBox->FirstSelected() :
                                     pSvTabListBox->NextSelected(pEntry);
@@ -190,7 +190,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox )
     }
     else
     {
-        sal_uInt16 nPos;
+        sal_uLong nPos;
         SvBaseLink* pLink = GetSelEntry( &nPos );
         if( !pLink )
             return 0;
@@ -242,7 +242,7 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, AutomaticClickHdl, RadioButton *, pRadio
 {
     (void)pRadioButton;
 
-    sal_uInt16 nPos;
+    sal_uLong nPos;
     SvBaseLink* pLink = GetSelEntry( &nPos );
     if( pLink && !( FILEOBJECT & pLink->GetObjType() ) &&
         LINKUPDATE_ALWAYS != pLink->GetUpdateMode() )
@@ -255,7 +255,7 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioBut
 {
     (void)pRadioButton;
 
-    sal_uInt16 nPos;
+    sal_uLong nPos;
     SvBaseLink* pLink = GetSelEntry( &nPos );
     if( pLink && !( FILEOBJECT & pLink->GetObjType() ) &&
         LINKUPDATE_ONCALL != pLink->GetUpdateMode())
@@ -267,18 +267,18 @@ IMPL_LINK_INLINE_END( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioButto
 IMPL_LINK_NOARG(SvBaseLinksDlg, UpdateNowClickHdl)
 {
     SvTabListBox& rListBox = Links();
-    sal_uInt16 nSelCnt = (sal_uInt16)rListBox.GetSelectionCount();
+    sal_uLong nSelCnt = rListBox.GetSelectionCount();
     if( 255 < nSelCnt )
         nSelCnt = 255;
 
     std::vector< SvBaseLink* > aLnkArr;
-    std::vector< sal_uInt16 > aPosArr;
+    std::vector< sal_Int16 > aPosArr;
 
     SvTreeListEntry* pE = rListBox.FirstSelected();
     while( pE )
     {
-        sal_uInt16 nFndPos = (sal_uInt16)rListBox.GetModel()->GetAbsPos( pE );
-        if( LISTBOX_ENTRY_NOTFOUND != nFndPos )
+        sal_uLong nFndPos = rListBox.GetModel()->GetAbsPos( pE );
+        if( TREELIST_ENTRY_NOTFOUND != nFndPos )
         {
             aLnkArr.push_back( static_cast< SvBaseLink* >( pE->GetUserData() ) );
             aPosArr.push_back( nFndPos );
@@ -288,12 +288,12 @@ IMPL_LINK_NOARG(SvBaseLinksDlg, UpdateNowClickHdl)
 
     if( !aLnkArr.empty() )
     {
-        for( sal_uInt16 n = 0; n < aLnkArr.size(); ++n )
+        for( size_t n = 0; n < aLnkArr.size(); ++n )
         {
             SvBaseLinkRef xLink = aLnkArr[ n ];
 
             // first look for the entry in the array
-            for( sal_uInt16 i = 0; i < pLinkMgr->GetLinks().size(); ++i )
+            for( size_t i = 0; i < pLinkMgr->GetLinks().size(); ++i )
                 if( &xLink == *pLinkMgr->GetLinks()[ i ] )
                 {
                     xLink->SetUseCache( sal_False );
@@ -343,7 +343,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
 {
     (void)pPushButton;
 
-    sal_uInt16 nSelectionCount = (sal_uInt16)Links().GetSelectionCount();
+    sal_uLong nSelectionCount = Links().GetSelectionCount();
     if(nSelectionCount > 1)
     {
         try
@@ -367,7 +367,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
             {
                 OUString aPath = xFolderPicker->getDirectory();
 
-                for( sal_uInt16 i = 0; i < nSelectionCount; i++)
+                for( sal_uLong i = 0; i < nSelectionCount; i++)
                 {
                     pEntry = i==0 ?
                         Links().FirstSelected() :
@@ -399,7 +399,7 @@ IMPL_LINK( SvBaseLinksDlg, ChangeSourceClickHdl, PushButton *, pPushButton )
     }
     else
     {
-        sal_uInt16 nPos;
+        sal_uLong nPos;
         SvBaseLink* pLink = GetSelEntry( &nPos );
         if ( pLink && !pLink->GetLinkSourceName().isEmpty() )
             pLink->Edit( this, LINK( this, SvBaseLinksDlg, EndEditHdl ) );
@@ -414,7 +414,7 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton )
     sal_Bool bModified = sal_False;
     if(Links().GetSelectionCount() <= 1)
     {
-        sal_uInt16 nPos;
+        sal_uLong nPos;
         SvBaseLinkRef xLink = GetSelEntry( &nPos );
         if( !xLink.Is() )
             return 0;
@@ -521,7 +521,7 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer )
 
 IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
 {
-    sal_uInt16 nPos;
+    sal_uLong nPos;
     GetSelEntry( &nPos );
 
     if( _pLink && _pLink->WasLastEditOK() )
@@ -531,7 +531,7 @@ IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink )
         // anymore, fill the list completely new. Otherwise only the
         // edited link needs to be refreshed.
         sal_Bool bLinkFnd = sal_False;
-        for( sal_uInt16 n = pLinkMgr->GetLinks().size(); n;  )
+        for( size_t n = pLinkMgr->GetLinks().size(); n;  )
             if( _pLink == &(*pLinkMgr->GetLinks()[ --n ]) )
             {
                 bLinkFnd = sal_True;
@@ -593,7 +593,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr )
     if( pLinkMgr )
     {
         SvBaseLinks& rLnks = (SvBaseLinks&)pLinkMgr->GetLinks();
-        for( sal_uInt16 n = 0; n < rLnks.size(); ++n )
+        for( size_t n = 0; n < rLnks.size(); ++n )
         {
             SvBaseLinkRef* pLinkRef = rLnks[ n ];
             if( !pLinkRef->Is() )
@@ -619,7 +619,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr )
 }
 
 
-void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uInt16 nPos, sal_Bool bSelect )
+void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, sal_Bool bSelect )
 {
     OUString aEntry, sFileNm, sLinkNm, sTypeNm, sFilter;
 
@@ -657,12 +657,12 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uInt16 nPos, sal_
         Links().Select(pE);
 }
 
-SvBaseLink* SvBaseLinksDlg::GetSelEntry( sal_uInt16* pPos )
+SvBaseLink* SvBaseLinksDlg::GetSelEntry( sal_uLong* pPos )
 {
     SvTreeListEntry* pE = Links().FirstSelected();
-    sal_uInt16 nPos;
-    if( pE && LISTBOX_ENTRY_NOTFOUND !=
-        ( nPos = (sal_uInt16)Links().GetModel()->GetAbsPos( pE ) ) )
+    sal_uLong nPos;
+    if( pE && TREELIST_ENTRY_NOTFOUND !=
+        ( nPos = Links().GetModel()->GetAbsPos( pE ) ) )
     {
         DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" );
 
@@ -674,7 +674,7 @@ SvBaseLink* SvBaseLinksDlg::GetSelEntry( sal_uInt16* pPos )
 }
 
 void SvBaseLinksDlg::SetType( SvBaseLink& rLink,
-                                    sal_uInt16 nSelPos,
+                                    sal_uLong nSelPos,
                                     sal_uInt16 nType )
 {
     rLink.SetUpdateMode( nType );
@@ -690,8 +690,8 @@ void SvBaseLinksDlg::SetActLink( SvBaseLink * pLink )
     if( pLinkMgr )
     {
         const SvBaseLinks& rLnks = pLinkMgr->GetLinks();
-        sal_uInt16 nSelect = 0;
-        for( sal_uInt16 n = 0; n < rLnks.size(); ++n )
+        sal_uLong nSelect = 0;
+        for( size_t n = 0; n < rLnks.size(); ++n )
         {
             SvBaseLinkRef* pLinkRef = rLnks[ n ];
             // #109573# only visible links have been inserted into the TreeListBox,
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 73b6052..7192521 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -359,7 +359,7 @@ SvTreeListEntry * SFTreeListBox::insertEntry(
     {
         Image aImage = SvFileInformationManager::GetFileImage( INetURLObject(factoryURL), false );
         p = InsertEntry(
-            rText, aImage, aImage, pParent, bChildrenOnDemand, LIST_APPEND,
+            rText, aImage, aImage, pParent, bChildrenOnDemand, TREELIST_APPEND,
             aUserData.release()); // XXX possible leak
     }
     else
@@ -393,7 +393,7 @@ SvTreeListEntry * SFTreeListBox::insertEntry(
         aImage = m_docImage;
     }
     SvTreeListEntry * p = InsertEntry(
-        rText, aImage, aImage, pParent, bChildrenOnDemand, LIST_APPEND,
+        rText, aImage, aImage, pParent, bChildrenOnDemand, TREELIST_APPEND,
         aUserData.release()); // XXX possible leak
    return p;
 }
@@ -840,7 +840,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
         //do we need L10N for this? ie somethng like:
         //String aNewStdName( ResId( STR_STDMODULENAME ) );
         sal_Bool bValid = sal_False;
-        sal_uInt16 i = 1;
+        sal_Int32 i = 1;
 
         Sequence< Reference< browse::XBrowseNode > > childNodes;
         // no children => ok to create Parcel1 or Script1 without checking
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index ae83b9d..9e1413f 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -162,7 +162,7 @@ private:
 
     OUString                    GetLabel4Command(const OUString& rCommand);
     void                        InitAccCfg();
-    sal_uInt16                  MapKeyCodeToPos( const KeyCode &rCode ) const;
+    sal_uLong                   MapKeyCodeToPos( const KeyCode &rCode ) const;
     css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const OUString& sName);
     void                        StartFileDialog( WinBits nBits, const OUString& rTitle );
 
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 8ab1fad..d8cca47 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -431,7 +431,7 @@ protected:
                                         SvxConfigEntry* pParentData );
 
     SvTreeListEntry*    InsertEntryIntoUI ( SvxConfigEntry* pNewEntryData,
-                                        sal_uLong nPos = LIST_APPEND );
+                                        sal_uLong nPos = TREELIST_APPEND );
 
     SvxEntries*     FindParentForChild( SvxEntries* pParentEntries,
                                         SvxConfigEntry* pChildData );
diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx
index 4688403..31acdbc 100644
--- a/cui/source/inc/cuifmsearch.hxx
+++ b/cui/source/inc/cuifmsearch.hxx
@@ -187,8 +187,8 @@ private:
 
 inline void FmSearchDialog::SetActiveField(const OUString& strField)
 {
-    sal_uInt16 nInitialField = m_lbField.GetEntryPos(strField);
-    if (nInitialField == COMBOBOX_ENTRY_NOTFOUND)
+    sal_Int32 nInitialField = m_lbField.GetEntryPos(strField);
+    if (nInitialField == LISTBOX_ENTRY_NOTFOUND)
         nInitialField = 0;
     m_lbField.SelectEntryPos(nInitialField);
     LINK(this, FmSearchDialog, OnFieldSelected).Call(&m_lbField);
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 7bb862d..b3d34e3 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -64,7 +64,7 @@ private:
     ChangeType          mnHatchingListState;
 
     sal_uInt16          mnPageType;
-    sal_uInt16          mnPos;
+    sal_Int32           mnPos;
     sal_Bool            mbAreaTP;
 
     virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
@@ -245,7 +245,7 @@ private:
 
     sal_uInt16 nPageType;
     sal_uInt16 nDlgType;
-    sal_uInt16 nPos;
+    sal_Int32  nPos;
 
     sal_Bool*               pbAreaTP;
 
@@ -397,7 +397,7 @@ private:
     ChangeType*         pnColorListState;
     sal_uInt16*         pPageType;
     sal_uInt16          nDlgType;
-    sal_uInt16*         pPos;
+    sal_Int32*          pPos;
     sal_Bool*           pbAreaTP;
 
     XOutdevItemPool*    pXPool;
@@ -435,7 +435,7 @@ public:
 
     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
-    void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
+    void    SetPos( sal_Int32* pInPos ) { pPos = pInPos; }
     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
 
     void    SetGrdChgd( ChangeType* pIn ) { pnGradientListState = pIn; }
@@ -472,7 +472,7 @@ private:
     ChangeType*         pnColorListState;
     sal_uInt16*         pPageType;
     sal_uInt16          nDlgType;
-    sal_uInt16*         pPos;
+    sal_Int32*          pPos;
     sal_Bool*           pbAreaTP;
 
     XOutdevItemPool*    pXPool;
@@ -513,7 +513,7 @@ public:
 
     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
-    void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
+    void    SetPos( sal_Int32* pInPos ) { pPos = pInPos; }
     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
 
     void    SetHtchChgd( ChangeType* pIn ) { pnHatchingListState = pIn; }
@@ -555,7 +555,7 @@ private:
     ChangeType*         pnColorListState;
     sal_uInt16*         pPageType;
     sal_uInt16          nDlgType;
-    sal_uInt16*         pPos;
+    sal_Int32*          pPos;
     sal_Bool*           pbAreaTP;
 
     sal_Bool                bBmpChanged;
@@ -598,7 +598,7 @@ public:
 
     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
-    void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
+    void    SetPos( sal_Int32* pInPos ) { pPos = pInPos; }
     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
 
     void    SetBmpChgd( ChangeType* pIn ) { pnBitmapListState = pIn; }
@@ -678,7 +678,7 @@ private:
     ChangeType*         pnColorListState;
     sal_uInt16*         pPageType;
     sal_uInt16          nDlgType;
-    sal_uInt16*         pPos;
+    sal_Int32*          pPos;
     sal_Bool*           pbAreaTP;
 
     XFillStyleItem      aXFStyleItem;
@@ -736,7 +736,7 @@ public:
 
     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
-    void    SetPos( sal_uInt16* pInPos ) { pPos = pInPos; }
+    void    SetPos( sal_Int32* pInPos ) { pPos = pInPos; }
     void    SetAreaTP( sal_Bool* pIn ) { pbAreaTP = pIn; }
 
     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 4726974..6d5cbd7 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -49,8 +49,8 @@ private:
     ChangeType          mnColorListState;
 
     sal_uInt16          nPageType;
-    sal_uInt16          nPosDashLb;
-    sal_uInt16          nPosLineEndLb;
+    sal_Int32           nPosDashLb;
+    sal_Int32           nPosLineEndLb;
     sal_Bool            mbAreaTP;
 
     virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
@@ -164,8 +164,8 @@ private:
     ChangeType*         pnColorListState;
     sal_uInt16          nPageType;
     sal_uInt16          nDlgType;
-    sal_uInt16*         pPosDashLb;
-    sal_uInt16*         pPosLineEndLb;
+    sal_Int32*          pPosDashLb;
+    sal_Int32*          pPosLineEndLb;
 
     SfxMapUnit          ePoolUnit;
 
@@ -225,8 +225,8 @@ public:
 
     void    SetPageType( sal_uInt16 nInType ) { nPageType = nInType; }
     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
-    void    SetPosDashLb( sal_uInt16* pInPos ) { pPosDashLb = pInPos; }
-    void    SetPosLineEndLb( sal_uInt16* pInPos ) { pPosLineEndLb = pInPos; }
+    void    SetPosDashLb( sal_Int32* pInPos ) { pPosDashLb = pInPos; }
+    void    SetPosLineEndLb( sal_Int32* pInPos ) { pPosLineEndLb = pInPos; }
 
     void    SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; }
     void    SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; }
@@ -276,7 +276,7 @@ private:
     ChangeType*         pnDashListState;
     sal_uInt16*         pPageType;
     sal_uInt16          nDlgType;
-    sal_uInt16*         pPosDashLb;
+    sal_Int32*          pPosDashLb;
 
     SfxMapUnit          ePoolUnit;
     FieldUnit           eFUnit;
@@ -315,7 +315,7 @@ public:
 
     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
-    void    SetPosDashLb( sal_uInt16* pInPos ) { pPosDashLb = pInPos; }
+    void    SetPosDashLb( sal_Int32* pInPos ) { pPosDashLb = pInPos; }
 
     void    SetDashChgd( ChangeType* pIn ) { pnDashListState = pIn; }
 
@@ -355,7 +355,7 @@ private:
     ChangeType*         pnLineEndListState;
     sal_uInt16*         pPageType;
     sal_uInt16          nDlgType;
-    sal_uInt16*         pPosLineEndLb;
+    sal_Int32*          pPosLineEndLb;
 
     DECL_LINK( ClickAddHdl_Impl, void * );
     DECL_LINK( ClickModifyHdl_Impl, void * );
@@ -386,7 +386,7 @@ public:
 
     void    SetPageType( sal_uInt16* pInType ) { pPageType = pInType; }
     void    SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
-    void    SetPosLineEndLb( sal_uInt16* pInPos ) { pPosLineEndLb = pInPos; }
+    void    SetPosLineEndLb( sal_Int32* pInPos ) { pPosLineEndLb = pInPos; }
 
     void    SetLineEndChgd( ChangeType* pIn ) { pnLineEndListState = pIn; }
 
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index b7cbf67..6770612 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -199,7 +199,7 @@ public :
     SvxIconChoiceCtrlEntry* AddTabPage(
         sal_uInt16 nId, const OUString& rIconText, const Image& rChoiceIcon,
         CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = NULL /* NULL allowed*/,
-        sal_Bool bItemsOnDemand = sal_False, sal_uLong nPos = LIST_APPEND );
+        sal_Bool bItemsOnDemand = sal_False, sal_uLong nPos = TREELIST_APPEND );
 
     void                SetCurPageId( sal_uInt16 nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); }
     sal_uInt16              GetCurPageId() const       { return mnCurrentPageId; }
diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx
index aab701c..889fb6a 100644
--- a/cui/source/inc/linkdlg.hxx
+++ b/cui/source/inc/linkdlg.hxx
@@ -83,10 +83,10 @@ class SvBaseLinksDlg : public ModalDialog
     DECL_LINK( BreakLinkClickHdl, PushButton * );
     DECL_LINK( UpdateWaitingHdl, Timer * );
     DECL_LINK( EndEditHdl, sfx2::SvBaseLink* );
-    sfx2::SvBaseLink* GetSelEntry( sal_uInt16* pPos );
+    sfx2::SvBaseLink* GetSelEntry( sal_uLong* pPos );
     OUString ImplGetStateStr( const sfx2::SvBaseLink& );
-    void SetType( sfx2::SvBaseLink& rLink, sal_uInt16 nPos, sal_uInt16 nType );
-    void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uInt16 nPos = LISTBOX_APPEND, sal_Bool bSelect = sal_False);
+    void SetType( sfx2::SvBaseLink& rLink, sal_uLong nPos, sal_uInt16 nType );
+    void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uLong nPos = TREELIST_APPEND, sal_Bool bSelect = sal_False);
 
     void StartUpdateTimer()         { aUpdateTimer.Start(); }
 
diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx
index 98ddd2d..c72f687 100644
--- a/cui/source/inc/optdict.hxx
+++ b/cui/source/inc/optdict.hxx
@@ -141,7 +141,7 @@ private:
                             ::com::sun::star::linguistic2::XDictionary >  &xDic );
 
     void            RemoveDictEntry(SvTreeListEntry* pEntry);
-    sal_uInt16          GetLBInsertPos(const OUString &rDicWord);
+    sal_uLong       GetLBInsertPos(const OUString &rDicWord);
 
 protected:
 
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 3348c38..5fac95a 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -135,7 +135,7 @@ void SvxDefaultColorOptPage::FillColorBox()
     for( long i = 0; i < nCount; i++ )
     {
         pColorEntry = pColorList->GetColor( i );
-        m_pValSetColorBox->InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() );
+        m_pValSetColorBox->InsertItem( i + 1, pColorEntry->GetColor(), pColorEntry->GetName() );
     }
 }
 
@@ -208,7 +208,7 @@ IMPL_LINK_NOARG(SvxDefaultColorOptPage, AddChartColor)
 
 IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton )
 {
-    size_t nIndex = m_pLbChartColors->GetSelectEntryPos();
+    sal_Int32 nIndex = m_pLbChartColors->GetSelectEntryPos();
 
     if (m_pLbChartColors->GetSelectEntryCount() == 0)
         return 0L;
@@ -248,14 +248,14 @@ IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ColorLB*, _pColorList )
     if( nIndex == -1 )      // not found
         m_pValSetColorBox->SetNoSelection();
     else
-        m_pValSetColorBox->SelectItem( (sal_uInt16)nIndex + 1 );       // ValueSet is 1-based
+        m_pValSetColorBox->SelectItem( nIndex + 1 );       // ValueSet is 1-based
 
     return 0L;
 }
 
 IMPL_LINK_NOARG(SvxDefaultColorOptPage, BoxClickedHdl)
 {
-    sal_uInt16 nIdx = m_pLbChartColors->GetSelectEntryPos();
+    sal_Int32 nIdx = m_pLbChartColors->GetSelectEntryPos();
     if( nIdx != LISTBOX_ENTRY_NOTFOUND )
     {
         const XColorEntry aEntry( m_pValSetColorBox->GetItemColor( m_pValSetColorBox->GetSelectItemId() ), m_pLbChartColors->GetSelectEntry() );
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 2079d20..63b7723 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -131,10 +131,10 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
     if (xDicList.is())
         aDics = xDicList->getDictionaries();
     const Reference< XDictionary >  *pDic = aDics.getConstArray();
-    sal_Int32 nCount = (sal_uInt16) aDics.getLength();
+    sal_Int32 nCount = aDics.getLength();
 
     sal_Bool bFound = sal_False;
-    sal_uInt16 i;
+    sal_Int32 i;
     for (i = 0; !bFound && i < nCount; ++i )
         if ( sDict.equalsIgnoreAsciiCase( pDic[i]->getName()) )
             bFound = sal_True;
@@ -300,7 +300,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(
     if ( nCount > 0 )
     {
         pAllDictsLB->SelectEntry( aLookUpEntry );
-        sal_uInt16 nPos = pAllDictsLB->GetSelectEntryPos();
+        sal_Int32 nPos = pAllDictsLB->GetSelectEntryPos();
 
         if ( nPos == LISTBOX_ENTRY_NOTFOUND )
         {
@@ -375,13 +375,13 @@ void SvxEditDictionaryDialog::SetLanguage_Impl( util::Language nLanguage )
     pLangLB->SelectLanguage( nLanguage );
 }
 
-sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const OUString &rDicWord)
+sal_uLong SvxEditDictionaryDialog::GetLBInsertPos(const OUString &rDicWord)
 {
-    sal_uInt16 nPos = USHRT_MAX;
+    sal_uLong nPos = TREELIST_ENTRY_NOTFOUND;
 
     IntlWrapper aIntlWrapper( Application::GetSettings().GetLanguageTag() );
     const CollatorWrapper* pCollator = aIntlWrapper.getCollator();
-    sal_uInt16 j;
+    sal_uLong j;
     for( j = 0; j < pWordsLB->GetEntryCount(); j++ )
     {
         SvTreeListEntry* pEntry = pWordsLB->GetEntry(j);
@@ -400,7 +400,7 @@ sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const OUString &rDicWord)
 
 void SvxEditDictionaryDialog::RemoveDictEntry(SvTreeListEntry* pEntry)
 {
-    sal_uInt16 nLBPos = pAllDictsLB->GetSelectEntryPos();
+    sal_Int32 nLBPos = pAllDictsLB->GetSelectEntryPos();
 
     if ( pEntry != NULL && nLBPos != LISTBOX_ENTRY_NOTFOUND )
     {
@@ -418,7 +418,7 @@ void SvxEditDictionaryDialog::RemoveDictEntry(SvTreeListEntry* pEntry)
 
 IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectBookHdl_Impl)
 {
-    sal_uInt16 nPos = pAllDictsLB->GetSelectEntryPos();
+    sal_Int32 nPos = pAllDictsLB->GetSelectEntryPos();
 
     if ( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
@@ -443,8 +443,8 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectBookHdl_Impl)
 
 IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl)
 {
-    sal_uInt16 nDicPos = pAllDictsLB->GetSelectEntryPos();
-    sal_uInt16 nLang = pLangLB->GetSelectLanguage();
+    sal_Int32 nDicPos = pAllDictsLB->GetSelectEntryPos();
+    sal_Int32 nLang = pLangLB->GetSelectLanguage();
     Reference< XDictionary >  xDic( aDics.getConstArray()[ nDicPos ], UNO_QUERY );
     sal_Int16 nOldLang = LanguageTag( xDic->getLocale() ).getLanguageType();
 
@@ -528,13 +528,13 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId )
     for (sal_Int32 i = 0;  i < nCount;  i++)
     {
         aStr = pEntry[i]->getDictionaryWord();
-        sal_uInt16 nPos = GetLBInsertPos( aStr );
+        sal_uLong nPos = GetLBInsertPos( aStr );
         if(pEntry[i]->isNegative())
         {
             aStr += "\t";
             aStr += pEntry[i]->getReplacementText();
         }
-        pWordsLB->InsertEntry(aStr, 0, sal_False, nPos == USHRT_MAX ?  LIST_APPEND : nPos);
+        pWordsLB->InsertEntry(aStr, 0, sal_False, nPos == TREELIST_ENTRY_NOTFOUND ?  TREELIST_APPEND : nPos);
     }
 
     if (pWordsLB->GetEntryCount())
@@ -598,7 +598,7 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn)
         OUString aReplaceStr(pReplaceED->GetText());
 
         sal_Int16 nAddRes = DIC_ERR_UNKNOWN;
-        sal_uInt16 nPos = pAllDictsLB->GetSelectEntryPos();
+        sal_Int32 nPos = pAllDictsLB->GetSelectEntryPos();
         if ( nPos != LISTBOX_ENTRY_NOTFOUND && !aNewWord.isEmpty())
         {
             DBG_ASSERT(nPos < aDics.getLength(), "invalid dictionary index");
@@ -632,7 +632,7 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn)
             // insert new entry in list-box etc...
 
             pWordsLB->SetUpdateMode(sal_False);
-            sal_uInt16 _nPos = USHRT_MAX;
+            sal_uLong _nPos = TREELIST_ENTRY_NOTFOUND;
 
             if(pReplaceFT->IsVisible())
             {
@@ -650,7 +650,7 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn)
             {
                 _nPos = GetLBInsertPos( aNewWord );
                 SvTreeListEntry* pInsEntry = pWordsLB->InsertEntry(sEntry, 0, sal_False,
-                            _nPos == USHRT_MAX ? LIST_APPEND : (sal_uInt32)_nPos);
+                            _nPos == TREELIST_ENTRY_NOTFOUND ? TREELIST_APPEND : _nPos);
                 pNewEntry = pInsEntry;
             }
 
@@ -693,7 +693,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt)
             sal_Bool bTmpSelEntry=sal_False;
             CDE_RESULT eCmpRes = CDE_DIFFERENT;
 
-            for(sal_uInt16 i = 0; i < pWordsLB->GetEntryCount(); i++)
+            for(sal_uLong i = 0; i < pWordsLB->GetEntryCount(); i++)
             {
                 SvTreeListEntry*  pEntry = pWordsLB->GetEntry( i );
                 OUString aTestStr( pWordsLB->GetEntryText(pEntry, 0) );
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index ebe2cfc..d802fb5 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -231,7 +231,7 @@ void SvxProxyTabPage::ReadConfigData_Impl()
 
         if( xNameAccess->getByName(aProxyModePN) >>= nIntValue )
         {
-            m_pProxyModeLB->SelectEntryPos( (sal_uInt16) nIntValue );
+            m_pProxyModeLB->SelectEntryPos( nIntValue );
         }
 
         if( xNameAccess->getByName(aHttpProxyPN) >>= aStringValue )
@@ -400,7 +400,7 @@ sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& )
     try {
         Reference< beans::XPropertySet > xPropertySet(m_xConfigurationUpdateAccess, UNO_QUERY_THROW );
 
-        sal_uInt16 nSelPos = m_pProxyModeLB->GetSelectEntryPos();
+        sal_Int32 nSelPos = m_pProxyModeLB->GetSelectEntryPos();
         if(m_pProxyModeLB->GetSavedValue() != nSelPos)
         {
             if( nSelPos == 1 )
@@ -509,7 +509,7 @@ void SvxProxyTabPage::EnableControls_Impl(sal_Bool bEnable)
 
 IMPL_LINK( SvxProxyTabPage, ProxyHdl_Impl, ListBox *, pBox )
 {
-    sal_uInt16 nPos = pBox->GetSelectEntryPos();
+    sal_Int32 nPos = pBox->GetSelectEntryPos();
 
     // Restore original system values
     if( nPos == 1 )
@@ -537,8 +537,8 @@ IMPL_LINK( SvxProxyTabPage, LoseFocusHdl_Impl, Edit *, pEdit )
 //#98647#----------------------------------------------
 void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt )
 {   // try to show tips just like as on toolbars
-    sal_uInt16 nPos=LISTBOX_ENTRY_NOTFOUND;
-    sal_uInt16 nTop = GetTopEntry();
+    sal_Int32 nPos=LISTBOX_ENTRY_NOTFOUND;
+    sal_Int32 nTop = GetTopEntry();
     sal_uInt16 nCount = GetDisplayLineCount(); // Attention: Not GetLineCount()
     Point aPt = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
     Rectangle aItemRect;
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 4fa9192..b804422 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -829,7 +829,7 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, AssignHdl_Impl)
     OUString sParam = comphelper::string::strip(m_pParameterEdit->GetText(), ' ');
     if (!sParam.isEmpty())
     {
-        sal_uInt16 nPos = m_pAssignedList->GetEntryPos( sParam );
+        sal_Int32 nPos = m_pAssignedList->GetEntryPos( sParam );
         if ( LISTBOX_ENTRY_NOTFOUND == nPos )
             nPos = m_pAssignedList->InsertEntry( sParam );
         m_pAssignedList->SelectEntryPos( nPos );
@@ -853,7 +853,7 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, SelectHdl_Impl)
 
 IMPL_LINK_NOARG(SvxJavaParameterDlg, DblClickHdl_Impl)
 {
-    sal_uInt16 nPos = m_pAssignedList->GetSelectEntryPos();
+    sal_Int32 nPos = m_pAssignedList->GetSelectEntryPos();
     if ( nPos != LISTBOX_ENTRY_NOTFOUND )
         m_pParameterEdit->SetText( m_pAssignedList->GetEntry( nPos ) );
     return 0;
@@ -863,11 +863,11 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, DblClickHdl_Impl)
 
 IMPL_LINK_NOARG(SvxJavaParameterDlg, RemoveHdl_Impl)
 {
-    sal_uInt16 nPos = m_pAssignedList->GetSelectEntryPos();
+    sal_Int32 nPos = m_pAssignedList->GetSelectEntryPos();
     if ( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
         m_pAssignedList->RemoveEntry( nPos );
-        sal_uInt16 nCount = m_pAssignedList->GetEntryCount();
+        sal_Int32 nCount = m_pAssignedList->GetEntryCount();
         if ( nCount )
         {
             if ( nPos >= nCount )
@@ -893,10 +893,10 @@ short SvxJavaParameterDlg::Execute()
 
 Sequence< OUString > SvxJavaParameterDlg::GetParameters() const
 {
-    sal_uInt16 nCount = m_pAssignedList->GetEntryCount();
+    sal_Int32 nCount = m_pAssignedList->GetEntryCount();
     Sequence< OUString > aParamList( nCount );
     OUString* pArray = aParamList.getArray();
-     for ( sal_uInt16 i = 0; i < nCount; ++i )
+     for ( sal_Int32 i = 0; i < nCount; ++i )
          pArray[i] = OUString( m_pAssignedList->GetEntry(i) );
     return aParamList;
 }
@@ -940,7 +940,7 @@ SvxJavaClassPathDlg::SvxJavaClassPathDlg(Window* pParent)
 
 SvxJavaClassPathDlg::~SvxJavaClassPathDlg()
 {
-    sal_uInt16 i, nCount = m_pPathList->GetEntryCount();
+    sal_Int32 i, nCount = m_pPathList->GetEntryCount();
     for ( i = 0; i < nCount; ++i )
         delete static_cast< OUString* >( m_pPathList->GetEntryData(i) );
 }
@@ -968,7 +968,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl)
         OUString sFile = aURL.getFSysPath( INetURLObject::FSYS_DETECT );
         if ( !IsPathDuplicate( sURL ) )
         {
-            sal_uInt16 nPos = m_pPathList->InsertEntry( sFile, SvFileInformationManager::GetImage( aURL, false ) );
+            sal_Int32 nPos = m_pPathList->InsertEntry( sFile, SvFileInformationManager::GetImage( aURL, false ) );
             m_pPathList->SelectEntryPos( nPos );
         }
         else
@@ -1005,7 +1005,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl)
         OUString sNewFolder = aURL.getFSysPath( INetURLObject::FSYS_DETECT );
         if ( !IsPathDuplicate( sFolderURL ) )
         {
-            sal_uInt16 nPos = m_pPathList->InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL, false ) );
+            sal_Int32 nPos = m_pPathList->InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL, false ) );
             m_pPathList->SelectEntryPos( nPos );
         }
         else
@@ -1023,11 +1023,11 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl)
 
 IMPL_LINK_NOARG(SvxJavaClassPathDlg, RemoveHdl_Impl)
 {
-    sal_uInt16 nPos = m_pPathList->GetSelectEntryPos();
+    sal_Int32 nPos = m_pPathList->GetSelectEntryPos();
     if ( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
         m_pPathList->RemoveEntry( nPos );
-        sal_uInt16 nCount = m_pPathList->GetEntryCount();
+        sal_Int32 nCount = m_pPathList->GetEntryCount();
         if ( nCount )
         {
             if ( nPos >= nCount )
@@ -1054,8 +1054,8 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const OUString& _rPath )
 {
     bool bRet = false;
     INetURLObject aFileObj( _rPath );
-    sal_uInt16 nCount = m_pPathList->GetEntryCount();
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
+    sal_Int32 nCount = m_pPathList->GetEntryCount();
+    for ( sal_Int32 i = 0; i < nCount; ++i )
     {
         INetURLObject aOtherObj( m_pPathList->GetEntry(i), INetURLObject::FSYS_DETECT );
         if ( aOtherObj == aFileObj )
@@ -1073,8 +1073,8 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const OUString& _rPath )
 OUString SvxJavaClassPathDlg::GetClassPath() const
 {
     OUString sPath;
-    sal_uInt16 nCount = m_pPathList->GetEntryCount();
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
+    sal_Int32 nCount = m_pPathList->GetEntryCount();
+    for ( sal_Int32 i = 0; i < nCount; ++i )
     {
         if ( !sPath.isEmpty() )
             sPath += OUString(CLASSPATH_DELIMITER);
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 5aefdca..e9af921 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1272,7 +1272,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
             DicUserData aData( (sal_uLong)pEntry->GetUserData() );
             if (aData.GetEntryId() < nDics)
             {
-                sal_Bool bChecked = m_pLinguDicsCLB->IsChecked( (sal_uInt16) i );
+                sal_Bool bChecked = m_pLinguDicsCLB->IsChecked( i );
                 uno::Reference< XDictionary > xDic( aDics.getConstArray()[ i ] );
                 if (xDic.is())
                 {
@@ -1298,7 +1298,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
 
 
     nEntries = m_pLinguOptionsCLB->GetEntryCount();
-    for (sal_uInt16 j = 0;  j < nEntries;  ++j)
+    for (sal_uLong j = 0;  j < nEntries;  ++j)
     {
         SvTreeListEntry *pEntry = m_pLinguOptionsCLB->GetEntry( j );
 
@@ -1322,8 +1322,8 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
         aLngCfg.SetProperty( aPropName, aAny );
     }
 
-    SvTreeListEntry *pPreBreakEntry  = m_pLinguOptionsCLB->GetEntry( (sal_uInt16) EID_NUM_PRE_BREAK );
-    SvTreeListEntry *pPostBreakEntry = m_pLinguOptionsCLB->GetEntry( (sal_uInt16) EID_NUM_POST_BREAK );
+    SvTreeListEntry *pPreBreakEntry  = m_pLinguOptionsCLB->GetEntry( (sal_uLong) EID_NUM_PRE_BREAK );
+    SvTreeListEntry *pPostBreakEntry = m_pLinguOptionsCLB->GetEntry( (sal_uLong) EID_NUM_POST_BREAK );
     DBG_ASSERT( pPreBreakEntry, "NULL Pointer" );
     DBG_ASSERT( pPostBreakEntry, "NULL Pointer" );
     if (pPreBreakEntry && pPostBreakEntry)
@@ -1341,7 +1341,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
 
 
     // automatic spell checking
-    bool bNewAutoCheck = m_pLinguOptionsCLB->IsChecked( (sal_uInt16) EID_SPELL_AUTO );
+    bool bNewAutoCheck = m_pLinguOptionsCLB->IsChecked( (sal_uLong) EID_SPELL_AUTO );
     const SfxPoolItem* pOld = GetOldItem( rCoreSet, SID_AUTOSPELL_CHECK );
     if ( !pOld || ( (SfxBoolItem*)pOld )->GetValue() != bNewAutoCheck )
     {
@@ -1383,7 +1383,7 @@ void SvxLinguTabPage::AddDicBoxEntry(
     OUString aTxt( ::GetDicInfoStr( rxDic->getName(),
                         LanguageTag( rxDic->getLocale() ).getLanguageType(),
                         DictionaryType_NEGATIVE == rxDic->getDictionaryType() ) );
-    m_pLinguDicsCLB->InsertEntry( aTxt, (sal_uInt16)LISTBOX_APPEND );  // append at end
+    m_pLinguDicsCLB->InsertEntry( aTxt, TREELIST_APPEND );  // append at end
     SvTreeListEntry* pEntry = m_pLinguDicsCLB->GetEntry( m_pLinguDicsCLB->GetEntryCount() - 1 );
     DBG_ASSERT( pEntry, "failed to add entry" );
     if (pEntry)
@@ -1426,10 +1426,10 @@ void SvxLinguTabPage::UpdateModulesBox_Impl()
 
         m_pLinguModulesCLB->Clear();
 
-        for (sal_uInt16 i = 0;  i < nDispSrvcCount;  ++i)
+        for (sal_uLong i = 0;  i < nDispSrvcCount;  ++i)
         {
             const ServiceInfo_Impl &rInfo = rAllDispSrvcArr[i];
-            m_pLinguModulesCLB->InsertEntry( rInfo.sDisplayName, (sal_uInt16)LISTBOX_APPEND );
+            m_pLinguModulesCLB->InsertEntry( rInfo.sDisplayName, TREELIST_APPEND );
             SvTreeListEntry* pEntry = m_pLinguModulesCLB->GetEntry(i);
             pEntry->SetUserData( (void *) &rInfo );
             m_pLinguModulesCLB->CheckEntryPos( i, rInfo.bConfigured );
@@ -1592,8 +1592,8 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox )
     if (pBox == m_pLinguModulesCLB)
     {
         DBG_ASSERT( pLinguData, "NULL pointer, LinguData missing" );
-        sal_uInt16 nPos = m_pLinguModulesCLB->GetSelectEntryPos();
-        if (nPos != LISTBOX_ENTRY_NOTFOUND  &&  pLinguData)
+        sal_uLong nPos = m_pLinguModulesCLB->GetSelectEntryPos();
+        if (nPos != TREELIST_ENTRY_NOTFOUND  &&  pLinguData)
         {
             pLinguData->Reconfigure( m_pLinguModulesCLB->GetText( nPos ),
                                      m_pLinguModulesCLB->IsChecked( nPos ) );
@@ -1601,8 +1601,8 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox )
     }
     else if (pBox == m_pLinguDicsCLB)
     {
-        sal_uInt16 nPos = m_pLinguDicsCLB->GetSelectEntryPos();
-        if (nPos != LISTBOX_ENTRY_NOTFOUND)
+        sal_uLong nPos = m_pLinguDicsCLB->GetSelectEntryPos();
+        if (nPos != TREELIST_ENTRY_NOTFOUND)
         {
             const uno::Reference< XDictionary > &rDic = aDics.getConstArray()[ nPos ];
             if (SvxGetIgnoreAllList() == rDic)
@@ -1755,7 +1755,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
                                 DicUserData aDicData( (sal_uLong) pDicEntry->GetUserData() );
                                 if (aDicData.GetEntryId() == nDicPos )
                                 {
-                                    m_pLinguDicsCLB->RemoveEntry( (sal_uInt16) i );
+                                    m_pLinguDicsCLB->RemoveEntry( i );
                                     break;
                                 }
                             }
@@ -1986,7 +1986,7 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox )
             ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData();
             if(!pData->IsParent() && pData->GetType() != TYPE_HYPH)
             {
-                sal_uInt16  nCurPos = pBox->GetSelectEntryPos();
+                sal_uLong  nCurPos = pBox->GetSelectEntryPos();
                 if(nCurPos < pBox->GetEntryCount() - 1)
                 {
                     bDisableDown = ((ModuleUserData_Impl*)pBox->
@@ -2057,7 +2057,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
         sal_Int32 nStart = 0, nLocalIndex = 0;
         Sequence< OUString > aChange;
         bool bChanged = false;
-        for(sal_uInt16 i = 0; i < m_pModulesCLB->GetEntryCount(); i++)
+        for(sal_uLong i = 0; i < m_pModulesCLB->GetEntryCount(); i++)
         {
             SvTreeListEntry *pEntry = m_pModulesCLB->GetEntry(i);
             ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData();
@@ -2298,9 +2298,9 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
 IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, PushButton *, pBtn )
 {
     sal_Bool bUp = m_pPrioUpPB == pBtn;
-    sal_uInt16  nCurPos = m_pModulesCLB->GetSelectEntryPos();
+    sal_uLong  nCurPos = m_pModulesCLB->GetSelectEntryPos();
     SvTreeListEntry* pEntry;
-    if (nCurPos != LISTBOX_ENTRY_NOTFOUND  &&
+    if (nCurPos != TREELIST_ENTRY_NOTFOUND  &&
         0 != (pEntry = m_pModulesCLB->GetEntry(nCurPos)))
     {
         m_pModulesCLB->SetUpdateMode(sal_False);
@@ -2314,7 +2314,7 @@ IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, PushButton *, pBtn )
 
         pModel->Remove(pEntry);
 
-        sal_uInt16 nDestPos = bUp ? nCurPos - 1 : nCurPos + 1;
+        sal_uLong nDestPos = bUp ? nCurPos - 1 : nCurPos + 1;
         pModel->Insert(pToInsert, nDestPos);
         m_pModulesCLB->CheckEntryPos(nDestPos, bIsChecked );
         m_pModulesCLB->SelectEntryPos(nDestPos );
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index a1895b1..e8610a7 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -60,7 +60,7 @@ static const HorJustConnection::MapEntryType s_pHorJustMap[] =
     { ALIGNDLG_HORALIGN_BLOCK,  SVX_HOR_JUSTIFY_BLOCK       },
     { ALIGNDLG_HORALIGN_FILL,   SVX_HOR_JUSTIFY_REPEAT      },
     { ALIGNDLG_HORALIGN_DISTRIBUTED, SVX_HOR_JUSTIFY_BLOCK  },
-    { LISTBOX_ENTRY_NOTFOUND,   SVX_HOR_JUSTIFY_STANDARD    }
+    { WRAPPER_LISTBOX_ENTRY_NOTFOUND,   SVX_HOR_JUSTIFY_STANDARD    }
 };
 
 // vertical alignment ---------------------------------------------------------
@@ -76,7 +76,7 @@ static const VerJustConnection::MapEntryType s_pVerJustMap[] =
     { ALIGNDLG_VERALIGN_BOTTOM, SVX_VER_JUSTIFY_BOTTOM      },
     { ALIGNDLG_VERALIGN_BLOCK,  SVX_VER_JUSTIFY_BLOCK       },
     { ALIGNDLG_VERALIGN_DISTRIBUTED, SVX_VER_JUSTIFY_BLOCK  },
-    { LISTBOX_ENTRY_NOTFOUND,   SVX_VER_JUSTIFY_STANDARD    }
+    { WRAPPER_LISTBOX_ENTRY_NOTFOUND,   SVX_VER_JUSTIFY_STANDARD    }
 };
 
 // cell rotate mode -----------------------------------------------------------
@@ -89,7 +89,7 @@ static const RotateModeConnection::MapEntryType s_pRotateModeMap[] =
     { IID_BOTTOMLOCK,           SVX_ROTATE_MODE_BOTTOM      },
     { IID_TOPLOCK,              SVX_ROTATE_MODE_TOP         },
     { IID_CELLLOCK,             SVX_ROTATE_MODE_STANDARD    },
-    { VALUESET_ITEM_NOTFOUND,   SVX_ROTATE_MODE_STANDARD    }
+    { WRAPPER_VALUESET_ITEM_NOTFOUND,   SVX_ROTATE_MODE_STANDARD    }
 };
 
 
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 3861044..3334a21 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -116,7 +116,7 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet )
         nLangList |= LANG_LIST_CTL;
     m_pLanguageLB->SetLanguageList( nLangList, sal_True, sal_True );
     m_pLanguageLB->SelectLanguage( LANGUAGE_NONE );
-    sal_uInt16 nPos = m_pLanguageLB->GetSelectEntryPos();
+    sal_Int32 nPos = m_pLanguageLB->GetSelectEntryPos();
     DBG_ASSERT( LISTBOX_ENTRY_NOTFOUND != nPos, "listbox entry missing" );
     m_pLanguageLB->SetEntryData( nPos, (void*)(long) LANGUAGE_UNDETERMINED );
 
@@ -144,9 +144,9 @@ void OfaAutoCorrDlg::EnableLanguage(bool bEnable)
 static sal_Bool lcl_FindEntry( ListBox& rLB, const OUString& rEntry,
                     CollatorWrapper& rCmpClass )
 {
-    sal_uInt16 nCount = rLB.GetEntryCount();
-    sal_uInt16 nSelPos = rLB.GetSelectEntryPos();
-    sal_uInt16 i;
+    sal_Int32 nCount = rLB.GetEntryCount();
+    sal_Int32 nSelPos = rLB.GetSelectEntryPos();
+    sal_Int32 i;
     for(i = 0; i < nCount; i++)
     {
         if( 0 == rCmpClass.compareString(rEntry, rLB.GetEntry(i) ))
@@ -162,7 +162,7 @@ static sal_Bool lcl_FindEntry( ListBox& rLB, const OUString& rEntry,
 
 IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox*, pBox)
 {
-    sal_uInt16 nPos = pBox->GetSelectEntryPos();
+    sal_Int32 nPos = pBox->GetSelectEntryPos();
     void* pVoid = pBox->GetEntryData(nPos);
     LanguageType eNewLang = (LanguageType)(sal_IntPtr)pVoid;
     // save old settings and fill anew
@@ -202,7 +202,7 @@ sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& )
     SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
     long nFlags = pAutoCorrect->GetFlags();
 
-    sal_uInt16 nPos = 0;
+    sal_uLong nPos = 0;
     pAutoCorrect->SetAutoCorrFlag(Autocorrect,          m_pCheckLB->IsChecked(nPos++));
     pAutoCorrect->SetAutoCorrFlag(CptlSttWrd,           m_pCheckLB->IsChecked(nPos++));
     pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc,         m_pCheckLB->IsChecked(nPos++));
@@ -244,7 +244,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet& )
     m_pCheckLB->InsertEntry(m_sNoDblSpaces);
     m_pCheckLB->InsertEntry(m_sAccidentalCaps);
 
-    sal_uInt16 nPos = 0;
+    sal_uLong nPos = 0;
     m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) );
     m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) );
     m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) );
@@ -1213,17 +1213,17 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn)
 
             NewEntry(m_pShortED->GetText(), m_pReplaceED->GetText(), bKeepSourceFormatting);
             m_pReplaceTLB->SetUpdateMode(sal_False);
-            sal_uInt32 nPos = UINT_MAX;
+            sal_uLong nPos = TREELIST_ENTRY_NOTFOUND;
             sEntry += "\t";
             sEntry += m_pReplaceED->GetText();
             if(_pNewEntry)
             {
-                nPos = (sal_uInt32) m_pReplaceTLB->GetModel()->GetAbsPos(_pNewEntry);
+                nPos = m_pReplaceTLB->GetModel()->GetAbsPos(_pNewEntry);
                 m_pReplaceTLB->GetModel()->Remove(_pNewEntry);
             }
             else
             {
-                sal_uInt32 j;
+                sal_uLong j;
                 for( j = 0; j < m_pReplaceTLB->GetEntryCount(); j++ )
                 {
                     SvTreeListEntry* pReplaceEntry = m_pReplaceTLB->GetEntry(j);
@@ -1234,7 +1234,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn)
             }
             SvTreeListEntry* pInsEntry = m_pReplaceTLB->InsertEntry(
                                         sEntry, static_cast< SvTreeListEntry * >(NULL), false,
-                                        nPos == UINT_MAX ? LIST_APPEND : nPos);
+                                        nPos == TREELIST_ENTRY_NOTFOUND ? TREELIST_APPEND : nPos);
             if (bKeepSourceFormatting)
             {
                 pInsEntry->SetUserData(&bHasSelectionText); // new formatted text
@@ -1435,8 +1435,8 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet&  )
 
             if(pWrdList)
             {
-                sal_uInt16 nCount = pWrdList->size();
-                sal_uInt16 i;
+                size_t nCount = pWrdList->size();
+                size_t i;
                 for( i = nCount; i; )
                 {
                     OUString aString = (*pWrdList)[ --i ];
@@ -1458,8 +1458,8 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet&  )
 
             if(pCplList)
             {
-                sal_uInt16 nCount = pCplList->size();
-                sal_uInt16 i;
+                size_t nCount = pCplList->size();
+                size_t i;
                 for( i = nCount; i; )
                 {
                     OUString aString = (*pCplList)[ --i ];
@@ -1484,8 +1484,8 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet&  )
 
     if(pWrdList)
     {
-        sal_uInt16 nCount = pWrdList->size();
-        sal_uInt16 i;
+        size_t nCount = pWrdList->size();
+        size_t i;
         for( i = nCount; i; )
         {
             OUString aString = (*pWrdList)[ --i ];
@@ -1506,20 +1506,19 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet&  )
 
     if(pCplList)
     {
-        sal_uInt16 nCount = pCplList->size();
-        sal_uInt16 i;
-        for( i = nCount; i; )
+        size_t nCount = pCplList->size();
+        for( size_t i = nCount; i; )
         {
             OUString aString = (*pCplList)[ --i ];
-            if( USHRT_MAX == m_pAbbrevLB->GetEntryPos(aString) )
+            if( LISTBOX_ENTRY_NOTFOUND == m_pAbbrevLB->GetEntryPos(aString) )
             {
                 pCplList->erase(i);
             }
         }
-        nCount = m_pAbbrevLB->GetEntryCount();
-        for( i = 0; i < nCount; ++i )
+        sal_Int32 nAbbrevCount = m_pAbbrevLB->GetEntryCount();
+        for( sal_Int32 ia = 0; ia < nAbbrevCount; ++ia )
         {
-            pCplList->insert( m_pAbbrevLB->GetEntry( i ) );
+            pCplList->insert( m_pAbbrevLB->GetEntry( ia ) );
         }
         pAutoCorrect->SaveCplSttExceptList(eLang);
     }
@@ -1568,7 +1567,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset,
             pArrays = &aStringsTable[eOldLanguage]; // create new array
         }
 
-        sal_uInt16 i;
+        sal_Int32 i;
         for(i = 0; i < m_pAbbrevLB->GetEntryCount(); i++)
             pArrays->aAbbrevStrings.push_back(OUString(m_pAbbrevLB->GetEntry(i)));
 
@@ -1595,7 +1594,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset,
         SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
         const SvStringsISortDtor* pCplList = pAutoCorrect->GetCplSttExceptList(eLang);
         const SvStringsISortDtor* pWrdList = pAutoCorrect->GetWrdSttExceptList(eLang);
-        sal_uInt16 i;
+        size_t i;
         for( i = 0; i < pCplList->size(); i++ )
         {
             m_pAbbrevLB->InsertEntry((*pCplList)[i]);
@@ -1832,7 +1831,7 @@ sal_Bool OfaQuoteTabPage::FillItemSet( SfxItemSet&  )
 
     if (m_pCheckLB->IsVisible())
     {
-        sal_uInt16 nPos = 0;
+        sal_uLong nPos = 0;
         pAutoCorrect->SetAutoCorrFlag(AddNonBrkSpace, m_pCheckLB->IsChecked(nPos++));
         pAutoCorrect->SetAutoCorrFlag(ChgOrdinalNumber, m_pCheckLB->IsChecked(nPos++));
     }
@@ -1930,7 +1929,7 @@ void OfaQuoteTabPage::Reset( const SfxItemSet& )
         m_pCheckLB->InsertEntry( sNonBrkSpace );
         m_pCheckLB->InsertEntry( sOrdinal );
 
-        sal_uInt16 nPos = 0;
+        sal_uLong nPos = 0;
         m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & AddNonBrkSpace) );
         m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & ChgOrdinalNumber) );
 
@@ -2128,7 +2127,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage(Window* pParent,
     for( const sal_uInt16* pKeys = aKeyCodes; *pKeys; ++pKeys )
     {
         KeyCode aKCode( *pKeys );
-        sal_uInt16 nPos = m_pDCBExpandKey->InsertEntry( aKCode.GetName() );
+        sal_Int32 nPos = m_pDCBExpandKey->InsertEntry( aKCode.GetName() );
         m_pDCBExpandKey->SetEntryData( nPos, (void*)(sal_uLong)*pKeys );
         if( KEY_RETURN == *pKeys )      // default to RETURN
             m_pDCBExpandKey->SelectEntryPos( nPos );
@@ -2219,7 +2218,7 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet&  )
     // select the specific KeyCode:
     {
         sal_uLong nKey = pOpt->nAutoCmpltExpandKey;
-        for( sal_uInt16 n = 0, nCnt = m_pDCBExpandKey->GetEntryCount(); n < nCnt; ++n )
+        for( sal_Int32 n = 0, nCnt = m_pDCBExpandKey->GetEntryCount(); n < nCnt; ++n )
             if( nKey == (sal_uLong)m_pDCBExpandKey->GetEntryData( n ))
             {
                 m_pDCBExpandKey->SelectEntryPos( n );
@@ -2237,7 +2236,7 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet&  )
         {
             const OUString* pStr =
                 &(*m_pAutoCompleteList)[n]->GetAutoCompleteString();
-            sal_uInt16 nPos = m_pLBEntries->InsertEntry( *pStr );
+            sal_Int32 nPos = m_pLBEntries->InsertEntry( *pStr );
             m_pLBEntries->SetEntryData( nPos, (void*)pStr );
         }
     }
@@ -2258,11 +2257,11 @@ void OfaAutoCompleteTabPage::ActivatePage( const SfxItemSet& )
 
 IMPL_LINK_NOARG(OfaAutoCompleteTabPage, DeleteHdl)
 {
-    sal_uInt16 nSelCnt =
+    sal_Int32 nSelCnt =
         (m_pAutoCompleteList) ? m_pLBEntries->GetSelectEntryCount() : 0;
     while( nSelCnt )
     {
-        sal_uInt16 nPos = m_pLBEntries->GetSelectEntryPos( --nSelCnt );
+        sal_Int32 nPos = m_pLBEntries->GetSelectEntryPos( --nSelCnt );
         OUString* pStr = static_cast<OUString*>(m_pLBEntries->GetEntryData(nPos));
         m_pLBEntries->RemoveEntry( nPos );
         editeng::IAutoCompleteString hack(*pStr); // UGLY
@@ -2288,7 +2287,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox )
 
 void OfaAutoCompleteTabPage::CopyToClipboard() const
 {
-    sal_uInt16 nSelCnt = m_pLBEntries->GetSelectEntryCount();
+    sal_Int32 nSelCnt = m_pLBEntries->GetSelectEntryCount();
     if (m_pAutoCompleteList && nSelCnt)
     {
         TransferDataContainer* pCntnr = new TransferDataContainer;
@@ -2305,7 +2304,7 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const
 
         rtl_TextEncoding nEncode = osl_getThreadTextEncoding();
 
-        for( sal_uInt16 n = 0; n < nSelCnt; ++n )
+        for( sal_Int32 n = 0; n < nSelCnt; ++n )
         {
             sData.append(OUStringToOString(m_pLBEntries->GetSelectEntry(n),
                 nEncode));
@@ -2407,7 +2406,7 @@ struct ImplSmartTagLBUserData
 void OfaSmartTagOptionsTabPage::ClearListBox()
 {
     const sal_uLong nCount = m_aSmartTagTypesLB.GetEntryCount();
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
+    for ( sal_uLong i = 0; i < nCount; ++i )
     {
         const SvTreeListEntry* pEntry = m_aSmartTagTypesLB.GetEntry(i);
         const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData());
@@ -2463,7 +2462,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const SmartTagMgr& rSmartTagMgr )
 */
 IMPL_LINK_NOARG(OfaSmartTagOptionsTabPage, ClickHdl)
 {
-    const sal_uInt16 nPos = m_aSmartTagTypesLB.GetSelectEntryPos();
+    const sal_uLong nPos = m_aSmartTagTypesLB.GetSelectEntryPos();
     const SvTreeListEntry* pEntry = m_aSmartTagTypesLB.GetEntry(nPos);
     const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData());
     uno::Reference< smarttags::XSmartTagRecognizer > xRec = pUserData->mxRec;
@@ -2502,7 +2501,7 @@ IMPL_LINK_NOARG(OfaSmartTagOptionsTabPage, SelectHdl)
     if ( m_aSmartTagTypesLB.GetEntryCount() < 1 )
         return 0;
 
-    const sal_uInt16 nPos = m_aSmartTagTypesLB.GetSelectEntryPos();
+    const sal_uLong nPos = m_aSmartTagTypesLB.GetSelectEntryPos();
     const SvTreeListEntry* pEntry = m_aSmartTagTypesLB.GetEntry(nPos);
     const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData());
     uno::Reference< smarttags::XSmartTagRecognizer > xRec = pUserData->mxRec;
@@ -2534,7 +2533,7 @@ sal_Bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& )
 
     const sal_uLong nCount = m_aSmartTagTypesLB.GetEntryCount();
 
-    for ( sal_uInt16 i = 0; i < nCount; ++i )
+    for ( sal_uLong i = 0; i < nCount; ++i )
     {
         const SvTreeListEntry* pEntry = m_aSmartTagTypesLB.GetEntry(i);
         const ImplSmartTagLBUserData* pUserData = static_cast< ImplSmartTagLBUserData* >(pEntry->GetUserData());
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 5b0717c..c2c7077 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -76,7 +76,7 @@ struct SvxBackgroundTable_Impl
     sal_uInt16      nCellWhich;
     sal_uInt16      nRowWhich;
     sal_uInt16      nTableWhich;
-    sal_uInt16      nActPos;
+    sal_Int32       nActPos;
 
     SvxBackgroundTable_Impl()
         : pCellBrush(NULL)
@@ -94,7 +94,7 @@ struct SvxBackgroundPara_Impl
     SvxBrushItem*   pParaBrush;
     SvxBrushItem*   pCharBrush;
 
-    sal_uInt16          nActPos;
+    sal_Int32           nActPos;
 
     SvxBackgroundPara_Impl()
         : pParaBrush(NULL)
@@ -534,7 +534,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet )
     {
         nDestValue = ((const SfxUInt16Item*)pItem)->GetValue();
         // character activated?
-        sal_uInt16 nParaSel  = m_pParaLBox->GetSelectEntryPos();
+        sal_Int32 nParaSel  = m_pParaLBox->GetSelectEntryPos();
         if(1 == nParaSel)
         {
             // then it was a "standard"-call
@@ -584,7 +584,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet )
     {
         if(m_pTblLBox->IsVisible())
         {
-            sal_uInt16 nValue = m_pTblLBox->GetSelectEntryPos();
+            sal_Int32 nValue = m_pTblLBox->GetSelectEntryPos();
 
             if ( pTableBck_Impl )
             {
@@ -624,7 +624,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet )
         }
         else
         {
-            sal_uInt16 nValue = m_pParaLBox->GetSelectEntryPos();
+            sal_Int32 nValue = m_pParaLBox->GetSelectEntryPos();
 
             if ( pParaBck_Impl )
             {
@@ -1490,7 +1490,7 @@ IMPL_LINK( SvxBackgroundTabPage, RadioClickHdl_Impl, RadioButton*, pBtn )
 
 IMPL_LINK_NOARG(SvxBackgroundTabPage, ModifyGradientHdl_Impl)
 {
-    sal_uInt16 nPos = m_pLbGradients->GetSelectEntryPos();
+    sal_Int32 nPos = m_pLbGradients->GetSelectEntryPos();
 
     if (nPos != LISTBOX_ENTRY_NOTFOUND)
     {
@@ -1635,7 +1635,7 @@ void SvxBackgroundTabPage::ShowParaControl(sal_Bool bCharOnly)
 
 IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
 {
-    sal_uInt16 nSelPos = pBox->GetSelectEntryPos();
+    sal_Int32 nSelPos = pBox->GetSelectEntryPos();
     if( pTableBck_Impl && pTableBck_Impl->nActPos != nSelPos)
     {
         boost::scoped_ptr<SvxBrushItem> xItemHolder;
@@ -1727,7 +1727,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
 
 IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox )
 {
-    sal_uInt16 nSelPos = pBox->GetSelectEntryPos();
+    sal_Int32 nSelPos = pBox->GetSelectEntryPos();
     if( pParaBck_Impl && pParaBck_Impl->nActPos != nSelPos)
     {
         SvxBrushItem* pActItem = NULL;
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index fd7b905..869bf09 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -518,7 +518,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet )
         if( !bColorEq )
             aColor.SetColor( COL_BLACK );
 
-        sal_uInt16 nSelPos = m_pLbLineColor->GetEntryPos( aColor );
+        sal_Int32 nSelPos = m_pLbLineColor->GetEntryPos( aColor );
         if( nSelPos == LISTBOX_ENTRY_NOTFOUND )
             nSelPos = m_pLbLineColor->InsertEntry( aColor, SVX_RESSTR( RID_SVXSTR_COLOR_USER ) );
 
diff --git a/cui/source/tabpages/borderconn.cxx b/cui/source/tabpages/borderconn.cxx
index eafa408..b625512 100644
--- a/cui/source/tabpages/borderconn.cxx
+++ b/cui/source/tabpages/borderconn.cxx
@@ -201,7 +201,7 @@ static const ShadowPosWrapper::MapEntryType s_pShadowPosMap[] =
     { 3,                        SVX_SHADOW_TOPRIGHT     },
     { 4,                        SVX_SHADOW_BOTTOMLEFT   },
     { 5,                        SVX_SHADOW_TOPLEFT      },
-    { VALUESET_ITEM_NOTFOUND,   SVX_SHADOW_NONE         }
+    { WRAPPER_VALUESET_ITEM_NOTFOUND, SVX_SHADOW_NONE   }
 };
 
 class ShadowControlsWrapper : public sfx::MultiControlWrapper< SvxShadowItem >
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index e9a0bd2..530741d 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -237,14 +237,14 @@ struct SvxCharNamePage_Impl
     Timer           m_aUpdateTimer;
     OUString        m_aNoStyleText;
     const FontList* m_pFontList;
-    sal_uInt16          m_nExtraEntryPos;
+    sal_Int32           m_nExtraEntryPos;
     sal_Bool            m_bMustDelete;
     sal_Bool            m_bInSearchMode;
 
     SvxCharNamePage_Impl() :
 
         m_pFontList     ( NULL ),
-        m_nExtraEntryPos( LISTBOX_ENTRY_NOTFOUND ),
+        m_nExtraEntryPos( COMBOBOX_ENTRY_NOTFOUND ),
         m_bMustDelete   ( sal_False ),
         m_bInSearchMode ( sal_False )
 
@@ -888,7 +888,7 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan
     const OUString& rFontName  = pNameBox->GetText();
     const FontList* pFontList = GetFontList();
     OUString aStyleBoxText =pStyleBox->GetText();
-    sal_uInt16 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText );
+    sal_Int32 nEntryPos = pStyleBox->GetEntryPos( aStyleBoxText );
     if ( nEntryPos >= m_pImpl->m_nExtraEntryPos )
         aStyleBoxText = "";
     FontInfo aInfo( pFontList->Get( rFontName, aStyleBoxText ) );
@@ -1086,7 +1086,7 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan
     }
     nWhich = GetWhich( nSlot );
     pOld = GetOldItem( rSet, nSlot );
-    sal_uInt16 nLangPos = pLangBox->GetSelectEntryPos();
+    sal_Int32 nLangPos = pLangBox->GetSelectEntryPos();
     LanguageType eLangType = (LanguageType)(sal_uLong)pLangBox->GetEntryData( nLangPos );
 
     if ( pOld )
@@ -1432,7 +1432,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
     SvxFont& rCJKFont = GetPreviewCJKFont();
     SvxFont& rCTLFont = GetPreviewCTLFont();
 
-    sal_uInt16 nPos = m_pUnderlineLB->GetSelectEntryPos();
+    sal_Int32 nPos = m_pUnderlineLB->GetSelectEntryPos();
     FontUnderline eUnderline = (FontUnderline)(sal_uLong)m_pUnderlineLB->GetEntryData( nPos );
     nPos = m_pOverlineLB->GetSelectEntryPos();
     FontUnderline eOverline = (FontUnderline)(sal_uLong)m_pOverlineLB->GetEntryData( nPos );
@@ -1458,7 +1458,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
     rCJKFont.SetEmphasisMark( eMark );
     rCTLFont.SetEmphasisMark( eMark );
 
-    sal_uInt16 nRelief = m_pReliefLB->GetSelectEntryPos();
+    sal_Int32 nRelief = m_pReliefLB->GetSelectEntryPos();
     if(LISTBOX_ENTRY_NOTFOUND != nRelief)
     {
         rFont.SetRelief( (FontRelief)nRelief );
@@ -1474,7 +1474,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
     rCJKFont.SetShadow( rFont.IsShadow() );
     rCTLFont.SetShadow( rFont.IsShadow() );
 
-    sal_uInt16 nCapsPos = m_pEffectsLB->GetSelectEntryPos();
+    sal_Int32 nCapsPos = m_pEffectsLB->GetSelectEntryPos();
     if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND )
     {
         rFont.SetCaseMap( (SvxCaseMap)nCapsPos );
@@ -1497,7 +1497,7 @@ void SvxCharEffectsPage::SetCaseMap_Impl( SvxCaseMap eCaseMap )
 {
     if ( SVX_CASEMAP_END > eCaseMap )
         m_pEffectsLB->SelectEntryPos(
-            sal::static_int_cast< sal_uInt16 >( eCaseMap ) );
+            sal::static_int_cast< sal_Int32 >( eCaseMap ) );
     else
     {
         m_pEffectsLB->SetNoSelection();

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list