summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx18
-rw-r--r--accessibility/inc/accessibility/helper/listboxhelper.hxx20
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx4
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx24
-rw-r--r--accessibility/source/standard/vclxaccessiblelistitem.cxx4
-rw-r--r--basctl/source/basicide/basicbox.cxx18
-rw-r--r--basctl/source/basicide/baside2b.cxx16
-rw-r--r--basctl/source/basicide/bastype2.cxx2
-rw-r--r--basctl/source/basicide/brkdlg.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx18
-rw-r--r--cui/source/customize/acccfg.cxx36
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx6
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx4
-rw-r--r--cui/source/dialogs/hldocntp.cxx4
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx6
-rw-r--r--cui/source/dialogs/hltpbase.cxx4
-rw-r--r--cui/source/dialogs/linkdlg.cxx54
-rw-r--r--cui/source/dialogs/scriptdlg.cxx6
-rw-r--r--cui/source/inc/acccfg.hxx2
-rw-r--r--cui/source/inc/cfg.hxx2
-rw-r--r--cui/source/inc/cuifmsearch.hxx4
-rw-r--r--cui/source/inc/cuitabarea.hxx20
-rw-r--r--cui/source/inc/cuitabline.hxx20
-rw-r--r--cui/source/inc/iconcdlg.hxx2
-rw-r--r--cui/source/inc/linkdlg.hxx6
-rw-r--r--cui/source/inc/optdict.hxx2
-rw-r--r--cui/source/options/optchart.cxx8
-rw-r--r--cui/source/options/optdict.cxx32
-rw-r--r--cui/source/options/optinet2.cxx10
-rw-r--r--cui/source/options/optjava.cxx30
-rw-r--r--cui/source/options/optlingu.cxx36
-rw-r--r--cui/source/tabpages/align.cxx6
-rw-r--r--cui/source/tabpages/autocdlg.cxx77
-rw-r--r--cui/source/tabpages/backgrnd.cxx16
-rw-r--r--cui/source/tabpages/border.cxx2
-rw-r--r--cui/source/tabpages/borderconn.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx52
-rw-r--r--cui/source/tabpages/connect.cxx4
-rw-r--r--cui/source/tabpages/measure.cxx10
-rw-r--r--cui/source/tabpages/numfmt.cxx42
-rw-r--r--cui/source/tabpages/numpages.cxx94
-rw-r--r--cui/source/tabpages/page.cxx22
-rw-r--r--cui/source/tabpages/paragrph.cxx16
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx18
-rw-r--r--cui/source/tabpages/tabstpge.cxx18
-rw-r--r--cui/source/tabpages/textanim.cxx6
-rw-r--r--cui/source/tabpages/tparea.cxx22
-rw-r--r--cui/source/tabpages/tpbitmap.cxx12
-rw-r--r--cui/source/tabpages/tpcolor.cxx20
-rw-r--r--cui/source/tabpages/tpgradnt.cxx14
-rw-r--r--cui/source/tabpages/tphatch.cxx14
-rw-r--r--cui/source/tabpages/tpline.cxx18
-rw-r--r--cui/source/tabpages/tplnedef.cxx8
-rw-r--r--cui/source/tabpages/tplneend.cxx8
-rw-r--r--cui/source/tabpages/tpshadow.cxx8
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx4
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx6
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx2
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx8
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx18
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx4
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx4
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx2
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.cxx16
-rw-r--r--dbaccess/source/ui/inc/paramdialog.hxx2
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx16
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx4
-rw-r--r--editeng/source/outliner/outliner.cxx6
-rw-r--r--extensions/source/bibliography/toolbar.cxx2
-rw-r--r--extensions/source/bibliography/toolbar.hxx2
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx6
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx2
-rw-r--r--extensions/source/propctrlr/pcrcommon.hxx5
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx8
-rw-r--r--extensions/source/propctrlr/propertyeditor.cxx4
-rw-r--r--extensions/source/propctrlr/taborder.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx2
-rw-r--r--formula/source/ui/dlg/formula.cxx13
-rw-r--r--formula/source/ui/dlg/funcpage.cxx18
-rw-r--r--formula/source/ui/dlg/funcpage.hxx14
-rw-r--r--formula/source/ui/dlg/structpg.hxx2
-rw-r--r--fpicker/source/office/OfficeControlAccess.cxx10
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx10
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx10
-rw-r--r--include/sfx2/controlwrapper.hxx12
-rw-r--r--include/sfx2/itemconnect.hxx12
-rw-r--r--include/svtools/ctrlbox.hxx52
-rw-r--r--include/svtools/ivctrl.hxx2
-rw-r--r--include/svtools/svtabbx.hxx16
-rw-r--r--include/svtools/treelist.hxx5
-rw-r--r--include/svtools/treelistbox.hxx8
-rw-r--r--include/svtools/valueset.hxx4
-rw-r--r--include/svx/checklbx.hxx21
-rw-r--r--include/svx/ctredlin.hxx10
-rw-r--r--include/svx/dlgctrl.hxx12
-rw-r--r--include/svx/fontlb.hxx5
-rw-r--r--include/svx/frmdirlbox.hxx2
-rw-r--r--include/svx/galtheme.hxx12
-rw-r--r--include/svx/langbox.hxx14
-rw-r--r--include/svx/numfmtsh.hxx4
-rw-r--r--include/svx/svdpage.hxx5
-rw-r--r--include/svx/txencbox.hxx6
-rw-r--r--include/svx/xtable.hxx4
-rw-r--r--include/tools/contnr.hxx8
-rw-r--r--include/vcl/combobox.h7
-rw-r--r--include/vcl/combobox.hxx52
-rw-r--r--include/vcl/field.hxx10
-rw-r--r--include/vcl/lstbox.h9
-rw-r--r--include/vcl/lstbox.hxx64
-rw-r--r--padmin/source/prtsetup.cxx4
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx10
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx6
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx16
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx2
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx2
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx10
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx6
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx10
-rw-r--r--sc/source/ui/inc/acredlin.hxx6
-rw-r--r--sc/source/ui/inc/tpsubt.hxx1
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx6
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx2
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx1
-rw-r--r--sc/source/ui/optdlg/opredlin.cxx2
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx10
-rw-r--r--sc/source/ui/optdlg/tpview.cxx14
-rw-r--r--sc/source/ui/view/gridwin.cxx10
-rw-r--r--sd/source/core/anminfo.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx30
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx46
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx28
-rw-r--r--sd/source/ui/dlg/animobjs.cxx10
-rw-r--r--sd/source/ui/dlg/copydlg.cxx2
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx20
-rw-r--r--sd/source/ui/dlg/navigatr.cxx2
-rw-r--r--sd/source/ui/dlg/present.cxx4
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx16
-rw-r--r--sd/source/ui/dlg/tpaction.cxx8
-rw-r--r--sd/source/ui/dlg/tpoption.cxx8
-rw-r--r--sd/source/ui/func/fulinend.cxx2
-rw-r--r--sd/source/ui/func/fumorph.cxx4
-rw-r--r--sd/source/ui/view/outlview.cxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx20
-rw-r--r--sfx2/source/dialog/mgetempl.cxx2
-rw-r--r--sfx2/source/dialog/srchdlg.cxx4
-rw-r--r--starmath/source/dialog.cxx14
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx28
-rw-r--r--svtools/source/contnr/treelist.cxx8
-rw-r--r--svtools/source/contnr/treelistbox.cxx12
-rw-r--r--svtools/source/control/ctrlbox.cxx77
-rw-r--r--svtools/source/control/toolbarmenu.cxx14
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx8
-rw-r--r--svtools/source/uno/treecontrolpeer.hxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx2
-rw-r--r--svx/source/dialog/checklbx.cxx30
-rw-r--r--svx/source/dialog/ctredlin.cxx6
-rw-r--r--svx/source/dialog/dlgctrl.cxx12
-rw-r--r--svx/source/dialog/fontlb.cxx4
-rw-r--r--svx/source/dialog/frmdirlbox.cxx10
-rw-r--r--svx/source/dialog/langbox.cxx40
-rw-r--r--svx/source/dialog/txencbox.cxx18
-rw-r--r--svx/source/form/datanavi.cxx22
-rw-r--r--svx/source/form/filtnav.cxx12
-rw-r--r--svx/source/form/navigatortree.cxx6
-rw-r--r--svx/source/form/navigatortreemodel.cxx8
-rw-r--r--svx/source/form/tabwin.cxx4
-rw-r--r--svx/source/inc/datanavi.hxx2
-rw-r--r--svx/source/inc/fmexpl.hxx4
-rw-r--r--svx/source/items/numfmtsh.cxx2
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.cxx14
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.hxx6
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.cxx20
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx18
-rw-r--r--svx/source/tbxctrls/itemwin.cxx6
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx3
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx2
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx2
-rw-r--r--sw/inc/editsh.hxx6
-rw-r--r--sw/source/core/edit/edglbldc.cxx6
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx30
-rw-r--r--sw/source/ui/chrdlg/break.cxx6
-rw-r--r--sw/source/ui/config/optload.cxx34
-rw-r--r--sw/source/ui/config/optpage.cxx25
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx12
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx21
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx10
-rw-r--r--sw/source/ui/dochdl/gloshdl.cxx2
-rw-r--r--sw/source/ui/fldui/flddb.cxx13
-rw-r--r--sw/source/ui/fldui/flddinf.cxx16
-rw-r--r--sw/source/ui/fldui/flddinf.hxx4
-rw-r--r--sw/source/ui/fldui/flddok.cxx29
-rw-r--r--sw/source/ui/fldui/flddok.hxx4
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx17
-rw-r--r--sw/source/ui/fldui/fldpage.cxx2
-rw-r--r--sw/source/ui/fldui/fldpage.hxx12
-rw-r--r--sw/source/ui/fldui/fldref.cxx28
-rw-r--r--sw/source/ui/fldui/fldref.hxx6
-rw-r--r--sw/source/ui/fldui/fldvar.cxx64
-rw-r--r--sw/source/ui/fldui/fldvar.hxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx68
-rw-r--r--sw/source/ui/inc/bookmark.hxx10
-rw-r--r--sw/source/ui/inc/frmpage.hxx8
-rw-r--r--sw/source/ui/inc/optload.hxx2
-rw-r--r--sw/source/ui/inc/swlbox.hxx16
-rw-r--r--sw/source/ui/index/cnttab.cxx49
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx14
-rw-r--r--sw/source/ui/misc/bookmark.cxx24
-rw-r--r--sw/source/ui/misc/docfnote.cxx6
-rw-r--r--sw/source/ui/misc/linenum.cxx4
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx10
-rw-r--r--sw/source/ui/misc/pgfnote.cxx4
-rw-r--r--sw/source/ui/utlui/content.cxx14
-rw-r--r--sw/source/ui/utlui/glbltree.cxx46
-rw-r--r--tools/source/inet/inetmsg.cxx4
-rw-r--r--vcl/inc/ilstbox.hxx178
-rw-r--r--vcl/source/control/combobox.cxx130
-rw-r--r--vcl/source/control/field.cxx24
-rw-r--r--vcl/source/control/ilstbox.cxx280
-rw-r--r--vcl/source/control/lstbox.cxx86
-rw-r--r--xmlsecurity/source/dialogs/macrosecurity.cxx8
227 files changed, 1846 insertions, 1745 deletions
diff --git a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
index 59443696c46b..ce591813c6ab 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 a95acf6df1cd..84e9d5459ffb 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 d9fd0a50a71a..d5a5eaa82499 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 75fec91622a5..2db7e9bd08d6 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 f829093a2652..fb507bec6b6c 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 1c98157d2767..59d438cbb0b4 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 233bb6550408..c7e81a11daaf 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 633962f8e483..8f848a8f390b 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 f41616f51175..77c4c77accc3 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 b087aaf443c1..bee38f16e9eb 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 29d409e55a37..3a24e10cbbd5 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 23e362a8507f..0d79f33a4e11 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 b3b2e0a30dcd..aadceba8445a 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 464454c7140e..d6320a45f700 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 32db4205e34c..67903b4d29d1 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 d62be75e31c5..4b6bfb486bb1 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 d3938c39e41c..e219e18df2c0 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 73b60526b946..7192521be328 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 ae83b9deb4eb..9e1413f3762b 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 8ab1fad446cc..d8cca470ee68 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 4688403c92db..31acdbc87752 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 7bb862d55f5b..b3d34e3d46b9 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 47269744d1c4..6d5cbd7ee7f1 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 b7cbf674a43f..67706124bc16 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 aab701c13fd3..889fb6a3e6f1 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 98ddd2d4461a..c72f687e94f4 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 3348c38f7a27..5fac95aeaf9e 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 2079d2081947..63b7723b151d 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 ebe2cfc487dc..d802fb5dbd35 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 4fa9192bae4e..b804422077a1 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 5aefdcab5309..e9af92199590 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 a1895b115901..e8610a7cdd94 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 38610445292e..3334a2185998 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 5b0717ccdd2f..c2c707748968 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 fd7b9057aeac..869bf09d1d39 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 eafa40843a86..b6255128812e 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 e9a0bd2e6d3b..530741d34214 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();
@@ -1545,7 +1545,7 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet )
rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor );
m_pPreviewWin->Invalidate();
- sal_uInt16 nSelPos = m_pFontColorLB->GetEntryPos( aColor );
+ sal_Int32 nSelPos = m_pFontColorLB->GetEntryPos( aColor );
if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) )
nSelPos = m_pFontColorLB->GetEntryPos( m_aTransparentColorName );
@@ -1612,7 +1612,7 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox )
{
if ( m_pEmphasisLB == pBox )
{
- sal_uInt16 nEPos = m_pEmphasisLB->GetSelectEntryPos();
+ sal_Int32 nEPos = m_pEmphasisLB->GetSelectEntryPos();
sal_Bool bEnable = ( nEPos > 0 && nEPos != LISTBOX_ENTRY_NOTFOUND );
m_pPositionFT->Enable( bEnable );
m_pPositionLB->Enable( bEnable );
@@ -1625,7 +1625,7 @@ IMPL_LINK( SvxCharEffectsPage, SelectHdl_Impl, ListBox*, pBox )
}
else if ( m_pPositionLB != pBox )
{
- sal_uInt16 nUPos = m_pUnderlineLB->GetSelectEntryPos(),
+ sal_Int32 nUPos = m_pUnderlineLB->GetSelectEntryPos(),
nOPos = m_pOverlineLB->GetSelectEntryPos(),
nSPos = m_pStrikeoutLB->GetSelectEntryPos();
sal_Bool bUEnable = ( nUPos > 0 && nUPos != LISTBOX_ENTRY_NOTFOUND );
@@ -1745,7 +1745,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
if ( eUnderline != UNDERLINE_NONE )
{
- for ( sal_uInt16 i = 0; i < m_pUnderlineLB->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < m_pUnderlineLB->GetEntryCount(); ++i )
{
if ( (FontUnderline)(sal_uLong)m_pUnderlineLB->GetEntryData(i) == eUnderline )
{
@@ -1756,7 +1756,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
}
Color aColor = rItem.GetColor();
- sal_uInt16 nPos = m_pUnderlineColorLB->GetEntryPos( aColor );
+ sal_Int32 nPos = m_pUnderlineColorLB->GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
m_pUnderlineColorLB->SelectEntryPos( nPos );
@@ -1802,7 +1802,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
if ( eOverline != UNDERLINE_NONE )
{
- for ( sal_uInt16 i = 0; i < m_pOverlineLB->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < m_pOverlineLB->GetEntryCount(); ++i )
{
if ( (FontUnderline)(sal_uLong)m_pOverlineLB->GetEntryData(i) == eOverline )
{
@@ -1813,7 +1813,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
}
Color aColor = rItem.GetColor();
- sal_uInt16 nPos = m_pOverlineColorLB->GetEntryPos( aColor );
+ sal_Int32 nPos = m_pOverlineColorLB->GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
m_pOverlineColorLB->SelectEntryPos( nPos );
@@ -1859,7 +1859,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
if ( eStrikeout != STRIKEOUT_NONE )
{
- for ( sal_uInt16 i = 0; i < m_pStrikeoutLB->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < m_pStrikeoutLB->GetEntryCount(); ++i )
{
if ( (FontStrikeout)(sal_uLong)m_pStrikeoutLB->GetEntryData(i) == eStrikeout )
{
@@ -1915,13 +1915,13 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet )
rCJKFont.SetEmphasisMark( eMark );
rCTLFont.SetEmphasisMark( eMark );
- m_pEmphasisLB->SelectEntryPos( (sal_uInt16)( eMark & EMPHASISMARK_STYLE ) );
+ m_pEmphasisLB->SelectEntryPos( (sal_Int32)( eMark & EMPHASISMARK_STYLE ) );
eMark &= ~EMPHASISMARK_STYLE;
sal_uLong nEntryData = ( eMark == EMPHASISMARK_POS_ABOVE )
? CHRDLG_POSITION_OVER
: ( eMark == EMPHASISMARK_POS_BELOW ) ? CHRDLG_POSITION_UNDER : 0;
- for ( sal_uInt16 i = 0; i < m_pPositionLB->GetEntryCount(); i++ )
+ for ( sal_Int32 i = 0; i < m_pPositionLB->GetEntryCount(); i++ )
{
if ( nEntryData == (sal_uLong)m_pPositionLB->GetEntryData(i) )
{
@@ -2171,7 +2171,7 @@ sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
// Underline
sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
pOld = GetOldItem( rSet, SID_ATTR_CHAR_UNDERLINE );
- sal_uInt16 nPos = m_pUnderlineLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pUnderlineLB->GetSelectEntryPos();
FontUnderline eUnder = (FontUnderline)(sal_uLong)m_pUnderlineLB->GetEntryData( nPos );
if ( pOld )
@@ -2295,8 +2295,8 @@ sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
// Emphasis
nWhich = GetWhich( SID_ATTR_CHAR_EMPHASISMARK );
pOld = GetOldItem( rSet, SID_ATTR_CHAR_EMPHASISMARK );
- sal_uInt16 nMarkPos = m_pEmphasisLB->GetSelectEntryPos();
- sal_uInt16 nPosPos = m_pPositionLB->GetSelectEntryPos();
+ sal_Int32 nMarkPos = m_pEmphasisLB->GetSelectEntryPos();
+ sal_Int32 nPosPos = m_pPositionLB->GetSelectEntryPos();
FontEmphasisMark eMark = (FontEmphasisMark)nMarkPos;
if ( m_pPositionLB->IsEnabled() )
{
@@ -2333,7 +2333,7 @@ sal_Bool SvxCharEffectsPage::FillItemSet( SfxItemSet& rSet )
pOld = GetOldItem( rSet, SID_ATTR_CHAR_CASEMAP );
SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED;
bool bChecked = false;
- sal_uInt16 nCapsPos = m_pEffectsLB->GetSelectEntryPos();
+ sal_Int32 nCapsPos = m_pEffectsLB->GetSelectEntryPos();
if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND )
{
eCaseMap = (SvxCaseMap)nCapsPos;
@@ -3172,7 +3172,7 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet )
// Kerning
nWhich = GetWhich( SID_ATTR_CHAR_KERNING );
pOld = GetOldItem( rSet, SID_ATTR_CHAR_KERNING );
- sal_uInt16 nPos = m_pKerningLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pKerningLB->GetSelectEntryPos();
short nKerning = 0;
SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
@@ -3345,14 +3345,14 @@ void SvxCharTwoLinesPage::SelectCharacter( ListBox* pBox )
void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, sal_Bool bStart )
{
- sal_uInt16 nEntryPos = 0;
+ sal_Int32 nEntryPos = 0;
ListBox* pBox = bStart ? m_pStartBracketLB : m_pEndBracketLB;
if ( 0 == cBracket )
pBox->SelectEntryPos(0);
else
{
bool bFound = false;
- for ( sal_uInt16 i = 1; i < pBox->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 1; i < pBox->GetEntryCount(); ++i )
{
if ( (sal_uLong)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR )
{
@@ -3394,7 +3394,7 @@ IMPL_LINK_NOARG(SvxCharTwoLinesPage, TwoLinesHdl_Impl)
IMPL_LINK( SvxCharTwoLinesPage, CharacterMapHdl_Impl, ListBox*, pBox )
{
- sal_uInt16 nPos = pBox->GetSelectEntryPos();
+ sal_Int32 nPos = pBox->GetSelectEntryPos();
if ( CHRDLG_ENCLOSE_SPECIAL_CHAR == (sal_uLong)pBox->GetEntryData( nPos ) )
SelectCharacter( pBox );
else
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index fc33e7984d3a..e16950107a1e 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -363,7 +363,7 @@ sal_Bool SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs)
}
- sal_uInt16 nPos = m_pLbType->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbType->GetSelectEntryPos();
if( nPos != m_pLbType->GetSavedValue() )
{
if( nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -448,7 +448,7 @@ IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p )
if( p == m_pLbType )
{
- sal_uInt16 nPos = m_pLbType->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbType->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) );
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index bd92d55972f5..bc617adfc63a 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -307,7 +307,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs )
long nFieldUnit = (long) ( ( const SdrMeasureUnitItem& )rAttrs.
Get( SDRATTR_MEASUREUNIT ) ).GetValue();
- for( sal_uInt16 i = 0; i < m_pLbUnit->GetEntryCount(); ++i )
+ for( sal_Int32 i = 0; i < m_pLbUnit->GetEntryCount(); ++i )
{
if ( (sal_IntPtr)m_pLbUnit->GetEntryData( i ) == nFieldUnit )
{
@@ -489,7 +489,7 @@ sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs)
bModified = sal_True;
}
- sal_uInt16 nPos = m_pLbUnit->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbUnit->GetSelectEntryPos();
if( nPos != m_pLbUnit->GetSavedValue() )
{
if( nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -721,7 +721,7 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p )
if( p == m_pLbUnit )
{
- sal_uInt16 nPos = m_pLbUnit->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbUnit->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pLbUnit->GetEntryData( nPos );
@@ -796,10 +796,10 @@ void SvxMeasurePage::FillUnitLB()
sal_IntPtr nUnit = FUNIT_NONE;
OUString aStrMetric( m_pFtAutomatic->GetText());
- sal_uInt16 nPos = m_pLbUnit->InsertEntry( aStrMetric );
+ sal_Int32 nPos = m_pLbUnit->InsertEntry( aStrMetric );
m_pLbUnit->SetEntryData( nPos, (void*)nUnit );
- for( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
+ for( sal_uInt32 i = 0; i < aMetricArr.Count(); ++i )
{
aStrMetric = aMetricArr.GetStringByPos( i );
nUnit = aMetricArr.GetValue( i );
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index f66104725ec9..871c47cdfcf0 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -383,8 +383,8 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
const SfxPoolItem* pItem = NULL;
const SfxBoolItem* pAutoEntryAttr = NULL;
- sal_uInt16 nCatLbSelPos = 0;
- sal_uInt16 nFmtLbSelPos = 0;
+ sal_uInt16 nCatLbSelPos = 0;
+ sal_uInt16 nFmtLbSelPos = 0;
LanguageType eLangType = LANGUAGE_DONTKNOW;
std::vector<OUString> aFmtEntryList;
SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED;
@@ -530,7 +530,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
pNumFmtShell->GetInitSettings( nCatLbSelPos, eLangType, nFmtLbSelPos,
aFmtEntryList, aPrevString, pDummy );
- m_pLbCurrency->SelectEntryPos((sal_uInt16)pNumFmtShell->GetCurrencySymbol());
+ m_pLbCurrency->SelectEntryPos((sal_Int32)pNumFmtShell->GetCurrencySymbol());
nFixedCategory=nCatLbSelPos;
if(bOneAreaFlag)
@@ -848,7 +848,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt
for ( ; i < rEntries.size(); ++i )
{
aEntry = rEntries[i];
- aPrivCat=pNumFmtShell->GetCategory4Entry( static_cast<sal_uInt16>(i) );
+ aPrivCat=pNumFmtShell->GetCategory4Entry( static_cast<short>(i) );
if(aPrivCat!=CAT_TEXT)
{
Color* pPreviewColor = NULL;
@@ -881,13 +881,13 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt
void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sal_False*/ )
{
OUString theFormat = m_pEdFormat->GetText();
- sal_uInt16 nCurCategory = m_pLbCategory->GetSelectEntryPos();
- sal_uInt16 nCategory = nCurCategory;
+ sal_Int32 nCurCategory = m_pLbCategory->GetSelectEntryPos();
+ sal_uInt16 nCategory = static_cast<sal_uInt16>(nCurCategory);
sal_uInt16 nDecimals = 0;
sal_uInt16 nZeroes = 0;
bool bNegRed = false;
bool bThousand = false;
- sal_uInt16 nCurrencyPos =m_pLbCurrency->GetSelectEntryPos();
+ sal_Int32 nCurrencyPos =m_pLbCurrency->GetSelectEntryPos();
if(bOneAreaFlag)
nCurCategory=nFixedCategory;
@@ -901,7 +901,7 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sa
if(nCategory==CAT_CURRENCY)
{
sal_uInt16 nTstPos=pNumFmtShell->FindCurrencyFormat(theFormat);
- if(nCurrencyPos!=nTstPos && nTstPos!=(sal_uInt16)-1)
+ if(nCurrencyPos!=static_cast<sal_Int32>(nTstPos) && nTstPos!=(sal_uInt16)-1)
{
m_pLbCurrency->SelectEntryPos(nTstPos);
pNumFmtShell->SetCurrencySymbol(nTstPos);
@@ -1143,15 +1143,15 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb )
// Current category may be UserDefined with no format entries defined.
// And yes, m_pLbFormat is a SvxFontListBox with sal_uLong list positions,
- // implementation returns a LIST_APPEND if empty, comparison with
- // sal_uInt16 LISTBOX_ENTRY_NOTFOUND wouldn't match.
- if ( m_pLbFormat->GetSelectEntryPos() == LIST_APPEND )
+ // implementation returns a TREELIST_ENTRY_NOTFOUND if empty,
+ // comparison with sal_Int32 LISTBOX_ENTRY_NOTFOUND wouldn't match.
+ if ( m_pLbFormat->GetSelectEntryPos() == TREELIST_ENTRY_NOTFOUND )
pLb = m_pLbCategory; // continue with the current category selected
else
pLb = m_pLbFormat; // continue with the current format selected
}
- short nTmpCatPos;
+ sal_Int32 nTmpCatPos;
if(bOneAreaFlag)
{
@@ -1162,29 +1162,27 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb )
nTmpCatPos=m_pLbCategory->GetSelectEntryPos();
}
- sal_uInt16 nCurrencyPos=LISTBOX_ENTRY_NOTFOUND ;
-
if (nTmpCatPos==CAT_CURRENCY && pLb == m_pLbCurrency )
{
- nCurrencyPos = m_pLbCurrency->GetSelectEntryPos();
- pNumFmtShell->SetCurrencySymbol(nCurrencyPos);
+ sal_Int32 nCurrencyPos = m_pLbCurrency->GetSelectEntryPos();
+ pNumFmtShell->SetCurrencySymbol(static_cast<sal_uInt32>(nCurrencyPos));
}
// Format-ListBox ----------------------------------------------------
if (pLb == m_pLbFormat)
{
- sal_uInt16 nSelPos = (sal_uInt16) m_pLbFormat->GetSelectEntryPos();
+ sal_uLong nSelPos = m_pLbFormat->GetSelectEntryPos();
OUString aFormat = m_pLbFormat->GetSelectEntry();
OUString aComment;
- short nFmtLbSelPos = nSelPos;
+ short nFmtLbSelPos = static_cast<short>(nSelPos);
- aFormat=pNumFmtShell->GetFormat4Entry(nSelPos);
- aComment=pNumFmtShell->GetComment4Entry(nSelPos);
+ aFormat=pNumFmtShell->GetFormat4Entry(nFmtLbSelPos);
+ aComment=pNumFmtShell->GetComment4Entry(nFmtLbSelPos);
if(pNumFmtShell->GetUserDefined4Entry(nFmtLbSelPos))
{
- if(pNumFmtShell->GetComment4Entry(nFmtLbSelPos).isEmpty())
+ if(aComment.isEmpty())
{
aComment = m_pLbCategory->GetEntry(1);
}
@@ -1194,7 +1192,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb )
{
if(!m_pEdFormat->HasFocus()) m_pEdFormat->SetText( aFormat );
m_pFtComment->SetText(aComment);
- ChangePreviewText( nSelPos );
+ ChangePreviewText( static_cast<sal_uInt16>(nSelPos) );
}
REMOVE_DONTKNOW() // possibly UI-Enable
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 99c18f13002f..c8d612d161e8 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -177,7 +177,7 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent,
: SfxTabPage(pParent, "PickNumberingPage", "cui/ui/picknumberingpage.ui", rSet)
, pActNum(0)
, pSaveNum(0)
- , nActNumLvl(USHRT_MAX)
+ , nActNumLvl(SAL_MAX_UINT16)
, bModified(false)
, bPreset(false)
, nNumItemId(SID_ATTR_NUMBERING_RULE)
@@ -365,7 +365,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(Window* pParent,
: SfxTabPage(pParent, "PickBulletPage", "cui/ui/pickbulletpage.ui", rSet)
, pActNum(0)
, pSaveNum(0)
- , nActNumLvl(USHRT_MAX)
+ , nActNumLvl(SAL_MAX_UINT16)
, bModified(false)
, bPreset(false)
, nNumItemId(SID_ATTR_NUMBERING_RULE)
@@ -528,7 +528,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent,
: SfxTabPage(pParent, "PickOutlinePage", "cui/ui/pickoutlinepage.ui", rSet)
, pActNum(0)
, pSaveNum(0)
- , nActNumLvl(USHRT_MAX)
+ , nActNumLvl(SAL_MAX_UINT16)
, nNumItemId(SID_ATTR_NUMBERING_RULE)
, bModified(false)
, bPreset(false)
@@ -776,7 +776,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent,
: SfxTabPage(pParent, "PickGraphicPage", "cui/ui/pickgraphicpage.ui", rSet)
, pActNum(0)
, pSaveNum(0)
- , nActNumLvl(USHRT_MAX)
+ , nActNumLvl(SAL_MAX_UINT16)
, nNumItemId(SID_ATTR_NUMBERING_RULE)
, bModified(false)
, bPreset(false)
@@ -792,7 +792,7 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent,
// determine graphic name
GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
- sal_uInt16 i = 0;
+ size_t i = 0;
for(std::vector<OUString>::iterator it = aGrfNames.begin(); it != aGrfNames.end(); ++it, ++i)
{
m_pExamplesVS->InsertItem( i + 1, i);
@@ -971,12 +971,12 @@ void SvxNumOptionsTabPage::GetI18nNumbering( ListBox& rFmtLB, sal_uInt16 nDoNotR
// Extended numbering schemes present in the resource but not offered by
// the i18n framework per configuration must be removed from the listbox.
// Do not remove a special entry matching nDoNotRemove.
- const sal_uInt16 nDontRemove = 0xffff;
+ const sal_uInt16 nDontRemove = SAL_MAX_UINT16;
::std::vector< sal_uInt16> aRemove( rFmtLB.GetEntryCount(), nDontRemove);
for (size_t i=0; i<aRemove.size(); ++i)
{
sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)rFmtLB.GetEntryData(
- sal::static_int_cast< sal_uInt16 >(i));
+ sal::static_int_cast< sal_Int32 >(i));
if (nEntryData > NumberingType::CHARS_LOWER_LETTER_N && nEntryData != nDoNotRemove)
aRemove[i] = nEntryData;
}
@@ -990,7 +990,7 @@ void SvxNumOptionsTabPage::GetI18nNumbering( ListBox& rFmtLB, sal_uInt16 nDoNotR
if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N)
{
sal_Bool bInsert = sal_True;
- for(sal_uInt16 nEntry = 0; nEntry < rFmtLB.GetEntryCount(); nEntry++)
+ for(sal_Int32 nEntry = 0; nEntry < rFmtLB.GetEntryCount(); nEntry++)
{
sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)rFmtLB.GetEntryData(nEntry);
if(nEntryData == (sal_uInt16) nCurrent)
@@ -1003,7 +1003,7 @@ void SvxNumOptionsTabPage::GetI18nNumbering( ListBox& rFmtLB, sal_uInt16 nDoNotR
if(bInsert)
{
OUString aIdent = xInfo->getNumberingIdentifier( nCurrent );
- sal_uInt16 nPos = rFmtLB.InsertEntry(aIdent);
+ sal_Int32 nPos = rFmtLB.InsertEntry(aIdent);
rFmtLB.SetEntryData(nPos,(void*)(sal_uLong)nCurrent);
}
}
@@ -1013,7 +1013,7 @@ void SvxNumOptionsTabPage::GetI18nNumbering( ListBox& rFmtLB, sal_uInt16 nDoNotR
{
if (aRemove[i] != nDontRemove)
{
- sal_uInt16 nPos = rFmtLB.GetEntryPos( (void*)(sal_uLong)aRemove[i]);
+ sal_Int32 nPos = rFmtLB.GetEntryPos( (void*)(sal_uLong)aRemove[i]);
rFmtLB.RemoveEntry( nPos);
}
}
@@ -1032,7 +1032,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
, bHTMLMode(sal_False)
, bMenuButtonInitialized(sal_False)
, nBullet(0xff)
- , nActNumLvl(USHRT_MAX)
+ , nActNumLvl(SAL_MAX_UINT16)
, nNumItemId(SID_ATTR_NUMBERING_RULE)
{
get(m_pLevelLB, "levellb");
@@ -1150,7 +1150,7 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
- sal_uInt16 nTmpNumLvl = USHRT_MAX;
+ sal_uInt16 nTmpNumLvl = SAL_MAX_UINT16;
if(pExampleSet)
{
if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, false, &pItem))
@@ -1172,8 +1172,8 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet)
sal_uInt16 nMask = 1;
m_pLevelLB->SetUpdateMode(false);
m_pLevelLB->SetNoSelection();
- m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX);
- if(nActNumLvl != USHRT_MAX)
+ m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == SAL_MAX_UINT16);
+ if(nActNumLvl != SAL_MAX_UINT16)
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
@@ -1248,7 +1248,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
sal_uInt16 nMask = 1;
m_pLevelLB->SetUpdateMode(false);
m_pLevelLB->SetNoSelection();
- if(nActNumLvl == USHRT_MAX)
+ if(nActNumLvl == SAL_MAX_UINT16)
{
m_pLevelLB->SelectEntryPos( pSaveNum->GetLevelCount(), true);
}
@@ -1319,8 +1319,8 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
//remove types that are unsupported by Draw/Impress
if(!bContinuous)
{
- sal_uInt16 nFmtCount = m_pFmtLB->GetEntryCount();
- for(sal_uInt16 i = nFmtCount; i; i--)
+ sal_Int32 nFmtCount = m_pFmtLB->GetEntryCount();
+ for(sal_Int32 i = nFmtCount; i; i--)
{
sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)m_pFmtLB->GetEntryData(i - 1);
if(/*SVX_NUM_NUMBER_NONE == nEntryData ||*/
@@ -1332,14 +1332,14 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP))
{
sal_IntPtr nData = SVX_NUM_BITMAP|LINK_TOKEN;
- sal_uInt16 nPos = m_pFmtLB->GetEntryPos((void*)nData);
+ sal_Int32 nPos = m_pFmtLB->GetEntryPos((void*)nData);
if(LISTBOX_ENTRY_NOTFOUND != nPos)
m_pFmtLB->RemoveEntry(nPos);
}
else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP))
{
sal_IntPtr nData = SVX_NUM_BITMAP;
- sal_uInt16 nPos = m_pFmtLB->GetEntryPos((void*)nData);
+ sal_Int32 nPos = m_pFmtLB->GetEntryPos((void*)nData);
if(LISTBOX_ENTRY_NOTFOUND != nPos)
m_pFmtLB->RemoveEntry(nPos);
}
@@ -1359,8 +1359,8 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
// delete all kinds of numeric enumerations
if(pActNum->IsFeatureSupported(NUM_NO_NUMBERS))
{
- sal_uInt16 nFmtCount = m_pFmtLB->GetEntryCount();
- for(sal_uInt16 i = nFmtCount; i; i--)
+ sal_Int32 nFmtCount = m_pFmtLB->GetEntryCount();
+ for(sal_Int32 i = nFmtCount; i; i--)
{
sal_uInt16 nEntryData = (sal_uInt16)(sal_uLong)m_pFmtLB->GetEntryData(i - 1);
if( /*nEntryData >= SVX_NUM_CHARS_UPPER_LETTER &&*/ nEntryData <= SVX_NUM_NUMBER_NONE)
@@ -1394,7 +1394,7 @@ void SvxNumOptionsTabPage::InitControls()
sal_Int16 eFirstOrient = text::VertOrientation::NONE;
Size aFirstSize(0,0);
sal_uInt16 nMask = 1;
- sal_uInt16 nLvl = USHRT_MAX;
+ sal_uInt16 nLvl = SAL_MAX_UINT16;
sal_uInt16 nHighestLevel = 0;
OUString aEmptyStr;
@@ -1407,7 +1407,7 @@ void SvxNumOptionsTabPage::InitControls()
aNumFmtArr[i] = &pActNum->GetLevel(i);
bShowBullet &= aNumFmtArr[i]->GetNumberingType() == SVX_NUM_CHAR_SPECIAL;
bShowBitmap &= (aNumFmtArr[i]->GetNumberingType()&(~LINK_TOKEN)) == SVX_NUM_BITMAP;
- if(USHRT_MAX == nLvl)
+ if(SAL_MAX_UINT16 == nLvl)
{
nLvl = i;
sFirstCharFmt = aNumFmtArr[i]->GetCharFmtName();
@@ -1441,7 +1441,7 @@ void SvxNumOptionsTabPage::InitControls()
SwitchNumberType(bShowBullet ? 1 : bShowBitmap ? 2 : 0);
sal_uInt16 nNumberingType;
- if (nLvl != USHRT_MAX)
+ if (nLvl != SAL_MAX_UINT16)
nNumberingType = aNumFmtArr[nLvl]->GetNumberingType();
else
{
@@ -1463,7 +1463,7 @@ void SvxNumOptionsTabPage::InitControls()
m_pOrientLB->SetNoSelection();
else
m_pOrientLB->SelectEntryPos(
- sal::static_int_cast< sal_uInt16 >(eFirstOrient - 1));
+ sal::static_int_cast< sal_Int32 >(eFirstOrient - 1));
// no text::VertOrientation::NONE
if(bSameSize)
@@ -1498,7 +1498,7 @@ void SvxNumOptionsTabPage::InitControls()
}
if(bSameAdjust)
{
- sal_uInt16 nPos = 1; // centered
+ sal_Int32 nPos = 1; // centered
if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
@@ -1787,7 +1787,7 @@ void SvxNumOptionsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox )
{
- sal_uInt16 nPos = pBox->GetSelectEntryPos();
+ sal_Int32 nPos = pBox->GetSelectEntryPos();
nPos ++; // no VERT_NONE
sal_uInt16 nMask = 1;
@@ -1965,7 +1965,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, PopupActivateHdl_Impl)
Graphic aGraphic;
OUString sGrfName;
std::vector<OUString>::const_iterator it = aGrfNames.begin();
- for(sal_uInt16 i = 0; it != aGrfNames.end(); ++it, ++i)
+ for(size_t i = 0; it != aGrfNames.end(); ++it, ++i)
{
sGrfName = *it;
INetURLObject aObj(sGrfName);
@@ -2147,7 +2147,7 @@ IMPL_LINK( SvxNumOptionsTabPage, RatioHdl_Impl, CheckBox *, pBox )
IMPL_LINK_NOARG(SvxNumOptionsTabPage, CharFmtHdl_Impl)
{
bAutomaticCharStyles = sal_False;
- sal_uInt16 nEntryPos = m_pCharFmtLB->GetSelectEntryPos();
+ sal_Int32 nEntryPos = m_pCharFmtLB->GetSelectEntryPos();
OUString sEntry = m_pCharFmtLB->GetSelectEntry();
sal_uInt16 nMask = 1;
OUString aEmptyStr;
@@ -2191,7 +2191,7 @@ IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit )
aNumFmt.SetStart( (sal_uInt16)m_pStartED->GetValue() );
else //align
{
- sal_uInt16 nPos = m_pAlignLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pAlignLB->GetSelectEntryPos();
SvxAdjust eAdjust = SVX_ADJUST_CENTER;
if(nPos == 0)
eAdjust = SVX_ADJUST_LEFT;
@@ -2271,7 +2271,7 @@ SvxNumberingPreview::SvxNumberingPreview(Window* pParent, WinBits nWinBits)
, nPageWidth(0)
, pOutlineNames(0)
, bPosition(false)
- , nActLevel(USHRT_MAX)
+ , nActLevel(SAL_MAX_UINT16)
{
SetBorderStyle(WINDOW_BORDER_MONO);
}
@@ -2589,7 +2589,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent,
: SfxTabPage(pParent, "NumberingPositionPage", "cui/ui/numberingpositionpage.ui", rSet)
, pActNum(0)
, pSaveNum(0)
- , nActNumLvl(USHRT_MAX)
+ , nActNumLvl(SAL_MAX_UINT16)
, nNumItemId(SID_ATTR_NUMBERING_RULE)
, bModified(false)
, bPreset(false)
@@ -2628,7 +2628,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent,
m_pRelativeCB->Check();
m_pAlignLB->SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl));
m_pAlign2LB->SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl));
- for ( sal_uInt16 i = 0; i < m_pAlignLB->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < m_pAlignLB->GetEntryCount(); ++i )
{
m_pAlign2LB->InsertEntry( m_pAlignLB->GetEntry( i ) );
}
@@ -2718,7 +2718,7 @@ void SvxNumPositionTabPage::InitControls()
const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive &&
m_pRelativeCB->IsEnabled() && m_pRelativeCB->IsChecked();
const bool bSingleSelection = m_pLevelLB->GetSelectEntryCount() == 1 &&
- USHRT_MAX != nActNumLvl;
+ SAL_MAX_UINT16 != nActNumLvl;
m_pDistBorderMF->Enable( !bLabelAlignmentPosAndSpaceModeActive &&
( bSingleSelection || bRelative ) );
@@ -2738,14 +2738,14 @@ void SvxNumPositionTabPage::InitControls()
const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
sal_uInt16 nMask = 1;
- sal_uInt16 nLvl = USHRT_MAX;
+ sal_uInt16 nLvl = SAL_MAX_UINT16;
long nFirstBorderTextRelative = -1;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
aNumFmtArr[i] = &pActNum->GetLevel(i);
if(nActNumLvl & nMask)
{
- if(USHRT_MAX == nLvl)
+ if(SAL_MAX_UINT16 == nLvl)
nLvl = i;
if( i > nLvl)
@@ -2825,7 +2825,7 @@ void SvxNumPositionTabPage::InitControls()
if(bSameAdjust)
{
- sal_uInt16 nPos = 1; // centered
+ sal_Int32 nPos = 1; // centered
if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
@@ -2841,7 +2841,7 @@ void SvxNumPositionTabPage::InitControls()
if ( bSameLabelFollowedBy )
{
- sal_uInt16 nPos = 0; // LISTTAB
+ sal_Int32 nPos = 0; // LISTTAB
if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
nPos = 1;
@@ -2906,7 +2906,7 @@ void SvxNumPositionTabPage::InitControls()
void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- sal_uInt16 nTmpNumLvl = USHRT_MAX;
+ sal_uInt16 nTmpNumLvl = SAL_MAX_UINT16;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
if(pExampleSet)
{
@@ -2929,8 +2929,8 @@ void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet)
sal_uInt16 nMask = 1;
m_pLevelLB->SetUpdateMode(false);
m_pLevelLB->SetNoSelection();
- m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX);
- if(nActNumLvl != USHRT_MAX)
+ m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == SAL_MAX_UINT16);
+ if(nActNumLvl != SAL_MAX_UINT16)
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
if(nActNumLvl & nMask)
@@ -3015,7 +3015,7 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
sal_uInt16 nMask = 1;
m_pLevelLB->SetUpdateMode(false);
m_pLevelLB->SetNoSelection();
- if(nActNumLvl == USHRT_MAX)
+ if(nActNumLvl == SAL_MAX_UINT16)
{
m_pLevelLB->SelectEntryPos( pSaveNum->GetLevelCount(), true);
}
@@ -3133,7 +3133,7 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, EditModifyHdl_Impl)
{
SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
- const sal_uInt16 nPos = m_pAlignLB->IsVisible()
+ const sal_Int32 nPos = m_pAlignLB->IsVisible()
? m_pAlignLB->GetSelectEntryPos()
: m_pAlign2LB->GetSelectEntryPos();
SvxAdjust eAdjust = SVX_ADJUST_CENTER;
@@ -3262,7 +3262,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, MetricField *, pFld )
IMPL_LINK( SvxNumPositionTabPage, RelativeHdl_Impl, CheckBox *, pBox )
{
sal_Bool bOn = pBox->IsChecked();
- sal_Bool bSingleSelection = m_pLevelLB->GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
+ sal_Bool bSingleSelection = m_pLevelLB->GetSelectEntryCount() == 1 && SAL_MAX_UINT16 != nActNumLvl;
sal_Bool bSetValue = sal_False;
long nValue = 0;
if(bOn || bSingleSelection)
@@ -3307,7 +3307,7 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, LabelFollowedByHdl_Impl)
// determine value to be set at the chosen list levels
SvxNumberFormat::LabelFollowedBy eLabelFollowedBy = SvxNumberFormat::LISTTAB;
{
- const sal_uInt16 nPos = m_pLabelFollowedByLB->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pLabelFollowedByLB->GetSelectEntryPos();
if ( nPos == 1 )
{
eLabelFollowedBy = SvxNumberFormat::SPACE;
@@ -3320,7 +3320,7 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, LabelFollowedByHdl_Impl)
// set value at the chosen list levels
bool bSameListtabPos = true;
- sal_uInt16 nFirstLvl = USHRT_MAX;
+ sal_uInt16 nFirstLvl = SAL_MAX_UINT16;
sal_uInt16 nMask = 1;
for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); ++i )
{
@@ -3330,7 +3330,7 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, LabelFollowedByHdl_Impl)
aNumFmt.SetLabelFollowedBy( eLabelFollowedBy );
pActNum->SetLevel( i, aNumFmt );
- if ( nFirstLvl == USHRT_MAX )
+ if ( nFirstLvl == SAL_MAX_UINT16 )
{
nFirstLvl = i;
}
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index c6d944498419..c49ff5d012fb 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -521,7 +521,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet )
SetMetricValue( *m_pPaperWidthEdit, aPaperSize.Width(), SFX_MAPUNIT_100TH_MM );
m_pPaperSizeBox->Clear();
- sal_uInt16 nActPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nActPos = LISTBOX_ENTRY_NOTFOUND;
sal_uInt16 nAryId = RID_SVXSTRARY_PAPERSIZE_STD;
if ( ePaperStart != PAPER_A3 )
@@ -529,12 +529,12 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet )
ResStringArray aPaperAry( CUI_RES( nAryId ) );
sal_uInt32 nCnt = aPaperAry.Count();
- sal_uInt16 nUserPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nUserPos = LISTBOX_ENTRY_NOTFOUND;
for ( sal_uInt32 i = 0; i < nCnt; ++i )
{
OUString aStr = aPaperAry.GetString(i);
Paper eSize = (Paper)aPaperAry.GetValue(i);
- sal_uInt16 nPos = m_pPaperSizeBox->InsertEntry( aStr );
+ sal_Int32 nPos = m_pPaperSizeBox->InsertEntry( aStr );
m_pPaperSizeBox->SetEntryData( nPos, (void*)(sal_uLong)eSize );
if ( eSize == ePaper )
@@ -730,7 +730,7 @@ sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet )
// paper tray
nWhich = GetWhich( SID_ATTR_PAGE_PAPERBIN );
- sal_uInt16 nPos = m_pPaperTrayBox->GetSelectEntryPos();
+ sal_Int32 nPos = m_pPaperTrayBox->GetSelectEntryPos();
sal_uInt16 nBin = (sal_uInt16)(sal_uLong)m_pPaperTrayBox->GetEntryData( nPos );
pOld = GetOldItem( rSet, SID_ATTR_PAGE_PAPERBIN );
@@ -742,7 +742,7 @@ sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet )
nPos = m_pPaperSizeBox->GetSelectEntryPos();
Paper ePaper = (Paper)(sal_uLong)m_pPaperSizeBox->GetEntryData( nPos );
- const sal_uInt16 nOld = m_pPaperSizeBox->GetSavedValue();
+ const sal_Int32 nOld = m_pPaperSizeBox->GetSavedValue();
bool bChecked = m_pLandscapeBtn->IsChecked();
if ( PAPER_USER == ePaper )
@@ -920,7 +920,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl)
OUString aOldName = m_pPaperTrayBox->GetSelectEntry();
m_pPaperTrayBox->SetUpdateMode( false );
m_pPaperTrayBox->Clear();
- sal_uInt16 nEntryPos = m_pPaperTrayBox->InsertEntry(
+ sal_Int32 nEntryPos = m_pPaperTrayBox->InsertEntry(
EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) );
m_pPaperTrayBox->SetEntryData( nEntryPos,
(void*)(sal_uLong)PAPERBIN_PRINTER_SETTINGS );
@@ -950,7 +950,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl)
IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox )
{
- const sal_uInt16 nPos = pBox->GetSelectEntryPos();
+ const sal_Int32 nPos = pBox->GetSelectEntryPos();
Paper ePaper = (Paper)(sal_uLong)m_pPaperSizeBox->GetEntryData( nPos );
if ( ePaper != PAPER_USER )
@@ -1027,9 +1027,9 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeModify_Impl)
Size aSize( GetCoreValue( *m_pPaperWidthEdit, eUnit ),
GetCoreValue( *m_pPaperHeightEdit, eUnit ) );
Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, (MapUnit)eUnit, true );
- sal_uInt16 nEntryCount = m_pPaperSizeBox->GetEntryCount();
+ sal_Int32 nEntryCount = m_pPaperSizeBox->GetEntryCount();
- for ( sal_uInt16 i = 0; i < nEntryCount; ++i )
+ for ( sal_Int32 i = 0; i < nEntryCount; ++i )
{
Paper eTmp = (Paper)(sal_uLong)m_pPaperSizeBox->GetEntryData(i);
@@ -1386,7 +1386,7 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
// Inquiry whether the page margins are beyond the printing area.
// If not, ask user whether they shall be taken.
// If not, stay on the TabPage.
- sal_uInt16 nPos = m_pPaperSizeBox->GetSelectEntryPos();
+ sal_Int32 nPos = m_pPaperSizeBox->GetSelectEntryPos();
Paper ePaper = (Paper)(sal_uLong)m_pPaperSizeBox->GetEntryData( nPos );
if ( ePaper != PAPER_SCREEN_4_3 && ePaper != PAPER_SCREEN_16_9 && ePaper != PAPER_SCREEN_16_10 && IsMarginOutOfRange() )
@@ -1567,7 +1567,7 @@ void SvxPageDescPage::SetCollectionList(const std::vector<OUString> &aList)
OSL_ENSURE(!aList.empty(), "Empty string list");
sStandardRegister = aList[0];
- for( sal_uInt16 i = 1; i < aList.size(); i++ )
+ for( size_t i = 1; i < aList.size(); i++ )
m_pRegisterLB->InsertEntry(aList[i]);
m_pRegisterCB->Show();
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index af9ef3a0aba9..8df3564ad97e 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -207,7 +207,7 @@ sal_Bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet& rOutSet )
sal_Bool bModified = sal_False;
sal_uInt16 nWhich;
- sal_uInt16 nPos = m_pLineDist->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLineDist->GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != nPos &&
( nPos != m_pLineDist->GetSavedValue() ||
@@ -853,7 +853,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl( sal_Bool bAll )
m_pExampleWin->SetUpper( (sal_uInt16)m_pTopDist->Denormalize( m_pTopDist->GetValue( FUNIT_TWIP ) ) );
m_pExampleWin->SetLower( (sal_uInt16)m_pBottomDist->Denormalize( m_pBottomDist->GetValue( FUNIT_TWIP ) ) );
- sal_uInt16 nPos = m_pLineDist->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLineDist->GetSelectEntryPos();
switch ( nPos )
{
@@ -1093,7 +1093,7 @@ sal_Bool SvxParaAlignTabPage::FillItemSet( SfxItemSet& rOutSet )
SvxAdjust eOneWord = m_pExpandCB->IsChecked() ? SVX_ADJUST_BLOCK : SVX_ADJUST_LEFT;
- sal_uInt16 nLBPos = m_pLastLineLB->GetSelectEntryPos();
+ sal_Int32 nLBPos = m_pLastLineLB->GetSelectEntryPos();
SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
if ( 1 == nLBPos )
@@ -1148,7 +1148,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet )
sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST );
SfxItemState eItemState = rSet.GetItemState( _nWhich );
- sal_uInt16 nLBSelect = 0;
+ sal_Int32 nLBSelect = 0;
if ( eItemState >= SFX_ITEM_AVAILABLE )
{
const SvxAdjustItem& rAdj = (const SvxAdjustItem&)rSet.Get( _nWhich );
@@ -1286,7 +1286,7 @@ void SvxParaAlignTabPage::UpdateExample_Impl( sal_Bool bAll )
{
m_pExampleWin->SetAdjust( SVX_ADJUST_BLOCK );
SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
- sal_uInt16 nLBPos = m_pLastLineLB->GetSelectEntryPos();
+ sal_Int32 nLBPos = m_pLastLineLB->GetSelectEntryPos();
if(nLBPos == 1)
eLastBlock = SVX_ADJUST_CENTER;
else if(nLBPos == 2)
@@ -1659,8 +1659,8 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet )
if ( eBreak == SVX_BREAK_NONE )
m_pPageBreakBox->SetState( TRISTATE_FALSE );
- sal_uInt16 nType = 0; // selection position in break type ListBox : Page
- sal_uInt16 nPosition = 0; // selection position in break position ListBox : Before
+ sal_Int32 nType = 0; // selection position in break type ListBox : Page
+ sal_Int32 nPosition = 0; // selection position in break position ListBox : Before
switch ( eBreak )
{
case SVX_BREAK_PAGE_BEFORE:
@@ -2090,7 +2090,7 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakPosHdl_Impl, ListBox *, pListBox )
IMPL_LINK( SvxExtParagraphTabPage, PageBreakTypeHdl_Impl, ListBox *, pListBox )
{
//column break or break break after
- sal_uInt16 nBreakPos = m_pBreakPositionLB->GetSelectEntryPos();
+ sal_Int32 nBreakPos = m_pBreakPositionLB->GetSelectEntryPos();
if ( pListBox->GetSelectEntryPos() == 1 || 1 == nBreakPos)
{
m_pApplyCollBtn->SetState( TRISTATE_FALSE );
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index d68046387806..84aa0b2ec904 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -1384,7 +1384,7 @@ IMPL_LINK_NOARG(SvxSwPosSizeTabPage, ProtectHdl)
short SvxSwPosSizeTabPage::GetRelation(FrmMap *, ListBox &rRelationLB)
{
short nRel = 0;
- sal_uInt16 nPos = rRelationLB.GetSelectEntryPos();
+ sal_Int32 nPos = rRelationLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1433,7 +1433,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBo
sal_uInt16 SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB)
{
sal_uInt16 nMapPos = 0;
- sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos();
+ sal_Int32 nLBSelPos = rAlignLB.GetSelectEntryPos();
if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1470,7 +1470,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor,
long nX,
long nY)
{
- sal_uInt16 nPos = m_pVertLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pVertLB->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && m_pVMap )
{
m_nOldV = m_pVMap[nPos].nAlign;
@@ -1614,7 +1614,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor,
void SvxSwPosSizeTabPage::UpdateExample()
{
- sal_uInt16 nPos = m_pHoriLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pHoriLB->GetSelectEntryPos();
if ( m_pHMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_uInt16 nMapPos = GetMapPos(m_pHMap, *m_pHoriLB);
@@ -1675,7 +1675,7 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u
sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft);
OUString sEntry = m_aFramePosString.GetString(sStrId1);
- sal_uInt16 nPos = rLB.InsertEntry(sEntry);
+ sal_Int32 nPos = rLB.InsertEntry(sEntry);
rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]);
if (pMap[_nMapPos].nAlign == nAlign)
sSelEntry = sEntry;
@@ -1692,7 +1692,7 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u
if (!rLB.GetSelectEntryCount())
{
- for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++)
+ for (sal_Int32 i = 0; i < rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i);
if (pEntry->nLBRelation == LB_REL_CHAR) // Default
@@ -1734,7 +1734,7 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u
SvxSwFramePosString::StringId sStrId1 = m_pHoriMirrorCB->IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId;
sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft);
OUString sEntry = m_aFramePosString.GetString(sStrId1);
- sal_uInt16 nPos = rLB.InsertEntry(sEntry);
+ sal_Int32 nPos = rLB.InsertEntry(sEntry);
rLB.SetEntryData(nPos, &aRelationMap[nRelPos]);
if (sSelEntry.isEmpty() && aRelationMap[nRelPos].nRelation == nRel)
sSelEntry = sEntry;
@@ -1767,7 +1767,7 @@ sal_uLong SvxSwPosSizeTabPage::FillRelLB(FrmMap *pMap, sal_uInt16 nMapPos, sal_u
break;
}
- for (sal_uInt16 i = 0; i < rLB.GetEntryCount(); i++)
+ for (sal_Int32 i = 0; i < rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)rLB.GetEntryData(i);
if (pEntry->nRelation == nRel)
@@ -1869,7 +1869,7 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView )
if( m_aAnchorPos != Point(0,0) ) // -> Writer
{
- for( sal_uInt16 i = 1; i < rMarkList.GetMarkCount(); i++ )
+ for( sal_uLong i = 1; i < rMarkList.GetMarkCount(); i++ )
{
pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
if( m_aAnchorPos != pObj->GetAnchorPos() )
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 6ce623593122..ae4706eae637 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -494,9 +494,9 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn )
nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MAP_100TH_MM );
}
const long nReal = nVal - nOffset;
- sal_uInt16 nSize = m_pTabBox->GetEntryCount();
+ sal_Int32 nSize = m_pTabBox->GetEntryCount();
- sal_uInt16 i;
+ sal_Int32 i;
for( i = 0; i < nSize; i++ )
{
if ( nReal < aNewTabs[i].GetTabPos() )
@@ -533,7 +533,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn )
IMPL_LINK_NOARG(SvxTabulatorTabPage, DelHdl_Impl)
{
- sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue() );
+ sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue() );
if ( nPos == COMBOBOX_ENTRY_NOTFOUND )
return 0;
@@ -612,7 +612,7 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox )
}
aAktTab.GetAdjustment() = eAdj;
- sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
+ sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
@@ -643,7 +643,7 @@ IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox )
cFill = '-';
aAktTab.GetFill() = cFill;
- sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
+ sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
@@ -662,7 +662,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit )
if ( !aChar.isEmpty() )
aAktTab.GetFill() = aChar[0];
- const sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit);
+ const sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit);
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
aNewTabs.Remove( nPos );
@@ -679,7 +679,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit )
if ( !aChar.isEmpty() && ( aChar[0] >= ' '))
aAktTab.GetDecimal() = aChar[0];
- sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
+ sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
aNewTabs.Remove( nPos );
@@ -692,7 +692,7 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit )
IMPL_LINK_NOARG(SvxTabulatorTabPage, SelectHdl_Impl)
{
- sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
+ sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
aAktTab = aNewTabs[nPos];
@@ -706,7 +706,7 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, SelectHdl_Impl)
IMPL_LINK_NOARG(SvxTabulatorTabPage, ModifyHdl_Impl)
{
- sal_uInt16 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
+ sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
aAktTab = aNewTabs[nPos];
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 3bdb1cd4c90f..139c3d179b55 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -151,7 +151,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
if( pItem )
{
eAniKind = ( ( const SdrTextAniKindItem* )pItem )->GetValue();
- m_pLbEffect->SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eAniKind) );
+ m_pLbEffect->SelectEntryPos( sal::static_int_cast< sal_Int32 >(eAniKind) );
}
else
m_pLbEffect->SetNoSelection();
@@ -335,7 +335,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
{
sal_Bool bModified = sal_False;
- sal_uInt16 nPos;
+ sal_Int32 nPos;
TriState eState;
// animation type
@@ -459,7 +459,7 @@ SfxTabPage* SvxTextAnimationPage::Create( Window* pWindow,
IMPL_LINK_NOARG(SvxTextAnimationPage, SelectEffectHdl_Impl)
{
- sal_uInt16 nPos = m_pLbEffect->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbEffect->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
eAniKind = (SdrTextAniKind) nPos;
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 0789d85ab551..354b7ab118d4 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -413,7 +413,7 @@ void SvxTransparenceTabPage::Reset(const SfxItemSet& rAttrs)
// transparence gradient
const XGradient& rGradient = ((XFillFloatTransparenceItem*)pGradientItem)->GetGradientValue();
XGradientStyle eXGS(rGradient.GetGradientStyle());
- m_pLbTrgrGradientType->SelectEntryPos(sal::static_int_cast< sal_uInt16 >(eXGS));
+ m_pLbTrgrGradientType->SelectEntryPos(sal::static_int_cast< sal_Int32 >(eXGS));
m_pMtrTrgrAngle->SetValue(rGradient.GetAngle() / 10);
m_pMtrTrgrBorder->SetValue(rGradient.GetBorder());
m_pMtrTrgrCenterX->SetValue(rGradient.GetXOffset());
@@ -769,7 +769,7 @@ void SvxAreaTabPage::Construct()
void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
{
- sal_uInt16 nCount;
+ sal_Int32 nCount;
SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,false);
SFX_ITEMSET_ARG (&rSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,false);
if (pPageTypeItem)
@@ -782,7 +782,7 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
if( pColorList.is() )
{
- sal_uInt16 _nPos = 0;
+ sal_Int32 _nPos = 0;
if( *pnBitmapListState )
{
@@ -918,7 +918,7 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet )
{
if( nDlgType == 0 ) // area dialog
{
- sal_uInt16 nPosOrig = nPos;
+ sal_Int32 nPosOrig = nPos;
XFillStyle eStyle = (XFillStyle) m_pTypeLB->GetSelectEntryPos();
switch( eStyle )
{
@@ -968,7 +968,7 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet )
sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
{
- sal_uInt16 _nPos;
+ sal_Int32 _nPos;
sal_Bool bModified = sal_False;
if( nDlgType != 0 || *pbAreaTP )
@@ -1413,7 +1413,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs )
{
eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rAttrs.
Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() );
- m_pTypeLB->SelectEntryPos( sal::static_int_cast< sal_uInt16 >( eXFS ) );
+ m_pTypeLB->SelectEntryPos( sal::static_int_cast< sal_Int32 >( eXFS ) );
if (SFX_ITEM_DONTCARE != rAttrs.GetItemState(XATTR_FILLCOLOR))
{
@@ -1816,7 +1816,7 @@ void SvxAreaTabPage::ClickColorHdl_Impl()
IMPL_LINK_NOARG(SvxAreaTabPage, ModifyColorHdl_Impl)
{
const SfxPoolItem* pPoolItem = NULL;
- sal_uInt16 _nPos = m_pLbColor->GetSelectEntryPos();
+ sal_Int32 _nPos = m_pLbColor->GetSelectEntryPos();
m_pLbHatchBckgrdColor->SelectEntryPos( _nPos );
if( _nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -1887,7 +1887,7 @@ void SvxAreaTabPage::ClickGradientHdl_Impl()
IMPL_LINK_NOARG(SvxAreaTabPage, ModifyGradientHdl_Impl)
{
const SfxPoolItem* pPoolItem = NULL;
- sal_uInt16 _nPos = m_pLbGradient->GetSelectEntryPos();
+ sal_Int32 _nPos = m_pLbGradient->GetSelectEntryPos();
if( _nPos != LISTBOX_ENTRY_NOTFOUND )
{
// fill ItemSet and pass it on to aCtlXRectPreview
@@ -1958,7 +1958,7 @@ void SvxAreaTabPage::ClickHatchingHdl_Impl()
IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchingHdl_Impl)
{
const SfxPoolItem* pPoolItem = NULL;
- sal_uInt16 _nPos = m_pLbHatching->GetSelectEntryPos();
+ sal_Int32 _nPos = m_pLbHatching->GetSelectEntryPos();
if( _nPos != LISTBOX_ENTRY_NOTFOUND )
{
// fill ItemSet and pass it on to aCtlXRectPreview
@@ -1986,7 +1986,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchingHdl_Impl)
IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl)
{
const SfxPoolItem* pPoolItem = NULL;
- sal_uInt16 _nPos = m_pLbHatchBckgrdColor->GetSelectEntryPos();
+ sal_Int32 _nPos = m_pLbHatchBckgrdColor->GetSelectEntryPos();
m_pLbColor->SelectEntryPos( _nPos );
if( _nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -2085,7 +2085,7 @@ void SvxAreaTabPage::ClickBitmapHdl_Impl()
IMPL_LINK_NOARG(SvxAreaTabPage, ModifyBitmapHdl_Impl)
{
const SfxPoolItem* pPoolItem = NULL;
- sal_uInt16 _nPos = m_pLbBitmap->GetSelectEntryPos();
+ sal_Int32 _nPos = m_pLbBitmap->GetSelectEntryPos();
if( _nPos != LISTBOX_ENTRY_NOTFOUND )
{
// fill ItemSet and pass it on to aCtlXRectPreview
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index daf46ac8847c..9602ab38d91a 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -136,8 +136,8 @@ void SvxBitmapTabPage::Construct()
void SvxBitmapTabPage::ActivatePage( const SfxItemSet& )
{
- sal_uInt16 nPos;
- sal_uInt16 nCount;
+ sal_Int32 nPos;
+ sal_Int32 nCount;
if( nDlgType == 0 ) // area dialog
{
@@ -232,7 +232,7 @@ sal_Bool SvxBitmapTabPage::FillItemSet( SfxItemSet& _rOutAttrs )
if(PT_BITMAP == *pPageType)
{
_rOutAttrs.Put(XFillStyleItem(XFILL_BITMAP));
- sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbBitmaps->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
@@ -419,7 +419,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl)
long SvxBitmapTabPage::CheckChanges_Impl()
{
- sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbBitmaps->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if( bBmpChanged )
@@ -661,7 +661,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
{
- sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbBitmaps->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -726,7 +726,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl_Impl)
{
- sal_uInt16 nPos = m_pLbBitmaps->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbBitmaps->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index d4dfbdc3cd6f..6f242a794b65 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -279,12 +279,12 @@ void SvxColorTabPage::Update(bool bLoaded)
struct SvxColorTabPageShadow
{
sal_uInt16 nUnknownType;
- sal_uInt16 nUnknownPos;
+ sal_Int32 nUnknownPos;
sal_Bool bIsAreaTP;
sal_uInt16 nChangeType;
SvxColorTabPageShadow()
: nUnknownType( COLORPAGE_UNKNOWN )
- , nUnknownPos( COLORPAGE_UNKNOWN )
+ , nUnknownPos( LISTBOX_ENTRY_NOTFOUND )
, bIsAreaTP( sal_False )
, nChangeType( 0 )
{
@@ -493,7 +493,7 @@ long SvxColorTabPage::CheckChanges_Impl()
if (eCM != CM_RGB)
ConvertColorValues (aTmpColor, CM_RGB);
- sal_uInt16 nPos = m_pLbColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
Color aColor = pColorList->GetColor( nPos )->GetColor();
@@ -564,7 +564,7 @@ sal_Bool SvxColorTabPage::FillItemSet( SfxItemSet& rSet )
OUString aString;
Color aColor;
- sal_uInt16 nPos = m_pLbColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
aColor = pColorList->GetColor( nPos )->GetColor();
@@ -608,7 +608,7 @@ void SvxColorTabPage::Reset( const SfxItemSet& rSet )
// set color model
OUString aStr = GetUserData();
- m_pLbColorModel->SelectEntryPos( (sal_uInt16) aStr.toInt32() );
+ m_pLbColorModel->SelectEntryPos( aStr.toInt32() );
ChangeColorHdl_Impl( this );
SelectColorModelHdl_Impl( this );
@@ -742,7 +742,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl)
IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl)
{
- sal_uInt16 nPos = m_pLbColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -862,7 +862,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickWorkOnHdl_Impl)
IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl)
{
- sal_uInt16 nPos = m_pLbColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -899,7 +899,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl)
IMPL_LINK_NOARG(SvxColorTabPage, SelectColorLBHdl_Impl)
{
- sal_uInt16 nPos = m_pLbColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
m_pValSetColorList->SelectItem( nPos + 1 );
@@ -922,7 +922,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectColorLBHdl_Impl)
IMPL_LINK_NOARG(SvxColorTabPage, SelectValSetHdl_Impl)
{
- sal_uInt16 nPos = m_pValSetColorList->GetSelectItemId();
+ sal_Int32 nPos = m_pValSetColorList->GetSelectItemId();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
m_pLbColor->SelectEntryPos( nPos - 1 );
@@ -1059,7 +1059,7 @@ long SvxColorTabPage::ChangeColorHdl_Impl( void* )
// for( long i = 0; i < nCount; i++ )
// {
// pColorEntry = pColorList->GetColor( i );
-// rVs.InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() );
+// rVs.InsertItem( i + 1, pColorEntry->GetColor(), pColorEntry->GetName() );
// }
//}
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 3fd8650c558c..def2fa7bfa0f 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -151,8 +151,8 @@ void SvxGradientTabPage::Construct()
void SvxGradientTabPage::ActivatePage( const SfxItemSet& )
{
- sal_uInt16 nPos;
- sal_uInt16 nCount;
+ sal_Int32 nPos;
+ sal_Int32 nCount;
if( nDlgType == 0 ) // area dialog
{
@@ -252,7 +252,7 @@ long SvxGradientTabPage::CheckChanges_Impl()
(sal_uInt16) m_pMtrColorFrom->GetValue(),
(sal_uInt16) m_pMtrColorTo->GetValue() );
- sal_uInt16 nPos = m_pLbGradients->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbGradients->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
XGradient aGradient = pGradientList->GetGradient( nPos )->GetGradient();
@@ -314,7 +314,7 @@ sal_Bool SvxGradientTabPage::FillItemSet( SfxItemSet& rSet )
XGradient* pXGradient = NULL;
OUString aString;
- sal_uInt16 nPos = m_pLbGradients->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbGradients->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
pXGradient = new XGradient( pGradientList->GetGradient( nPos )->GetGradient() );
@@ -509,7 +509,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl)
IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl)
{
- sal_uInt16 nPos = m_pLbGradients->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbGradients->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -579,7 +579,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl)
IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl)
{
- sal_uInt16 nPos = m_pLbGradients->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbGradients->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -798,7 +798,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ChangeGradientHdl_Impl)
XGradientStyle eXGS = pGradient->GetGradientStyle();
m_pLbGradientType->SelectEntryPos(
- sal::static_int_cast< sal_uInt16 >( eXGS ) );
+ sal::static_int_cast< sal_Int32 >( eXGS ) );
// if the entry is not in the listbox,
// colors are added temporarily
m_pLbColorFrom->SetNoSelection();
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 711a782cc3af..374c4c77864b 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -147,8 +147,8 @@ void SvxHatchTabPage::Construct()
void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
{
- sal_uInt16 nPos;
- sal_uInt16 nCount;
+ sal_Int32 nPos;
+ sal_Int32 nCount;
if( nDlgType == 0 ) // area dialog
{
@@ -270,7 +270,7 @@ long SvxHatchTabPage::CheckChanges_Impl()
delete aMessDlg;
}
- sal_uInt16 nPos = m_pLbHatchings->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbHatchings->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
*pPos = nPos;
return 0L;
@@ -288,7 +288,7 @@ sal_Bool SvxHatchTabPage::FillItemSet( SfxItemSet& rSet )
XHatch* pXHatch = NULL;
OUString aString;
- sal_uInt16 nPos = m_pLbHatchings->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbHatchings->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
pXHatch = new XHatch( pHatchingList->GetHatch( nPos )->GetHatch() );
@@ -410,7 +410,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ChangeHatchHdl_Impl)
if( pHatch )
{
m_pLbLineType->SelectEntryPos(
- sal::static_int_cast< sal_uInt16 >( pHatch->GetHatchStyle() ) );
+ sal::static_int_cast< sal_Int32 >( pHatch->GetHatchStyle() ) );
// if the entry is not in the listbox
// the color is added temporarily
m_pLbLineColor->SetNoSelection();
@@ -553,7 +553,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl)
IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl)
{
- sal_uInt16 nPos = m_pLbHatchings->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbHatchings->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -623,7 +623,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl)
IMPL_LINK_NOARG(SvxHatchTabPage, ClickDeleteHdl_Impl)
{
- sal_uInt16 nPos = m_pLbHatchings->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbHatchings->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index e6f886f0c536..883d7e55dae2 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -494,7 +494,7 @@ void SvxLineTabPage::SymbolSelected(MenuButton* pButton)
void SvxLineTabPage::FillListboxes()
{
// Line styles
- sal_uInt16 nOldSelect = m_pLbLineStyle->GetSelectEntryPos();
+ sal_Int32 nOldSelect = m_pLbLineStyle->GetSelectEntryPos();
// aLbLineStyle.FillStyles();
m_pLbLineStyle->Fill( pDashList );
m_pLbLineStyle->SelectEntryPos( nOldSelect );
@@ -522,8 +522,8 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
SetPageType(pPageTypeItem->GetValue());
if( nDlgType == 0 && pDashList.is() )
{
- sal_uInt16 nPos;
- sal_uInt16 nCount;
+ sal_Int32 nPos;
+ sal_Int32 nCount;
// Dash list
if( ( *pnDashListState & CT_MODIFIED ) ||
@@ -617,7 +617,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
if( *pnColorListState & CT_CHANGED )
pColorList = ( (SvxLineTabDialog*) GetParentDialog() )->GetNewColorList();
// aLbColor
- sal_uInt16 nColorPos = m_pLbColor->GetSelectEntryPos();
+ sal_Int32 nColorPos = m_pLbColor->GetSelectEntryPos();
m_pLbColor->Clear();
m_pLbColor->Fill( pColorList );
nCount = m_pLbColor->GetEntryCount();
@@ -652,7 +652,7 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet )
{
nPageType = 1; // possibly for extensions
*pPosDashLb = m_pLbLineStyle->GetSelectEntryPos() - 2;// First entry SOLID!!!
- sal_uInt16 nPos = m_pLbStartStyle->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbStartStyle->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
nPos--;
*pPosLineEndLb = nPos;
@@ -669,7 +669,7 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet )
sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
{
const SfxPoolItem* pOld = NULL;
- sal_uInt16 nPos;
+ sal_Int32 nPos;
sal_Bool bModified = sal_False;
// To prevent modifications to the list, we do not set other page's items.
@@ -961,7 +961,7 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
sal_Bool SvxLineTabPage::FillXLSet_Impl()
{
- sal_uInt16 nPos;
+ sal_Int32 nPos;
if( m_pLbLineStyle->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
{
@@ -1279,7 +1279,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
if(rItemPolygon == rEntryPolygon)
{
// select this entry
- m_pLbStartStyle->SelectEntryPos((sal_uInt16)a + 1);
+ m_pLbStartStyle->SelectEntryPos(a + 1);
bSelected = sal_True;
}
}
@@ -1311,7 +1311,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
if(rItemPolygon == rEntryPolygon)
{
// select this entry
- m_pLbEndStyle->SelectEntryPos((sal_uInt16)a + 1);
+ m_pLbEndStyle->SelectEntryPos(a + 1);
bSelected = sal_True;
}
}
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index f2d9ab92b182..6f63b82680fb 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -248,7 +248,7 @@ void SvxLineDefTabPage::CheckChanges_Impl()
- sal_uInt16 nPos = m_pLbLineStyles->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbLineStyles->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
*pPosDashLb = nPos;
@@ -612,7 +612,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl)
IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl)
{
- sal_uInt16 nPos = m_pLbLineStyles->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbLineStyles->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -684,7 +684,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl)
IMPL_LINK_NOARG(SvxLineDefTabPage, ClickDeleteHdl_Impl)
{
- sal_uInt16 nPos = m_pLbLineStyles->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbLineStyles->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -898,7 +898,7 @@ void SvxLineDefTabPage::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- sal_uInt16 nOldSelect = m_pLbLineStyles->GetSelectEntryPos();
+ sal_Int32 nOldSelect = m_pLbLineStyles->GetSelectEntryPos();
m_pLbLineStyles->Clear();
m_pLbLineStyles->Fill( pDashList );
m_pLbLineStyles->SelectEntryPos( nOldSelect );
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 946ef7635f1f..7e38307ed807 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -181,7 +181,7 @@ int SvxLineEndDefTabPage::DeactivatePage( SfxItemSet* _pSet )
void SvxLineEndDefTabPage::CheckChanges_Impl()
{
- sal_uInt16 nPos = m_pLbLineEnds->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbLineEnds->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -308,7 +308,7 @@ long SvxLineEndDefTabPage::ChangePreviewHdl_Impl( void* )
IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl)
{
- sal_uInt16 nPos = m_pLbLineEnds->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbLineEnds->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -506,7 +506,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl)
IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickDeleteHdl_Impl)
{
- sal_uInt16 nPos = m_pLbLineEnds->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbLineEnds->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -660,7 +660,7 @@ void SvxLineEndDefTabPage::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- sal_uInt16 nOldSelect = m_pLbLineEnds->GetSelectEntryPos();
+ sal_Int32 nOldSelect = m_pLbLineEnds->GetSelectEntryPos();
m_pLbLineEnds->Clear();
m_pLbLineEnds->Fill( pLineEndList );
m_pLbLineEnds->SelectEntryPos( nOldSelect );
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 1899cef2cc6c..98378f102172 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -182,8 +182,8 @@ void SvxShadowTabPage::Construct()
void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet )
{
- sal_uInt16 nPos;
- sal_uInt16 nCount;
+ sal_Int32 nPos;
+ sal_Int32 nCount;
SFX_ITEMSET_ARG (&rSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,false);
if (pPageTypeItem)
@@ -319,7 +319,7 @@ sal_Bool SvxShadowTabPage::FillItemSet( SfxItemSet& rAttrs )
}
// ShadowColor
- sal_uInt16 nPos = m_pLbShadowColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbShadowColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND &&
nPos != m_pLbShadowColor->GetSavedValue() )
{
@@ -497,7 +497,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl)
else
rXFSet.Put( XFillStyleItem( XFILL_NONE ) );
- sal_uInt16 nPos = m_pLbShadowColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbShadowColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
rXFSet.Put( XFillColorItem( OUString(), m_pLbShadowColor->GetSelectEntryColor() ) );
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 273e5530ca5b..de119aab1b82 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -736,7 +736,7 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine
Reference<XNameAccess> xSubElements(_xContainer->getByName(*pIter),UNO_QUERY);
if ( xSubElements.is() )
{
- pEntry = pList->InsertEntry( *pIter, _pParent, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
+ pEntry = pList->InsertEntry( *pIter, _pParent, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
getBorderWin().getView()->getAppController().containerFound( Reference< XContainer >( xSubElements, UNO_QUERY ) );
fillNames( xSubElements, _eType, _nImageId, pEntry );
}
@@ -868,7 +868,7 @@ SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUS
if ( xContainer.is() )
{
const sal_Int32 nFolderIndicator = lcl_getFolderIndicatorForType( _eType );
- pRet = pTreeView->InsertEntry( _rName, pEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
+ pRet = pTreeView->InsertEntry( _rName, pEntry, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) );
fillNames( xContainer, _eType, nImageId, pRet );
}
else
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 965ec6e594c4..0a439b14be61 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2088,7 +2088,7 @@ void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _r
m_pTreeView->getListBox().InsertEntry(
_rQueryName, _rQueryImage, _rQueryImage, pDatasourceEntry,
- sal_True /*ChildrenOnDemand*/, LIST_APPEND, pQueriesData );
+ sal_True /*ChildrenOnDemand*/, TREELIST_APPEND, pQueriesData );
}
// the child for the tables container
@@ -2098,7 +2098,7 @@ void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _r
m_pTreeView->getListBox().InsertEntry(
_rTableName, _rTableImage, _rTableImage, pDatasourceEntry,
- sal_True /*ChildrenOnDemand*/, LIST_APPEND, pTablesData );
+ sal_True /*ChildrenOnDemand*/, TREELIST_APPEND, pTablesData );
}
}
@@ -2163,7 +2163,7 @@ SvTreeListEntry* SbaTableQueryBrowser::implAppendEntry( SvTreeListEntry* _pParen
Image aImage;
pImageProvider->getImages( _rName, getDatabaseObjectType( _eEntryType ), aImage );
- SvTreeListEntry* pNewEntry = m_pTreeView->getListBox().InsertEntry( _rName, _pParent, _eEntryType == etQueryContainer , LIST_APPEND, _pUserData );
+ SvTreeListEntry* pNewEntry = m_pTreeView->getListBox().InsertEntry( _rName, _pParent, _eEntryType == etQueryContainer , TREELIST_APPEND, _pUserData );
m_pTreeView->getListBox().SetExpandedEntryBmp( pNewEntry, aImage );
m_pTreeView->getListBox().SetCollapsedEntryBmp( pNewEntry, aImage );
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 0eb4eadb49c0..241d44df6fd9 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1431,7 +1431,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if(m_pType)
{
- sal_uInt16 nPos = pFieldType.get() ? m_pType->GetEntryPos(OUString(pFieldDescr->getTypeInfo()->aUIName)) : LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = pFieldType.get() ? m_pType->GetEntryPos(OUString(pFieldDescr->getTypeInfo()->aUIName)) : LISTBOX_ENTRY_NOTFOUND;
if(nPos == LISTBOX_ENTRY_NOTFOUND)
{
const OTypeInfoMap* pMap = getTypeInfo();
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 6ec27a9266a0..080aaa4cbe0b 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -240,7 +240,7 @@ namespace dbaui
OUString sDecodedURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
- sal_uInt16 nPos = InsertEntry( sTitle );
+ sal_Int32 nPos = InsertEntry( sTitle );
m_aURLs.insert( MapIndexToStringPair::value_type( nPos, StringPair( sDecodedURL, sFilter ) ) );
}
}
@@ -254,7 +254,7 @@ namespace dbaui
OUString OpenDocumentListBox::GetSelectedDocumentURL() const
{
OUString sURL;
- sal_uInt16 nSelected = GetSelectEntryPos();
+ sal_Int32 nSelected = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != GetSelectEntryPos() )
sURL = impl_getDocumentAtIndex( nSelected ).first;
return sURL;
@@ -263,7 +263,7 @@ namespace dbaui
OUString OpenDocumentListBox::GetSelectedDocumentFilter() const
{
OUString sFilter;
- sal_uInt16 nSelected = GetSelectEntryPos();
+ sal_Int32 nSelected = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != GetSelectEntryPos() )
sFilter = impl_getDocumentAtIndex( nSelected ).second;
return sFilter;
@@ -295,7 +295,7 @@ namespace dbaui
return;
Point aRequestPos( ScreenToOutputPixel( _rHEvt.GetMousePosPixel() ) );
- sal_uInt16 nItemIndex = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nItemIndex = LISTBOX_ENTRY_NOTFOUND;
if ( GetIndexForPoint( aRequestPos, nItemIndex ) != -1 )
{
Rectangle aItemRect( GetBoundingRectangle( nItemIndex ) );
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 81965a4e7608..1aef2959c7a0 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -108,8 +108,8 @@ void OTableTreeListBox::notifyHiContrastChanged()
SvTreeListEntry* pEntryLoop = First();
while (pEntryLoop)
{
- sal_uInt16 nCount = pEntryLoop->ItemCount();
- for (sal_uInt16 i=0;i<nCount;++i)
+ size_t nCount = pEntryLoop->ItemCount();
+ for (size_t i=0;i<nCount;++i)
{
SvLBoxItem* pItem = pEntryLoop->GetItem(i);
if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXCONTEXTBMP)
@@ -271,7 +271,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
sRootEntryText = ModuleRes(STR_ALL_VIEWS);
else
sRootEntryText = ModuleRes(STR_ALL_TABLES_AND_VIEWS);
- InsertEntry( sRootEntryText, NULL, sal_False, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
+ InsertEntry( sRootEntryText, NULL, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
}
if ( _rTables.empty() )
@@ -317,7 +317,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
{
SvTreeListEntry* pFolder = GetEntryPosByName( *folder, pRootEntry );
if ( !pFolder )
- pFolder = InsertEntry( *folder, pRootEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
+ pFolder = InsertEntry( *folder, pRootEntry, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
}
}
}
@@ -408,8 +408,8 @@ void OTableTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& _rSt
// replace the text item with our own one
SvLBoxItem* pTextItem = _pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING);
OSL_ENSURE(pTextItem, "OTableTreeListBox::InitEntry: no text item!?");
- sal_uInt16 nTextPos = _pEntry->GetPos(pTextItem);
- OSL_ENSURE(((sal_uInt16)-1) != nTextPos, "OTableTreeListBox::InitEntry: no text item pos!");
+ size_t nTextPos = _pEntry->GetPos(pTextItem);
+ OSL_ENSURE(SvTreeListEntry::ITEM_NOT_FOUND != nTextPos, "OTableTreeListBox::InitEntry: no text item pos!");
_pEntry->ReplaceItem(new OBoldListboxString(_pEntry, 0, _rString), nTextPos);
}
@@ -448,7 +448,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry(
{
SvTreeListEntry* pFolder = GetEntryPosByName( rFirstName, pParentEntry );
if ( !pFolder )
- pFolder = InsertEntry( rFirstName, pParentEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) );
+ pFolder = InsertEntry( rFirstName, pParentEntry, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) );
pParentEntry = pFolder;
}
@@ -456,14 +456,14 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry(
{
SvTreeListEntry* pFolder = GetEntryPosByName( rSecondName, pParentEntry );
if ( !pFolder )
- pFolder = InsertEntry( rSecondName, pParentEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) );
+ pFolder = InsertEntry( rSecondName, pParentEntry, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) );
pParentEntry = pFolder;
}
SvTreeListEntry* pRet = NULL;
if ( !_bCheckName || !GetEntryPosByName( sName, pParentEntry ) )
{
- pRet = InsertEntry( sName, pParentEntry, sal_False, LIST_APPEND );
+ pRet = InsertEntry( sName, pParentEntry, sal_False, TREELIST_APPEND );
Image aImage;
m_xImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage );
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 1d014a78dfe3..8edd41944493 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -451,7 +451,7 @@ namespace dbaui
OUString OTextConnectionHelper::GetSeparator( const ComboBox& rBox, const OUString& rList )
{
sal_Unicode nTok = '\t';
- sal_uInt16 nPos(rBox.GetEntryPos( rBox.GetText() ));
+ sal_Int32 nPos(rBox.GetEntryPos( rBox.GetText() ));
if( nPos == COMBOBOX_ENTRY_NOTFOUND )
return rBox.GetText().copy(0);
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index ceabc44dab44..3928566de3fc 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -152,7 +152,7 @@ namespace dbaui
if (!m_pSQLHistory)
return "invalid listbox!";
- if (m_aStatementHistory.size() != m_pSQLHistory->GetEntryCount())
+ if (m_aStatementHistory.size() != static_cast<size_t>(m_pSQLHistory->GetEntryCount()))
return "invalid listbox entry count!";
if (!m_xConnection.is())
@@ -318,7 +318,7 @@ namespace dbaui
{
if (!m_pSQLHistory->IsTravelSelect())
{
- const sal_uInt16 nSelected = m_pSQLHistory->GetSelectEntryPos();
+ const sal_Int32 nSelected = m_pSQLHistory->GetSelectEntryPos();
if (LISTBOX_ENTRY_NOTFOUND != nSelected)
switchToHistory(nSelected, sal_False);
}
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index 0f217d4c7a33..f67d2b6f4ab6 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -163,7 +163,7 @@ namespace
_rList.InsertEntry( sValue );
}
- sal_uInt16 nPos = _rList.GetEntryPos( OUString( _rCurrent ) );
+ sal_Int32 nPos = _rList.GetEntryPos( OUString( _rCurrent ) );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
_rList.SelectEntryPos( nPos );
else
@@ -232,7 +232,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
sTable,
::dbtools::eInDataManipulation);
- sal_uInt16 nPos = m_pImpl->m_pCatalog->GetEntryPos(OUString(sCatalog));
+ sal_Int32 nPos = m_pImpl->m_pCatalog->GetEntryPos(OUString(sCatalog));
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
m_pImpl->m_pCatalog->SelectEntryPos(nPos);
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index e72494df1a50..81ab05eca45e 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -355,7 +355,7 @@ namespace dbaui
{
OSL_ENSURE(!isNewField(), "IndexFieldsControl::SaveModified: why the hell ...!!!");
// selected entry
- sal_uInt16 nPos = m_pSortingCell->GetSelectEntryPos();
+ sal_Int32 nPos = m_pSortingCell->GetSelectEntryPos();
OSL_ENSURE(LISTBOX_ENTRY_NOTFOUND != nPos, "IndexFieldsControl::SaveModified: how did you get this selection??");
// adjust the sort flag in the index field description
OIndexField& rCurrentField = m_aFields[GetCurRow()];
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx
index 3a3c08d32e80..417c07d98851 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -263,12 +263,12 @@ namespace dbaui
}
else if (&m_aTravelNext == pButton)
{
- sal_uInt16 nCurrent = m_aAllParams.GetSelectEntryPos();
- sal_uInt16 nCount = m_aAllParams.GetEntryCount();
- OSL_ENSURE(nCount == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !");
+ sal_Int32 nCurrent = m_aAllParams.GetSelectEntryPos();
+ sal_Int32 nCount = m_aAllParams.GetEntryCount();
+ OSL_ENSURE(static_cast<size_t>(nCount) == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !");
// search the next entry in list we haven't visited yet
- sal_uInt16 nNext = (nCurrent + 1) % nCount;
+ sal_Int32 nNext = (nCurrent + 1) % nCount;
while ((nNext != nCurrent) && ( m_aVisitedParams[nNext] & EF_VISITED ))
nNext = (nNext + 1) % nCount;
@@ -308,14 +308,14 @@ namespace dbaui
}
// initialize the controls with the new values
- sal_uInt16 nSelected = m_aAllParams.GetSelectEntryPos();
+ sal_Int32 nSelected = m_aAllParams.GetSelectEntryPos();
OSL_ENSURE(nSelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnEntrySelected : no current entry !");
m_aParam.SetText(::comphelper::getString(m_aFinalValues[nSelected].Value));
m_nCurrentlySelected = nSelected;
// with this the value isn't dirty
- OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !");
+ OSL_ENSURE(static_cast<size_t>(m_nCurrentlySelected) < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !");
m_aVisitedParams[m_nCurrentlySelected] &= ~EF_DIRTY;
m_aResetVisitFlag.SetTimeout(1000);
@@ -329,7 +329,7 @@ namespace dbaui
OSL_ENSURE(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !");
// mark the currently selected entry as visited
- OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !");
+ OSL_ENSURE(static_cast<size_t>(m_nCurrentlySelected) < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !");
m_aVisitedParams[m_nCurrentlySelected] |= EF_VISITED;
// was it the last "not visited yet" entry ?
@@ -375,7 +375,7 @@ namespace dbaui
IMPL_LINK(OParameterDialog, OnValueModified, Control*, /*pBox*/)
{
// mark the currently selected entry as dirty
- OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !");
+ OSL_ENSURE(static_cast<size_t>(m_nCurrentlySelected) < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !");
m_aVisitedParams[m_nCurrentlySelected] |= EF_DIRTY;
m_bNeedErrorOnCurrent = sal_True;
diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx
index c5de4a17f128..afa0dda5bbed 100644
--- a/dbaccess/source/ui/inc/paramdialog.hxx
+++ b/dbaccess/source/ui/inc/paramdialog.hxx
@@ -60,7 +60,7 @@ namespace dbaui
OKButton m_aOKBtn;
CancelButton m_aCancelBtn;
- sal_uInt16 m_nCurrentlySelected;
+ sal_Int32 m_nCurrentlySelected;
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >
m_xParams;
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 687f67b358c5..3f11d2b4488a 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -380,7 +380,7 @@ void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList)
ODatabaseExport::TColumnVector::const_iterator aEnd = _rList.end();
for(;aIter != aEnd;++aIter)
{
- SvTreeListEntry* pEntry = InsertEntry((*aIter)->first,0,sal_False,LIST_APPEND,(*aIter)->second);
+ SvTreeListEntry* pEntry = InsertEntry((*aIter)->first,0,sal_False,TREELIST_APPEND,(*aIter)->second);
SvButtonState eState = !(m_bReadOnly && (*aIter)->second->IsAutoIncrement()) ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED;
SetCheckButtonState( pEntry, eState );
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 8f8039056f0b..2291b683d057 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -947,7 +947,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
if ( !m_bInUndoMode )
rController.GetUndoManager().EnterListAction(OUString(),OUString());
- sal_uInt16 nPos = m_pFieldCell->GetEntryPos(aFieldName);
+ sal_Int32 nPos = m_pFieldCell->GetEntryPos(aFieldName);
OUString aAliasName = pEntry->GetAlias();
if ( nPos != COMBOBOX_ENTRY_NOTFOUND && aAliasName.isEmpty() && comphelper::string::getTokenCount(aFieldName, '.') > 1 )
{ // special case, we have a table field so we must cut the table name
@@ -1019,8 +1019,8 @@ sal_Bool OSelectionBrowseBox::SaveModified()
case BROW_ORDER_ROW:
{
strOldCellContents = OUString::number((sal_uInt16)pEntry->GetOrderDir());
- sal_uInt16 nIdx = m_pOrderCell->GetSelectEntryPos();
- if (nIdx == sal_uInt16(-1))
+ sal_Int32 nIdx = m_pOrderCell->GetSelectEntryPos();
+ if (nIdx == LISTBOX_ENTRY_NOTFOUND)
nIdx = 0;
pEntry->SetOrderDir(EOrderDir(nIdx));
if(!m_bOrderByUnRelated)
@@ -1040,7 +1040,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
case BROW_FUNCTION_ROW:
{
strOldCellContents = pEntry->GetFunction();
- sal_uInt16 nPos = m_pFunctionCell->GetSelectEntryPos();
+ sal_Int32 nPos = m_pFunctionCell->GetSelectEntryPos();
// these functions are only available in CORE
OUString sFunctionName = m_pFunctionCell->GetEntry(nPos);
OUString sGroupFunctionName = m_aFunctionStrings.getToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1, ';');
@@ -1887,9 +1887,9 @@ void OSelectionBrowseBox::CellModified()
{
OTableFieldDescRef pEntry = getEntry(GetColumnPos(GetCurColumnId()) - 1);
- sal_uInt16 nIdx = m_pOrderCell->GetSelectEntryPos();
+ sal_Int32 nIdx = m_pOrderCell->GetSelectEntryPos();
if(!m_bOrderByUnRelated && nIdx > 0 &&
- nIdx != sal_uInt16(-1) &&
+ nIdx != LISTBOX_ENTRY_NOTFOUND &&
!pEntry->IsEmpty() &&
pEntry->GetOrderDir() != ORDER_NONE)
{
@@ -2251,8 +2251,8 @@ OUString OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 n
return pEntry->IsVisible() ? g_strOne : g_strZero;
case BROW_ORDER_ROW:
{
- sal_uInt16 nIdx = m_pOrderCell->GetSelectEntryPos();
- if (nIdx == sal_uInt16(-1))
+ sal_Int32 nIdx = m_pOrderCell->GetSelectEntryPos();
+ if (nIdx == LISTBOX_ENTRY_NOTFOUND)
nIdx = 0;
return OUString(nIdx);
}
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index f0b549243c46..9d7ac5ce5d1e 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -708,7 +708,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId )
void OTableEditorCtrl::resetType()
{
- sal_uInt16 nPos = pTypeCell->GetSelectEntryPos();
+ sal_Int32 nPos = pTypeCell->GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
SwitchType( GetView()->getController().getTypeInfo(nPos) );
else
@@ -1643,13 +1643,13 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
pRow->SetFieldType( _pType, sal_True );
if ( _pType.get() )
{
- const sal_uInt16 nCurrentlySelected = pTypeCell->GetSelectEntryPos();
+ const sal_Int32 nCurrentlySelected = pTypeCell->GetSelectEntryPos();
if ( ( LISTBOX_ENTRY_NOTFOUND == nCurrentlySelected )
|| ( GetView()->getController().getTypeInfo( nCurrentlySelected ) != _pType )
)
{
- sal_uInt16 nEntryPos = 0;
+ sal_Int32 nEntryPos = 0;
const OTypeInfoMap* pTypeInfo = GetView()->getController().getTypeInfo();
OTypeInfoMap::const_iterator aIter = pTypeInfo->begin();
OTypeInfoMap::const_iterator aEnd = pTypeInfo->end();
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index d8839023e3a1..8caed8b8403d 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -646,7 +646,7 @@ void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos )
if ( pData )
{
- sal_uInt16 nEntryPos = GetSelectEntryPos();
+ sal_uLong nEntryPos = GetSelectEntryPos();
UpdateDialog::Index * p = static_cast< UpdateDialog::Index * >( GetEntryData( nEntryPos ) );
if ( ( p->m_eKind == ENABLED_UPDATE ) || ( p->m_eKind == DISABLED_UPDATE ) )
@@ -695,7 +695,7 @@ void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos )
sal_uInt16 UpdateDialog::insertItem( UpdateDialog::Index *pEntry, SvLBoxButtonKind kind )
{
- m_updates.InsertEntry( pEntry->m_aName, LISTBOX_APPEND, static_cast< void * >( pEntry ), kind );
+ m_updates.InsertEntry( pEntry->m_aName, TREELIST_APPEND, static_cast< void * >( pEntry ), kind );
for ( sal_uInt16 i = m_updates.getItemCount(); i != 0 ; )
{
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 9ae852cc2615..5726854555e5 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1341,7 +1341,7 @@ size_t Outliner::InsertView( OutlinerView* pView, size_t nIndex )
advance( it, nIndex );
ActualIndex = nIndex;
}
- pEditEngine->InsertView( pView->pEditView, (sal_uInt16)nIndex );
+ pEditEngine->InsertView( pView->pEditView, nIndex );
return ActualIndex;
}
@@ -1364,10 +1364,10 @@ OutlinerView* Outliner::RemoveView( OutlinerView* pView )
OutlinerView* Outliner::RemoveView( size_t nIndex )
{
- EditView* pEditView = pEditEngine->GetView( (sal_uInt16)nIndex );
+ EditView* pEditView = pEditEngine->GetView( nIndex );
pEditView->HideCursor(); // HACK
- pEditEngine->RemoveView( (sal_uInt16)nIndex );
+ pEditEngine->RemoveView( nIndex );
{
ViewList::iterator it = aViewList.begin();
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index ae74141b19f7..6117df51ab19 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -407,7 +407,7 @@ void BibToolBar::UpdateSourceList(sal_Bool bFlag)
aLBSource.SetUpdateMode(bFlag);
}
-void BibToolBar::InsertSourceEntry(const OUString& aEntry, sal_uInt16 nPos)
+void BibToolBar::InsertSourceEntry(const OUString& aEntry, sal_Int32 nPos)
{
aLBSource.InsertEntry(aEntry, nPos);
}
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index 407b87c79d00..7fbe16358f66 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -156,7 +156,7 @@ class BibToolBar: public ToolBox
void ClearSourceList();
void UpdateSourceList(sal_Bool bFlag=sal_True);
void EnableSourceList(sal_Bool bFlag=sal_True);
- void InsertSourceEntry(const OUString&,sal_uInt16 nPos=LISTBOX_APPEND );
+ void InsertSourceEntry(const OUString&,sal_Int32 nPos=LISTBOX_APPEND );
void SelectSourceEntry(const OUString& );
void EnableQuery(sal_Bool bFlag=sal_True);
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index af38f74f0de7..6ddfa06f5b20 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -414,7 +414,7 @@ namespace dbp
// the (original) relative position of the entry
sal_IntPtr nRelativeIndex = reinterpret_cast<sal_IntPtr>(bMoveRight ? m_aExistFields.GetEntryData(nSelected) : m_aSelFields.GetEntryData(nSelected));
- sal_uInt16 nInsertPos = LISTBOX_APPEND;
+ sal_uInt16 nInsertPos = SAL_MAX_UINT16;
if (!bMoveRight)
{ // need to determine an insert pos which reflects the original
nInsertPos = 0;
@@ -437,7 +437,7 @@ namespace dbp
// remove the entry from it's old list
if (bMoveRight)
{
- sal_uInt16 nSelectPos = m_aExistFields.GetSelectEntryPos();
+ sal_Int32 nSelectPos = m_aExistFields.GetSelectEntryPos();
m_aExistFields.RemoveEntry(nSelected);
if ((LISTBOX_ENTRY_NOTFOUND != nSelectPos) && (nSelectPos < m_aExistFields.GetEntryCount()))
m_aExistFields.SelectEntryPos(nSelectPos);
@@ -446,7 +446,7 @@ namespace dbp
}
else
{
- sal_uInt16 nSelectPos = m_aSelFields.GetSelectEntryPos();
+ sal_Int32 nSelectPos = m_aSelFields.GetSelectEntryPos();
m_aSelFields.RemoveEntry(nSelected);
if ((LISTBOX_ENTRY_NOTFOUND != nSelectPos) && (nSelectPos < m_aSelFields.GetEntryCount()))
m_aSelFields.SelectEntryPos(nSelectPos);
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index e93a5055bc16..e4fb9dd4851f 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -674,7 +674,7 @@ namespace pcr
sal_uInt16 OBrowserListBox::GetPropertyPos( const OUString& _rEntryName ) const
{
- sal_uInt16 nRet = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nRet = EDITOR_LIST_ENTRY_NOTFOUND;
for ( ListBoxLines::const_iterator linePos = m_aLines.begin();
linePos != m_aLines.end();
++linePos
diff --git a/extensions/source/propctrlr/pcrcommon.hxx b/extensions/source/propctrlr/pcrcommon.hxx
index 1d3f6d78806f..a18b8a231476 100644
--- a/extensions/source/propctrlr/pcrcommon.hxx
+++ b/extensions/source/propctrlr/pcrcommon.hxx
@@ -20,8 +20,9 @@
#ifndef _EXTENSIONS_PROPCTRLR_PCRCOMMON_HXX_
#define _EXTENSIONS_PROPCTRLR_PCRCOMMON_HXX_
-#define EDITOR_LIST_APPEND (sal_uInt16)-1
-#define EDITOR_LIST_REPLACE_EXISTING (sal_uInt16)-1
+#define EDITOR_LIST_APPEND (SAL_MAX_UINT16)
+#define EDITOR_LIST_REPLACE_EXISTING (SAL_MAX_UINT16)
+#define EDITOR_LIST_ENTRY_NOTFOUND (SAL_MAX_UINT16)
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 39e8e34564b4..f530432cc5cd 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -1611,7 +1611,7 @@ namespace pcr
if ( !impl_findObjectProperty_nothrow( _rPropertyName, &propertyPos ) )
return;
- if ( getPropertyBox().GetPropertyPos( _rPropertyName ) != LISTBOX_ENTRY_NOTFOUND )
+ if ( getPropertyBox().GetPropertyPos( _rPropertyName ) != EDITOR_LIST_ENTRY_NOTFOUND )
{
rebuildPropertyUI( _rPropertyName );
return;
@@ -1629,16 +1629,16 @@ namespace pcr
// by definition, the properties in m_aProperties are in the order in which they appear in the UI
// So all we need is a predecessor of pProperty in m_aProperties
- sal_uInt16 nUIPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nUIPos = EDITOR_LIST_ENTRY_NOTFOUND;
do
{
if ( propertyPos != m_aProperties.begin() )
--propertyPos;
nUIPos = getPropertyBox().GetPropertyPos( propertyPos->second.Name );
}
- while ( ( nUIPos == LISTBOX_ENTRY_NOTFOUND ) && ( propertyPos != m_aProperties.begin() ) );
+ while ( ( nUIPos == EDITOR_LIST_ENTRY_NOTFOUND ) && ( propertyPos != m_aProperties.begin() ) );
- if ( nUIPos == LISTBOX_ENTRY_NOTFOUND )
+ if ( nUIPos == EDITOR_LIST_ENTRY_NOTFOUND )
// insert at the very top
nUIPos = 0;
else
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index e5aa5f24d5d5..0cf8dffb8e0f 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -383,7 +383,7 @@ namespace pcr
OBrowserPage* pPage = getPage( _nPageId );
DBG_ASSERT( pPage, "OPropertyEditor::InsertEntry: don't have such a page!" );
if ( !pPage )
- return LISTBOX_ENTRY_NOTFOUND;
+ return EDITOR_LIST_ENTRY_NOTFOUND;
sal_uInt16 nEntry = pPage->getListBox().InsertEntry( rData, nPos );
@@ -427,7 +427,7 @@ namespace pcr
sal_uInt16 OPropertyEditor::GetPropertyPos( const OUString& rEntryName ) const
{
- sal_uInt16 nVal=LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nVal=EDITOR_LIST_ENTRY_NOTFOUND;
const OBrowserPage* pPage = getPage( rEntryName );
if ( pPage )
nVal = pPage->getListBox().GetPropertyPos( rEntryName );
diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index 770610adab84..64ee7a75dc31 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -193,7 +193,7 @@ namespace pcr
aName = ::comphelper::getString( xControl->getPropertyValue( PROPERTY_NAME ) );
// TODO: do Basic controls have a name?
aImage = GetImage( xControl );
- m_pLB_Controls->InsertEntry( aName, aImage, aImage, 0, sal_False, LIST_APPEND, xControl.get() );
+ m_pLB_Controls->InsertEntry( aName, aImage, aImage, 0, sal_False, TREELIST_APPEND, xControl.get() );
}
}
else
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 3f1d2d198682..4b05bbef30ca 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1480,7 +1480,7 @@ IMPL_LINK( XMLFilterListBox, HeaderEndDrag_Impl, HeaderBar*, pBar )
void XMLFilterListBox::addFilterEntry( const filter_info_impl* pInfo )
{
const OUString aEntryStr( getEntryString( pInfo ) );
- InsertEntryToColumn( aEntryStr, LIST_APPEND, 0xffff, (void*)pInfo );
+ InsertEntryToColumn( aEntryStr, TREELIST_APPEND, 0xffff, (void*)pInfo );
}
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index d30397300fe6..4bef88ed534c 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -788,10 +788,11 @@ void FormulaDlg_Impl::FillListboxes()
// 1. Page: select function
if ( pFuncDesc && pFuncDesc->getCategory() )
{
- if( pFuncPage->GetCategory() != pFuncDesc->getCategory()->getNumber() + 1 )
- pFuncPage->SetCategory(static_cast<sal_uInt16>(pFuncDesc->getCategory()->getNumber() + 1));
+ // We'll never have more than int32 max categories so this is safe ...
+ if( pFuncPage->GetCategory() != static_cast<sal_Int32>(pFuncDesc->getCategory()->getNumber() + 1) )
+ pFuncPage->SetCategory(pFuncDesc->getCategory()->getNumber() + 1);
- sal_uInt16 nPos=pFuncPage->GetFuncPos(pFuncDesc);
+ sal_Int32 nPos=pFuncPage->GetFuncPos(pFuncDesc);
pFuncPage->SetFunction(nPos);
}
@@ -1026,7 +1027,7 @@ IMPL_LINK( FormulaDlg_Impl, BtnHdl, PushButton*, pBtn )
IMPL_LINK_NOARG(FormulaDlg_Impl, DblClkHdl)
{
- sal_uInt16 nFunc = pFuncPage->GetFunction();
+ sal_Int32 nFunc = pFuncPage->GetFunction();
// ex-UpdateLRUList
const IFunctionDescription* pDesc = pFuncPage->GetFuncDesc(nFunc);
@@ -1542,9 +1543,9 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, MatrixHdl)
IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl)
{
- sal_uInt16 nCat = pFuncPage->GetCategory();
+ sal_Int32 nCat = pFuncPage->GetCategory();
if ( nCat == LISTBOX_ENTRY_NOTFOUND ) nCat = 0;
- sal_uInt16 nFunc = pFuncPage->GetFunction();
+ sal_Int32 nFunc = pFuncPage->GetFunction();
if ( nFunc == LISTBOX_ENTRY_NOTFOUND ) nFunc = 0;
if ( (pFuncPage->GetFunctionEntryCount() > 0)
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index f38d110b98d5..dd21c15b743b 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -113,9 +113,9 @@ void FuncPage::impl_addFunctions(const IFunctionCategory* _pCategory)
void FuncPage::UpdateFunctionList()
{
- sal_uInt16 nSelPos = aLbCategory.GetSelectEntryPos();
+ sal_Int32 nSelPos = aLbCategory.GetSelectEntryPos();
const IFunctionCategory* pCategory = static_cast<const IFunctionCategory*>(aLbCategory.GetEntryData(nSelPos));
- sal_uInt16 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ sal_Int32 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
? Lb2Cat( nSelPos ) : 0;
(void)nCategory;
@@ -189,16 +189,16 @@ IMPL_LINK_NOARG(FuncPage, DblClkHdl)
return 0;
}
-void FuncPage::SetCategory(sal_uInt16 nCat)
+void FuncPage::SetCategory(sal_Int32 nCat)
{
aLbCategory.SelectEntryPos(nCat);
UpdateFunctionList();
}
-sal_uInt16 FuncPage::GetFuncPos(const IFunctionDescription* _pDesc)
+sal_Int32 FuncPage::GetFuncPos(const IFunctionDescription* _pDesc)
{
return aLbFunction.GetEntryPos(_pDesc);
}
-void FuncPage::SetFunction(sal_uInt16 nFunc)
+void FuncPage::SetFunction(sal_Int32 nFunc)
{
aLbFunction.SelectEntryPos(nFunc);
}
@@ -208,17 +208,17 @@ void FuncPage::SetFocus()
aLbFunction.GrabFocus();
}
-sal_uInt16 FuncPage::GetCategory()
+sal_Int32 FuncPage::GetCategory()
{
return aLbCategory.GetSelectEntryPos();
}
-sal_uInt16 FuncPage::GetFunction()
+sal_Int32 FuncPage::GetFunction()
{
return aLbFunction.GetSelectEntryPos();
}
-sal_uInt16 FuncPage::GetFunctionEntryCount()
+sal_Int32 FuncPage::GetFunctionEntryCount()
{
return aLbFunction.GetSelectEntryCount();
}
@@ -227,7 +227,7 @@ OUString FuncPage::GetSelFunctionName() const
{
return aLbFunction.GetSelectEntry();
}
-const IFunctionDescription* FuncPage::GetFuncDesc( sal_uInt16 nPos ) const
+const IFunctionDescription* FuncPage::GetFuncDesc( sal_Int32 nPos ) const
{
// not pretty, but hopefully rare
return (const IFunctionDescription*) aLbFunction.GetEntryData(nPos);
diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx
index 9c4efbca498e..0ace168d4256 100644
--- a/formula/source/ui/dlg/funcpage.hxx
+++ b/formula/source/ui/dlg/funcpage.hxx
@@ -89,15 +89,15 @@ public:
FuncPage( Window* pParent,const IFunctionManager* _pFunctionManager);
- void SetCategory(sal_uInt16 nCat);
- void SetFunction(sal_uInt16 nFunc);
+ void SetCategory(sal_Int32 nCat);
+ void SetFunction(sal_Int32 nFunc);
void SetFocus();
- sal_uInt16 GetCategory();
- sal_uInt16 GetFunction();
- sal_uInt16 GetFunctionEntryCount();
+ sal_Int32 GetCategory();
+ sal_Int32 GetFunction();
+ sal_Int32 GetFunctionEntryCount();
- sal_uInt16 GetFuncPos(const IFunctionDescription* _pDesc);
- const IFunctionDescription* GetFuncDesc( sal_uInt16 nPos ) const;
+ sal_Int32 GetFuncPos(const IFunctionDescription* _pDesc);
+ const IFunctionDescription* GetFuncDesc( sal_Int32 nPos ) const;
OUString GetSelFunctionName() const;
void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickLink = rLink; }
diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx
index 1dea99e40913..4988f47b509f 100644
--- a/formula/source/ui/dlg/structpg.hxx
+++ b/formula/source/ui/dlg/structpg.hxx
@@ -55,7 +55,7 @@ public:
const OUString& rText,
const Image& rEntryImg,
SvTreeListEntry* pParent = NULL,
- sal_uLong nPos = LIST_APPEND,
+ sal_uLong nPos = TREELIST_APPEND,
IFormulaToken* pToken = NULL );
void SetActiveFlag(sal_Bool bFlag=sal_True);
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index 90f23d6edc1f..f546c8f103f7 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -519,7 +519,7 @@ namespace svt
{
sal_Int32 nPos = 0;
if ( _rValue >>= nPos )
- _pListbox->RemoveEntry( (sal_uInt16) nPos );
+ _pListbox->RemoveEntry( nPos );
}
break;
@@ -657,7 +657,7 @@ namespace svt
sal_Int32 nPos = 0;
if ( _rValue >>= nPos )
{
- static_cast< ListBox* >( _pControl )->SelectEntryPos( (sal_uInt16) nPos );
+ static_cast< ListBox* >( _pControl )->SelectEntryPos( nPos );
}
else if ( !_bIgnoreIllegalArgument )
{
@@ -719,7 +719,7 @@ namespace svt
Sequence< OUString > aItems( static_cast< ListBox* >( _pControl )->GetEntryCount() );
OUString* pItems = aItems.getArray();
- for ( sal_uInt16 i=0; i<static_cast< ListBox* >( _pControl )->GetEntryCount(); ++i )
+ for ( sal_Int32 i=0; i<static_cast< ListBox* >( _pControl )->GetEntryCount(); ++i )
*pItems++ = static_cast< ListBox* >( _pControl )->GetEntry( i );
aReturn <<= aItems;
@@ -731,7 +731,7 @@ namespace svt
DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
"OControlAccess::implGetControlProperty: invalid control/property combination!" );
- sal_uInt16 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
+ sal_Int32 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
OUString sSelected;
if ( LISTBOX_ENTRY_NOTFOUND != nSelected )
sSelected = static_cast< ListBox* >( _pControl )->GetSelectEntry();
@@ -744,7 +744,7 @@ namespace svt
DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
"OControlAccess::implGetControlProperty: invalid control/property combination!" );
- sal_uInt16 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
+ sal_Int32 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != nSelected )
aReturn <<= (sal_Int32)static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
else
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index eb80188c2c26..cdc874b87a00 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -306,7 +306,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
}
else if ( rControlCommand.Command == "AddEntry" )
{
- sal_uInt16 nPos( COMBOBOX_APPEND );
+ sal_Int32 nPos( COMBOBOX_APPEND );
OUString aText;
for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
{
@@ -320,7 +320,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
}
else if ( rControlCommand.Command == "InsertEntry" )
{
- sal_uInt16 nPos( COMBOBOX_APPEND );
+ sal_Int32 nPos( COMBOBOX_APPEND );
OUString aText;
for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
{
@@ -331,7 +331,7 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
{
if (( nTmpPos >= 0 ) &&
( nTmpPos < sal_Int32( m_pComboBox->GetEntryCount() )))
- nPos = sal_uInt16( nTmpPos );
+ nPos = nTmpPos;
}
}
else if ( rControlCommand.Arguments[i].Name == "Text" )
@@ -349,8 +349,8 @@ void ComboboxToolbarController::executeControlCommand( const ::com::sun::star::f
sal_Int32 nPos( -1 );
if ( rControlCommand.Arguments[i].Value >>= nPos )
{
- if ( nPos < sal_Int32( m_pComboBox->GetEntryCount() ))
- m_pComboBox->RemoveEntryAt(sal_uInt16(nPos));
+ if ( 0 <= nPos && nPos < sal_Int32( m_pComboBox->GetEntryCount() ))
+ m_pComboBox->RemoveEntryAt(nPos);
}
break;
}
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 36d30ed28e2b..664b3a7b1570 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -243,7 +243,7 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
}
else if ( rControlCommand.Command == "AddEntry" )
{
- sal_uInt16 nPos( LISTBOX_APPEND );
+ sal_Int32 nPos( LISTBOX_APPEND );
OUString aText;
for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
{
@@ -257,7 +257,7 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
}
else if ( rControlCommand.Command == "InsertEntry" )
{
- sal_uInt16 nPos( LISTBOX_APPEND );
+ sal_Int32 nPos( LISTBOX_APPEND );
OUString aText;
for ( sal_Int32 i = 0; i < rControlCommand.Arguments.getLength(); i++ )
{
@@ -268,7 +268,7 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
{
if (( nTmpPos >= 0 ) &&
( nTmpPos < sal_Int32( m_pListBoxControl->GetEntryCount() )))
- nPos = sal_uInt16( nTmpPos );
+ nPos = nTmpPos;
}
}
else if ( rControlCommand.Arguments[i].Name == "Text" )
@@ -286,8 +286,8 @@ void DropdownToolbarController::executeControlCommand( const ::com::sun::star::f
sal_Int32 nPos( -1 );
if ( rControlCommand.Arguments[i].Value >>= nPos )
{
- if ( nPos < sal_Int32( m_pListBoxControl->GetEntryCount() ))
- m_pListBoxControl->RemoveEntry( sal_uInt16( nPos ));
+ if ( 0 <= nPos && nPos < sal_Int32( m_pListBoxControl->GetEntryCount() ))
+ m_pListBoxControl->RemoveEntry( nPos );
}
break;
}
diff --git a/include/sfx2/controlwrapper.hxx b/include/sfx2/controlwrapper.hxx
index 96dfd7280123..531ad502d8d6 100644
--- a/include/sfx2/controlwrapper.hxx
+++ b/include/sfx2/controlwrapper.hxx
@@ -334,10 +334,12 @@ typedef MetricFieldWrapper< sal_uIntPtr > ULongMetricFieldWrapper;
+#define WRAPPER_LISTBOX_ENTRY_NOTFOUND 0xFFFF /* XXX was value of LISTBOX_ENTRY_NOTFOUND */
+
/** A wrapper for the VCL ListBox.
If a position<->value map is passed to the constructor, it MUST be
- terminated with an entry containing LISTBOX_ENTRY_NOTFOUND as list
+ terminated with an entry containing WRAPPER_LISTBOX_ENTRY_NOTFOUND as list
position. See documentation of the PosValueMapper template for details.
*/
template< typename ValueT >
@@ -353,7 +355,7 @@ public:
/** @param pMap Optional list position <-> value map.
See PosValueMapper documentation for details. */
inline explicit ListBoxWrapper( ListBox& rListBox, const MapEntryType* pMap = 0 ) :
- SingleControlWrapper< ListBox, ValueT >( rListBox ), MapperType( LISTBOX_ENTRY_NOTFOUND, pMap ) {}
+ SingleControlWrapper< ListBox, ValueT >( rListBox ), MapperType( WRAPPER_LISTBOX_ENTRY_NOTFOUND, pMap ) {}
virtual bool IsControlDontKnow() const
{ return this->GetControl().GetSelectEntryCount() == 0; }
@@ -376,10 +378,12 @@ typedef ListBoxWrapper< sal_uIntPtr > ULongListBoxWrapper;
+#define WRAPPER_VALUESET_ITEM_NOTFOUND 0xFFFF /* XXX was value of VALUESET_ITEM_NOTFOUND */
+
/** A wrapper for the SVTOOLS ValueSet.
If a position<->value map is passed to the constructor, it MUST be
- terminated with an entry containing VALUESET_ITEM_NOTFOUND as list
+ terminated with an entry containing WRAPPER_VALUESET_ITEM_NOTFOUND as list
position. See documentation of the PosValueMapper template for details.
*/
template< typename ValueT >
@@ -395,7 +399,7 @@ public:
/** @param pMap Optional position <-> value map.
See PosValueMapper documentation for details. */
inline explicit ValueSetWrapper( ValueSet& rValueSet, const MapEntryType* pMap = 0 ) :
- SingleControlWrapper< ValueSet, ValueT >( rValueSet ), MapperType( VALUESET_ITEM_NOTFOUND, pMap ) {}
+ SingleControlWrapper< ValueSet, ValueT >( rValueSet ), MapperType( WRAPPER_VALUESET_ITEM_NOTFOUND, pMap ) {}
virtual bool IsControlDontKnow() const
{ return this->GetControl().IsNoSelection(); }
diff --git a/include/sfx2/itemconnect.hxx b/include/sfx2/itemconnect.hxx
index 789a7085cab6..7dc7f5948345 100644
--- a/include/sfx2/itemconnect.hxx
+++ b/include/sfx2/itemconnect.hxx
@@ -364,9 +364,10 @@ typedef MetricConnection< UInt32ItemWrapper > UInt32MetricConnection;
/** Connection between an item and a VCL ListBox.
Optionally a map can be passed that maps list box positions to item values.
- This map MUST be terminated with an entry containing LISTBOX_ENTRY_NOTFOUND
- as list box position. The item value contained in this last entry is used
- as default item value in case of an error.
+ This map MUST be terminated with an entry containing
+ WRAPPER_LISTBOX_ENTRY_NOTFOUND as list box position. The item value
+ contained in this last entry is used as default item value in case of an
+ error.
*/
template< typename ItemWrpT >
class ListBoxConnection : public ItemControlConnection< ItemWrpT,
@@ -397,8 +398,9 @@ typedef ListBoxConnection< UInt32ItemWrapper > UInt32ListBoxConnection;
Optionally a map can be passed that maps value set identifiers to item
values. This map MUST be terminated with an entry containing
- VALUESET_ITEM_NOTFOUND as value set identifier. The item value contained in
- this last entry is used as default item value in case of an error.
+ WRAPPER_VALUESET_ITEM_NOTFOUND as value set identifier. The item value
+ contained in this last entry is used as default item value in case of an
+ error.
*/
template< typename ItemWrpT >
class ValueSetConnection : public ItemControlConnection< ItemWrpT,
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 2d0f4abacce5..7b3e38d1fbce 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -169,26 +169,26 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt );
using ListBox::InsertEntry;
- virtual sal_uInt16 InsertEntry( const OUString& rStr,
- sal_uInt16 nPos = LISTBOX_APPEND );
- virtual sal_uInt16 InsertEntry( const Color& rColor, const OUString& rStr,
- sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_Int32 InsertEntry( const OUString& rStr,
+ sal_Int32 nPos = LISTBOX_APPEND );
+ virtual sal_Int32 InsertEntry( const Color& rColor, const OUString& rStr,
+ sal_Int32 nPos = LISTBOX_APPEND );
void InsertAutomaticEntryColor(const Color &rAutoColorValue);
bool IsAutomaticSelected() { return !GetSelectEntryPos(); }
using ListBox::RemoveEntry;
- virtual void RemoveEntry( sal_uInt16 nPos );
+ virtual void RemoveEntry( sal_Int32 nPos );
virtual void Clear();
void CopyEntries( const ColorListBox& rBox );
using ListBox::GetEntryPos;
- virtual sal_uInt16 GetEntryPos( const Color& rColor ) const;
- virtual Color GetEntryColor( sal_uInt16 nPos ) const;
+ virtual sal_Int32 GetEntryPos( const Color& rColor ) const;
+ virtual Color GetEntryColor( sal_Int32 nPos ) const;
Size GetImageSize() const { return aImageSize; }
void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True )
{ ListBox::SelectEntry( rStr, bSelect ); }
void SelectEntry( const Color& rColor, sal_Bool bSelect = sal_True );
- Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
+ Color GetSelectEntryColor( sal_Int32 nSelIndex = 0 ) const;
bool IsEntrySelected(const OUString& rStr ) const
{
return ListBox::IsEntrySelected(rStr);
@@ -196,7 +196,7 @@ public:
bool IsEntrySelected(const Color& rColor) const
{
- sal_uInt16 nPos = GetEntryPos( rColor );
+ sal_Int32 nPos = GetEntryPos( rColor );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nPos );
else
@@ -208,20 +208,20 @@ private:
ColorListBox( const ColorListBox& );
ColorListBox& operator =( const ColorListBox& );
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
};
inline void ColorListBox::SelectEntry( const Color& rColor, sal_Bool bSelect )
{
- sal_uInt16 nPos = GetEntryPos( rColor );
+ sal_Int32 nPos = GetEntryPos( rColor );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
ListBox::SelectEntryPos( nPos, bSelect );
}
-inline Color ColorListBox::GetSelectEntryColor( sal_uInt16 nSelIndex ) const
+inline Color ColorListBox::GetSelectEntryColor( sal_Int32 nSelIndex ) const
{
- sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
+ sal_Int32 nPos = GetSelectEntryPos( nSelIndex );
Color aColor;
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
aColor = GetEntryColor( nPos );
@@ -307,7 +307,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
virtual void DataChanged( const DataChangedEvent& rDCEvt );
void UpdateEntries( long nOldWidth );
- sal_uInt16 GetStylePos( sal_uInt16 nListPos, long nWidth );
+ sal_Int32 GetStylePos( sal_Int32 nListPos, long nWidth );
public:
typedef Color (*ColorFunc)(Color);
@@ -322,7 +322,7 @@ public:
void SetNone( const OUString& sNone );
using ListBox::InsertEntry;
- virtual sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_Int32 InsertEntry( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
/** Insert a listbox entry with all widths in Twips. */
void InsertEntry( BorderWidthImpl aWidthImpl,
sal_uInt16 nStyle, long nMinWidth = 0,
@@ -331,23 +331,23 @@ public:
ColorDistFunc pColorDistFn = &sameDistColor );
using ListBox::RemoveEntry;
- virtual void RemoveEntry( sal_uInt16 nPos );
+ virtual void RemoveEntry( sal_Int32 nPos );
virtual void Clear();
using ListBox::GetEntryPos;
- virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const;
- sal_uInt16 GetEntryStyle( sal_uInt16 nPos ) const;
+ virtual sal_Int32 GetEntryPos( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const;
+ sal_uInt16 GetEntryStyle( sal_Int32 nPos ) const;
void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
void SelectEntry( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID, sal_Bool bSelect = sal_True );
- sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const;
+ sal_uInt16 GetSelectEntryStyle( sal_Int32 nSelIndex = 0 ) const;
bool IsEntrySelected(const OUString& rStr) const
{
return ListBox::IsEntrySelected(rStr);
}
bool IsEntrySelected( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const
{
- sal_uInt16 nPos = GetEntryPos( nStyle );
+ sal_Int32 nPos = GetEntryPos( nStyle );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nPos );
else
@@ -365,16 +365,16 @@ public:
protected:
inline const Color& GetPaintColor( void ) const;
- Color GetColorLine1( sal_uInt16 nPos = 0 );
- Color GetColorLine2( sal_uInt16 nPos = 0 );
- Color GetColorDist( sal_uInt16 nPos = 0 );
+ Color GetColorLine1( sal_Int32 nPos = 0 );
+ Color GetColorLine2( sal_Int32 nPos = 0 );
+ Color GetColorDist( sal_Int32 nPos = 0 );
private:
// declared as private because some compilers would generate the default methods
LineListBox( const LineListBox& );
LineListBox& operator =( const LineListBox& );
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
};
inline void LineListBox::SetColor( const Color& rColor )
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index 37df1b01c639..e2b2c9717471 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -283,7 +283,7 @@ public:
SvxIconChoiceCtrlEntry* InsertEntry( const OUString& rText,
const Image& rImage,
- sal_uLong nPos = LIST_APPEND,
+ sal_uLong nPos = CONTAINER_APPEND,
const Point* pPos = 0,
sal_uInt16 nFlags = 0
);
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 8e29e30bfb38..c321e6d35ab3 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -75,7 +75,7 @@ public:
virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = 0,
sal_Bool bChildrenOnDemand = sal_False,
- sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
+ sal_uLong nPos=TREELIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
virtual SvTreeListEntry* InsertEntry( const OUString& rText,
@@ -83,16 +83,16 @@ public:
const Image& rCollapsedEntryBmp,
SvTreeListEntry* pParent = 0,
sal_Bool bChildrenOnDemand = sal_False,
- sal_uLong nPos = LIST_APPEND, void* pUserData = 0,
+ sal_uLong nPos = TREELIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
- virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = LIST_APPEND,
+ virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = TREELIST_APPEND,
sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, SvTreeListEntry* pParent,
sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL );
virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = NULL,
- sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
+ sal_uLong nPos = TREELIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual OUString GetEntryText( SvTreeListEntry* pEntry ) const;
OUString GetEntryText( SvTreeListEntry*, sal_uInt16 nCol ) const;
@@ -147,15 +147,15 @@ public:
void InitHeaderBar( HeaderBar* pHeaderBar );
sal_Bool IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol ) const;
- virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = LIST_APPEND,
+ virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, sal_uLong nPos = TREELIST_APPEND,
sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, SvTreeListEntry* pParent,
sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL );
virtual SvTreeListEntry* InsertEntryToColumn( const OUString&, const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp, SvTreeListEntry* pParent = NULL,
- sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
- virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=LIST_APPEND);
- virtual sal_uLong Insert( SvTreeListEntry* pEntry, sal_uLong nRootPos = LIST_APPEND );
+ sal_uLong nPos = TREELIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
+ virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=TREELIST_APPEND);
+ virtual sal_uLong Insert( SvTreeListEntry* pEntry, sal_uLong nRootPos = TREELIST_APPEND );
void RemoveEntry( SvTreeListEntry* _pEntry );
void Clear();
diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx
index 049224d83839..d8cf1ae4e8f4 100644
--- a/include/svtools/treelist.hxx
+++ b/include/svtools/treelist.hxx
@@ -27,6 +27,7 @@
#include <tools/solar.h>
#include <tools/link.hxx>
#include <tools/debug.hxx>
+#include <tools/contnr.hxx>
#include <limits.h>
#include <vector>
@@ -160,8 +161,8 @@ public:
SvTreeListEntry* PrevSibling( SvTreeListEntry* pEntry ) const;
SvTreeListEntry* LastSibling( SvTreeListEntry* pEntry ) const;
- sal_uLong Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pPar,sal_uLong nPos=ULONG_MAX);
- sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = ULONG_MAX )
+ sal_uLong Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pPar,sal_uLong nPos = TREELIST_APPEND);
+ sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = TREELIST_APPEND )
{ return Insert(pEntry, pRootItem, nRootPos ); }
void InsertTree( SvTreeListEntry* pTree, SvTreeListEntry* pTargetParent, sal_uLong nListPos );
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index a5877d0cca60..bac80fcf59a1 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -296,8 +296,8 @@ protected:
// Invalidate children on enable/disable
virtual void StateChanged( StateChangedType eType );
- virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=LIST_APPEND);
- virtual sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = LIST_APPEND );
+ virtual sal_uLong Insert( SvTreeListEntry* pEnt,SvTreeListEntry* pPar,sal_uLong nPos=TREELIST_APPEND);
+ virtual sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = TREELIST_APPEND );
// In-place editing
SvInplaceEdit2* pEdCtrl;
@@ -629,7 +629,7 @@ public:
virtual SvTreeListEntry* InsertEntry( const OUString& rText, SvTreeListEntry* pParent = 0,
sal_Bool bChildrenOnDemand = sal_False,
- sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
+ sal_uLong nPos=TREELIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
virtual SvTreeListEntry* InsertEntry( const OUString& rText,
@@ -637,7 +637,7 @@ public:
const Image& rCollapsedEntryBmp,
SvTreeListEntry* pParent = 0,
sal_Bool bChildrenOnDemand = sal_False,
- sal_uLong nPos = LIST_APPEND, void* pUserData = 0,
+ sal_uLong nPos = TREELIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
const Image& GetDefaultExpandedEntryBmp( ) const;
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index f128884d08c2..e3d9207a0902 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -193,8 +193,8 @@ to be set (before Show) with SetStyle().
// - ValueSet -
-#define VALUESET_APPEND ((sal_uInt16)-1)
-#define VALUESET_ITEM_NOTFOUND ((sal_uInt16)-1)
+#define VALUESET_APPEND ((size_t)-1)
+#define VALUESET_ITEM_NOTFOUND ((size_t)-1)
class SVT_DLLPUBLIC ValueSet : public Control
{
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx
index 0061d540aeb0..697f139b54ab 100644
--- a/include/svx/checklbx.hxx
+++ b/include/svx/checklbx.hxx
@@ -22,7 +22,6 @@
#include <svtools/treelistbox.hxx>
#include <svtools/svlbitm.hxx>
-#include <vcl/lstbox.hxx>
#include <svx/svxdllapi.h>
// class SvxCheckListBox -------------------------------------------------
@@ -51,23 +50,23 @@ public:
~SvxCheckListBox();
void InsertEntry ( const OUString& rStr,
- sal_uInt16 nPos = LISTBOX_APPEND,
+ sal_uLong nPos = TREELIST_APPEND,
void* pUserData = NULL,
SvLBoxButtonKind eButtonKind =
SvLBoxButtonKind_enabledCheckbox );
- void RemoveEntry ( sal_uInt16 nPos );
+ void RemoveEntry ( sal_uLong nPos );
- void SelectEntryPos ( sal_uInt16 nPos, sal_Bool bSelect = sal_True );
- sal_uInt16 GetSelectEntryPos () const;
+ void SelectEntryPos ( sal_uLong nPos, sal_Bool bSelect = sal_True );
+ sal_uLong GetSelectEntryPos () const;
- OUString GetText ( sal_uInt16 nPos ) const;
- sal_uInt16 GetCheckedEntryCount() const;
- void CheckEntryPos ( sal_uInt16 nPos, sal_Bool bCheck = sal_True );
- sal_Bool IsChecked ( sal_uInt16 nPos ) const;
+ OUString GetText ( sal_uLong nPos ) const;
+ sal_uLong GetCheckedEntryCount() const;
+ void CheckEntryPos ( sal_uLong nPos, sal_Bool bCheck = sal_True );
+ sal_Bool IsChecked ( sal_uLong nPos ) const;
void ToggleCheckButton ( SvTreeListEntry* pEntry );
- void* SetEntryData ( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData ( sal_uInt16 nPos ) const;
+ void* SetEntryData ( sal_uLong nPos, void* pNewData );
+ void* GetEntryData ( sal_uLong nPos ) const;
virtual void MouseButtonDown ( const MouseEvent& rMEvt );
virtual void KeyInput ( const KeyEvent& rKEvt );
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 0c05252034a3..f74829bf87c0 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -137,10 +137,10 @@ public:
bool IsValidComment(const OUString &rComment);
SvTreeListEntry* InsertEntry(const OUString& ,RedlinData *pUserData,
- SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
+ SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=TREELIST_APPEND);
SvTreeListEntry* InsertEntry(const OUString& ,RedlinData *pUserData,const Color&,
- SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
+ SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=TREELIST_APPEND);
virtual SvTreeListEntry* CreateEntry() const;
@@ -221,10 +221,10 @@ public:
sal_uInt16 GetDateMode();
void ClearAuthors();
- void InsertAuthor( const OUString& rString, sal_uInt16 nPos = LISTBOX_APPEND );
+ void InsertAuthor( const OUString& rString, sal_Int32 nPos = LISTBOX_APPEND );
OUString GetSelectedAuthor()const;
- void SelectedAuthorPos(sal_uInt16 nPos);
- sal_uInt16 SelectAuthor(const OUString& aString);
+ void SelectedAuthorPos(sal_Int32 nPos);
+ sal_Int32 SelectAuthor(const OUString& aString);
void SetComment(const OUString& rComment);
OUString GetComment()const;
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index f13d78744c82..a0b42672645d 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -235,7 +235,7 @@ public:
virtual void Fill( const XColorListRef &pTab );
void Append( const XColorEntry& rEntry );
- void Modify( const XColorEntry& rEntry, sal_uInt16 nPos );
+ void Modify( const XColorEntry& rEntry, sal_Int32 nPos );
};
/************************************************************************/
@@ -249,7 +249,7 @@ public:
virtual void Fill( const XHatchListRef &pList );
void Append( const XHatchEntry& rEntry, const Bitmap& rBitmap );
- void Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
+ void Modify( const XHatchEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap );
};
/************************************************************************/
@@ -263,7 +263,7 @@ public:
virtual void Fill( const XGradientListRef &pList );
void Append( const XGradientEntry& rEntry, const Bitmap& rBitmap );
- void Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
+ void Modify( const XGradientEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap );
void SelectEntryByList( const XGradientListRef &pList, const OUString& rStr,
const XGradient& rXGradient, sal_uInt16 nDist = 0 );
};
@@ -278,7 +278,7 @@ public:
virtual void Fill(const XBitmapListRef &pList);
void Append(const Size& rSize, const XBitmapEntry& rEntry);
- void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos);
+ void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_Int32 nPos);
void SelectEntryByList(const XBitmapList* pList, const OUString& rStr);
private:
@@ -333,7 +333,7 @@ public:
void setAddStandardFields(bool bNew);
void Append(const XDashEntry& rEntry, const Bitmap& rBitmap );
- void Modify(const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
+ void Modify(const XDashEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap );
void SelectEntryByList(const XDashList* pList, const OUString& rStr, const XDash& rDash, sal_uInt16 nDist = 0);
};
@@ -350,7 +350,7 @@ public:
virtual void Fill( const XLineEndListRef &pList, bool bStart = true );
void Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool bStart = true );
- void Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap, bool bStart = true );
+ void Modify( const XLineEndEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap, bool bStart = true );
};
diff --git a/include/svx/fontlb.hxx b/include/svx/fontlb.hxx
index 63fd156a72f6..bee24dfec836 100644
--- a/include/svx/fontlb.hxx
+++ b/include/svx/fontlb.hxx
@@ -78,11 +78,12 @@ public:
const OUString& rString, const Font& rFont, const Color* pColor = NULL );
/** Selects/deselects an entry specified by its position in the list box. */
- void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true );
+ void SelectEntryPos( sal_uLong nPos, bool bSelect = true );
/** Removes a selection. */
void SetNoSelection();
- /** Returns the position of the entry currently selected or LIST_APPEND. */
+ /** Returns the position of the entry currently selected or TREELIST_APPEND.
+ */
sal_uLong GetSelectEntryPos() const;
/** Returns the text of the selected entry or an empty string. */
OUString GetSelectEntry() const;
diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx
index 080a89ccec5d..ff61dd196664 100644
--- a/include/svx/frmdirlbox.hxx
+++ b/include/svx/frmdirlbox.hxx
@@ -46,7 +46,7 @@ public:
void InsertEntryValue(
const OUString& rString,
SvxFrameDirection eDirection,
- sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 nPos = LISTBOX_APPEND );
/** Removes the entry, that represents the specified frame direction. */
void RemoveEntryValue( SvxFrameDirection eDirection );
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index c996c4589fbb..9e40cb4f94f5 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -140,7 +140,7 @@ public:
SVX_DLLPUBLIC SgaObject* AcquireObject( size_t nPos );
SVX_DLLPUBLIC void ReleaseObject( SgaObject* pObj );
- SVX_DLLPUBLIC bool InsertObject( const SgaObject& rObj, sal_uIntPtr nPos = LIST_APPEND );
+ SVX_DLLPUBLIC bool InsertObject( const SgaObject& rObj, sal_uIntPtr nPos = CONTAINER_APPEND );
SVX_DLLPUBLIC bool RemoveObject( size_t nPos );
bool ChangeObjectPos( size_t nOldPos, size_t nNewPos );
@@ -202,17 +202,17 @@ public:
sal_Bool GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, sal_Bool bProgress = sal_False );
SVX_DLLPUBLIC sal_Bool GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool bProgress = sal_False );
- SVX_DLLPUBLIC sal_Bool InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos = LIST_APPEND );
+ SVX_DLLPUBLIC sal_Bool InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
SVX_DLLPUBLIC sal_Bool GetModel( sal_uIntPtr nPos, SdrModel& rModel, sal_Bool bProgress = sal_False );
- SVX_DLLPUBLIC sal_Bool InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos = LIST_APPEND );
+ SVX_DLLPUBLIC sal_Bool InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
sal_Bool GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rModelStreamRef, sal_Bool bProgress = sal_False );
- sal_Bool InsertModelStream( const SotStorageStreamRef& rModelStream, sal_uIntPtr nInsertPos = LIST_APPEND );
+ sal_Bool InsertModelStream( const SotStorageStreamRef& rModelStream, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
sal_Bool GetURL( sal_uIntPtr nPos, INetURLObject& rURL, sal_Bool bProgress = sal_False );
- SVX_DLLPUBLIC sal_Bool InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos = LIST_APPEND );
- sal_Bool InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos = LIST_APPEND );
+ SVX_DLLPUBLIC sal_Bool InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
+ sal_Bool InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos = CONTAINER_APPEND );
sal_Bool InsertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos );
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index f978e7b35eb5..c6c6de6c8d3e 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -64,8 +64,8 @@ private:
sal_Bool m_bWithCheckmark;
SVX_DLLPRIVATE void Init();
- SVX_DLLPRIVATE sal_uInt16 ImplInsertImgEntry( const OUString& rEntry, sal_uInt16 nPos, bool bChecked );
- SVX_DLLPRIVATE sal_uInt16 ImplInsertLanguage(LanguageType, sal_uInt16, sal_Int16 );
+ SVX_DLLPRIVATE sal_Int32 ImplInsertImgEntry( const OUString& rEntry, sal_Int32 nPos, bool bChecked );
+ SVX_DLLPRIVATE sal_Int32 ImplInsertLanguage(LanguageType, sal_Int32 nPos, sal_Int16 nType);
public:
SvxLanguageBox(Window* pParent, WinBits nBits, sal_Bool bCheck = sal_False);
@@ -75,11 +75,11 @@ public:
sal_Bool bHasLangNone, sal_Bool bLangNoneIsLangAll = sal_False,
sal_Bool bCheckSpellAvail = sal_False );
- sal_uInt16 InsertLanguage( const LanguageType eLangType, sal_uInt16 nPos = LISTBOX_APPEND );
- sal_uInt16 InsertDefaultLanguage( sal_Int16 nType, sal_uInt16 nPos = LISTBOX_APPEND );
- sal_uInt16 InsertSystemLanguage( sal_uInt16 nPos = LISTBOX_APPEND );
- sal_uInt16 InsertLanguage( const LanguageType eLangType,
- sal_Bool bCheckEntry, sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertLanguage( const LanguageType eLangType, sal_Int32 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertSystemLanguage( sal_Int32 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertLanguage( const LanguageType eLangType,
+ sal_Bool bCheckEntry, sal_Int32 nPos = LISTBOX_APPEND );
void RemoveLanguage( const LanguageType eLangType );
void SelectLanguage( const LanguageType eLangType, sal_Bool bSelect = sal_True );
LanguageType GetSelectLanguage() const;
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index 6755aef97469..4610d3039882 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -160,7 +160,7 @@ public:
OUString GetFormat4Entry(short nEntry);
void SetComment4Entry(short nEntry, const OUString& aCommentString);
- void SetCurrencySymbol(sal_uInt16 nPos);
+ void SetCurrencySymbol(sal_uInt32 nPos);
sal_uInt32 GetCurrencySymbol();
sal_uInt16 FindCurrencyFormat( const OUString& rFmtString );
sal_uInt16 FindCurrencyFormat(const NfCurrencyEntry* pTmpCurrencyEntry,bool bTmpBanking);
@@ -195,7 +195,7 @@ private:
std::vector<sal_uInt16> aCurCurrencyList;
NfCurrencyEntry* pCurCurrencyEntry;
bool bBankingSymbol;
- sal_uInt16 nCurCurrencyEntryPos;
+ sal_uInt32 nCurCurrencyEntryPos;
std::vector<OUString> aCurrencyFormatList;
bool bUseStarFormat;
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index bfab233f158f..465c540f1454 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -25,6 +25,7 @@
#include <vcl/print.hxx>
#include <vcl/gdimtf.hxx>
#include <tools/weakbase.hxx>
+#include <tools/contnr.hxx>
#include <cppuhelper/weakref.hxx>
#include <svx/svdtypes.hxx>
#include <svx/svdlayer.hxx>
@@ -126,10 +127,10 @@ public:
// Neuberechnung der Objekt-Ordnungsnummern
void RecalcObjOrdNums();
bool IsObjOrdNumsDirty() const { return bObjOrdNumsDirty; }
- virtual void NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos=0xFFFF
+ virtual void NbcInsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND
, const SdrInsertReason* pReason=NULL
);
- virtual void InsertObject(SdrObject* pObj, sal_uIntPtr nPos=0xFFFF
+ virtual void InsertObject(SdrObject* pObj, sal_uIntPtr nPos=CONTAINER_APPEND
, const SdrInsertReason* pReason=NULL
);
// aus Liste entfernen ohne delete
diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx
index df5778a1e6c6..92bc35baa105 100644
--- a/include/svx/txencbox.hxx
+++ b/include/svx/txencbox.hxx
@@ -30,7 +30,7 @@ class SVX_DLLPUBLIC SvxTextEncodingBox : public ListBox
private:
const SvxTextEncodingTable* m_pEncTable;
- SVX_DLLPRIVATE sal_uInt16 EncodingToPos_Impl( rtl_TextEncoding nEnc ) const;
+ SVX_DLLPRIVATE sal_Int32 EncodingToPos_Impl( rtl_TextEncoding nEnc ) const;
public:
SvxTextEncodingBox( Window* pParent, WinBits nBits );
@@ -87,11 +87,11 @@ public:
{ return m_pEncTable; }
void InsertTextEncoding( const rtl_TextEncoding nEnc,
- sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 nPos = LISTBOX_APPEND );
void InsertTextEncoding( const rtl_TextEncoding nEnc,
const OUString& rEntry,
- sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 nPos = LISTBOX_APPEND );
void SelectTextEncoding( const rtl_TextEncoding nEnc,
sal_Bool bSelect = sal_True );
diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index 791583da7ed2..a400a5677c02 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -40,6 +40,8 @@
#include <svtools/grfmgr.hxx>
#include <svx/XPropertyEntry.hxx>
+#include <limits>
+
class Color;
class Bitmap;
class VirtualDevice;
@@ -218,7 +220,7 @@ public:
XPropertyListType Type() const { return meType; }
long Count() const;
- void Insert(XPropertyEntry* pEntry, long nIndex = CONTAINER_APPEND);
+ void Insert(XPropertyEntry* pEntry, long nIndex = ::std::numeric_limits<long>::max());
XPropertyEntry* Replace(XPropertyEntry* pEntry, long nIndex);
XPropertyEntry* Remove(long nIndex);
diff --git a/include/tools/contnr.hxx b/include/tools/contnr.hxx
index 6903d67a7c35..9fe673af92f2 100644
--- a/include/tools/contnr.hxx
+++ b/include/tools/contnr.hxx
@@ -24,9 +24,11 @@
#include <limits.h>
-#define CONTAINER_APPEND ULONG_MAX
-#define CONTAINER_ENTRY_NOTFOUND ULONG_MAX
-#define LIST_APPEND CONTAINER_APPEND
+#define CONTAINER_APPEND (ULONG_MAX)
+#define CONTAINER_ENTRY_NOTFOUND (ULONG_MAX)
+
+#define TREELIST_APPEND (ULONG_MAX)
+#define TREELIST_ENTRY_NOTFOUND (ULONG_MAX)
#endif
diff --git a/include/vcl/combobox.h b/include/vcl/combobox.h
index 0127b3dee4eb..047a24cd9d41 100644
--- a/include/vcl/combobox.h
+++ b/include/vcl/combobox.h
@@ -22,9 +22,10 @@
#include <vcl/lstbox.h>
-#define COMBOBOX_APPEND ((sal_uInt16)0xFFFF)
-#define COMBOBOX_ENTRY_NOTFOUND ((sal_uInt16)0xFFFF)
-#define COMBOBOX_ERROR ((sal_uInt16)0xFFFF)
+#define COMBOBOX_APPEND (SAL_MAX_INT32)
+#define COMBOBOX_ENTRY_NOTFOUND (SAL_MAX_INT32)
+#define COMBOBOX_ERROR (SAL_MAX_INT32)
+#define COMBOBOX_MAX_ENTRIES (SAL_MAX_INT32 - 1)
#endif // INCLUDED_VCL_COMBOBOX_H
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index 7809188db1bb..b9bde8c2b1bb 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -42,7 +42,7 @@ private:
ImplListBox* mpImplLB;
ImplBtn* mpBtn;
ImplListBoxFloatingWindow* mpFloatWin;
- sal_uInt16 mnDDHeight;
+ sal_uInt16 mnDDHeight;
sal_Unicode mcMultiSep;
bool mbDDAutoSize : 1;
bool mbSyntheticModify : 1;
@@ -129,21 +129,21 @@ public:
virtual void SetText( const OUString& rStr );
virtual void SetText( const OUString& rStr, const Selection& rNewSelection );
- virtual sal_uInt16 InsertEntry(const OUString& rStr, sal_uInt16 nPos = COMBOBOX_APPEND);
- void InsertEntryWithImage( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = COMBOBOX_APPEND );
+ virtual sal_Int32 InsertEntry(const OUString& rStr, sal_Int32 nPos = COMBOBOX_APPEND);
+ void InsertEntryWithImage( const OUString& rStr, const Image& rImage, sal_Int32 nPos = COMBOBOX_APPEND );
void RemoveEntry( const OUString& rStr );
- virtual void RemoveEntryAt(sal_uInt16 nPos);
+ virtual void RemoveEntryAt(sal_Int32 nPos);
void Clear();
- sal_uInt16 GetEntryPos( const OUString& rStr ) const;
- Image GetEntryImage( sal_uInt16 nPos ) const;
- OUString GetEntry( sal_uInt16 nPos ) const;
- sal_uInt16 GetEntryCount() const;
+ sal_Int32 GetEntryPos( const OUString& rStr ) const;
+ Image GetEntryImage( sal_Int32 nPos ) const;
+ OUString GetEntry( sal_Int32 nPos ) const;
+ sal_Int32 GetEntryCount() const;
- bool IsTravelSelect() const;
- bool IsInDropDown() const;
+ bool IsTravelSelect() const;
+ bool IsInDropDown() const;
void ToggleDropDown();
long CalcWindowSizePixel( sal_uInt16 nLines ) const;
@@ -154,13 +154,13 @@ public:
void DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false );
void SetBorderStyle( sal_uInt16 nBorderStyle );
- void SetSeparatorPos( sal_uInt16 n = LISTBOX_ENTRY_NOTFOUND );
+ void SetSeparatorPos( sal_Int32 n = LISTBOX_ENTRY_NOTFOUND );
void EnableAutocomplete( bool bEnable, bool bMatchCase = false );
- bool IsAutocompleteEnabled() const;
+ bool IsAutocompleteEnabled() const;
void EnableMultiSelection( bool bMulti );
- bool IsMultiSelectionEnabled() const;
+ bool IsMultiSelectionEnabled() const;
void SetMultiSelectionSeparator( sal_Unicode cSep ) { mcMultiSep = cSep; }
sal_Unicode GetMultiSelectionSeparator() const { return mcMultiSep; }
@@ -177,24 +177,24 @@ public:
void SetMRUEntries( const OUString& rEntries, sal_Unicode cSep = ';' );
OUString GetMRUEntries( sal_Unicode cSep = ';' ) const;
- void SetMaxMRUCount( sal_uInt16 n );
- sal_uInt16 GetMaxMRUCount() const;
- sal_uInt16 GetMRUCount() const;
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetMaxMRUCount( sal_Int32 n );
+ sal_Int32 GetMaxMRUCount() const;
+ sal_Int32 GetMRUCount() const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
- sal_uInt16 GetTopEntry() const;
+ sal_Int32 GetTopEntry() const;
void SetProminentEntryType( ProminentEntry eType );
- sal_uInt16 GetDisplayLineCount() const;
+ sal_uInt16 GetDisplayLineCount() const;
- sal_uInt16 GetSelectEntryCount() const;
- sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
- bool IsEntryPosSelected( sal_uInt16 nPos ) const;
- void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true );
+ sal_Int32 GetSelectEntryCount() const;
+ sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const;
+ bool IsEntryPosSelected( sal_Int32 nPos ) const;
+ void SelectEntryPos( sal_Int32 nPos, bool bSelect = true );
void SetNoSelection();
- Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const;
+ Rectangle GetBoundingRectangle( sal_Int32 nItem ) const;
/** checks whether a certain point lies within the bounds of
a list item and returns the item as well as the character position
@@ -215,7 +215,7 @@ public:
if no item is at that point.
*/
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
sal_Int32 getMaxWidthChars() const { return m_nMaxWidthChars; }
void setMaxWidthChars(sal_Int32 nWidth);
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 47b77abda784..e9bd9e5f4440 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -128,7 +128,7 @@ public:
const OUString& GetLiteralMask() const { return maLiteralMask; }
void SetFormatFlags( sal_uInt16 nFlags ) { mnFormatFlags = nFlags; }
- sal_uInt16 GetFormatFlags() const { return mnFormatFlags; }
+ sal_uInt16 GetFormatFlags() const { return mnFormatFlags; }
void SetString( const OUString& rStr );
OUString GetString() const;
@@ -732,7 +732,7 @@ public:
virtual void ReformatAll();
- void InsertValue( sal_Int64 nValue, sal_uInt16 nPos = COMBOBOX_APPEND );
+ void InsertValue( sal_Int64 nValue, sal_Int32 nPos = COMBOBOX_APPEND );
};
@@ -758,9 +758,9 @@ public:
virtual void ReformatAll();
void InsertValue( sal_Int64 nValue, FieldUnit eInUnit = FUNIT_NONE,
- sal_uInt16 nPos = COMBOBOX_APPEND );
- sal_Int64 GetValue( sal_uInt16 nPos, FieldUnit eOutUnit = FUNIT_NONE ) const;
- sal_uInt16 GetValuePos( sal_Int64 nValue,
+ sal_Int32 nPos = COMBOBOX_APPEND );
+ sal_Int64 GetValue( sal_Int32 nPos, FieldUnit eOutUnit = FUNIT_NONE ) const;
+ sal_Int32 GetValuePos( sal_Int64 nValue,
FieldUnit eInUnit = FUNIT_NONE ) const;
// Needed, because GetValue() with nPos hide these functions
diff --git a/include/vcl/lstbox.h b/include/vcl/lstbox.h
index 80383cfec234..50e121fad6fc 100644
--- a/include/vcl/lstbox.h
+++ b/include/vcl/lstbox.h
@@ -20,9 +20,12 @@
#ifndef INCLUDED_VCL_LSTBOX_H
#define INCLUDED_VCL_LSTBOX_H
-#define LISTBOX_APPEND ((sal_uInt16)0xFFFF)
-#define LISTBOX_ENTRY_NOTFOUND ((sal_uInt16)0xFFFF)
-#define LISTBOX_ERROR ((sal_uInt16)0xFFFF)
+#include <sal/types.h>
+
+#define LISTBOX_APPEND (SAL_MAX_INT32)
+#define LISTBOX_ENTRY_NOTFOUND (SAL_MAX_INT32)
+#define LISTBOX_ERROR (SAL_MAX_INT32)
+#define LISTBOX_MAX_ENTRIES (SAL_MAX_INT32 - 1)
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index bfba165e8466..c81b52a5b916 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -42,8 +42,8 @@ private:
ImplWin* mpImplWin;
ImplBtn* mpBtn;
sal_uInt16 mnDDHeight;
- sal_uInt16 mnSaveValue;
- sal_Int32 m_nMaxWidthChars;
+ sal_Int32 mnSaveValue;
+ sal_Int32 m_nMaxWidthChars;
Link maSelectHdl;
Link maDoubleClickHdl;
sal_uInt16 mnLineCount;
@@ -115,32 +115,32 @@ public:
void EnableDDAutoWidth( bool b );
- sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
- sal_uInt16 InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertEntry( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertEntry( const OUString& rStr, const Image& rImage, sal_Int32 nPos = LISTBOX_APPEND );
void RemoveEntry( const OUString& rStr );
- void RemoveEntry( sal_uInt16 nPos );
+ void RemoveEntry( sal_Int32 nPos );
void Clear();
- sal_uInt16 GetEntryPos( const OUString& rStr ) const;
- sal_uInt16 GetEntryPos( const void* pData ) const;
- Image GetEntryImage( sal_uInt16 nPos ) const;
- OUString GetEntry( sal_uInt16 nPos ) const;
- sal_uInt16 GetEntryCount() const;
+ sal_Int32 GetEntryPos( const OUString& rStr ) const;
+ sal_Int32 GetEntryPos( const void* pData ) const;
+ Image GetEntryImage( sal_Int32 nPos ) const;
+ OUString GetEntry( sal_Int32 nPos ) const;
+ sal_Int32 GetEntryCount() const;
void SelectEntry( const OUString& rStr, bool bSelect = true );
- void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true );
+ void SelectEntryPos( sal_Int32 nPos, bool bSelect = true );
- sal_uInt16 GetSelectEntryCount() const;
- OUString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const;
- sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
+ sal_Int32 GetSelectEntryCount() const;
+ OUString GetSelectEntry( sal_Int32 nSelIndex = 0 ) const;
+ sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const;
bool IsEntrySelected(const OUString& rStr) const;
- bool IsEntryPosSelected( sal_uInt16 nPos ) const;
+ bool IsEntryPosSelected( sal_Int32 nPos ) const;
void SetNoSelection();
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
/** this methods stores a combination of flags from the
LISTBOX_ENTRY_FLAG_* defines at the given entry.
@@ -150,36 +150,36 @@ public:
to change the internal behaviour of the ListBox implementation
for specific entries.
*/
- void SetEntryFlags( sal_uInt16 nPos, long nFlags );
+ void SetEntryFlags( sal_Int32 nPos, long nFlags );
/** this methods gets the current combination of flags from the
LISTBOX_ENTRY_FLAG_* defines from the given entry.
See description of the possible LISTBOX_ENTRY_FLAG_* flags
for details.
*/
- long GetEntryFlags( sal_uInt16 nPos ) const;
+ long GetEntryFlags( sal_Int32 nPos ) const;
- void SetTopEntry( sal_uInt16 nPos );
- sal_uInt16 GetTopEntry() const;
+ void SetTopEntry( sal_Int32 nPos );
+ sal_Int32 GetTopEntry() const;
void SaveValue() { mnSaveValue = GetSelectEntryPos(); }
- sal_uInt16 GetSavedValue() const { return mnSaveValue; }
+ sal_Int32 GetSavedValue() const { return mnSaveValue; }
- void SetSeparatorPos( sal_uInt16 n = LISTBOX_ENTRY_NOTFOUND );
- sal_uInt16 GetSeparatorPos() const;
+ void SetSeparatorPos( sal_Int32 n = LISTBOX_ENTRY_NOTFOUND );
+ sal_Int32 GetSeparatorPos() const;
- bool IsTravelSelect() const;
- bool IsInDropDown() const;
+ bool IsTravelSelect() const;
+ bool IsInDropDown() const;
void ToggleDropDown();
void EnableMultiSelection( bool bMulti, bool bStackSelection );
void EnableMultiSelection( bool bMulti );
- bool IsMultiSelectionEnabled() const;
+ bool IsMultiSelectionEnabled() const;
void SetReadOnly( bool bReadOnly = true );
- bool IsReadOnly() const;
+ bool IsReadOnly() const;
- Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const;
+ Rectangle GetBoundingRectangle( sal_Int32 nItem ) const;
void SetUserItemSize( const Size& rSz );
@@ -199,7 +199,7 @@ public:
Size CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const;
- sal_uInt16 GetMRUCount() const;
+ sal_Int32 GetMRUCount() const;
sal_uInt16 GetDisplayLineCount() const;
void EnableMirroring();
@@ -226,7 +226,7 @@ public:
if no item is at that point.
*/
using Control::GetIndexForPoint;
- long GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const;
+ long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
sal_Int32 getMaxWidthChars() const { return m_nMaxWidthChars; }
void setMaxWidthChars(sal_Int32 nWidth);
@@ -248,7 +248,7 @@ public:
private:
// Bei MultiListBox nicht erlaubt...
void SaveValue();
- sal_uInt16 GetSavedValue();
+ sal_Int32 GetSavedValue();
public:
explicit MultiListBox( Window* pParent, WinBits nStyle = 0 );
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 9e4d6ccee07a..4082de66e914 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -36,7 +36,7 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con
return;
const PPDValue* pValue = NULL;
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
OUString aOptionText;
for( int i = 0; i < pKey->countValues(); i++ )
@@ -210,7 +210,7 @@ RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
m_pDuplexBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
m_pSlotBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
// duplex
nPos = m_pDuplexBox->InsertEntry( m_pParent->m_aInvalidString );
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 1ff8e015a49d..cf982895fbb1 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -274,7 +274,7 @@ namespace
const OUString* pEntries = _rEntries.getConstArray();
sal_Int32 nEntries = _rEntries.getLength();
for ( sal_Int32 i = 0; i < nEntries; ++i, ++pEntries )
- _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries) );
+ _rListBox.InsertEntry( *pEntries,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(*pEntries) );
}
void lcl_addToList( OAddFieldWindowListBox& _rListBox, const uno::Reference< container::XNameAccess>& i_xColumns )
{
@@ -288,9 +288,9 @@ namespace
if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
if ( !sLabel.isEmpty() )
- _rListBox.InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ _rListBox.InsertEntry( sLabel,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
else
- _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ _rListBox.InsertEntry( *pEntries,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
}
}
}
@@ -456,9 +456,9 @@ void OAddFieldWindow::_elementInserted( const container::ContainerEvent& _rEvent
if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
if ( !sLabel.isEmpty() )
- m_pListBox->InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) );
+ m_pListBox->InsertEntry( sLabel,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(sName,sLabel) );
else
- m_pListBox->InsertEntry( sName,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) );
+ m_pListBox->InsertEntry( sName,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(sName,sLabel) );
}
}
}
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 1d56f1b81183..d84b3d87ead2 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -253,7 +253,7 @@ sal_Int8 OFieldExpressionControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt
sal_Int8 nAction = DND_ACTION_NONE;
if ( IsEditing() )
{
- sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos();
+ sal_Int32 nPos = m_pComboCell->GetSelectEntryPos();
if ( COMBOBOX_ENTRY_NOTFOUND != nPos || !m_pComboCell->GetText().isEmpty() )
SaveModified();
DeactivateCell();
@@ -447,7 +447,7 @@ sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
xGroup = m_pParent->getGroup(m_aGroupPositions[nRow]);
if ( xGroup.is() )
{
- sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos();
+ sal_Int32 nPos = m_pComboCell->GetSelectEntryPos();
OUString sExpression;
if ( COMBOBOX_ENTRY_NOTFOUND == nPos )
sExpression = m_pComboCell->GetText();
@@ -1287,7 +1287,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::INTERVAL));
break;
}
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
switch(_xGroup->getGroupOn())
{
case report::GroupOn::DEFAULT:
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 9bdcbbcd34fb..f424dff3ca06 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -154,7 +154,7 @@ class NavigatorTree : public ::cppu::BaseMutex
unsigned short m_nTimerCounter;
SvTreeListEntry* insertEntry(const OUString& _sName,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData);
- void traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition = LIST_APPEND);
+ void traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition = TREELIST_APPEND);
void traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvTreeListEntry* _pParent);
NavigatorTree(const NavigatorTree&);
@@ -521,7 +521,7 @@ void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xS
{
uno::Reference< report::XReportComponent> xElement(_xSection->getByIndex(i),uno::UNO_QUERY_THROW);
OSL_ENSURE(xElement.is(),"Found report element which is NULL!");
- insertEntry(lcl_getName(xElement.get()),pSection,lcl_getImageId(xElement),LIST_APPEND,new UserData(this,xElement));
+ insertEntry(lcl_getName(xElement.get()),pSection,lcl_getImageId(xElement),TREELIST_APPEND,new UserData(this,xElement));
uno::Reference< report::XReportDefinition> xSubReport(xElement,uno::UNO_QUERY);
if ( xSubReport.is() )
{
@@ -534,12 +534,12 @@ void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xS
void NavigatorTree::traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvTreeListEntry* _pParent)
{
- SvTreeListEntry* pFunctions = insertEntry(OUString(ModuleRes(RID_STR_FUNCTIONS)), _pParent, SID_RPT_NEW_FUNCTION, LIST_APPEND, new UserData(this,_xFunctions));
+ SvTreeListEntry* pFunctions = insertEntry(OUString(ModuleRes(RID_STR_FUNCTIONS)), _pParent, SID_RPT_NEW_FUNCTION, TREELIST_APPEND, new UserData(this,_xFunctions));
const sal_Int32 nCount = _xFunctions->getCount();
for (sal_Int32 i = 0; i< nCount; ++i)
{
uno::Reference< report::XFunction> xElement(_xFunctions->getByIndex(i),uno::UNO_QUERY);
- insertEntry(xElement->getName(),pFunctions,SID_RPT_NEW_FUNCTION,LIST_APPEND,new UserData(this,xElement));
+ insertEntry(xElement->getName(),pFunctions,SID_RPT_NEW_FUNCTION,TREELIST_APPEND,new UserData(this,xElement));
}
}
@@ -568,7 +568,7 @@ SvTreeListEntry* NavigatorTree::find(const uno::Reference< uno::XInterface >& _x
void NavigatorTree::traverseReport(const uno::Reference< report::XReportDefinition>& _xReport)
{
- insertEntry(_xReport->getName(),m_pMasterReport,SID_SELECT_REPORT,LIST_APPEND,new UserData(this,_xReport));
+ insertEntry(_xReport->getName(),m_pMasterReport,SID_SELECT_REPORT,TREELIST_APPEND,new UserData(this,_xReport));
}
void NavigatorTree::traverseReportFunctions(const uno::Reference< report::XFunctions>& _xFunctions)
@@ -604,7 +604,7 @@ void NavigatorTree::traversePageFooter(const uno::Reference< report::XSection>&
void NavigatorTree::traverseGroups(const uno::Reference< report::XGroups>& _xGroups)
{
SvTreeListEntry* pReport = find(_xGroups->getReportDefinition());
- insertEntry(OUString(ModuleRes(RID_STR_GROUPS)), pReport, SID_SORTINGANDGROUPING, LIST_APPEND, new UserData(this,_xGroups));
+ insertEntry(OUString(ModuleRes(RID_STR_GROUPS)), pReport, SID_SORTINGANDGROUPING, TREELIST_APPEND, new UserData(this,_xGroups));
}
void NavigatorTree::traverseGroup(const uno::Reference< report::XGroup>& _xGroup)
@@ -665,7 +665,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
traverseSection(xReport->getPageFooter(),pParent, SID_PAGEHEADERFOOTER);
else if ( _rEvent.PropertyName == PROPERTY_REPORTFOOTERON )
{
- sal_uLong nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : LIST_APPEND;
+ sal_uLong nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : TREELIST_APPEND;
traverseSection(xReport->getReportFooter(),pParent,SID_REPORTHEADERFOOTER,nPos);
}
}
@@ -696,7 +696,7 @@ void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent )
uno::Reference< report::XReportComponent> xElement(xProp,uno::UNO_QUERY);
if ( xProp.is() )
sName = lcl_getName(xProp);
- insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),LIST_APPEND,new UserData(this,xProp));
+ insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),TREELIST_APPEND,new UserData(this,xProp));
}
if ( !IsExpanded(pEntry) )
Expand(pEntry);
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index bf9a61df65a4..981b4e5d6e19 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1515,7 +1515,7 @@ void ScCheckListMenuWindow::initMembers()
{
if ( !maMembers[ i ].mbDate )
{
- maChecks.InsertEntry(maMembers[i].maName, NULL, sal_False, LISTBOX_APPEND, NULL,
+ maChecks.InsertEntry(maMembers[i].maName, NULL, sal_False, TREELIST_APPEND, NULL,
SvLBoxButtonKind_enabledCheckbox );
}
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 3990cfdc1f96..2ea6fc3a2108 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -68,7 +68,7 @@ void ScCondFormatManagerWindow::Init()
for(ScConditionalFormatList::iterator itr = mpFormatList->begin(); itr != mpFormatList->end(); ++itr)
{
- SvTreeListEntry* pEntry = InsertEntryToColumn( createEntryString(*itr), LIST_APPEND, 0xffff );
+ SvTreeListEntry* pEntry = InsertEntryToColumn( createEntryString(*itr), TREELIST_APPEND, 0xffff );
maMapLBoxEntryToCondIndex.insert(std::pair<SvTreeListEntry*,sal_Int32>(pEntry,itr->GetKey()));
}
SetUpdateMode(true);
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index a9aca83417cb..e412c34e6731 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -377,8 +377,8 @@ sal_uInt16 ScPivotFilterDlg::GetFieldSelPos( SCCOL nField )
const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
{
ScQueryParam theParam( theQueryData );
- sal_uInt16 nConnect1 = aLbConnect1.GetSelectEntryPos();
- sal_uInt16 nConnect2 = aLbConnect2.GetSelectEntryPos();
+ sal_Int32 nConnect1 = aLbConnect1.GetSelectEntryPos();
+ sal_Int32 nConnect2 = aLbConnect2.GetSelectEntryPos();
svl::SharedStringPool& rPool = pViewData->GetDocument()->GetSharedStringPool();
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index e7a08189a83d..2f2910bdfb00 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -59,7 +59,7 @@ namespace {
@return true = The passed string list contains an empty string entry.
*/
template< typename ListBoxType >
-bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, sal_uInt16 nEmptyPos = LISTBOX_APPEND )
+bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, sal_Int32 nEmptyPos = LISTBOX_APPEND )
{
bool bEmpty = false;
const OUString* pStr = rStrings.getConstArray();
@@ -80,7 +80,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, s
}
template< typename ListBoxType >
-bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, sal_uInt16 nEmptyPos = LISTBOX_APPEND )
+bool lclFillListBox( ListBoxType& rLBox, const vector<ScDPLabelData::Member>& rMembers, sal_Int32 nEmptyPos = LISTBOX_APPEND )
{
bool bEmpty = false;
vector<ScDPLabelData::Member>::const_iterator itr = rMembers.begin(), itrEnd = rMembers.end();
@@ -134,7 +134,7 @@ static const ScDPListBoxWrapper::MapEntryType spRefTypeMap[] =
{ 6, DataPilotFieldReferenceType::COLUMN_PERCENTAGE },
{ 7, DataPilotFieldReferenceType::TOTAL_PERCENTAGE },
{ 8, DataPilotFieldReferenceType::INDEX },
- { LISTBOX_ENTRY_NOTFOUND, DataPilotFieldReferenceType::NONE }
+ { WRAPPER_LISTBOX_ENTRY_NOTFOUND, DataPilotFieldReferenceType::NONE }
};
static const ScDPListBoxWrapper::MapEntryType spLayoutMap[] =
@@ -142,14 +142,14 @@ static const ScDPListBoxWrapper::MapEntryType spLayoutMap[] =
{ 0, DataPilotFieldLayoutMode::TABULAR_LAYOUT },
{ 1, DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_TOP },
{ 2, DataPilotFieldLayoutMode::OUTLINE_SUBTOTALS_BOTTOM },
- { LISTBOX_ENTRY_NOTFOUND, DataPilotFieldLayoutMode::TABULAR_LAYOUT }
+ { WRAPPER_LISTBOX_ENTRY_NOTFOUND, DataPilotFieldLayoutMode::TABULAR_LAYOUT }
};
static const ScDPListBoxWrapper::MapEntryType spShowFromMap[] =
{
{ 0, DataPilotFieldShowItemsMode::FROM_TOP },
{ 1, DataPilotFieldShowItemsMode::FROM_BOTTOM },
- { LISTBOX_ENTRY_NOTFOUND, DataPilotFieldShowItemsMode::FROM_TOP }
+ { WRAPPER_LISTBOX_ENTRY_NOTFOUND, DataPilotFieldShowItemsMode::FROM_TOP }
};
} // namespace
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 899ec67524fb..bfe7af6abbfe 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -253,7 +253,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet )
aNewSortData = aTempData;
}
}
- std::vector<sal_uInt16> nSortPos;
+ std::vector<sal_Int32> nSortPos;
for ( sal_uInt16 i=0; i<nSortKeyCount; i++ )
{
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index cb728fece561..a5fcd1b64c4c 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -69,13 +69,13 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( Window* pParent,
ScTpSubTotalGroup::~ScTpSubTotalGroup()
{
- sal_uInt16 nCount = (sal_uInt16)mpLbColumns->GetEntryCount();
+ sal_uLong nCount = mpLbColumns->GetEntryCount();
if ( nCount > 0 )
{
sal_uInt16* pData = NULL;
- for ( sal_uInt16 i=0; i<nCount; i++ )
+ for ( sal_uLong i=0; i<nCount; i++ )
{
pData = (sal_uInt16*)(mpLbColumns->GetEntryData( i ));
OSL_ENSURE( pData, "EntryData not found" );
@@ -123,7 +123,7 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo,
// first we have to clear the listboxes...
- for ( sal_uInt16 nLbEntry = 0; nLbEntry < mpLbColumns->GetEntryCount(); ++nLbEntry )
+ for ( sal_uLong nLbEntry = 0; nLbEntry < mpLbColumns->GetEntryCount(); ++nLbEntry )
{
mpLbColumns->CheckEntryPos( nLbEntry, false );
*((sal_uInt16*)mpLbColumns->GetEntryData( nLbEntry )) = 0;
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 4b25d2aa6da3..fd77fdfb4d82 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -195,7 +195,7 @@ void ScFunctionDockWin::InitLRUList()
pFuncMgr->fillLastRecentlyUsedFunctions(aLRUList);
- sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos();
+ sal_Int32 nSelPos = aCatBox.GetSelectEntryPos();
if(nSelPos == 0)
UpdateFunctionList();
@@ -241,7 +241,7 @@ void ScFunctionDockWin::UpdateLRUList()
void ScFunctionDockWin::SetSize()
{
- sal_uInt16 nSelEntry=0;
+ sal_Int32 nSelEntry=0;
SfxChildAlignment aChildAlign=eSfxOldAlignment;//GetAlignment();
short nNewDockMode;
switch(aChildAlign)
@@ -769,8 +769,8 @@ void ScFunctionDockWin::Resize()
void ScFunctionDockWin::UpdateFunctionList()
{
- sal_uInt16 nSelPos = aCatBox.GetSelectEntryPos();
- sal_uInt16 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ sal_Int32 nSelPos = aCatBox.GetSelectEntryPos();
+ sal_Int32 nCategory = ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
? (nSelPos-1) : 0;
pAllFuncList->Clear();
@@ -1088,7 +1088,7 @@ void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo)
aSplitterInitPos.Y() = (sal_uInt16) aStr.toInt32();
sal_Int32 n1 = aStr.indexOf(';');
aStr = aStr.copy( n1+1 );
- sal_uInt16 nSelPos = sal::static_int_cast<sal_uInt16>( aStr.toInt32() );
+ sal_Int32 nSelPos = aStr.toInt32();
aCatBox.SelectEntryPos(nSelPos);
SelHdl(&aCatBox);
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index b135e0231475..16ec2674e3e7 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -170,12 +170,12 @@ protected:
SvTreeListEntry* InsertChangeAction(
const ScChangeAction* pScChangeAction,ScChangeActionState eState,
SvTreeListEntry* pParent=NULL,bool bDelMaster = false,
- bool bDisabled = false,sal_uLong nPos = LIST_APPEND);
+ bool bDisabled = false,sal_uLong nPos = TREELIST_APPEND);
SvTreeListEntry* InsertFilteredAction(
const ScChangeAction* pScChangeAction,ScChangeActionState eState,
SvTreeListEntry* pParent = NULL,bool bDelMaster = false,
- bool bDisabled = false, sal_uLong nPos = LIST_APPEND);
+ bool bDisabled = false, sal_uLong nPos = TREELIST_APPEND);
SvTreeListEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
SvTreeListEntry* pParent,sal_uLong nSpecial);
@@ -194,7 +194,7 @@ protected:
bool InsertChildren( ScChangeActionMap* pActionMap, SvTreeListEntry* pParent );
void AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction,
- sal_uLong nPos=LIST_APPEND);
+ sal_uLong nPos=TREELIST_APPEND);
void RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction);
void UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction);
diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
index fdc093ca2b7a..66f56af770c9 100644
--- a/sc/source/ui/inc/tpsubt.hxx
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -23,6 +23,7 @@
#include <sfx2/tabdlg.hxx>
#include <svx/checklbx.hxx>
#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
#include "global.hxx"
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index 0879cd0a1dcf..03308ea8bd64 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -81,17 +81,17 @@ private:
bool bModifyMode;
bool bCancelMode;
bool bCopyDone;
- sal_uInt16 nCancelPos;
+ sal_Int32 nCancelPos;
#ifdef _TPUSRLST_CXX
private:
void Init ();
- sal_uInt16 UpdateUserListBox ();
+ size_t UpdateUserListBox ();
void UpdateEntries ( size_t nList );
void MakeListStr ( OUString& rListStr );
void AddNewList ( const OUString& rEntriesStr );
void RemoveList ( size_t nList );
- void ModifyList ( sal_uInt16 nSelList,
+ void ModifyList ( size_t nSelList,
const OUString& rEntriesStr );
void CopyListFromArea ( const ScRefAddress& rStartPos,
const ScRefAddress& rEndPos );
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 83d0f488485c..fa7660706d24 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1539,7 +1539,7 @@ void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartActi
{
pTheView->SetUpdateMode(false);
- sal_uLong nPos=LIST_APPEND;
+ sal_uLong nPos=TREELIST_APPEND;
bool bRemove = false;
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index e8f831e98d21..6654205ce9ca 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -105,7 +105,7 @@ ScRangeManagerTable::~ScRangeManagerTable()
void ScRangeManagerTable::addEntry(const ScRangeNameLine& rLine, bool bSetCurEntry)
{
- SvTreeListEntry* pEntry = InsertEntryToColumn( createEntryString(rLine), LIST_APPEND, 0xffff);
+ SvTreeListEntry* pEntry = InsertEntryToColumn( createEntryString(rLine), TREELIST_APPEND, 0xffff);
if (bSetCurEntry)
SetCurEntry(pEntry);
}
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 633c4753d39b..ae4f04358c76 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -15,6 +15,7 @@
#include "vcl/dialog.hxx"
#include "vcl/button.hxx"
#include "vcl/fixed.hxx"
+#include "vcl/lstbox.hxx"
#include "svx/checklbx.hxx"
#include "svtools/treelistbox.hxx"
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 43cb3082ef6d..9eff711bf39d 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -77,7 +77,7 @@ sal_Bool ScRedlineOptionsTabPage::FillItemSet( SfxItemSet& /* rSet */ )
ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
sal_uLong nNew=0;
- sal_uInt16 nPos=0;
+ sal_Int32 nPos=0;
nPos = m_pContentColorLB->GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index e680b7fa6f47..79d6b32ac35d 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -258,7 +258,7 @@ int ScTpUserLists::DeactivatePage( SfxItemSet* pSetP )
-sal_uInt16 ScTpUserLists::UpdateUserListBox()
+size_t ScTpUserLists::UpdateUserListBox()
{
mpLbLists->Clear();
@@ -454,7 +454,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
-void ScTpUserLists::ModifyList( sal_uInt16 nSelList,
+void ScTpUserLists::ModifyList( size_t nSelList,
const OUString& rEntriesStr )
{
if ( !pUserLists ) return;
@@ -488,7 +488,7 @@ IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb )
{
if ( pLb == mpLbLists )
{
- sal_uInt16 nSelPos = mpLbLists->GetSelectEntryPos();
+ sal_Int32 nSelPos = mpLbLists->GetSelectEntryPos();
if ( nSelPos != LISTBOX_ENTRY_NOTFOUND )
{
if ( !mpFtEntries->IsEnabled() ) mpFtEntries->Enable();
@@ -605,7 +605,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
}
else // if ( bModifyMode )
{
- sal_uInt16 nSelList = mpLbLists->GetSelectEntryPos();
+ sal_Int32 nSelList = mpLbLists->GetSelectEntryPos();
OSL_ENSURE( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" );
@@ -645,7 +645,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
{
if ( mpLbLists->GetEntryCount() > 0 )
{
- sal_uInt16 nRemovePos = mpLbLists->GetSelectEntryPos();
+ sal_Int32 nRemovePos = mpLbLists->GetSelectEntryPos();
OUString aMsg ( aStrQueryRemove.getToken( 0, '#' ) );
aMsg += mpLbLists->GetEntry( nRemovePos );
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 7dd0b96b5807..fb055871dbf5 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -272,7 +272,7 @@ void ScTpContentOptions::InitGridOpt()
{
sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID );
sal_Bool bGridOnTop = pLocalOptions->GetOption( VOPT_GRID_ONTOP );
- sal_uInt16 nSelPos = 0;
+ sal_Int32 nSelPos = 0;
if ( bGrid || bGridOnTop )
{
@@ -348,7 +348,7 @@ void ScTpContentOptions::InitGridOpt()
IMPL_LINK( ScTpContentOptions, GridHdl, ListBox*, pLb )
{
- sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
+ sal_Int32 nSelPos = pLb->GetSelectEntryPos();
sal_Bool bGrid = ( nSelPos <= 1 );
sal_Bool bGridOnTop = ( nSelPos == 1 );
@@ -404,7 +404,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent,
case FUNIT_INCH:
{
// nur diese Metriken benutzen
- sal_uInt16 nPos = m_pUnitLB->InsertEntry( sMetric );
+ sal_Int32 nPos = m_pUnitLB->InsertEntry( sMetric );
m_pUnitLB->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
}
break;
@@ -435,7 +435,7 @@ SfxTabPage* ScTpLayoutOptions::Create( Window* pParent,
sal_Bool ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet )
{
sal_Bool bRet = sal_True;
- const sal_uInt16 nMPos = m_pUnitLB->GetSelectEntryPos();
+ const sal_Int32 nMPos = m_pUnitLB->GetSelectEntryPos();
if ( nMPos != m_pUnitLB->GetSavedValue() )
{
sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pUnitLB->GetEntryData( nMPos );
@@ -538,7 +538,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet& rCoreSet )
const SfxUInt16Item& rItem = (SfxUInt16Item&)rCoreSet.Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
- for ( sal_uInt16 i = 0; i < m_pUnitLB->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < m_pUnitLB->GetEntryCount(); ++i )
{
if ( (FieldUnit)(sal_IntPtr)m_pUnitLB->GetEntryData( i ) == eFieldUnit )
{
@@ -642,8 +642,8 @@ int ScTpLayoutOptions::DeactivatePage( SfxItemSet* pSetP )
IMPL_LINK_NOARG(ScTpLayoutOptions, MetricHdl)
{
- const sal_uInt16 nMPos = m_pUnitLB->GetSelectEntryPos();
- if(nMPos != USHRT_MAX)
+ const sal_Int32 nMPos = m_pUnitLB->GetSelectEntryPos();
+ if(nMPos != LISTBOX_ENTRY_NOTFOUND)
{
FieldUnit eFieldUnit = (FieldUnit)(sal_IntPtr)m_pUnitLB->GetEntryData( nMPos );
sal_Int64 nVal =
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b482fd92d974..f6f915a59d76 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -264,7 +264,7 @@ ScFilterListBox::~ScFilterListBox()
void ScFilterListBox::EndInit()
{
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nSel = 0;
else
@@ -318,7 +318,7 @@ void ScFilterListBox::SelectHdl()
{
if ( !IsTravelSelect() && !bInit && !bCancelled )
{
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != nPos )
{
nSel = nPos;
@@ -1052,7 +1052,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
pFilterBox->SetUpdateMode(true);
pFilterBox->GrabFocus();
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if (!aCurrent.isEmpty())
{
nPos = pFilterBox->GetEntryPos(aCurrent);
@@ -1212,7 +1212,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
pFilterBox->SetUpdateMode(true);
}
- sal_uInt16 nSelPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nSelPos = LISTBOX_ENTRY_NOTFOUND;
if (!bDataSelect) // AutoFilter: aktiven Eintrag selektieren
{
@@ -1339,7 +1339,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
void ScGridWindow::FilterSelect( sal_uLong nSel )
{
- OUString aString = pFilterBox->GetEntry( static_cast< sal_uInt16 >( nSel ) );
+ OUString aString = pFilterBox->GetEntry( static_cast< sal_Int32 >( nSel ) );
SCCOL nCol = pFilterBox->GetCol();
SCROW nRow = pFilterBox->GetRow();
diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx
index 1f897a0dfbd8..f160910ede1a 100644
--- a/sd/source/core/anminfo.cxx
+++ b/sd/source/core/anminfo.cxx
@@ -52,7 +52,7 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
mbSecondSoundOn (sal_False),
mbSecondPlayFull (sal_False),
mnVerb (0),
- mnPresOrder (LIST_APPEND),
+ mnPresOrder (TREELIST_APPEND),
mrObject (rObject)
{
maBlueScreen = RGB_Color(COL_LIGHTMAGENTA);
@@ -82,7 +82,7 @@ SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rOb
mbSecondSoundOn (rAnmInfo.mbSecondSoundOn),
mbSecondPlayFull (rAnmInfo.mbSecondPlayFull),
mnVerb (rAnmInfo.mnVerb),
- mnPresOrder (LIST_APPEND),
+ mnPresOrder (TREELIST_APPEND),
mrObject (rObject)
{
// can not be copied
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 1e1912fde7bf..36692adc70b5 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -77,7 +77,7 @@ public:
virtual void MouseButtonUp( const MouseEvent& rMEvt );
- sal_uInt16 InsertCategory( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertCategory( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
void SetDoubleClickLink( const Link& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; }
@@ -105,9 +105,9 @@ CategoryListBox::~CategoryListBox()
{
}
-sal_uInt16 CategoryListBox::InsertCategory( const OUString& rStr, sal_uInt16 nPos /* = LISTBOX_APPEND */ )
+sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32 nPos /* = LISTBOX_APPEND */ )
{
- sal_uInt16 n = ListBox::InsertEntry( rStr, nPos );
+ sal_Int32 n = ListBox::InsertEntry( rStr, nPos );
if( n != LISTBOX_ENTRY_NOTFOUND )
ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | LISTBOX_ENTRY_FLAG_DISABLE_SELECTION );
@@ -208,9 +208,9 @@ private:
sal_uInt16 mnId;
- sal_uInt16 mnCurvePathPos;
- sal_uInt16 mnPolygonPathPos;
- sal_uInt16 mnFreeformPathPos;
+ sal_Int32 mnCurvePathPos;
+ sal_Int32 mnPolygonPathPos;
+ sal_Int32 mnFreeformPathPos;
};
@@ -255,7 +255,7 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
OUString sMotionPathLabel( SD_RESSTR( STR_CUSTOMANIMATION_USERPATH ) );
- sal_uInt16 nFirstEffect = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nFirstEffect = LISTBOX_ENTRY_NOTFOUND;
if( nTabId == MOTIONPATH )
{
@@ -287,7 +287,7 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
CustomAnimationPresetPtr pDescriptor = (*aIter++);
if( pDescriptor.get() && (bHasText || !pDescriptor->isTextOnly() ) )
{
- sal_uInt16 nPos = mpLBEffects->InsertEntry( pDescriptor->getLabel() );
+ sal_Int32 nPos = mpLBEffects->InsertEntry( pDescriptor->getLabel() );
mpLBEffects->SetEntryData( nPos, static_cast<void*>( new CustomAnimationPresetPtr( pDescriptor ) ) );
if( nFirstEffect == LISTBOX_ENTRY_NOTFOUND )
@@ -338,7 +338,7 @@ void CustomAnimationCreateTabPage::onSelectEffect()
CustomAnimationPresetPtr pPreset( *p );
const double fDuration = pPreset->getDuration();
- sal_uInt16 nPos = 0xffff;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if( fDuration == 5.0 )
nPos = 0;
@@ -365,7 +365,7 @@ void CustomAnimationCreateTabPage::onSelectEffect()
void CustomAnimationCreateTabPage::clearEffects()
{
- sal_uInt16 nPos = mpLBEffects->GetEntryCount();
+ sal_Int32 nPos = mpLBEffects->GetEntryCount();
while( nPos-- )
delete static_cast< CustomAnimationPresetPtr* >( mpLBEffects->GetEntryData( nPos ) );
@@ -392,7 +392,7 @@ PathKind CustomAnimationCreateTabPage::getCreatePathKind() const
if( mpLBEffects->GetSelectEntryCount() == 1 )
{
- const sal_uInt16 nPos = mpLBEffects->GetSelectEntryPos();
+ const sal_Int32 nPos = mpLBEffects->GetSelectEntryPos();
if( nPos == mnCurvePathPos )
{
eKind = CURVE;
@@ -414,8 +414,8 @@ PathKind CustomAnimationCreateTabPage::getCreatePathKind() const
double CustomAnimationCreateTabPage::getDuration() const
{
- sal_uInt16 nPos = mpCBSpeed->GetSelectEntryPos();
- if( (nPos == 0xffff) || !mpCBSpeed->IsEnabled() )
+ sal_Int32 nPos = mpCBSpeed->GetSelectEntryPos();
+ if( (nPos == LISTBOX_ENTRY_NOTFOUND) || !mpCBSpeed->IsEnabled() )
{
CustomAnimationPresetPtr pPreset = getSelectedPreset();
if( pPreset.get() )
@@ -436,7 +436,7 @@ double CustomAnimationCreateTabPage::getDuration() const
void CustomAnimationCreateTabPage::setDuration( double fDuration )
{
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
if( fDuration < 2.0f )
{
if( fDuration < 1.0f )
@@ -480,7 +480,7 @@ sal_uInt16 CustomAnimationCreateTabPage::getId() const
bool CustomAnimationCreateTabPage::select( const OUString& rsPresetId )
{
- sal_uInt16 nPos = mpLBEffects->GetEntryCount();
+ sal_Int32 nPos = mpLBEffects->GetEntryCount();
while( nPos-- )
{
void* pEntryData = mpLBEffects->GetEntryData( nPos );
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index bb425853248a..8cbc95ab13ee 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -152,7 +152,7 @@ void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId )
while( aIter != aEnd )
{
- sal_uInt16 nPos = mpControl->InsertEntry( rPresets.getUINameForProperty( (*aIter) ) );
+ sal_Int32 nPos = mpControl->InsertEntry( rPresets.getUINameForProperty( (*aIter) ) );
if( (*aIter) == aPropertyValue )
mpControl->SelectEntryPos( nPos );
maPropertyValues[nPos] = (*aIter++);
@@ -229,7 +229,7 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, Window* pParent, con
for ( long i = 0; i < pColorList->Count(); i++ )
{
XColorEntry* pEntry = pColorList->GetColor(i);
- sal_uInt16 nPos = mpControl->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ sal_Int32 nPos = mpControl->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
if( pEntry->GetColor().GetRGBColor() == (sal_uInt32)nColor )
mpControl->SelectEntryPos( nPos );
}
@@ -1274,7 +1274,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
sal_Bool bHasAfterEffect = sal_False;
pSet->getPropertyValue( nHandleHasAfterEffect ) >>= bHasAfterEffect;
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
if( bHasAfterEffect )
{
nPos++;
@@ -1288,7 +1288,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
sal_Int32 nColor = 0;
aDimColor >>= nColor;
Color aColor( nColor );
- sal_uInt16 nColorPos = mpCLBDimColor->GetEntryPos( aColor );
+ sal_Int32 nColorPos = mpCLBDimColor->GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nColorPos )
mpCLBDimColor->SelectEntryPos( nColorPos );
else
@@ -1313,7 +1313,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
{
if( pSet->getPropertyState( nHandleIterateType ) != STLPropertyState_AMBIGUOUS)
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
sal_Int32 nIterateType = 0;
pSet->getPropertyValue( nHandleIterateType ) >>= nIterateType;
@@ -1345,7 +1345,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
if( pSet->getPropertyState( nHandleSoundURL ) != STLPropertyState_AMBIGUOUS )
{
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
const Any aValue( pSet->getPropertyValue( nHandleSoundURL ) );
@@ -1366,14 +1366,14 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
OUString aString = maSoundList[ i ];
if( aString == aSoundURL )
{
- nPos = (sal_uInt16)i+2;
+ nPos = (sal_Int32)i+2;
break;
}
}
if( nPos == 0 )
{
- nPos = (sal_uInt16)maSoundList.size()+2;
+ nPos = (sal_Int32)maSoundList.size()+2;
maSoundList.push_back( aSoundURL );
INetURLObject aURL( aSoundURL );
nPos = mpLBSound->InsertEntry( aURL.GetBase(), nPos );
@@ -1396,7 +1396,7 @@ CustomAnimationEffectTabPage::~CustomAnimationEffectTabPage()
void CustomAnimationEffectTabPage::updateControlStates()
{
- sal_uInt16 nPos = mpLBAfterEffect->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBAfterEffect->GetSelectEntryPos();
mpCLBDimColor->Enable( nPos == 1 );
mpFTDimColor->Enable( nPos == 1 );
@@ -1415,7 +1415,7 @@ IMPL_LINK( CustomAnimationEffectTabPage, implSelectHdl, Control*, pControl )
{
if( pControl == mpLBAfterEffect )
{
- sal_uInt16 nPos = static_cast<ListBox*>( mpLBAfterEffect )->GetSelectEntryPos();
+ sal_Int32 nPos = static_cast<ListBox*>( mpLBAfterEffect )->GetSelectEntryPos();
if( nPos == 1 )
{
if( mpCLBDimColor->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
@@ -1429,7 +1429,7 @@ IMPL_LINK( CustomAnimationEffectTabPage, implSelectHdl, Control*, pControl )
}
else if( pControl == mpLBSound )
{
- sal_uInt16 nPos = mpLBSound->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBSound->GetSelectEntryPos();
if( nPos == (mpLBSound->GetEntryCount() - 1) )
{
openSoundFileDialog();
@@ -1484,7 +1484,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
pSet->setPropertyValue( nHandleDecelerate, makeAny( fTemp ) );
}
- sal_uInt16 nPos = mpLBAfterEffect->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBAfterEffect->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Bool bAfterEffect = nPos != 0;
@@ -1674,12 +1674,12 @@ void CustomAnimationEffectTabPage::openSoundFileDialog()
if( !bValidSoundFile )
nPos = 0;
- mpLBSound->SelectEntryPos( (sal_uInt16) nPos );
+ mpLBSound->SelectEntryPos( nPos );
}
void CustomAnimationEffectTabPage::onSoundPreview()
{
- const sal_uInt16 nPos = mpLBSound->GetSelectEntryPos();
+ const sal_Int32 nPos = mpLBSound->GetSelectEntryPos();
if( nPos >= 2 ) try
{
@@ -1746,7 +1746,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
{
sal_Int16 nStart = 0;
pSet->getPropertyValue( nHandleStart ) >>= nStart;
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
switch( nStart )
{
case EffectNodeType::WITH_PREVIOUS: nPos = 1; break;
@@ -1777,7 +1777,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
}
else
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if( fDuration == 5.0 )
nPos = 0;
@@ -1806,7 +1806,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
if( aRepeatCount.hasValue() )
aRepeatCount >>= fRepeat;
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if( fRepeat == 0 )
nPos = 0;
@@ -1883,7 +1883,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
}
OUString aDescription( getShapeDescription( xShape, true ) );
- sal_uInt16 nPos = mpLBTrigger->InsertEntry( aDescription );
+ sal_Int32 nPos = mpLBTrigger->InsertEntry( aDescription );
mpLBTrigger->SetEntryData( nPos, (void*)(sal_IntPtr)nShape );
if( xShape == xTrigger )
@@ -1909,7 +1909,7 @@ IMPL_LINK( CustomAnimationDurationTabPage, implControlHdl, Control*, pControl )
void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
{
- sal_uInt16 nPos = mpLBStart->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBStart->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Int16 nStart;
@@ -2108,7 +2108,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
{
sal_Int32 nTextGrouping = 0;
if( pSet->getPropertyValue( nHandleTextGrouping ) >>= nTextGrouping )
- maLBGroupText->SelectEntryPos( (sal_uInt16)(nTextGrouping + 1) );
+ maLBGroupText->SelectEntryPos( nTextGrouping + 1 );
}
if( pSet->getPropertyState( nHandleHasVisibleShape ) != STLPropertyState_AMBIGUOUS )
@@ -2162,7 +2162,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
sal_Int32 nPos = 6;
while( (nPos > 2) && (nPos > nMaxParaDepth) )
{
- maLBGroupText->RemoveEntry( (sal_uInt16)nPos );
+ maLBGroupText->RemoveEntry( nPos );
nPos--;
}
}
@@ -2172,7 +2172,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
{
- sal_uInt16 nPos = maLBGroupText->GetSelectEntryPos();
+ sal_Int32 nPos = maLBGroupText->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Int32 nTextGrouping = nPos - 1;
@@ -2226,7 +2226,7 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
void CustomAnimationTextAnimTabPage::updateControlStates()
{
- sal_uInt16 nPos = maLBGroupText->GetSelectEntryPos();
+ sal_Int32 nPos = maLBGroupText->GetSelectEntryPos();
maCBXGroupAuto->Enable( nPos > 1 );
maMFGroupAuto->Enable( nPos > 1 );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 792e1f9efb25..4f9228d0c047 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -274,16 +274,16 @@ void lcl_CreateUndoForPages(
}
}
-sal_uInt16 lcl_getTransitionEffectIndex(
+sal_Int32 lcl_getTransitionEffectIndex(
SdDrawDocument * pDoc,
const ::sd::impl::TransitionEffect & rTransition )
{
// first entry: "<none>"
- sal_uInt16 nResultIndex = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nResultIndex = LISTBOX_ENTRY_NOTFOUND;
if( pDoc )
{
- sal_uInt16 nCurrentIndex = 0;
+ sal_Int32 nCurrentIndex = 0;
const ::sd::TransitionPresetList & rPresetList = ::sd::TransitionPreset::getTransitionPresetList();
::sd::TransitionPresetList::const_iterator aIt( rPresetList.begin());
const ::sd::TransitionPresetList::const_iterator aEndIt( rPresetList.end());
@@ -367,14 +367,14 @@ OUString lcl_getSoundFileURL(
{
if( rListBox->GetSelectEntryCount() > 0 )
{
- sal_uInt16 nPos = rListBox->GetSelectEntryPos();
+ sal_Int32 nPos = rListBox->GetSelectEntryPos();
// the first three entries are no actual sounds
if( nPos >= 3 )
{
DBG_ASSERT( (sal_uInt32)(rListBox->GetEntryCount() - 3) == rSoundList.size(),
"Sound list-box is not synchronized to sound list" );
nPos -= 3;
- if( rSoundList.size() > nPos )
+ if( rSoundList.size() > static_cast<size_t>(nPos) )
return rSoundList[ nPos ];
}
}
@@ -402,10 +402,10 @@ void lcl_FillSoundListBox(
const ::std::vector< OUString > & rSoundList,
ListBox* rOutListBox )
{
- sal_uInt16 nCount = rOutListBox->GetEntryCount();
+ sal_Int32 nCount = rOutListBox->GetEntryCount();
// keep first three entries
- for( sal_uInt16 i=nCount - 1; i>=3; --i )
+ for( sal_Int32 i=nCount - 1; i>=3; --i )
rOutListBox->RemoveEntry( i );
::std::for_each( rSoundList.begin(), rSoundList.end(),
@@ -593,7 +593,7 @@ void SlideTransitionPane::updateControls()
mpLB_SLIDE_TRANSITIONS->SelectEntryPos( 0 );
else
{
- sal_uInt16 nEntry = lcl_getTransitionEffectIndex( mpDrawDoc, aEffect );
+ sal_Int32 nEntry = lcl_getTransitionEffectIndex( mpDrawDoc, aEffect );
if( nEntry == LISTBOX_ENTRY_NOTFOUND )
mpLB_SLIDE_TRANSITIONS->SetNoSelection();
else
@@ -633,7 +633,7 @@ void SlideTransitionPane::updateControls()
if( lcl_findSoundInList( maSoundList, aEffect.maSound, nPos ))
{
// skip first three entries
- mpLB_SOUND->SelectEntryPos( (sal_uInt16)nPos + 3 );
+ mpLB_SOUND->SelectEntryPos( nPos + 3 );
maCurrentSoundFile = aEffect.maSound;
}
}
@@ -750,7 +750,7 @@ void SlideTransitionPane::openSoundFileDialog()
if( bValidSoundFile )
// skip first three entries in list
- mpLB_SOUND->SelectEntryPos( (sal_uInt16)nPos + 3 );
+ mpLB_SOUND->SelectEntryPos( nPos + 3 );
}
if( ! bValidSoundFile )
@@ -759,7 +759,7 @@ void SlideTransitionPane::openSoundFileDialog()
{
tSoundListType::size_type nPos = 0;
if( lcl_findSoundInList( maSoundList, maCurrentSoundFile, nPos ))
- mpLB_SOUND->SelectEntryPos( (sal_uInt16)nPos + 3 );
+ mpLB_SOUND->SelectEntryPos( nPos + 3 );
else
mpLB_SOUND->SelectEntryPos( 0 ); // NONE
}
@@ -796,7 +796,7 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
if( mpLB_SPEED->IsEnabled() &&
mpLB_SPEED->GetSelectEntryCount() > 0 )
{
- sal_uInt16 nPos = mpLB_SPEED->GetSelectEntryPos();
+ sal_Int32 nPos = mpLB_SPEED->GetSelectEntryPos();
aResult.mfDuration = (nPos == 0)
? 3.0
: (nPos == 1)
@@ -832,7 +832,7 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
maCurrentSoundFile = "";
if( mpLB_SOUND->GetSelectEntryCount() > 0 )
{
- sal_uInt16 nPos = mpLB_SOUND->GetSelectEntryPos();
+ sal_Int32 nPos = mpLB_SOUND->GetSelectEntryPos();
aResult.mbStopSound = nPos == 1;
aResult.mbSoundOn = nPos > 1;
if( aResult.mbStopSound )
@@ -1035,7 +1035,7 @@ IMPL_LINK_NOARG(SlideTransitionPane, SoundListBoxSelected)
{
if( mpLB_SOUND->GetSelectEntryCount() )
{
- sal_uInt16 nPos = mpLB_SOUND->GetSelectEntryPos();
+ sal_Int32 nPos = mpLB_SOUND->GetSelectEntryPos();
if( nPos == 2 )
{
// other sound...
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 2651d367deb0..59cc9bbbac90 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -916,9 +916,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
// several objects
SdrObjList* pObjList = ((SdrObjGroup*)pObject)->GetSubList();
- for( sal_uInt16 nObject = 0; nObject < pObjList->GetObjCount(); nObject++ )
+ for( sal_uLong nObject = 0; nObject < pObjList->GetObjCount(); nObject++ )
{
- SdrObject* pSnapShot = (SdrObject*) pObjList->GetObj( (sal_uLong) nObject );
+ SdrObject* pSnapShot = (SdrObject*) pObjList->GetObj( nObject );
BitmapEx *const pBitmapEx = new BitmapEx(
SdrExchangeView::GetObjGraphic(
@@ -994,7 +994,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
SdrObjList* pObjList = pCloneGroup->GetSubList();
for (sal_uLong nObject= 0; nObject < nMarkCount; nObject++)
- pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone(), LIST_APPEND);
+ pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone(), CONTAINER_APPEND);
pPage->InsertObject(pCloneGroup, m_nCurrentFrame + 1);
}
@@ -1122,7 +1122,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
// find LoopCount (number of passes)
AnimationBitmap aAnimBmp;
long nLoopCount = 0L;
- sal_uInt16 nPos = aLbLoopCount.GetSelectEntryPos();
+ sal_Int32 nPos = aLbLoopCount.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != aLbLoopCount.GetEntryCount() - 1 ) // endless
nLoopCount = (long) aLbLoopCount.GetSelectEntry().toInt32();
@@ -1222,7 +1222,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
pClone = pPage->GetObj(i);
SdrObject* pCloneOfClone = pClone->Clone();
//SdrObject* pCloneOfClone = pPage->GetObj(i)->Clone();
- pObjList->InsertObject(pCloneOfClone, LIST_APPEND);
+ pObjList->InsertObject(pCloneOfClone, CONTAINER_APPEND);
}
// until now the top left corner of the group is in the window center;
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 5a76931d2fdd..f6d223d992b1 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -233,7 +233,7 @@ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
*/
IMPL_LINK_NOARG(CopyDlg, SelectColorHdl)
{
- sal_uInt16 nPos = m_pLbStartColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbStartColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND &&
!m_pLbEndColor->IsEnabled() )
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 8c7f54da43b2..1561111ab371 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -74,7 +74,7 @@ SdCustomShowDlg::SdCustomShowDlg( Window* pWindow,
{
m_pLbCustomShows->InsertEntry( pCustomShow->GetName() );
}
- m_pLbCustomShows->SelectEntryPos( (sal_uInt16)nPosToSelect );
+ m_pLbCustomShows->SelectEntryPos( (sal_Int32)nPosToSelect );
pCustomShowList->Seek( nPosToSelect );
}
@@ -89,7 +89,7 @@ SdCustomShowDlg::~SdCustomShowDlg()
void SdCustomShowDlg::CheckState()
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
sal_Bool bEnable = nPos != LISTBOX_ENTRY_NOTFOUND;
m_pBtnEdit->Enable( bEnable );
@@ -134,7 +134,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
// edit CustomShow
else if( p == m_pBtnEdit )
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
DBG_ASSERT( pCustomShowList, "pCustomShowList does not exist" );
@@ -159,7 +159,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
// delete CustomShow
else if( p == m_pBtnRemove )
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
delete (*pCustomShowList)[nPos];
@@ -172,7 +172,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
// copy CustomShow
else if( p == m_pBtnCopy )
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
SdCustomShow* pShow = new SdCustomShow( *(*pCustomShowList)[nPos] );
@@ -231,7 +231,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
}
else if( p == m_pLbCustomShows )
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
pCustomShowList->Seek( nPos );
@@ -358,15 +358,15 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p )
{
if( p == m_pBtnAdd )
{
- sal_uInt16 nCount = m_pLbPages->GetSelectEntryCount();
+ sal_Int32 nCount = m_pLbPages->GetSelectEntryCount();
if( nCount > 0 )
{
- sal_uLong nPosCP = LIST_APPEND;
+ sal_uLong nPosCP = TREELIST_APPEND;
SvTreeListEntry* pEntry = m_pLbCustomPages->FirstSelected();
if( pEntry )
nPosCP = m_pLbCustomPages->GetModel()->GetAbsPos( pEntry ) + 1L;
- for( sal_uInt16 i = 0; i < nCount; i++ )
+ for( sal_Int32 i = 0; i < nCount; i++ )
{
OUString aStr = m_pLbPages->GetSelectEntry( i );
pEntry = m_pLbCustomPages->InsertEntry( aStr,
@@ -377,7 +377,7 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p )
GetSelectEntryPos( i ), PK_STANDARD );
pEntry->SetUserData( pPage );
- if( nPosCP != LIST_APPEND )
+ if( nPosCP != TREELIST_APPEND )
nPosCP++;
}
bModified = sal_True;
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 66a3ca0aa9f9..9753e01823f2 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -679,7 +679,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName )
{
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
if( pDocName )
{
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index b7c14fefc02d..7d1f022f8760 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -250,7 +250,7 @@ void SdStartPresentationDlg::InitMonitorSettings()
nSelectedIndex = nDefaultExternalIndex;
}
- maLBMonitor->SelectEntryPos((sal_uInt16)nSelectedIndex);
+ maLBMonitor->SelectEntryPos(nSelectedIndex);
}
}
catch( Exception& )
@@ -278,7 +278,7 @@ void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr )
rAttr.Put( SfxUInt32Item ( ATTR_PRESENT_PAUSE_TIMEOUT, aTmfPause->GetTime().GetMSFromTime() / 1000 ) );
rAttr.Put( SfxBoolItem ( ATTR_PRESENT_SHOW_PAUSELOGO, aCbxAutoLogo->IsChecked() ) );
- sal_uInt16 nPos = maLBMonitor->GetSelectEntryPos();
+ sal_Int32 nPos = maLBMonitor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
rAttr.Put( SfxInt32Item ( ATTR_PRESENT_DISPLAY, (sal_Int32)(sal_IntPtr)maLBMonitor->GetEntryData(nPos)) );
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 82401f1b17b1..70a521c05323 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -593,7 +593,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, SfxMedium* pInMedium,
Image aImgDocClosed=Image( BitmapEx( SdResId( BMP_DOC_CLOSED ) ) );
// insert document name
- InsertEntry( maDocName, aImgDocOpen, aImgDocClosed, NULL, sal_True, LIST_APPEND,
+ InsertEntry( maDocName, aImgDocOpen, aImgDocClosed, NULL, sal_True, TREELIST_APPEND,
reinterpret_cast< void* >( 1 )
);
}
@@ -625,7 +625,7 @@ void SdPageObjsTLB::AddShapeList (
aIcon,
pParentEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
pUserData);
SdrObjListIter aIter(
@@ -674,7 +674,7 @@ void SdPageObjsTLB::AddShapeList (
maImgOle,
pEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
pObj
);
@@ -708,7 +708,7 @@ void SdPageObjsTLB::AddShapeList (
maImgGraphic,
pEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
pObj
);
@@ -757,7 +757,7 @@ void SdPageObjsTLB::AddShapeList (
rIconProvider.maImgObjects,
pEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
pObj
);
@@ -973,7 +973,7 @@ void SdPageObjsTLB::RequestingChildren( SvTreeListEntry* pFileEntry )
aImgPage,
pFileEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
reinterpret_cast< void* >( 1 ) );
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
@@ -1445,8 +1445,8 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const
if (pCustomShow != NULL)
{
bBelongsToShow = false;
- sal_uLong nPageCount = pCustomShow->PagesVector().size();
- for (sal_uInt16 i=0; i<nPageCount && !bBelongsToShow; i++)
+ size_t nPageCount = pCustomShow->PagesVector().size();
+ for (size_t i=0; i<nPageCount && !bBelongsToShow; i++)
if (pPage == pCustomShow->PagesVector()[i])
bBelongsToShow = true;
}
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 602fc58b7e6a..b52a0c0dcb56 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -723,9 +723,9 @@ IMPL_LINK_NOARG(SdTPAction, CheckFileHdl)
presentation::ClickAction SdTPAction::GetActualClickAction()
{
presentation::ClickAction eCA = presentation::ClickAction_NONE;
- sal_uInt16 nPos = m_pLbAction->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbAction->GetSelectEntryPos();
- if (nPos != LISTBOX_ENTRY_NOTFOUND && nPos < maCurrentActions.size())
+ if (nPos != LISTBOX_ENTRY_NOTFOUND && static_cast<size_t>(nPos) < maCurrentActions.size())
eCA = maCurrentActions[ nPos ];
return( eCA );
}
@@ -818,8 +818,8 @@ OUString SdTPAction::GetEditText( sal_Bool bFullDocDestination )
break;
case presentation::ClickAction_VERB:
{
- const sal_uInt16 nPos = m_pLbOLEAction->GetSelectEntryPos();
- if( nPos < aVerbVector.size() )
+ const sal_Int32 nPos = m_pLbOLEAction->GetSelectEntryPos();
+ if( static_cast<size_t>(nPos) < aVerbVector.size() )
aStr = OUString::number( aVerbVector[ nPos ] );
return aStr;
}
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index afd3547087a3..43809ecc6f9d 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -254,7 +254,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
{
OUString sMetric = aMetricArr.GetStringByPos( i );
sal_IntPtr nFieldUnit = aMetricArr.GetValue( i );
- sal_uInt16 nPos = m_pLbMetric->InsertEntry( sMetric );
+ sal_Int32 nPos = m_pLbMetric->InsertEntry( sMetric );
m_pLbMetric->SetEntryData( nPos, (void*)nFieldUnit );
}
m_pLbMetric->SetSelectHdl( LINK( this, SdTpOptionsMisc, SelectMetricHdl_Impl ) );
@@ -401,7 +401,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
}
// metric
- const sal_uInt16 nMPos = m_pLbMetric->GetSelectEntryPos();
+ const sal_Int32 nMPos = m_pLbMetric->GetSelectEntryPos();
if ( nMPos != m_pLbMetric->GetSavedValue() )
{
sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pLbMetric->GetEntryData( nMPos );
@@ -470,7 +470,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich );
long nFieldUnit = (long)rItem.GetValue();
- for ( sal_uInt16 i = 0; i < m_pLbMetric->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < m_pLbMetric->GetEntryCount(); ++i )
{
if ( (sal_IntPtr)m_pLbMetric->GetEntryData( i ) == nFieldUnit )
{
@@ -523,7 +523,7 @@ SfxTabPage* SdTpOptionsMisc::Create( Window* pWindow,
IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl)
{
- sal_uInt16 nPos = m_pLbMetric->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbMetric->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index d22098310029..01be0670ab84 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -134,7 +134,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
if( bDifferent )
{
XLineEndEntry* pEntry = new XLineEndEntry( aPolyPolygon, aName );
- pLineEndList->Insert( pEntry, LIST_APPEND);
+ pLineEndList->Insert( pEntry);
}
else
{
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 1aeee02f9a05..faa94e172edc 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -431,13 +431,13 @@ void FuMorph::ImpInsertPolygons(
pNewObj->SetMergedItemSetAndBroadcast(aSet);
- pObjList->InsertObject( pNewObj, LIST_APPEND );
+ pObjList->InsertObject( pNewObj, CONTAINER_APPEND );
}
if ( nCount )
{
pObjList->InsertObject( pObj1->Clone(), 0 );
- pObjList->InsertObject( pObj2->Clone(), LIST_APPEND );
+ pObjList->InsertObject( pObj2->Clone(), CONTAINER_APPEND );
mpView->DeleteMarked();
mpView->InsertObjectAtView( pObjGroup, *pPageView, SDRINSERT_SETDEFLAYER );
}
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 0288c165678b..76abf4f257a0 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -121,7 +121,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, ::Window* pWindow, OutlineViewSh
Rectangle aNullRect;
mpOutlinerView[0]->SetOutputArea(aNullRect);
mrOutliner.SetUpdateMode(false);
- mrOutliner.InsertView(mpOutlinerView[0], LIST_APPEND);
+ mrOutliner.InsertView(mpOutlinerView[0], EE_APPEND);
onUpdateStyleSettings( true );
@@ -254,7 +254,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin)
{
mpOutlinerView[nView] = new OutlinerView(&mrOutliner, dynamic_cast< ::sd::Window* >(pWin));
mpOutlinerView[nView]->SetBackgroundColor( aWhiteColor );
- mrOutliner.InsertView(mpOutlinerView[nView], LIST_APPEND);
+ mrOutliner.InsertView(mpOutlinerView[nView], EE_APPEND);
bAdded = sal_True;
if (bValidArea)
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index f7199a43f189..569c2d7ac185 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -506,13 +506,13 @@ bool IndexBox_Impl::Notify( NotifyEvent& rNEvt )
void IndexBox_Impl::SelectExecutableEntry()
{
- sal_uInt16 nPos = GetEntryPos( GetText() );
+ sal_Int32 nPos = GetEntryPos( GetText() );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
{
- sal_uInt16 nOldPos = nPos;
+ sal_Int32 nOldPos = nPos;
OUString aEntryText;
IndexEntry_Impl* pEntry = (IndexEntry_Impl*)(sal_uIntPtr)GetEntryData( nPos );
- sal_uInt16 nCount = GetEntryCount();
+ sal_Int32 nCount = GetEntryCount();
while ( nPos < nCount && ( !pEntry || pEntry->m_aURL.isEmpty() ) )
{
pEntry = (IndexEntry_Impl*)(sal_uIntPtr)GetEntryData( ++nPos );
@@ -809,7 +809,7 @@ sal_Bool IndexTabPage_Impl::HasKeyword() const
sal_Bool bRet = sal_False;
if ( !sKeyword.isEmpty() )
{
- sal_uInt16 nPos = m_pIndexCB->GetEntryPos( sKeyword );
+ sal_Int32 nPos = m_pIndexCB->GetEntryPos( sKeyword );
bRet = ( nPos != LISTBOX_ENTRY_NOTFOUND );
}
@@ -823,10 +823,10 @@ sal_Bool IndexTabPage_Impl::HasKeywordIgnoreCase()
sal_Bool bRet = sal_False;
if ( !sKeyword.isEmpty() )
{
- sal_uInt16 nEntries = m_pIndexCB->GetEntryCount();
+ sal_Int32 nEntries = m_pIndexCB->GetEntryCount();
OUString sIndexItem;
const vcl::I18nHelper& rI18nHelper = GetSettings().GetLocaleI18nHelper();
- for ( sal_uInt16 n = 0; n < nEntries; n++)
+ for ( sal_Int32 n = 0; n < nEntries; n++)
{
sIndexItem = m_pIndexCB->GetEntry( n );
if (rI18nHelper.MatchString( sIndexItem, sKeyword ))
@@ -972,9 +972,9 @@ SearchTabPage_Impl::~SearchTabPage_Impl()
nChecked = m_pScopeCB->IsChecked() ? 1 : 0;
aUserData += OUString::number( nChecked );
aUserData += ";";
- sal_uInt16 nCount = std::min( m_pSearchED->GetEntryCount(), (sal_uInt16)10 ); // save only 10 entries
+ sal_Int32 nCount = std::min( m_pSearchED->GetEntryCount(), (sal_Int32)10 ); // save only 10 entries
- for ( sal_uInt16 i = 0; i < nCount; ++i )
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
OUString aText = m_pSearchED->GetEntry(i);
aUserData += INetURLObject::encode(
@@ -1187,7 +1187,7 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction )
case MID_RENAME :
{
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
SfxAddHelpBookmarkDialog_Impl aDlg( this, sal_True );
@@ -1209,7 +1209,7 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction )
case MID_DELETE :
{
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
RemoveEntry( nPos );
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index f33ce5000f3e..3cf107a48bdf 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -374,7 +374,7 @@ sal_Bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
*/
{
- const sal_uInt16 nFilterIdx = m_pFilterLb->GetSelectEntryPos();
+ const sal_Int32 nFilterIdx = m_pFilterLb->GetSelectEntryPos();
// Set Filter
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 3dada2fd5621..51744cf97cf3 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -100,7 +100,7 @@ void SearchDialog::SaveConfig()
SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName );
aViewOpt.SetWindowState(OStringToOUString(m_sWinState, RTL_TEXTENCODING_ASCII_US));
OUString sUserData;
- sal_uInt16 i = 0, nCount = std::min( m_pSearchEdit->GetEntryCount(), MAX_SAVE_COUNT );
+ sal_Int32 i = 0, nCount = std::min( m_pSearchEdit->GetEntryCount(), static_cast<sal_Int32>(MAX_SAVE_COUNT) );
for ( ; i < nCount; ++i )
{
sUserData += m_pSearchEdit->GetEntry(i);
@@ -123,7 +123,7 @@ void SearchDialog::SaveConfig()
IMPL_LINK_NOARG(SearchDialog, FindHdl)
{
OUString sSrchTxt = m_pSearchEdit->GetText();
- sal_uInt16 nPos = m_pSearchEdit->GetEntryPos( sSrchTxt );
+ sal_Int32 nPos = m_pSearchEdit->GetEntryPos( sSrchTxt );
if ( nPos > 0 && nPos != COMBOBOX_ENTRY_NOTFOUND )
m_pSearchEdit->RemoveEntryAt(nPos);
if ( nPos > 0 )
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 2cd5f43c17d9..b05a37b1c836 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -283,7 +283,7 @@ IMPL_LINK_INLINE_END( SmFontDialog, FontSelectHdl, ComboBox *, pComboBox )
IMPL_LINK( SmFontDialog, FontModifyHdl, ComboBox *, pComboBox )
{
// if font is available in list then use it
- sal_uInt16 nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
+ sal_Int32 nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
if (COMBOBOX_ENTRY_NOTFOUND != nPos)
{
FontSelectHdl( pComboBox );
@@ -1516,7 +1516,7 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
bool SmSymbolDialog::SelectSymbolSet(const OUString &rSymbolSetName)
{
bool bRet = false;
- sal_uInt16 nPos = m_pSymbolSets->GetEntryPos(rSymbolSetName);
+ sal_Int32 nPos = m_pSymbolSets->GetEntryPos(rSymbolSetName);
aSymbolSetName = OUString();
aSymbolSet.clear();
@@ -1762,7 +1762,7 @@ IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, EMPTYARG pListBox )
IMPL_LINK( SmSymDefineDialog, SubsetChangeHdl, ListBox *, EMPTYARG pListBox )
{
(void) pListBox;
- sal_uInt16 nPos = aFontsSubsetLB.GetSelectEntryPos();
+ sal_Int32 nPos = aFontsSubsetLB.GetSelectEntryPos();
if (LISTBOX_ENTRY_NOTFOUND != nPos)
{
const Subset* pSubset = reinterpret_cast<const Subset*> (aFontsSubsetLB.GetEntryData( nPos ));
@@ -2144,7 +2144,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
rComboBox.SetText(aNormName);
bool bRet = false;
- sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
+ sal_Int32 nPos = rComboBox.GetEntryPos(aNormName);
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
@@ -2221,7 +2221,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
rComboBox.SetText(aNormName);
bool bRet = false;
- sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
+ sal_Int32 nPos = rComboBox.GetEntryPos(aNormName);
bool bIsOld = &rComboBox == &aOldSymbols;
@@ -2319,7 +2319,7 @@ void SmSymDefineDialog::SetFont(const OUString &rFontName, const OUString &rStyl
bool SmSymDefineDialog::SelectFont(const OUString &rFontName, bool bApplyFont)
{
bool bRet = false;
- sal_uInt16 nPos = aFonts.GetEntryPos(rFontName);
+ sal_Int32 nPos = aFonts.GetEntryPos(rFontName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -2347,7 +2347,7 @@ bool SmSymDefineDialog::SelectFont(const OUString &rFontName, bool bApplyFont)
bool SmSymDefineDialog::SelectStyle(const OUString &rStyleName, bool bApplyFont)
{
bool bRet = false;
- sal_uInt16 nPos = aStyles.GetEntryPos(rStyleName);
+ sal_Int32 nPos = aStyles.GetEntryPos(rStyleName);
// if the style is not available take the first available one (if existent)
if (nPos == COMBOBOX_ENTRY_NOTFOUND && aStyles.GetEntryCount() > 0)
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 09634dfcfb3d..20f6cfc6fcb7 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -64,13 +64,13 @@ namespace svt
(!pEvt->GetKeyCode().IsShift() && pEvt->GetKeyCode().IsMod1()))
{
// select next resp. previous entry
- int nPos = GetEntryPos(GetText());
- nPos = nPos + (rKey.GetCode() == KEY_DOWN ? 1 : -1);
- if (nPos < 0)
- nPos = 0;
- if (nPos >= GetEntryCount())
- nPos = GetEntryCount() - 1;
- SetText(GetEntry(sal::static_int_cast< sal_uInt16 >(nPos)));
+ sal_Int32 nPos = GetEntryPos(GetText());
+ int nDir = (rKey.GetCode() == KEY_DOWN ? 1 : -1);
+ if (!((nPos == 0 && nDir == -1) || (nPos >= GetEntryCount() && nDir == 1)))
+ {
+ nPos += nDir;
+ SetText(GetEntry(nPos));
+ }
return true;
}
}
@@ -171,13 +171,13 @@ namespace svt
(!pEvt->GetKeyCode().IsShift() && pEvt->GetKeyCode().IsMod1()))
{
// select next resp. previous entry
- int nPos = GetSelectEntryPos();
- nPos = nPos + (rKey.GetCode() == KEY_DOWN ? 1 : -1);
- if (nPos < 0)
- nPos = 0;
- if (nPos >= GetEntryCount())
- nPos = GetEntryCount() - 1;
- SelectEntryPos(sal::static_int_cast< sal_uInt16 >(nPos));
+ sal_Int32 nPos = GetSelectEntryPos();
+ int nDir = (rKey.GetCode() == KEY_DOWN ? 1 : -1);
+ if (!((nPos == 0 && nDir == -1) || (nPos >= GetEntryCount() && nDir == 1)))
+ {
+ nPos += nDir;
+ SelectEntryPos(nPos);
+ }
Select(); // for calling Modify
return true;
}
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index e6f3b110eaa2..94dae1cf5921 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -898,7 +898,7 @@ sal_uLong SvTreeList::Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,s
rList.push_back(pEntry);
nEntryCount++;
- if (nPos != ULONG_MAX && (nPos != (rList.size()-1)))
+ if (nPos != TREELIST_APPEND && (nPos != (rList.size()-1)))
SetListPositions(rList);
else
pEntry->nListPos = rList.size()-1;
@@ -1525,7 +1525,7 @@ void SvTreeList::ResortChildren( SvTreeListEntry* pParent )
for (; it != itEnd; ++it)
{
SvTreeListEntry* p = *it;
- sal_uLong nListPos = ULONG_MAX;
+ sal_uLong nListPos = TREELIST_APPEND;
GetInsertionPos(p, pParent, nListPos);
if (nListPos < pParent->maChildren.size())
{
@@ -1550,7 +1550,7 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry* pEntry, SvTreeListEntry* pPar
if( eSortMode == SortNone )
return;
- rPos = ULONG_MAX;
+ rPos = TREELIST_ENTRY_NOTFOUND;
const SvTreeListEntries& rChildList = GetChildList(pParent);
if (!rChildList.empty())
@@ -1581,7 +1581,7 @@ void SvTreeList::GetInsertionPos( SvTreeListEntry* pEntry, SvTreeListEntry* pPar
if( nCompare != 0 )
{
if (i > static_cast<long>(rChildList.size()-1)) // not found, end of list
- rPos = ULONG_MAX;
+ rPos = TREELIST_ENTRY_NOTFOUND;
else
rPos = i; // not found, middle of list
}
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 88829aee26f8..c65bc33daf65 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -598,7 +598,7 @@ sal_Bool SvTreeListBox::NotifyMoving(
if( IsExpanded(pTarget))
rNewChildPos = 0;
else
- rNewChildPos = LIST_APPEND;
+ rNewChildPos = TREELIST_APPEND;
}
return sal_True;
}
@@ -654,7 +654,7 @@ sal_Bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry*
{
pSourceEntry = *it;
SvTreeListEntry* pNewParent = 0;
- sal_uLong nInsertionPos = ULONG_MAX;
+ sal_uLong nInsertionPos = TREELIST_APPEND;
sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
if ( bOk )
{
@@ -711,12 +711,12 @@ sal_Bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSourc
pSourceEntry = *it;
SvTreeListEntry* pNewParent = 0;
- sal_uLong nInsertionPos = ULONG_MAX;
+ sal_uLong nInsertionPos = TREELIST_APPEND;
sal_Bool bOk = NotifyMoving(pTarget,pSourceEntry,pNewParent,nInsertionPos);
sal_Bool bCopyOk = bOk;
if ( !bOk && bAllowCopyFallback )
{
- nInsertionPos = LIST_APPEND;
+ nInsertionPos = TREELIST_APPEND;
bCopyOk = NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
}
@@ -2183,7 +2183,7 @@ void SvTreeListBox::KeyInput( const KeyEvent& rKEvt )
void SvTreeListBox::RequestingChildren( SvTreeListEntry* pParent )
{
if( !pParent->HasChildren() )
- InsertEntry( OUString("<dummy>"), pParent, sal_False, LIST_APPEND );
+ InsertEntry( OUString("<dummy>"), pParent, sal_False, TREELIST_APPEND );
}
void SvTreeListBox::GetFocus()
@@ -3560,7 +3560,7 @@ void SvTreeListBox::RemoveParentKeepChildren( SvTreeListEntry* pParent )
SvTreeListEntry* pChild = FirstChild( pParent );
while( pChild )
{
- pModel->Move( pChild, pNewParent, LIST_APPEND );
+ pModel->Move( pChild, pNewParent, TREELIST_APPEND );
pChild = FirstChild( pParent );
}
}
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index ea1cdee711b0..7508659a58e9 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -141,13 +141,13 @@ ColorListBox::~ColorListBox()
-sal_uInt16 ColorListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
+sal_Int32 ColorListBox::InsertEntry( const OUString& rStr, sal_Int32 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
{
ImplColorListData* pData = new ImplColorListData;
- if ( nPos < pColorList->size() )
+ if ( static_cast<size_t>(nPos) < pColorList->size() )
{
ImpColorList::iterator it = pColorList->begin();
::std::advance( it, nPos );
@@ -164,14 +164,14 @@ sal_uInt16 ColorListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
-sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const OUString& rStr,
- sal_uInt16 nPos )
+sal_Int32 ColorListBox::InsertEntry( const Color& rColor, const OUString& rStr,
+ sal_Int32 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
{
ImplColorListData* pData = new ImplColorListData( rColor );
- if ( nPos < pColorList->size() )
+ if ( static_cast<size_t>(nPos) < pColorList->size() )
{
ImpColorList::iterator it = pColorList->begin();
::std::advance( it, nPos );
@@ -196,10 +196,10 @@ void ColorListBox::InsertAutomaticEntryColor(const Color &rColor)
-void ColorListBox::RemoveEntry( sal_uInt16 nPos )
+void ColorListBox::RemoveEntry( sal_Int32 nPos )
{
ListBox::RemoveEntry( nPos );
- if ( nPos < pColorList->size() )
+ if ( 0 <= nPos && static_cast<size_t>(nPos) < pColorList->size() )
{
ImpColorList::iterator it = pColorList->begin();
::std::advance( it, nPos );
@@ -228,10 +228,10 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
for ( size_t n = 0; n < nCount; n++ )
{
ImplColorListData* pData = (*rBox.pColorList)[ n ];
- sal_uInt16 nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND );
+ sal_Int32 nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND );
if ( nPos != LISTBOX_ERROR )
{
- if ( nPos < pColorList->size() )
+ if ( static_cast<size_t>(nPos) < pColorList->size() )
{
ImpColorList::iterator it = pColorList->begin();
::std::advance( it, nPos );
@@ -247,9 +247,9 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
-sal_uInt16 ColorListBox::GetEntryPos( const Color& rColor ) const
+sal_Int32 ColorListBox::GetEntryPos( const Color& rColor ) const
{
- for( sal_uInt16 n = (sal_uInt16) pColorList->size(); n; )
+ for( sal_Int32 n = (sal_Int32) pColorList->size(); n; )
{
ImplColorListData* pData = (*pColorList)[ --n ];
if ( pData->bColor && ( pData->aColor == rColor ) )
@@ -260,10 +260,11 @@ sal_uInt16 ColorListBox::GetEntryPos( const Color& rColor ) const
-Color ColorListBox::GetEntryColor( sal_uInt16 nPos ) const
+Color ColorListBox::GetEntryColor( sal_Int32 nPos ) const
{
Color aColor;
- ImplColorListData* pData = ( nPos < pColorList->size() ) ? (*pColorList)[ nPos ] : NULL;
+ ImplColorListData* pData = ( 0 <= nPos && static_cast<size_t>(nPos) < pColorList->size() ) ?
+ (*pColorList)[ nPos ] : NULL;
if ( pData && pData->bColor )
aColor = pData->aColor;
return aColor;
@@ -528,10 +529,10 @@ Color ImpLineListData::GetColorDist( const Color& rMain, const Color& rDefault )
return ( *m_pColorDistFn )( rMain, rDefault );
}
-sal_uInt16 LineListBox::GetSelectEntryStyle( sal_uInt16 nSelIndex ) const
+sal_uInt16 LineListBox::GetSelectEntryStyle( sal_Int32 nSelIndex ) const
{
sal_uInt16 nStyle = table::BorderLineStyle::SOLID;
- sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
+ sal_Int32 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if (!m_sNone.isEmpty())
@@ -788,22 +789,22 @@ LineListBox::~LineListBox()
delete pLineList;
}
-sal_uInt16 LineListBox::GetStylePos( sal_uInt16 nListPos, long nWidth )
+sal_Int32 LineListBox::GetStylePos( sal_Int32 nListPos, long nWidth )
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if (!m_sNone.isEmpty())
nListPos--;
- sal_uInt16 i = 0;
- sal_uInt16 n = 0;
- sal_uInt16 nCount = pLineList->size();
+ sal_Int32 n = 0;
+ size_t i = 0;
+ size_t nCount = pLineList->size();
while ( nPos == LISTBOX_ENTRY_NOTFOUND && i < nCount )
{
ImpLineListData* pData = (*pLineList)[ i ];
if ( pData && pData->GetMinWidth() <= nWidth )
{
if ( nListPos == n )
- nPos = i;
+ nPos = static_cast<sal_Int32>(i);
n++;
}
i++;
@@ -815,14 +816,14 @@ sal_uInt16 LineListBox::GetStylePos( sal_uInt16 nListPos, long nWidth )
void LineListBox::SelectEntry( sal_uInt16 nStyle, sal_Bool bSelect )
{
- sal_uInt16 nPos = GetEntryPos( nStyle );
+ sal_Int32 nPos = GetEntryPos( nStyle );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
ListBox::SelectEntryPos( nPos, bSelect );
}
-sal_uInt16 LineListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
+sal_Int32 LineListBox::InsertEntry( const OUString& rStr, sal_Int32 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR ) {
@@ -850,11 +851,11 @@ void LineListBox::InsertEntry(
-void LineListBox::RemoveEntry( sal_uInt16 nPos )
+void LineListBox::RemoveEntry( sal_Int32 nPos )
{
ListBox::RemoveEntry( nPos );
- if ( nPos < pLineList->size() ) {
+ if ( 0 <= nPos && nPos < pLineList->size() ) {
ImpLineList::iterator it = pLineList->begin();
::std::advance( it, nPos );
if ( *it ) delete *it;
@@ -878,7 +879,7 @@ void LineListBox::Clear()
-sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
+sal_Int32 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
{
for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) {
ImpLineListData* pData = (*pLineList)[ i ];
@@ -889,7 +890,7 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
size_t nPos = i;
if (!m_sNone.isEmpty())
nPos ++;
- return (sal_uInt16)nPos;
+ return (sal_Int32)nPos;
}
}
}
@@ -898,9 +899,9 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
-sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const
+sal_uInt16 LineListBox::GetEntryStyle( sal_Int32 nPos ) const
{
- ImpLineListData* pData = (nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL;
+ ImpLineListData* pData = (0 <= nPos && nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL;
return ( pData ) ? pData->GetStyle() : table::BorderLineStyle::NONE;
}
@@ -925,8 +926,8 @@ void LineListBox::UpdateEntries( long nOldWidth )
UpdatePaintLineColor( );
- sal_uInt16 nSelEntry = GetSelectEntryPos();
- sal_uInt16 nTypePos = GetStylePos( nSelEntry, nOldWidth );
+ sal_Int32 nSelEntry = GetSelectEntryPos();
+ sal_Int32 nTypePos = GetStylePos( nSelEntry, nOldWidth );
// Remove the old entries
while ( GetEntryCount( ) > 0 )
@@ -966,7 +967,7 @@ void LineListBox::UpdateEntries( long nOldWidth )
-Color LineListBox::GetColorLine1( sal_uInt16 nPos )
+Color LineListBox::GetColorLine1( sal_Int32 nPos )
{
Color rResult = GetPaintColor( );
@@ -978,7 +979,7 @@ Color LineListBox::GetColorLine1( sal_uInt16 nPos )
return rResult;
}
-Color LineListBox::GetColorLine2( sal_uInt16 nPos )
+Color LineListBox::GetColorLine2( sal_Int32 nPos )
{
Color rResult = GetPaintColor( );
@@ -990,7 +991,7 @@ Color LineListBox::GetColorLine2( sal_uInt16 nPos )
return rResult;
}
-Color LineListBox::GetColorDist( sal_uInt16 nPos )
+Color LineListBox::GetColorDist( sal_Int32 nPos )
{
Color rResult = GetSettings().GetStyleSettings().GetFieldColor();
@@ -1476,12 +1477,12 @@ void FontStyleBox::Modify()
CharClass aChrCls( ::comphelper::getProcessComponentContext(),
GetSettings().GetLanguageTag() );
OUString aStr = GetText();
- sal_uInt16 nEntryCount = GetEntryCount();
+ sal_Int32 nEntryCount = GetEntryCount();
if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND )
{
aStr = aChrCls.uppercase(aStr);
- for ( sal_uInt16 i = 0; i < nEntryCount; i++ )
+ for ( sal_Int32 i = 0; i < nEntryCount; i++ )
{
OUString aEntryText = aChrCls.uppercase(GetEntry(i));
@@ -1504,7 +1505,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
// else aLastStyle will overwritten
// store prior selection position and clear box
OUString aOldText = GetText();
- sal_uInt16 nPos = GetEntryPos( aOldText );
+ sal_Int32 nPos = GetEntryPos( aOldText );
Clear();
// does a font with this name already exist?
@@ -1797,7 +1798,7 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
OUString aStr = GetText();
Clear();
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
if ( !aFontSizeNames.IsEmpty() )
{
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 858bc77cee85..5f91e2e45809 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1075,11 +1075,11 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa
ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl );
if( pValueSet )
{
- sal_uInt16 nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() );
+ size_t nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() );
if( nItemPos != VALUESET_ITEM_NOTFOUND )
{
const sal_uInt16 nColCount = pValueSet->GetColCount();
- const sal_uInt16 nLine = nItemPos / nColCount;
+ const size_t nLine = nItemPos / nColCount;
nLastColumn = nItemPos - (nLine * nColCount);
@@ -1089,7 +1089,7 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa
}
else
{
- const sal_uInt16 nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount;
+ const size_t nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount;
return (nLine+1) < nLineCount;
}
}
@@ -1183,19 +1183,19 @@ void ToolbarMenu_Impl::implHighlightControl( sal_uInt16 nCode, Control* pControl
ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl );
if( pValueSet )
{
- const sal_uInt16 nItemCount = pValueSet->GetItemCount();
- sal_uInt16 nItemPos = VALUESET_ITEM_NOTFOUND;
+ const size_t nItemCount = pValueSet->GetItemCount();
+ size_t nItemPos = VALUESET_ITEM_NOTFOUND;
switch( nCode )
{
case KEY_UP:
{
const sal_uInt16 nColCount = pValueSet->GetColCount();
const sal_uInt16 nLastLine = nItemCount / nColCount;
- nItemPos = std::min( ((nLastLine-1) * nColCount) + mnLastColumn, nItemCount-1 );
+ nItemPos = std::min( static_cast<size_t>(((nLastLine-1) * nColCount) + mnLastColumn), nItemCount-1 );
break;
}
case KEY_DOWN:
- nItemPos = std::min( mnLastColumn, nItemCount-1 );
+ nItemPos = std::min( static_cast<size_t>(mnLastColumn), nItemCount-1 );
break;
case KEY_END:
nItemPos = nItemCount -1;
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index c5070a68476f..b2c282bca892 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -87,7 +87,7 @@ public:
UnoTreeListBoxImpl( TreeControlPeer* pPeer, Window* pParent, WinBits nWinStyle );
~UnoTreeListBoxImpl();
- sal_uInt32 insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,sal_uLong nPos=LIST_APPEND );
+ sal_uInt32 insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,sal_uLong nPos=TREELIST_APPEND );
virtual void RequestingChildren( SvTreeListEntry* pParent );
@@ -230,7 +230,7 @@ void TreeControlPeer::SetWindow( Window* pWindow )
-UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos /* = LIST_APPEND */ )
+UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos /* = TREELIST_APPEND */ )
{
UnoTreeListEntry* pEntry = 0;
if( mpTreeImpl )
@@ -437,7 +437,7 @@ void TreeControlPeer::addNode( UnoTreeListBoxImpl& rTree, const Reference< XTree
{
if( xNode.is() )
{
- UnoTreeListEntry* pEntry = createEntry( xNode, pParentEntry, LIST_APPEND );
+ UnoTreeListEntry* pEntry = createEntry( xNode, pParentEntry, TREELIST_APPEND );
const sal_Int32 nChildCount = xNode->getChildCount();
for( sal_Int32 nChild = 0; nChild < nChildCount; nChild++ )
addNode( rTree, xNode->getChildAt( nChild ), pEntry );
@@ -1073,7 +1073,7 @@ void TreeControlPeer::updateNode( UnoTreeListBoxImpl& rTree, const Reference< XT
{
Reference< XTreeNode > xParentNode( xNode->getParent() );
UnoTreeListEntry* pParentEntry = 0;
- sal_uLong nChild = LIST_APPEND;
+ sal_uLong nChild = TREELIST_APPEND;
if( xParentNode.is() )
{
diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx
index a96593103d87..8657cb125503 100644
--- a/svtools/source/uno/treecontrolpeer.hxx
+++ b/svtools/source/uno/treecontrolpeer.hxx
@@ -127,7 +127,7 @@ private:
void fillTree( UnoTreeListBoxImpl& rTree, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeDataModel >& xDataModel );
void addNode( UnoTreeListBoxImpl& rTree, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParentEntry );
- UnoTreeListEntry* createEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos = LIST_APPEND );
+ UnoTreeListEntry* createEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos = TREELIST_APPEND );
bool updateEntry( UnoTreeListEntry* pEntry );
void updateTree( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent, bool bRecursive );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 69dbee39f450..2204c5bc4924 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -239,7 +239,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
pRenderedShape = new SdrObjGroup();
((SdrObjGroup*)pRenderedShape)->GetSubList()->NbcInsertObject( pTmp );
}
- ((SdrObjGroup*)pRenderedShape)->GetSubList()->NbcInsertObject( pTextObj, LIST_APPEND );
+ ((SdrObjGroup*)pRenderedShape)->GetSubList()->NbcInsertObject( pTextObj, CONTAINER_APPEND );
}
else
pRenderedShape = pTextObj;
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index 2ac7ec8e83ab..005e1b136d53 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -85,7 +85,7 @@ void SvxCheckListBox::Init_Impl()
-void SvxCheckListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos,
+void SvxCheckListBox::InsertEntry( const OUString& rStr, sal_uLong nPos,
void* pUserData,
SvLBoxButtonKind eButtonKind )
{
@@ -95,7 +95,7 @@ void SvxCheckListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos,
-void SvxCheckListBox::RemoveEntry( sal_uInt16 nPos )
+void SvxCheckListBox::RemoveEntry( sal_uLong nPos )
{
if ( nPos < GetEntryCount() )
SvTreeListBox::GetModel()->Remove( GetEntry( nPos ) );
@@ -103,7 +103,7 @@ void SvxCheckListBox::RemoveEntry( sal_uInt16 nPos )
-void SvxCheckListBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect )
+void SvxCheckListBox::SelectEntryPos( sal_uLong nPos, sal_Bool bSelect )
{
if ( nPos < GetEntryCount() )
Select( GetEntry( nPos ), bSelect );
@@ -111,18 +111,18 @@ void SvxCheckListBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect )
-sal_uInt16 SvxCheckListBox::GetSelectEntryPos() const
+sal_uLong SvxCheckListBox::GetSelectEntryPos() const
{
SvTreeListEntry* pEntry = GetCurEntry();
if ( pEntry )
- return (sal_uInt16)GetModel()->GetAbsPos( pEntry );
- return LISTBOX_ENTRY_NOTFOUND;
+ return GetModel()->GetAbsPos( pEntry );
+ return TREELIST_ENTRY_NOTFOUND;
}
-OUString SvxCheckListBox::GetText( sal_uInt16 nPos ) const
+OUString SvxCheckListBox::GetText( sal_uLong nPos ) const
{
SvTreeListEntry* pEntry = GetEntry( nPos );
@@ -133,12 +133,12 @@ OUString SvxCheckListBox::GetText( sal_uInt16 nPos ) const
-sal_uInt16 SvxCheckListBox::GetCheckedEntryCount() const
+sal_uLong SvxCheckListBox::GetCheckedEntryCount() const
{
- sal_uInt16 nCheckCount = 0;
- sal_uInt16 nCount = (sal_uInt16)GetEntryCount();
+ sal_uLong nCheckCount = 0;
+ sal_uLong nCount = GetEntryCount();
- for ( sal_uInt16 i = 0; i < nCount; ++i )
+ for ( sal_uLong i = 0; i < nCount; ++i )
{
if ( IsChecked( i ) )
nCheckCount++;
@@ -148,7 +148,7 @@ sal_uInt16 SvxCheckListBox::GetCheckedEntryCount() const
-void SvxCheckListBox::CheckEntryPos( sal_uInt16 nPos, sal_Bool bCheck )
+void SvxCheckListBox::CheckEntryPos( sal_uLong nPos, sal_Bool bCheck )
{
if ( nPos < GetEntryCount() )
SetCheckButtonState(
@@ -158,7 +158,7 @@ void SvxCheckListBox::CheckEntryPos( sal_uInt16 nPos, sal_Bool bCheck )
-sal_Bool SvxCheckListBox::IsChecked( sal_uInt16 nPos ) const
+sal_Bool SvxCheckListBox::IsChecked( sal_uLong nPos ) const
{
if ( nPos < GetEntryCount() )
return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED);
@@ -168,7 +168,7 @@ sal_Bool SvxCheckListBox::IsChecked( sal_uInt16 nPos ) const
-void* SvxCheckListBox::SetEntryData ( sal_uInt16 nPos, void* pNewData )
+void* SvxCheckListBox::SetEntryData ( sal_uLong nPos, void* pNewData )
{
void* pOld = NULL;
@@ -182,7 +182,7 @@ void* SvxCheckListBox::SetEntryData ( sal_uInt16 nPos, void* pNewData )
-void* SvxCheckListBox::GetEntryData( sal_uInt16 nPos ) const
+void* SvxCheckListBox::GetEntryData( sal_uLong nPos ) const
{
if ( nPos < GetEntryCount() )
return GetEntry( nPos )->GetUserData();
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 2e3e73471fbf..25f6a20f4f1a 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -751,7 +751,7 @@ void SvxTPFilter::ClearAuthors()
m_pLbAuthor->Clear();
}
-void SvxTPFilter::InsertAuthor( const OUString& rString, sal_uInt16 nPos)
+void SvxTPFilter::InsertAuthor( const OUString& rString, sal_Int32 nPos)
{
m_pLbAuthor->InsertEntry(rString,nPos);
}
@@ -761,12 +761,12 @@ OUString SvxTPFilter::GetSelectedAuthor() const
return m_pLbAuthor->GetSelectEntry();
}
-void SvxTPFilter::SelectedAuthorPos(sal_uInt16 nPos)
+void SvxTPFilter::SelectedAuthorPos(sal_Int32 nPos)
{
m_pLbAuthor->SelectEntryPos(nPos);
}
-sal_uInt16 SvxTPFilter::SelectAuthor(const OUString& aString)
+sal_Int32 SvxTPFilter::SelectAuthor(const OUString& aString)
{
m_pLbAuthor->SelectEntry(aString);
return m_pLbAuthor->GetSelectEntryPos();
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index fb9799d38c2e..27515989e779 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1184,7 +1184,7 @@ void ColorLB::Append( const XColorEntry& rEntry )
/************************************************************************/
-void ColorLB::Modify( const XColorEntry& rEntry, sal_uInt16 nPos )
+void ColorLB::Modify( const XColorEntry& rEntry, sal_Int32 nPos )
{
RemoveEntry( nPos );
InsertEntry( rEntry.GetColor(), rEntry.GetName(), nPos );
@@ -1271,7 +1271,7 @@ void HatchingLB::Append( const XHatchEntry& rEntry, const Bitmap& rBitmap )
/************************************************************************/
-void HatchingLB::Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
+void HatchingLB::Modify( const XHatchEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap )
{
RemoveEntry( nPos );
@@ -1370,7 +1370,7 @@ void GradientLB::Append( const XGradientEntry& rEntry, const Bitmap& rBitmap )
/************************************************************************/
-void GradientLB::Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
+void GradientLB::Modify( const XGradientEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap )
{
RemoveEntry( nPos );
@@ -1555,7 +1555,7 @@ void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry)
/************************************************************************/
-void BitmapLB::Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos)
+void BitmapLB::Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_Int32 nPos)
{
RemoveEntry(nPos);
maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
@@ -1705,7 +1705,7 @@ void LineLB::Append( const XDashEntry& rEntry, const Bitmap& rBitmap )
/************************************************************************/
-void LineLB::Modify( const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
+void LineLB::Modify( const XDashEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap )
{
RemoveEntry( nPos );
@@ -1805,7 +1805,7 @@ void LineEndLB::Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool
/************************************************************************/
-void LineEndLB::Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap, bool bStart )
+void LineEndLB::Modify( const XLineEndEntry& rEntry, sal_Int32 nPos, const Bitmap& rBitmap, bool bStart )
{
RemoveEntry( nPos );
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
index 7449551b24a9..9c4c74c60c49 100644
--- a/svx/source/dialog/fontlb.cxx
+++ b/svx/source/dialog/fontlb.cxx
@@ -109,7 +109,7 @@ void SvxFontListBox::InsertFontEntry( const OUString& rString, const Font& rFont
mbUseFont = false;
}
-void SvxFontListBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect )
+void SvxFontListBox::SelectEntryPos( sal_uLong nPos, bool bSelect )
{
SvTreeListEntry* pEntry = GetEntry( nPos );
if( pEntry )
@@ -127,7 +127,7 @@ void SvxFontListBox::SetNoSelection()
sal_uLong SvxFontListBox::GetSelectEntryPos() const
{
SvTreeListEntry* pSvLBoxEntry = FirstSelected();
- return pSvLBoxEntry ? GetModel()->GetAbsPos( pSvLBoxEntry ) : LIST_APPEND;
+ return pSvLBoxEntry ? GetModel()->GetAbsPos( pSvLBoxEntry ) : TREELIST_ENTRY_NOTFOUND;
}
OUString SvxFontListBox::GetSelectEntry() const
diff --git a/svx/source/dialog/frmdirlbox.cxx b/svx/source/dialog/frmdirlbox.cxx
index 114a36b29a3c..04a8454d6e25 100644
--- a/svx/source/dialog/frmdirlbox.cxx
+++ b/svx/source/dialog/frmdirlbox.cxx
@@ -55,22 +55,22 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFrameDirectionListBox(Windo
}
-void FrameDirectionListBox::InsertEntryValue( const OUString& rString, SvxFrameDirection eDirection, sal_uInt16 nPos )
+void FrameDirectionListBox::InsertEntryValue( const OUString& rString, SvxFrameDirection eDirection, sal_Int32 nPos )
{
- sal_uInt16 nRealPos = InsertEntry( rString, nPos );
+ sal_Int32 nRealPos = InsertEntry( rString, nPos );
SetEntryData( nRealPos, lclEnumToVoid( eDirection ) );
}
void FrameDirectionListBox::RemoveEntryValue( SvxFrameDirection eDirection )
{
- sal_uInt16 nPos = GetEntryPos( lclEnumToVoid( eDirection ) );
+ sal_Int32 nPos = GetEntryPos( lclEnumToVoid( eDirection ) );
if( nPos != LISTBOX_ENTRY_NOTFOUND )
RemoveEntry( nPos );
}
void FrameDirectionListBox::SelectEntryValue( SvxFrameDirection eDirection )
{
- sal_uInt16 nPos = GetEntryPos( lclEnumToVoid( eDirection ) );
+ sal_Int32 nPos = GetEntryPos( lclEnumToVoid( eDirection ) );
if( nPos == LISTBOX_ENTRY_NOTFOUND )
SetNoSelection();
else
@@ -79,7 +79,7 @@ void FrameDirectionListBox::SelectEntryValue( SvxFrameDirection eDirection )
SvxFrameDirection FrameDirectionListBox::GetSelectEntryValue() const
{
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
if( nPos == LISTBOX_ENTRY_NOTFOUND )
return static_cast< SvxFrameDirection >( 0xFFFF );
return lclVoidToEnum( GetEntryData( nPos ) );
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index fb51ab3c5640..1766b3d3f3aa 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -107,12 +107,12 @@ static bool lcl_SeqHasLang( const Sequence< sal_Int16 > & rLangSeq, sal_Int16 nL
// class SvxLanguageBox
-sal_uInt16 TypeToPos_Impl( LanguageType eType, const ListBox& rLb )
+sal_Int32 TypeToPos_Impl( LanguageType eType, const ListBox& rLb )
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
- sal_uInt16 nCount = rLb.GetEntryCount();
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nCount = rLb.GetEntryCount();
- for ( sal_uInt16 i=0; nPos == LISTBOX_ENTRY_NOTFOUND && i<nCount; i++ )
+ for ( sal_Int32 i=0; nPos == LISTBOX_ENTRY_NOTFOUND && i<nCount; i++ )
if ( eType == LanguageType((sal_uIntPtr)rLb.GetEntryData(i)) )
nPos = i;
@@ -185,9 +185,9 @@ SvxLanguageBox::~SvxLanguageBox()
-sal_uInt16 SvxLanguageBox::ImplInsertImgEntry( const OUString& rEntry, sal_uInt16 nPos, bool bChecked )
+sal_Int32 SvxLanguageBox::ImplInsertImgEntry( const OUString& rEntry, sal_Int32 nPos, bool bChecked )
{
- sal_uInt16 nRet = 0;
+ sal_Int32 nRet = 0;
if( !bChecked )
nRet = InsertEntry( rEntry, m_aNotCheckedImage, nPos );
else
@@ -320,14 +320,14 @@ void SvxLanguageBox::SetLanguageList( sal_Int16 nLangList,
-sal_uInt16 SvxLanguageBox::InsertLanguage( const LanguageType nLangType, sal_uInt16 nPos )
+sal_Int32 SvxLanguageBox::InsertLanguage( const LanguageType nLangType, sal_Int32 nPos )
{
return ImplInsertLanguage( nLangType, nPos, ::com::sun::star::i18n::ScriptType::WEAK );
}
-sal_uInt16 SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, sal_uInt16 nPos, sal_Int16 nType )
+sal_Int32 SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, sal_Int32 nPos, sal_Int16 nType )
{
LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( nLangType);
// For obsolete and to be replaced languages check whether an entry of the
@@ -335,7 +335,7 @@ sal_uInt16 SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, sal
// string as would be returned by SvtLanguageTable::GetString().
if (nLang != nLangType)
{
- sal_uInt16 nAt = TypeToPos_Impl( nLang, *this );
+ sal_Int32 nAt = TypeToPos_Impl( nLang, *this );
if ( nAt != LISTBOX_ENTRY_NOTFOUND )
return nAt;
}
@@ -358,7 +358,7 @@ sal_uInt16 SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, sal
aStrEntry = ApplyLreOrRleEmbedding( aStrEntry );
- sal_uInt16 nAt = 0;
+ sal_Int32 nAt = 0;
if ( m_bWithCheckmark )
{
bool bFound = false;
@@ -383,22 +383,22 @@ sal_uInt16 SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, sal
-sal_uInt16 SvxLanguageBox::InsertDefaultLanguage( sal_Int16 nType, sal_uInt16 nPos )
+sal_Int32 SvxLanguageBox::InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos )
{
return ImplInsertLanguage( LANGUAGE_SYSTEM, nPos, nType );
}
-sal_uInt16 SvxLanguageBox::InsertSystemLanguage( sal_uInt16 nPos )
+sal_Int32 SvxLanguageBox::InsertSystemLanguage( sal_Int32 nPos )
{
return ImplInsertLanguage( LANGUAGE_USER_SYSTEM_CONFIG, nPos, ::com::sun::star::i18n::ScriptType::WEAK );
}
-sal_uInt16 SvxLanguageBox::InsertLanguage( const LanguageType nLangType,
- sal_Bool bCheckEntry, sal_uInt16 nPos )
+sal_Int32 SvxLanguageBox::InsertLanguage( const LanguageType nLangType,
+ sal_Bool bCheckEntry, sal_Int32 nPos )
{
LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( nLangType);
// For obsolete and to be replaced languages check whether an entry of the
@@ -406,7 +406,7 @@ sal_uInt16 SvxLanguageBox::InsertLanguage( const LanguageType nLangType,
// string as would be returned by SvtLanguageTable::GetString().
if (nLang != nLangType)
{
- sal_uInt16 nAt = TypeToPos_Impl( nLang, *this );
+ sal_Int32 nAt = TypeToPos_Impl( nLang, *this );
if ( nAt != LISTBOX_ENTRY_NOTFOUND )
return nAt;
}
@@ -415,7 +415,7 @@ sal_uInt16 SvxLanguageBox::InsertLanguage( const LanguageType nLangType,
if (LANGUAGE_NONE == nLang && m_bHasLangNone && m_bLangNoneIsLangAll)
aStrEntry = m_aAllString;
- sal_uInt16 nAt = ImplInsertImgEntry( aStrEntry, nPos, bCheckEntry );
+ sal_Int32 nAt = ImplInsertImgEntry( aStrEntry, nPos, bCheckEntry );
SetEntryData( nAt, (void*)(sal_uIntPtr)nLang );
return nAt;
@@ -425,7 +425,7 @@ sal_uInt16 SvxLanguageBox::InsertLanguage( const LanguageType nLangType,
void SvxLanguageBox::RemoveLanguage( const LanguageType eLangType )
{
- sal_uInt16 nAt = TypeToPos_Impl( eLangType, *this );
+ sal_Int32 nAt = TypeToPos_Impl( eLangType, *this );
if ( nAt != LISTBOX_ENTRY_NOTFOUND )
RemoveEntry( nAt );
@@ -435,7 +435,7 @@ void SvxLanguageBox::RemoveLanguage( const LanguageType eLangType )
LanguageType SvxLanguageBox::GetSelectLanguage() const
{
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return LanguageType( (sal_uIntPtr)GetEntryData(nPos) );
@@ -451,7 +451,7 @@ void SvxLanguageBox::SelectLanguage( const LanguageType eLangType, sal_Bool bSel
// a language that is replaced, we need to select the replacement instead.
LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( eLangType);
- sal_uInt16 nAt = TypeToPos_Impl( nLang, *this );
+ sal_Int32 nAt = TypeToPos_Impl( nLang, *this );
if ( nAt == LISTBOX_ENTRY_NOTFOUND )
nAt = InsertLanguage( nLang ); // on-the-fly-ID
@@ -467,7 +467,7 @@ sal_Bool SvxLanguageBox::IsLanguageSelected( const LanguageType eLangType ) cons
// Same here, work on the replacement if applicable.
LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( eLangType);
- sal_uInt16 nAt = TypeToPos_Impl( nLang, *this );
+ sal_Int32 nAt = TypeToPos_Impl( nLang, *this );
if ( nAt != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nAt );
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 5e292c5c1bb1..a0796d38f614 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -67,10 +67,10 @@ SvxTextEncodingBox::~SvxTextEncodingBox()
-sal_uInt16 SvxTextEncodingBox::EncodingToPos_Impl( rtl_TextEncoding nEnc ) const
+sal_Int32 SvxTextEncodingBox::EncodingToPos_Impl( rtl_TextEncoding nEnc ) const
{
- sal_uInt16 nCount = GetEntryCount();
- for ( sal_uInt16 i=0; i<nCount; i++ )
+ sal_Int32 nCount = GetEntryCount();
+ for ( sal_Int32 i=0; i<nCount; i++ )
{
if ( nEnc == rtl_TextEncoding( (sal_uIntPtr)GetEntryData(i) ) )
return i;
@@ -144,7 +144,7 @@ void SvxTextEncodingBox::FillFromDbTextEncodingMap(
svxform::ODataAccessCharsetHelper aCSH;
::std::vector< rtl_TextEncoding > aEncs;
sal_Int32 nCount = aCSH.getSupportedTextEncodings( aEncs );
- for ( sal_uInt16 j=0; j<nCount; j++ )
+ for ( sal_Int32 j=0; j<nCount; j++ )
{
sal_Bool bInsert = sal_True;
rtl_TextEncoding nEnc = rtl_TextEncoding( aEncs[j] );
@@ -201,15 +201,15 @@ void SvxTextEncodingBox::FillWithMimeAndSelectBest()
void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc,
- const OUString& rEntry, sal_uInt16 nPos )
+ const OUString& rEntry, sal_Int32 nPos )
{
- sal_uInt16 nAt = InsertEntry( rEntry, nPos );
+ sal_Int32 nAt = InsertEntry( rEntry, nPos );
SetEntryData( nAt, (void*)(sal_uIntPtr)nEnc );
}
-void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, sal_uInt16 nPos )
+void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, sal_Int32 nPos )
{
const OUString& rEntry = m_pEncTable->GetTextString( nEnc );
if ( !rEntry.isEmpty() )
@@ -222,7 +222,7 @@ void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, sal_uI
rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding() const
{
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return rtl_TextEncoding( (sal_uIntPtr)GetEntryData(nPos) );
@@ -234,7 +234,7 @@ rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding() const
void SvxTextEncodingBox::SelectTextEncoding( const rtl_TextEncoding nEnc, sal_Bool bSelect )
{
- sal_uInt16 nAt = EncodingToPos_Impl( nEnc );
+ sal_Int32 nAt = EncodingToPos_Impl( nEnc );
if ( nAt != LISTBOX_ENTRY_NOTFOUND )
SelectEntryPos( nAt, bSelect );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 7e15117cb13d..7e82487dc103 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -385,7 +385,7 @@ namespace svxform
{
ItemNode* pNode = new ItemNode( xChild );
SvTreeListEntry* pEntry = m_aItemList.InsertEntry(
- sName, aExpImg, aCollImg, _pParent, sal_False, LIST_APPEND, pNode );
+ sName, aExpImg, aCollImg, _pParent, sal_False, TREELIST_APPEND, pNode );
if ( xChild->hasAttributes() )
{
Reference< css::xml::dom::XNamedNodeMap > xMap = xChild->getAttributes();
@@ -401,7 +401,7 @@ namespace svxform
m_xUIHelper->getNodeDisplayName( xAttr, bShowDetails );
m_aItemList.InsertEntry(
sAttrName, aExpImg, aCollImg,
- pEntry, sal_False, LIST_APPEND, pNode );
+ pEntry, sal_False, TREELIST_APPEND, pNode );
}
}
}
@@ -763,7 +763,7 @@ namespace svxform
DBG_UNHANDLED_EXCEPTION();
}
return m_aItemList.InsertEntry(
- sName, aImage, aImage, pParent, sal_False, LIST_APPEND, _pNewNode );
+ sName, aImage, aImage, pParent, sal_False, TREELIST_APPEND, _pNewNode );
}
@@ -782,7 +782,7 @@ namespace svxform
{
// ID
_rEntry->getPropertyValue( PN_SUBMISSION_ID ) >>= sTemp;
- pEntry = m_aItemList.InsertEntry( sTemp, aImage, aImage, NULL, sal_False, LIST_APPEND, pNode );
+ pEntry = m_aItemList.InsertEntry( sTemp, aImage, aImage, NULL, sal_False, TREELIST_APPEND, pNode );
// Action
_rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp;
OUString sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_ACTION );
@@ -826,7 +826,7 @@ namespace svxform
_rEntry->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
sName += sTemp;
pEntry = m_aItemList.InsertEntry(
- sName, aImage, aImage, NULL, sal_False, LIST_APPEND, pNode );
+ sName, aImage, aImage, NULL, sal_False, TREELIST_APPEND, pNode );
}
catch ( Exception& )
{
@@ -1140,7 +1140,7 @@ namespace svxform
ItemNode* pNode = new ItemNode( xPropSet );
m_aItemList.InsertEntry(
- sEntry, aImage1, aImage2, NULL, sal_False, LIST_APPEND, pNode );
+ sEntry, aImage1, aImage2, NULL, sal_False, TREELIST_APPEND, pNode );
}
}
}
@@ -1425,7 +1425,7 @@ namespace svxform
IMPL_LINK( DataNavigatorWindow, ModelSelectHdl, ListBox *, pBox )
{
- sal_uInt16 nPos = m_aModelsBox.GetSelectEntryPos();
+ sal_Int32 nPos = m_aModelsBox.GetSelectEntryPos();
// pBox == NULL, if you want to force a new fill.
if ( nPos != m_nLastSelectedPos || !pBox )
{
@@ -1442,7 +1442,7 @@ namespace svxform
{
bool bIsDocModified = false;
Reference< css::xforms::XFormsUIHelper1 > xUIHelper;
- sal_uInt16 nSelectedPos = m_aModelsBox.GetSelectEntryPos();
+ sal_Int32 nSelectedPos = m_aModelsBox.GetSelectEntryPos();
OUString sSelectedModel( m_aModelsBox.GetEntry( nSelectedPos ) );
Reference< css::xforms::XModel > xModel;
try
@@ -1498,7 +1498,7 @@ namespace svxform
OUString( "ExternalData" ),
makeAny( sal_Bool( !bDocumentData ) ) );
- sal_uInt16 nNewPos = m_aModelsBox.InsertEntry( sNewName );
+ sal_Int32 nNewPos = m_aModelsBox.InsertEntry( sNewName );
m_aModelsBox.SelectEntryPos( nNewPos );
ModelSelectHdl( &m_aModelsBox );
bIsDocModified = true;
@@ -2713,7 +2713,7 @@ namespace svxform
OUString sTemp;
if ( m_xTempBinding->getPropertyValue( PN_BINDING_TYPE ) >>= sTemp )
{
- sal_uInt16 nPos = m_pDataTypeLB->GetEntryPos( sTemp );
+ sal_Int32 nPos = m_pDataTypeLB->GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nPos = m_pDataTypeLB->InsertEntry( sTemp );
m_pDataTypeLB->SelectEntryPos( nPos );
@@ -3297,7 +3297,7 @@ namespace svxform
m_xSubmission->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
sTemp = m_aMethodString.toUI( sTemp );
- sal_uInt16 nPos = m_pMethodLB->GetEntryPos( sTemp );
+ sal_Int32 nPos = m_pMethodLB->GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nPos = m_pMethodLB->InsertEntry( sTemp );
m_pMethodLB->SelectEntryPos( nPos );
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 1394ccff87ef..fddea8e5f316 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -781,8 +781,16 @@ void FmFilterModel::AppendFilterItems( FmFormItem& _rFormItem )
void FmFilterModel::Insert(const ::std::vector<FmFilterData*>::iterator& rPos, FmFilterData* pData)
{
::std::vector<FmFilterData*>& rItems = pData->GetParent()->GetChildren();
- sal_uLong nPos = rPos == rItems.end() ? LIST_APPEND : rPos - rItems.begin();
- rItems.insert(rPos, pData);
+ sal_uLong nPos = rPos == rItems.end() ? CONTAINER_APPEND : rPos - rItems.begin();
+ if (nPos == CONTAINER_APPEND)
+ {
+ rItems.push_back(pData);
+ nPos = rItems.size() - 1;
+ }
+ else
+ {
+ rItems.insert(rPos, pData);
+ }
// UI benachrichtigen
FmFilterInsertedHint aInsertedHint(pData, nPos);
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index ad410ed56ef2..271295451596 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -643,7 +643,7 @@ namespace svxform
for( size_t i = 0; i < nChildCount; i++ )
{
pChildData = pChildList->at( i );
- Insert( pChildData, LIST_APPEND );
+ Insert( pChildData, TREELIST_APPEND );
}
return pNewEntry;
@@ -1362,7 +1362,7 @@ namespace svxform
// Form einfuegen
- GetNavModel()->Insert( pNewFormData, LIST_APPEND, sal_True );
+ GetNavModel()->Insert( pNewFormData, TREELIST_APPEND, sal_True );
// Neue Form als aktive Form setzen
@@ -1417,7 +1417,7 @@ namespace svxform
// FormComponent einfuegen
- GetNavModel()->Insert( pNewFormControlData, LIST_APPEND, sal_True );
+ GetNavModel()->Insert( pNewFormControlData, TREELIST_APPEND, sal_True );
GetNavModel()->SetModified();
if (bEditName)
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index 8abc293156e2..73bb8f08bfef 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -537,7 +537,7 @@ namespace svxform
xForms->getByIndex(i) >>= xSubForm;
pSubFormData = new FmFormData( xSubForm, m_aNormalImages, pFormData );
- Insert( pSubFormData, LIST_APPEND );
+ Insert( pSubFormData, CONTAINER_APPEND );
// Neuer Branch, wenn SubForm wiederum Subforms enthaelt
@@ -566,7 +566,7 @@ namespace svxform
if (xSubForm.is())
{ // die aktuelle Component ist eine Form
pSubFormData = new FmFormData(xSubForm, m_aNormalImages, pFormData);
- Insert(pSubFormData, LIST_APPEND);
+ Insert(pSubFormData, CONTAINER_APPEND);
// Neuer Branch, wenn SubForm wiederum Subforms enthaelt
@@ -575,7 +575,7 @@ namespace svxform
else
{
pNewControlData = new FmControlData(xCurrentComponent, m_aNormalImages, pFormData);
- Insert(pNewControlData, LIST_APPEND);
+ Insert(pNewControlData, CONTAINER_APPEND);
}
}
}
@@ -614,7 +614,7 @@ namespace svxform
if( !pParentData )
{
pParentData = new FmFormData( xForm, m_aNormalImages, NULL );
- Insert( pParentData, LIST_APPEND );
+ Insert( pParentData, CONTAINER_APPEND );
}
if (!FindData(xComp, pParentData->GetChildList(),sal_False))
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index fa891f621b66..7e7d3d3aebbf 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -103,9 +103,9 @@ static void lcl_addToList( SvTreeListBox& _rListBox, const uno::Reference< conta
if ( xColumn->getPropertySetInfo()->hasPropertyByName(FM_PROP_LABEL) )
xColumn->getPropertyValue(FM_PROP_LABEL) >>= sLabel;
if ( !sLabel.isEmpty() )
- _rListBox.InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ _rListBox.InsertEntry( sLabel,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
else
- _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ _rListBox.InsertEntry( *pEntries,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
}
}
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 3d8f0348c6f6..2e0005ae586d 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -321,7 +321,7 @@ namespace svxform
long m_nMinWidth;
long m_nMinHeight;
long m_nBorderHeight;
- sal_uInt16 m_nLastSelectedPos;
+ sal_Int32 m_nLastSelectedPos;
bool m_bShowDetails;
bool m_bIsNotifyDisabled;
Size m_a2Size;
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 9aeef70572b1..5359d42bfc20 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -386,7 +386,7 @@ namespace svxform
void ClearBranch( FmFormData* pParentData );
void UpdateContent( FmFormShell* pNewShell );
- void Insert( FmEntryData* pEntryData, sal_uLong nRelPos = LIST_APPEND,
+ void Insert( FmEntryData* pEntryData, sal_uLong nRelPos = CONTAINER_APPEND,
sal_Bool bAlterModel = sal_False );
void Remove( FmEntryData* pEntryData, sal_Bool bAlterModel = sal_False );
@@ -455,7 +455,7 @@ namespace svxform
void UpdateContent();
FmControlData* NewControl( const OUString& rServiceName, SvTreeListEntry* pParentEntry, sal_Bool bEditName = sal_True );
void NewForm( SvTreeListEntry* pParentEntry );
- SvTreeListEntry* Insert( FmEntryData* pEntryData, sal_uLong nRelPos=LIST_APPEND );
+ SvTreeListEntry* Insert( FmEntryData* pEntryData, sal_uLong nRelPos=TREELIST_APPEND );
void Remove( FmEntryData* pEntryData );
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 402f03fb0cab..74e2d28c9117 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -1589,7 +1589,7 @@ void SvxNumberFormatShell::GetCurrencySymbols(std::vector<OUString>& rList, bool
delete pLanguageTable;
}
-void SvxNumberFormatShell::SetCurrencySymbol(sal_uInt16 nPos)
+void SvxNumberFormatShell::SetCurrencySymbol(sal_uInt32 nPos)
{
const NfCurrencyTable& rCurrencyTable=SvNumberFormatter::GetTheCurrencyTable();
sal_uInt16 nCount=rCurrencyTable.size();
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index d82e66417ca4..266b33837d3e 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -403,7 +403,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
}
case XFILL_GRADIENT:
{
- sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
+ sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND == nPos)
{
@@ -434,7 +434,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
}
case XFILL_HATCH:
{
- sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
+ sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND == nPos)
{
@@ -465,7 +465,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
}
case XFILL_BITMAP:
{
- sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
+ sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND == nPos)
{
@@ -641,7 +641,7 @@ void AreaPropertyPanel::ImpUpdateTransparencies()
if(mpFloatTransparenceItem->IsEnabled())
{
const XGradient& rGradient = mpFloatTransparenceItem->GetGradientValue();
- sal_uInt16 nEntryPos(0);
+ sal_Int32 nEntryPos(0);
Image* pImage = 0;
mpLBTransType->Enable();
@@ -821,7 +821,7 @@ void AreaPropertyPanel::NotifyItemUpdate(
mpColorTextFT->Enable();
XFillStyle eXFS = (XFillStyle)mpStyleItem->GetValue();
meLastXFS = eXFS;
- mpLbFillType->SelectEntryPos(sal::static_int_cast< sal_uInt16 >(eXFS));
+ mpLbFillType->SelectEntryPos(sal::static_int_cast< sal_Int32 >(eXFS));
if(XFILL_NONE == eXFS)
{
@@ -1213,7 +1213,7 @@ IMPL_LINK( AreaPropertyPanel, ClickTrGrHdl_Impl, ToolBox*, pToolBox )
IMPL_LINK(AreaPropertyPanel, ChangeTrgrTypeHdl_Impl, void *, EMPTYARG)
{
- sal_uInt16 nSelectType = mpLBTransType->GetSelectEntryPos();
+ sal_Int32 nSelectType = mpLBTransType->GetSelectEntryPos();
bool bGradient = false;
sal_uInt16 nTrans = 0;
@@ -1310,7 +1310,7 @@ IMPL_LINK(AreaPropertyPanel, ModifyTransparentHdl_Impl, void*, EMPTYARG)
{
const sal_uInt16 nTrans = (sal_uInt16)mpMTRTransparent->GetValue();
mnLastTransSolid = nTrans;
- const sal_uInt16 nSelectType = mpLBTransType->GetSelectEntryPos();
+ const sal_Int32 nSelectType = mpLBTransType->GetSelectEntryPos();
if(nTrans && !nSelectType)
{
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index 80304f575387..61173229334c 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -86,9 +86,9 @@ private:
sal_uInt16 meLastXFS;
Color maLastColor;
- sal_uInt16 mnLastPosGradient;
- sal_uInt16 mnLastPosHatch;
- sal_uInt16 mnLastPosBitmap;
+ sal_Int32 mnLastPosGradient;
+ sal_Int32 mnLastPosHatch;
+ sal_Int32 mnLastPosBitmap;
sal_uInt16 mnLastTransSolid;
XGradient maGradientLinear;
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index aef5069c867c..5f9e4e2a936d 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -571,7 +571,7 @@ void LinePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- sal_uInt16 nEntryPos(0);
+ sal_Int32 nEntryPos(0);
switch(pItem->GetValue())
{
@@ -631,7 +631,7 @@ void LinePropertyPanel::NotifyItemUpdate(
if(pItem)
{
- sal_uInt16 nEntryPos(0);
+ sal_Int32 nEntryPos(0);
switch(pItem->GetValue())
{
@@ -696,7 +696,7 @@ IMPL_LINK(LinePropertyPanel, ToolboxColorSelectHdl,ToolBox*, pToolBox)
IMPL_LINK_NOARG(LinePropertyPanel, ChangeLineStyleHdl)
{
- const sal_uInt16 nPos(mpLBStyle->GetSelectEntryPos());
+ const sal_Int32 nPos(mpLBStyle->GetSelectEntryPos());
if(LISTBOX_ENTRY_NOTFOUND != nPos && nPos != mpLBStyle->GetSavedValue())
{
@@ -736,7 +736,7 @@ IMPL_LINK_NOARG(LinePropertyPanel, ChangeLineStyleHdl)
IMPL_LINK(LinePropertyPanel, ChangeStartHdl, void*, EMPTYARG)
{
- sal_uInt16 nPos = mpLBStart->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBStart->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != mpLBStart->GetSavedValue() )
{
XLineStartItem* pItem = NULL;
@@ -755,7 +755,7 @@ IMPL_LINK(LinePropertyPanel, ChangeStartHdl, void*, EMPTYARG)
IMPL_LINK(LinePropertyPanel, ChangeEndHdl, void*, EMPTYARG)
{
- sal_uInt16 nPos = mpLBEnd->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBEnd->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != mpLBEnd->GetSavedValue() )
{
XLineEndItem* pItem = NULL;
@@ -774,7 +774,7 @@ IMPL_LINK(LinePropertyPanel, ChangeEndHdl, void*, EMPTYARG)
IMPL_LINK(LinePropertyPanel, ChangeEdgeStyleHdl, void*, EMPTYARG)
{
- const sal_uInt16 nPos(mpLBEdgeStyle->GetSelectEntryPos());
+ const sal_Int32 nPos(mpLBEdgeStyle->GetSelectEntryPos());
if(LISTBOX_ENTRY_NOTFOUND != nPos && nPos != mpLBEdgeStyle->GetSavedValue())
{
@@ -815,7 +815,7 @@ IMPL_LINK(LinePropertyPanel, ChangeEdgeStyleHdl, void*, EMPTYARG)
IMPL_LINK(LinePropertyPanel, ChangeCapStyleHdl, void*, EMPTYARG)
{
- const sal_uInt16 nPos(mpLBCapStyle->GetSelectEntryPos());
+ const sal_Int32 nPos(mpLBCapStyle->GetSelectEntryPos());
if(LISTBOX_ENTRY_NOTFOUND != nPos && nPos != mpLBCapStyle->GetSavedValue())
{
@@ -1057,7 +1057,7 @@ void LinePropertyPanel::SelectLineStyle()
const XDash& rEntry = pEntry->GetDash();
if(rDash == rEntry)
{
- mpLBStyle->SelectEntryPos((sal_uInt16)a + 2);
+ mpLBStyle->SelectEntryPos(a + 2);
bSelected = true;
}
}
@@ -1091,7 +1091,7 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd();
if(rItemPolygon == rEntryPolygon)
{
- mpLBStart->SelectEntryPos((sal_uInt16)a + 1);
+ mpLBStart->SelectEntryPos(a + 1);
bSelected = true;
}
}
@@ -1120,7 +1120,7 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd();
if(rItemPolygon == rEntryPolygon)
{
- mpLBEnd->SelectEntryPos((sal_uInt16)a + 1);
+ mpLBEnd->SelectEntryPos(a + 1);
bSelected = true;
}
}
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 44ed0d6ba93b..919fe820f6d7 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -169,7 +169,7 @@ void SvxFillToolBoxControl::StateChanged(
if(eLastXFS != eXFS)
{
bUpdate = sal_True;
- pFillTypeLB->SelectEntryPos( sal::static_int_cast< sal_uInt16 >( eXFS ) );
+ pFillTypeLB->SelectEntryPos( eXFS );
}
pFillAttrLB->Enable();
@@ -253,7 +253,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState )
LISTBOX_ENTRY_NOTFOUND ||
pFillAttrLB->GetSelectEntryColor() != aColor )
{
- sal_uInt16 nCount = pFillAttrLB->GetEntryCount();
+ sal_Int32 nCount = pFillAttrLB->GetEntryCount();
OUString aTmpStr;
if( nCount > 0 )
{
@@ -268,7 +268,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState )
aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END;
//pFillAttrLB->SetUpdateMode( sal_False );
- sal_uInt16 nPos = pFillAttrLB->InsertEntry( aColor, aTmpStr );
+ sal_Int32 nPos = pFillAttrLB->InsertEntry( aColor, aTmpStr );
//pFillAttrLB->SetUpdateMode( sal_True );
pFillAttrLB->SelectEntryPos( nPos );
}
@@ -287,7 +287,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState )
// Check if the entry is not in the list
if( pFillAttrLB->GetSelectEntry() != aString )
{
- sal_uInt16 nCount = pFillAttrLB->GetEntryCount();
+ sal_Int32 nCount = pFillAttrLB->GetEntryCount();
OUString aTmpStr;
if( nCount > 0 )
{
@@ -332,7 +332,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState )
// Check if the entry is not in the list
if( pFillAttrLB->GetSelectEntry() != aString )
{
- sal_uInt16 nCount = pFillAttrLB->GetEntryCount();
+ sal_Int32 nCount = pFillAttrLB->GetEntryCount();
OUString aTmpStr;
if( nCount > 0 )
{
@@ -384,7 +384,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState )
// Check if the entry is not in the list
if( pFillAttrLB->GetSelectEntry() != aString )
{
- sal_uInt16 nCount = pFillAttrLB->GetEntryCount();
+ sal_Int32 nCount = pFillAttrLB->GetEntryCount();
OUString aTmpStr;
if( nCount > 0 )
{
@@ -689,7 +689,7 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox )
break;
case XFILL_GRADIENT:
{
- sal_uInt16 nPos = pLbFillAttr->GetSelectEntryPos();
+ sal_Int32 nPos = pLbFillAttr->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_GRADIENT_LIST ) )
{
@@ -713,7 +713,7 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox )
case XFILL_HATCH:
{
- sal_uInt16 nPos = pLbFillAttr->GetSelectEntryPos();
+ sal_Int32 nPos = pLbFillAttr->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_HATCH_LIST ) )
{
@@ -736,7 +736,7 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox )
case XFILL_BITMAP:
{
- sal_uInt16 nPos = pLbFillAttr->GetSelectEntryPos();
+ sal_Int32 nPos = pLbFillAttr->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_BITMAP_LIST ) )
{
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index ef667913f1a1..7217655b2d98 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -101,7 +101,7 @@ void SvxLineBox::Select()
if ( !IsTravelSelect() )
{
XLineStyle eXLS;
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
switch ( nPos )
{
@@ -313,7 +313,7 @@ void SvxColorBox::Update( const XLineColorItem* pItem )
if( GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ||
GetSelectEntryColor() != aColor )
{
- sal_uInt16 nCount = GetEntryCount();
+ sal_Int32 nCount = GetEntryCount();
OUString aTmpStr;
if( nCount > 0 )
{
@@ -327,7 +327,7 @@ void SvxColorBox::Update( const XLineColorItem* pItem )
}
aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END;
- sal_uInt16 nPos = InsertEntry( aColor, aTmpStr );
+ sal_Int32 nPos = InsertEntry( aColor, aTmpStr );
SelectEntryPos( nPos );
}
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 732fe46ef60b..fd31acff4313 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2062,7 +2062,8 @@ void SvxStyleToolBoxControl::FillStyleBox()
pBox->SetUpdateMode( true );
pBox->SetFamily( eFamily );
- sal_uInt16 nLines = std::min( pBox->GetEntryCount(), MAX_STYLES_ENTRIES );
+ sal_uInt16 nLines = static_cast<sal_uInt16>(
+ std::min( pBox->GetEntryCount(), static_cast<sal_Int32>(MAX_STYLES_ENTRIES)));
pBox->SetDropDownLineCount( nLines );
}
}
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index c8f41080e045..30b2b20c753b 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -247,7 +247,7 @@ void DictionaryList::deleteEntryOnPos( sal_Int32 nPos )
sal_uIntPtr DictionaryList::deleteEntries( const OUString& rTerm )
{
- sal_uIntPtr nPos = LIST_APPEND;
+ sal_uIntPtr nPos = TREELIST_APPEND;
for( sal_Int32 nN=GetRowCount(); nN--; )
{
DictionaryEntry* pCurEntry = getEntryOnPos( nN );
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
index 3273633c3173..14b515a47777 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
@@ -78,7 +78,7 @@ public:
bool hasTerm( const OUString& rTerm ) const;
void addEntry( const OUString& rTerm, const OUString& rMapping
- , sal_Int16 nConversionPropertyType /*linguistic2::ConversionPropertyType*/, sal_uIntPtr nPos = LIST_APPEND );
+ , sal_Int16 nConversionPropertyType /*linguistic2::ConversionPropertyType*/, sal_uIntPtr nPos = TREELIST_APPEND );
sal_uIntPtr deleteEntries( const OUString& rTerm ); //return lowest position of deleted entries or LIST_APPEND if no entry was deleted
void deleteEntryOnPos( sal_Int32 nPos );
DictionaryEntry* getEntryOnPos( sal_Int32 nPos ) const;
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 3bf465c99249..7d5dd387b7d7 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -877,10 +877,10 @@ public:
const SwTOXBase& rTOX );
sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos );
sal_Bool DeleteGlobalDocContent( const SwGlblDocContents& rArr,
- sal_uInt16 nPos );
+ size_t nPos );
sal_Bool MoveGlobalDocContent( const SwGlblDocContents& rArr ,
- sal_uInt16 nFromPos, sal_uInt16 nToPos,
- sal_uInt16 nNewPos );
+ size_t nFromPos, size_t nToPos,
+ size_t nNewPos );
sal_Bool GotoGlobalDocContent( const SwGlblDocContent& rPos );
/// For Redlining.
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index b7490b72f0ac..ee85aec3e7b4 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -238,7 +238,7 @@ sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
}
sal_Bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
- sal_uInt16 nDelPos )
+ size_t nDelPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
return sal_False;
@@ -303,8 +303,8 @@ sal_Bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
}
sal_Bool SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
- sal_uInt16 nFromPos, sal_uInt16 nToPos,
- sal_uInt16 nInsPos )
+ size_t nFromPos, size_t nToPos,
+ size_t nInsPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ||
nFromPos >= rArr.size() || nToPos > rArr.size() ||
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 66092eab9da5..384fca4f5fc0 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -26,11 +26,11 @@
SwBoxEntry::SwBoxEntry() :
bModified(sal_False),
bNew(sal_False),
- nId(LISTBOX_APPEND)
+ nId(COMBOBOX_APPEND)
{
}
-SwBoxEntry::SwBoxEntry(const OUString& aNam, sal_uInt16 nIdx) :
+SwBoxEntry::SwBoxEntry(const OUString& aNam, sal_Int32 nIdx) :
bModified(sal_False),
bNew(sal_False),
aName(aNam),
@@ -55,8 +55,8 @@ SwComboBox::SwComboBox(Window* pParent, WinBits nStyle)
void SwComboBox::Init()
{
// create administration for the resource's Stringlist
- sal_uInt16 nSize = GetEntryCount();
- for( sal_uInt16 i=0; i < nSize; ++i )
+ sal_Int32 nSize = GetEntryCount();
+ for( sal_Int32 i=0; i < nSize; ++i )
{
SwBoxEntry* pTmp = new SwBoxEntry(ComboBox::GetEntry(i), i);
aEntryLst.push_back(pTmp);
@@ -73,15 +73,15 @@ void SwComboBox::InsertSwEntry(const SwBoxEntry& rEntry)
InsertSorted(new SwBoxEntry(rEntry));
}
-sal_uInt16 SwComboBox::InsertEntry(const OUString& rStr, sal_uInt16)
+sal_Int32 SwComboBox::InsertEntry(const OUString& rStr, sal_Int32)
{
InsertSwEntry(SwBoxEntry(rStr));
return 0;
}
-void SwComboBox::RemoveEntryAt(sal_uInt16 const nPos)
+void SwComboBox::RemoveEntryAt(sal_Int32 const nPos)
{
- if(nPos >= aEntryLst.size())
+ if(nPos < 0 || static_cast<size_t>(nPos) >= aEntryLst.size())
return;
// Remove old element
@@ -101,27 +101,27 @@ void SwComboBox::RemoveEntryAt(sal_uInt16 const nPos)
}
}
-sal_uInt16 SwComboBox::GetSwEntryPos(const SwBoxEntry& rEntry) const
+sal_Int32 SwComboBox::GetSwEntryPos(const SwBoxEntry& rEntry) const
{
return ComboBox::GetEntryPos(rEntry.aName);
}
-const SwBoxEntry& SwComboBox::GetSwEntry(sal_uInt16 const nPos) const
+const SwBoxEntry& SwComboBox::GetSwEntry(sal_Int32 const nPos) const
{
- if(nPos < aEntryLst.size())
+ if(0 <= nPos && static_cast<size_t>(nPos) < aEntryLst.size())
return aEntryLst[nPos];
return aDefault;
}
-sal_uInt16 SwComboBox::GetRemovedCount() const
+sal_Int32 SwComboBox::GetRemovedCount() const
{
- return aDelEntryLst.size();
+ return static_cast<sal_Int32>(aDelEntryLst.size());
}
-const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const
+const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_Int32 nPos) const
{
- if(nPos < aDelEntryLst.size())
+ if(0 <= nPos && static_cast<size_t>(nPos) < aDelEntryLst.size())
return aDelEntryLst[nPos];
return aDefault;
@@ -130,7 +130,7 @@ const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const
void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
{
ComboBox::InsertEntry(pEntry->aName);
- sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName);
+ sal_Int32 nPos = ComboBox::GetEntryPos(pEntry->aName);
aEntryLst.insert( aEntryLst.begin() + nPos, pEntry );
}
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 19a77d549dd0..7ba9dd1ca1c0 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -45,7 +45,7 @@ void SwBreakDlg::Apply()
else if(m_pPageBtn->IsChecked())
{
nKind = 3;
- const sal_uInt16 nPos = m_pPageCollBox->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pPageCollBox->GetSelectEntryPos();
if(0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos)
{
aTemplate = m_pPageCollBox->GetSelectEntry();
@@ -99,7 +99,7 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl)
{
if(m_pPageNumBox->IsChecked()) {
// In case of differing page descriptions, test validity
- const sal_uInt16 nPos = m_pPageCollBox->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pPageCollBox->GetSelectEntryPos();
// position 0 says 'Without'.
const SwPageDesc *pPageDesc;
if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos )
@@ -203,7 +203,7 @@ void SwBreakDlg::CheckEnable()
if ( bEnable )
{
// position 0 says 'Without' page template.
- const sal_uInt16 nPos = m_pPageCollBox->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pPageCollBox->GetSelectEntryPos();
if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos )
bEnable = sal_False;
}
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 838fe3c8825c..4abd35c76d8c 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -84,7 +84,7 @@ SwLoadOptPage::SwLoadOptPage(Window* pParent, const SfxItemSet& rSet)
get(m_pWordCountED, "wordcount");
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
- for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
+ for ( sal_uInt32 i = 0; i < aMetricArr.Count(); ++i )
{
OUString sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
@@ -98,7 +98,7 @@ SwLoadOptPage::SwLoadOptPage(Window* pParent, const SfxItemSet& rSet)
case FUNIT_INCH:
{
// use only these metrics
- sal_uInt16 nPos = m_pMetricLB->InsertEntry( sMetric );
+ sal_Int32 nPos = m_pMetricLB->InsertEntry( sMetric );
m_pMetricLB->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
}
default:; //prevent warning
@@ -165,7 +165,7 @@ sal_Bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
bRet = sal_True;
}
- const sal_uInt16 nMPos = m_pMetricLB->GetSelectEntryPos();
+ const sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos();
if ( nMPos != m_pMetricLB->GetSavedValue() )
{
// Double-Cast for VA3.0
@@ -253,7 +253,7 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet)
const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet.Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
- for ( sal_uInt16 i = 0; i < m_pMetricLB->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < m_pMetricLB->GetEntryCount(); ++i )
{
if ( (int)(sal_IntPtr)m_pMetricLB->GetEntryData( i ) == (int)eFieldUnit )
{
@@ -296,8 +296,8 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet)
IMPL_LINK_NOARG(SwLoadOptPage, MetricHdl)
{
- const sal_uInt16 nMPos = m_pMetricLB->GetSelectEntryPos();
- if(nMPos != USHRT_MAX)
+ const sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos();
+ if(nMPos != LISTBOX_ENTRY_NOTFOUND)
{
// Double-Cast for VA3.0
FieldUnit eFieldUnit = (FieldUnit)(sal_IntPtr)m_pMetricLB->GetEntryData( nMPos );
@@ -510,7 +510,7 @@ sal_Bool SwCaptionOptPage::FillItemSet( SfxItemSet& )
pEntry = m_pCheckLB->Next(pEntry);
}
- sal_uInt16 nCheckCount = m_pCheckLB->GetCheckedEntryCount();
+ sal_uLong nCheckCount = m_pCheckLB->GetCheckedEntryCount();
pModOpt->SetInsWithCaption( bHTMLMode, nCheckCount > 0 );
sal_Int32 nPos = m_pLbCaptionOrder->GetSelectEntryPos();
@@ -531,7 +531,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
m_pCheckLB->GetModel()->Clear(); // remove all entries
// Writer objects
- sal_uInt16 nPos = 0;
+ sal_uLong nPos = 0;
m_pCheckLB->InsertEntry(m_sSWTable);
SetOptions(nPos++, TABLE_CAP);
m_pCheckLB->InsertEntry(m_sSWFrame);
@@ -567,7 +567,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
ModifyHdl();
}
-void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos,
+void SwCaptionOptPage::SetOptions(const sal_uLong nPos,
const SwCapObjType eObjType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -600,7 +600,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
if (pSelEntry)
{
- sal_Bool bChecked = m_pCheckLB->IsChecked((sal_uInt16)m_pCheckLB->GetModel()->GetAbsPos(pSelEntry));
+ sal_Bool bChecked = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pSelEntry));
m_pSettingsGroup->Enable(bChecked);
bool bNumSep = bChecked && m_pLbCaptionOrder->GetSelectEntryPos() == 1;
@@ -646,7 +646,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
m_pCategoryBox->InsertEntry(pOpt->GetCategory());
if (m_pCategoryBox->GetText().isEmpty())
{
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
switch(pOpt->GetObjType())
{
case OLE_CAP:
@@ -657,7 +657,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
m_pCategoryBox->SetText(m_pCategoryBox->GetSwEntry(nPos).GetName());
}
- for (sal_uInt16 i = 0; i < m_pFormatBox->GetEntryCount(); i++)
+ for (sal_Int32 i = 0; i < m_pFormatBox->GetEntryCount(); i++)
{
if (pOpt->GetNumType() == (sal_uInt16)(sal_uLong)m_pFormatBox->GetEntryData(i))
{
@@ -687,7 +687,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
m_pPosBox->IsEnabled() );
m_pPosBox->SelectEntryPos(pOpt->GetPos());
- sal_uInt16 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
+ sal_Int32 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
m_pLbLevel->SelectEntryPos( nLevelPos );
m_pEdDelim->SetText(pOpt->GetSeparator());
m_pNumberingSeparatorED->SetText( pOpt->GetNumSeparator() );
@@ -721,7 +721,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
{
InsCaptionOpt* pOpt = (InsCaptionOpt*)pEntry->GetUserData();
- pOpt->UseCaption() = m_pCheckLB->IsChecked((sal_uInt16)m_pCheckLB->GetModel()->GetAbsPos(pEntry));
+ pOpt->UseCaption() = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pEntry));
OUString aName( m_pCategoryBox->GetText() );
if (aName == m_sNone)
pOpt->SetCategory(aEmptyOUStr);
@@ -730,8 +730,8 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
pOpt->SetNumType((sal_uInt16)(sal_uLong)m_pFormatBox->GetEntryData(m_pFormatBox->GetSelectEntryPos()));
pOpt->SetCaption(m_pTextEdit->IsEnabled() ? m_pTextEdit->GetText() : OUString(aEmptyOUStr) );
pOpt->SetPos(m_pPosBox->GetSelectEntryPos());
- sal_uInt16 nPos = m_pLbLevel->GetSelectEntryPos();
- sal_uInt16 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
+ sal_Int32 nPos = m_pLbLevel->GetSelectEntryPos();
+ sal_Int32 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
pOpt->SetLevel(nLevel);
pOpt->SetSeparator(m_pEdDelim->GetText());
pOpt->SetNumSeparator( m_pNumberingSeparatorED->GetText());
@@ -777,7 +777,7 @@ IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox )
sal_Bool bChecked = sal_False;
if (pSelEntry)
{
- bChecked = m_pCheckLB->IsChecked((sal_uInt16)m_pCheckLB->GetModel()->GetAbsPos(pSelEntry));
+ bChecked = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pSelEntry));
}
sal_Int32 nPos = pBox->GetSelectEntryPos();
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index cd88ff2ed640..5cf73bcf924f 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -118,7 +118,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
m_pAnyRulerCB->SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl));
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
- for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
+ for ( size_t i = 0; i < aMetricArr.Count(); ++i )
{
OUString sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
@@ -138,7 +138,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
// there isn't 'line' unit in HTML format
if ( eFUnit != FUNIT_LINE )
{
- sal_uInt16 nPos = m_pMetricLB->InsertEntry( sMetric );
+ sal_Int32 nPos = m_pMetricLB->InsertEntry( sMetric );
m_pMetricLB->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
m_pHMetric->InsertEntry( sMetric );
m_pHMetric->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
@@ -146,7 +146,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
// a vertical ruler has not the 'character' unit
if ( eFUnit != FUNIT_CHAR )
{
- sal_uInt16 nPos = m_pVMetric->InsertEntry( sMetric );
+ sal_Int32 nPos = m_pVMetric->InsertEntry( sMetric );
m_pVMetric->SetEntryData( nPos, (void*)(sal_IntPtr)eFUnit );
}
}
@@ -171,7 +171,7 @@ static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemS
if( rSet.GetItemState( nSID, false, &pItem ) >= SFX_ITEM_AVAILABLE )
{
FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue();
- for ( sal_uInt16 i = 0; i < rMetric->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < rMetric->GetEntryCount(); ++i )
{
if ( (int)(sal_IntPtr)rMetric->GetEntryData( i ) == (int)eFieldUnit )
{
@@ -238,8 +238,8 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
if(bRet)
bRet = 0 != rSet.Put(aElem);
- sal_uInt16 nMPos = m_pMetricLB->GetSelectEntryPos();
- sal_uInt16 nGlobalMetricPos = nMPos;
+ sal_Int32 nMPos = m_pMetricLB->GetSelectEntryPos();
+ sal_Int32 nGlobalMetricPos = nMPos;
if ( nMPos != m_pMetricLB->GetSavedValue() )
{
// Double-Cast for VA3.0
@@ -1695,7 +1695,7 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
sAuthor = get<Window>("byauthor")->GetText();
- for (sal_uInt16 i = 0; i < pInsertLB->GetEntryCount(); ++i)
+ for (sal_Int32 i = 0; i < pInsertLB->GetEntryCount(); ++i)
{
OUString sEntry(pInsertLB->GetEntry(i));
pDeletedLB->InsertEntry(sEntry);
@@ -1755,7 +1755,7 @@ sal_Bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
ColorData nOldMarkColor = pOpt->GetMarkAlignColor().GetColor();
sal_uInt16 nOldMarkMode = pOpt->GetMarkAlignMode();
- sal_uInt16 nPos = pInsertLB->GetSelectEntryPos();
+ sal_Int32 nPos = pInsertLB->GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
pAttr = (CharAttr *)pInsertLB->GetEntryData(nPos);
@@ -1893,8 +1893,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
pChangedColorLB->InsertEntry(sAuthor);
XColorListRef pColorLst = XColorList::GetStdColorList();
- sal_uInt16 i;
- for( i = 0; i < pColorLst->Count(); ++i )
+ for( sal_Int32 i = 0; i < pColorLst->Count(); ++i )
{
XColorEntry* pEntry = pColorLst->GetColor( i );
Color aColor = pEntry->GetColor();
@@ -1965,7 +1964,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
lcl_FillRedlineAttrListBox(*pChangedLB, rChangedAttr, aChangedAttrMap,
sizeof(aChangedAttrMap) / sizeof(sal_uInt16));
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
switch (pOpt->GetMarkAlignMode())
{
case text::HoriOrientation::NONE: nPos = 0; break;
@@ -2022,7 +2021,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB )
rFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED);
rCJKFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED);
- sal_uInt16 nPos = pColorLB->GetSelectEntryPos();
+ sal_Int32 nPos = pColorLB->GetSelectEntryPos();
switch( nPos )
{
@@ -2117,7 +2116,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB )
SvxFont& rFont = pPrev->GetFont();
SvxFont& rCJKFont = pPrev->GetCJKFont();
- sal_uInt16 nPos = pLB->GetSelectEntryPos();
+ sal_Int32 nPos = pLB->GetSelectEntryPos();
if( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index d2cd6285086b..5c3cb5211839 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -71,7 +71,7 @@ IMPL_LINK_NOARG(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl)
IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
{
bool bRename = pButton == m_pRenamePB;
- sal_uInt16 nPos = m_pFieldsLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pFieldsLB->GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
@@ -117,7 +117,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
IMPL_LINK_NOARG(SwCustomizeAddressListDialog, DeleteHdl_Impl)
{
- sal_uInt16 nPos = m_pFieldsLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pFieldsLB->GetSelectEntryPos();
m_pFieldsLB->RemoveEntry(m_pFieldsLB->GetSelectEntryPos());
m_pFieldsLB->SelectEntryPos(nPos > m_pFieldsLB->GetEntryCount() - 1 ? nPos - 1 : nPos);
@@ -134,8 +134,8 @@ IMPL_LINK_NOARG(SwCustomizeAddressListDialog, DeleteHdl_Impl)
IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
{
- sal_uInt16 nPos;
- sal_uInt16 nOldPos = nPos = m_pFieldsLB->GetSelectEntryPos();
+ sal_Int32 nPos;
+ sal_Int32 nOldPos = nPos = m_pFieldsLB->GetSelectEntryPos();
OUString aTemp = m_pFieldsLB->GetEntry(nPos);
m_pFieldsLB->RemoveEntry( nPos );
if(pButton == m_pUpPB)
@@ -162,8 +162,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
void SwCustomizeAddressListDialog::UpdateButtons()
{
- sal_uInt16 nPos = m_pFieldsLB->GetSelectEntryPos();
- sal_uInt16 nEntries = m_pFieldsLB->GetEntryCount();
+ sal_Int32 nPos = m_pFieldsLB->GetSelectEntryPos();
+ sal_Int32 nEntries = m_pFieldsLB->GetEntryCount();
m_pUpPB->Enable(nPos > 0 && nEntries > 0);
m_pDownPB->Enable(nPos < nEntries -1);
m_pDeletePB->Enable(nEntries > 0);
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 199e67ed6eb7..c7277626f8f2 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -481,7 +481,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
bEnableTo = sal_False;
- sal_uInt16 n, nInsPos = m_pLbTableCol->GetSelectEntryPos(),
+ sal_Int32 n, nInsPos = m_pLbTableCol->GetSelectEntryPos(),
nCnt = m_pLbTblDbColumn->GetEntryCount();
if( LISTBOX_APPEND == nInsPos )
for( n = 0; n < nCnt; ++n )
@@ -497,7 +497,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
else if( pButton == m_pIbDbcolOneTo &&
LISTBOX_ENTRY_NOTFOUND != m_pLbTblDbColumn->GetSelectEntryPos() )
{
- sal_uInt16 nInsPos = m_pLbTableCol->GetSelectEntryPos(),
+ sal_Int32 nInsPos = m_pLbTableCol->GetSelectEntryPos(),
nDelPos = m_pLbTblDbColumn->GetSelectEntryPos(),
nTopPos = m_pLbTblDbColumn->GetTopEntry();
m_pLbTableCol->InsertEntry( m_pLbTblDbColumn->GetEntry( nDelPos ), nInsPos );
@@ -515,7 +515,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
if( LISTBOX_ENTRY_NOTFOUND != m_pLbTableCol->GetSelectEntryPos() )
{
- sal_uInt16 nInsPos,
+ sal_Int32 nInsPos,
nDelPos = m_pLbTableCol->GetSelectEntryPos(),
nTopPos = m_pLbTableCol->GetTopEntry();
@@ -715,7 +715,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{
// Number of columns has changed: then the TabCols have to be adjusted
long nWidth = pRep->GetWidth();
- sal_uInt16 nCols = m_pLbTableCol->GetEntryCount() - 1;
+ sal_Int32 nCols = m_pLbTableCol->GetEntryCount() - 1;
SwTabCols aTabCols( nCols );
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
@@ -975,7 +975,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
{
rSh.DoUndo( sal_False );
- sal_uInt16 n, nRows = 0, nCols = m_pLbTableCol->GetEntryCount();
+ sal_Int32 nCols = m_pLbTableCol->GetEntryCount();
+ sal_uInt16 nRows = 0;
if( m_pCbTableHeadon->IsChecked() )
nRows++;
@@ -986,7 +987,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
// prepare the array for the selected columns
std::vector<SwInsDBColumn*> aColFlds;
- for( n = 0; n < nCols; ++n )
+ for( sal_Int32 n = 0; n < nCols; ++n )
{
SwInsDBColumn aSrch( m_pLbTableCol->GetEntry( n ), 0 );
SwInsDBColumns::const_iterator it = aDBColumns.find( &aSrch );
@@ -997,10 +998,10 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
}
- if( nCols != aColFlds.size() )
+ if( static_cast<size_t>(nCols) != aColFlds.size() )
{
OSL_ENSURE( !this, "not all database columns found" );
- nCols = aColFlds.size();
+ nCols = static_cast<sal_Int32>(aColFlds.size());
}
if(!nRows || !nCols)
@@ -1027,7 +1028,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if( m_pCbTableHeadon->IsChecked() )
{
- for( n = 0; n < nCols; ++n )
+ for( sal_Int32 n = 0; n < nCols; ++n )
{
if( m_pRbHeadlColnms->IsChecked() )
{
@@ -1060,7 +1061,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if(bBreak)
break;
- for( n = 0; n < nCols; ++n )
+ for( sal_Int32 n = 0; n < nCols; ++n )
{
// at the very first time, NO GoNextCell, because we're
// already in it. Also no GoNextCell after the Insert,
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 037da8c6e999..da9d8fa90e02 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -62,7 +62,7 @@ static void lcl_StoreGreetingsBox(ListBox& rBox,
{
Sequence< OUString> aEntries(rBox.GetEntryCount());
OUString* pEntries = aEntries.getArray();
- for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_Int32 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -74,7 +74,7 @@ static void lcl_StoreGreetingsBox(ComboBox& rBox,
{
Sequence< OUString> aEntries(rBox.GetEntryCount());
OUString* pEntries = aEntries.getArray();
- for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_Int32 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -364,10 +364,10 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage
lcl_StoreGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_StoreGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE);
- sal_uInt16 nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
- if(LISTBOX_ENTRY_NOTFOUND == nCurrentTextPos)
+ sal_Int32 nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
+ if(COMBOBOX_ENTRY_NOTFOUND == nCurrentTextPos)
{
- sal_uInt16 nCount = m_aNeutralCB.GetEntryCount();
+ sal_Int32 nCount = m_aNeutralCB.GetEntryCount();
m_aNeutralCB.InsertEntry( m_aNeutralCB.GetText(), nCount );
m_aNeutralCB.SelectEntryPos(nCount);
}
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 9190766c50ea..6aa1d5800964 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -458,7 +458,7 @@ sal_Bool SwGlossaryHdl::Expand( const OUString& rShortName,
pDlg->InsertGlos(pData->sTitle, pData->sLongName);
}
pDlg->SelectEntryPos(0);
- const sal_uInt16 nRet = RET_OK == pDlg->Execute()?
+ const sal_Int32 nRet = RET_OK == pDlg->Execute()?
pDlg->GetSelectedIdx():
LISTBOX_ENTRY_NOTFOUND;
delete pDlg;
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 82372d200867..f239e8ecac4d 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -82,12 +82,13 @@ void SwFldDBPage::Reset(const SfxItemSet&)
Init(); // Allgemeine initialisierung
m_pTypeLB->SetUpdateMode(false);
- sal_uInt16 nOldPos = m_pTypeLB->GetSelectEntryPos();
+ sal_Int32 nOldPos = m_pTypeLB->GetSelectEntryPos();
m_sOldDBName = m_pDatabaseTLB->GetDBName(m_sOldTableName, m_sOldColumnName);
m_pTypeLB->Clear();
- sal_uInt16 nPos, nTypeId, i;
+ sal_Int32 nPos;
+ sal_uInt16 nTypeId, i;
if (!IsFldEdit())
{
@@ -117,7 +118,7 @@ void SwFldDBPage::Reset(const SfxItemSet&)
sal_uInt16 nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, false, IsFldDlgHtmlMode());
for( i = 0; i < nSize; ++i )
{
- sal_uInt16 nEntryPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
+ sal_Int32 nEntryPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
sal_uInt16 nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
m_pFormatLB->SetEntryData( nEntryPos, reinterpret_cast<void*>(nFmtId) );
if( SVX_NUM_ARABIC == nFmtId )
@@ -262,7 +263,7 @@ sal_uInt16 SwFldDBPage::GetGroup()
IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
{
// save old ListBoxPos
- const sal_uInt16 nOld = GetTypeSel();
+ const sal_Int32 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(m_pTypeLB->GetSelectEntryPos());
@@ -344,7 +345,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
m_pFormatLB->Show();
if( IsFldEdit() )
{
- for( sal_uInt16 nI = m_pFormatLB->GetEntryCount(); nI; )
+ for( sal_Int32 nI = m_pFormatLB->GetEntryCount(); nI; )
if( GetCurField()->GetFormat() == (sal_uInt16)(sal_uLong)
m_pFormatLB->GetEntryData( --nI ))
{
@@ -483,7 +484,7 @@ void SwFldDBPage::FillUserData()
{
OUString sData(USER_DATA_VERSION);
sData += ";";
- sal_uInt16 nTypeSel = m_pTypeLB->GetSelectEntryPos();
+ sal_Int32 nTypeSel = m_pTypeLB->GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 78ccac188032..299f3b2fb2a0 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -123,12 +123,12 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
}
}
- sal_uInt16 nSelEntryData = USHRT_MAX;
+ sal_Int32 nSelEntryData = LISTBOX_ENTRY_NOTFOUND;
OUString sUserData = GetUserData();
if (sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
OUString sVal = sUserData.getToken(1, ';');
- nSelEntryData = static_cast< sal_uInt16 >(sVal.toInt32());
+ nSelEntryData = sVal.toInt32();
}
std::vector<OUString> aLst;
@@ -171,7 +171,7 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
pEntry->SetUserData(reinterpret_cast<void*>(i));
}
}
- if(nSelEntryData == i)
+ if(static_cast<size_t>(nSelEntryData) == i)
pSelEntry = pEntry;
}
}
@@ -231,7 +231,7 @@ IMPL_LINK_NOARG(SwFldDokInfPage, TypeHdl)
IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
{
sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
- sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos();
sal_uInt16 nExtSubType;
sal_uInt16 nNewType = 0;
@@ -361,7 +361,7 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
return 0;
}
-sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
+sal_Int32 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
{
// fill Format-Listbox
sal_uInt16 nTypeId = TYP_DOCINFOFLD;
@@ -374,7 +374,7 @@ sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
m_pSelectionLB->Clear();
sal_uInt16 nSize = 0;
- sal_uInt16 nSelPos = USHRT_MAX;
+ sal_Int32 nSelPos = LISTBOX_ENTRY_NOTFOUND;
sal_uInt16 nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
if (IsFldEdit())
@@ -392,7 +392,7 @@ sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
nSize = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode());
for (sal_uInt16 i = 0; i < nSize; i++)
{
- sal_uInt16 nPos = m_pSelectionLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_Int32 nPos = m_pSelectionLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId(nTypeId, i)));
if (IsFldEdit() && i == nExtSubType)
nSelPos = nPos;
@@ -424,7 +424,7 @@ sal_Bool SwFldDokInfPage::FillItemSet(SfxItemSet& )
sal_uLong nFormat = 0;
- sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos();
OUString aName;
if (DI_CUSTOM == nSubType)
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index 8e5727cd4033..e58361967468 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -46,14 +46,14 @@ class SwFldDokInfPage : public SwFldPage
SvTreeListEntry* pSelEntry;
com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > xCustomPropertySet;
- sal_uInt16 nOldSel;
+ sal_Int32 nOldSel;
sal_uLong nOldFormat;
OUString m_sOldCustomFieldName;
DECL_LINK(TypeHdl, void * = 0);
DECL_LINK(SubTypeHdl, void * = 0);
- sal_uInt16 FillSelectionLB(sal_uInt16 nSubTypeId);
+ sal_Int32 FillSelectionLB(sal_uInt16 nSubTypeId);
protected:
virtual sal_uInt16 GetGroup();
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index bc76e4109df0..ec6bc4f119df 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -91,7 +91,8 @@ void SwFldDokPage::Reset(const SfxItemSet& )
m_pTypeLB->SetUpdateMode(false);
m_pTypeLB->Clear();
- sal_uInt16 nPos, nTypeId;
+ sal_Int32 nPos;
+ sal_uInt16 nTypeId;
if (!IsFldEdit())
{
@@ -160,7 +161,7 @@ void SwFldDokPage::Reset(const SfxItemSet& )
sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.toInt32());
if(nVal != USHRT_MAX)
{
- for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
+ for(sal_Int32 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
if(nVal == (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(i))
{
m_pTypeLB->SelectEntryPos(i);
@@ -185,7 +186,7 @@ void SwFldDokPage::Reset(const SfxItemSet& )
IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
{
// save old ListBoxPos
- const sal_uInt16 nOld = GetTypeSel();
+ const sal_Int32 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(m_pTypeLB->GetSelectEntryPos());
@@ -196,7 +197,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
m_pTypeLB->SelectEntryPos(0);
}
- sal_uInt16 nCount;
+ size_t nCount;
if (nOld != GetTypeSel())
{
@@ -297,7 +298,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
m_pSelection->Enable( bEnable );
// fill Format-Listbox
- sal_uInt16 nSize = FillFormatLB(nTypeId);
+ sal_Int32 nSize = FillFormatLB(nTypeId);
sal_Bool bValue = sal_False, bLevel = sal_False, bNumFmt = sal_False, bOffset = sal_False;
sal_Bool bFormat = nSize != 0;
@@ -433,13 +434,13 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
void SwFldDokPage::AddSubType(sal_uInt16 nTypeId)
{
- sal_uInt16 nPos = m_pSelectionLB->InsertEntry(SwFieldType::GetTypeStr(nTypeId));
+ sal_Int32 nPos = m_pSelectionLB->InsertEntry(SwFieldType::GetTypeStr(nTypeId));
m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
}
IMPL_LINK_NOARG(SwFldDokPage, SubTypeHdl)
{
- sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
@@ -471,7 +472,7 @@ IMPL_LINK_NOARG(SwFldDokPage, SubTypeHdl)
return 0;
}
-sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
+sal_Int32 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
{
// fill Format-Listbox
m_pFormatLB->Clear();
@@ -483,7 +484,7 @@ sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
for( sal_uInt16 i = 0; i < nSize; ++i )
{
- sal_uInt16 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
sal_uInt16 nFmtId = GetFldMgr().GetFormatId( nTypeId, i );
m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>( nFmtId ));
if (IsFldEdit() && nFmtId == (GetCurField()->GetFormat() & ~AF_FIXED))
@@ -512,7 +513,7 @@ IMPL_LINK_NOARG(SwFldDokPage, FormatHdl)
if (nTypeId == USHRT_MAX)
{
- sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
@@ -544,7 +545,7 @@ sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
if (nTypeId == USHRT_MAX)
{
- sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
nTypeId = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
@@ -556,14 +557,14 @@ sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
if (m_pFormatLB->IsEnabled())
{
- sal_uInt16 nPos = m_pFormatLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pFormatLB->GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
nFormat = (sal_uInt16)(sal_uLong)m_pFormatLB->GetEntryData(nPos);
}
if (m_pSelectionLB->IsEnabled())
{
- sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pSelectionLB->GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
nSubType = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
}
@@ -645,7 +646,7 @@ void SwFldDokPage::FillUserData()
{
OUString sData(USER_DATA_VERSION);
sData += ";";
- sal_uInt16 nTypeSel = m_pTypeLB->GetSelectEntryPos();
+ sal_Int32 nTypeSel = m_pTypeLB->GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index 522599524996..25149e51b401 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -47,7 +47,7 @@ class SwFldDokPage : public SwFldPage
NumFormatListBox* m_pNumFormatLB;
CheckBox* m_pFixedCB;
- sal_uInt16 nOldSel;
+ sal_Int32 nOldSel;
sal_uLong nOldFormat;
DECL_LINK(TypeHdl, void *);
@@ -55,7 +55,7 @@ class SwFldDokPage : public SwFldPage
DECL_LINK(SubTypeHdl, void *);
void AddSubType(sal_uInt16 nTypeId);
- sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
+ sal_Int32 FillFormatLB(sal_uInt16 nTypeId);
protected:
virtual sal_uInt16 GetGroup();
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 6c172a2cf846..b16075f4beb6 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -101,7 +101,8 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
m_pTypeLB->SetUpdateMode(false);
m_pTypeLB->Clear();
- sal_uInt16 nPos, nTypeId;
+ sal_Int32 nPos;
+ sal_uInt16 nTypeId;
if (!IsFldEdit())
{
@@ -157,7 +158,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.toInt32());
if(nVal != USHRT_MAX)
{
- for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
+ for(sal_Int32 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
if(nVal == (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(i))
{
m_pTypeLB->SelectEntryPos(i);
@@ -183,7 +184,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
{
// save old ListBoxPos
- const sal_uInt16 nOld = GetTypeSel();
+ const sal_Int32 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(m_pTypeLB->GetSelectEntryPos());
@@ -208,7 +209,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
for (sal_uInt16 i = 0; i < nSize; i++)
{
- sal_uInt16 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )) );
}
@@ -405,7 +406,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
}
else if(m_pListItemsLB->GetSelectEntryCount())
{
- sal_uInt16 nSelPos = m_pListItemsLB->GetSelectEntryPos();
+ sal_Int32 nSelPos = m_pListItemsLB->GetSelectEntryPos();
if(pControl == m_pListRemovePB)
{
m_pListItemsLB->RemoveEntry(nSelPos);
@@ -529,7 +530,7 @@ sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (sal_uLong)m_pFormatLB->GetEntryData((sal_uInt16)nFormat);
+ nFormat = (sal_uLong)m_pFormatLB->GetEntryData(nFormat);
OUString aVal(m_pValueED->GetText());
OUString aName(m_pNameED->GetText());
@@ -555,7 +556,7 @@ sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
case TYP_DROPDOWN :
{
aName = m_pListNameED->GetText();
- for(sal_uInt16 i = 0; i < m_pListItemsLB->GetEntryCount(); i++)
+ for(sal_Int32 i = 0; i < m_pListItemsLB->GetEntryCount(); i++)
{
if(i)
aVal += OUString(DB_DELIM);
@@ -625,7 +626,7 @@ void SwFldFuncPage::FillUserData()
{
OUString sData(USER_DATA_VERSION);
sData += ";";
- sal_uInt16 nTypeSel = m_pTypeLB->GetSelectEntryPos();
+ sal_Int32 nTypeSel = m_pTypeLB->GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 559255bb3bc5..be9a092f93bf 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -308,7 +308,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2,
void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
{
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 };
ListBox** ppLB = aLBArr;
for( int i = 0; i < coLBCount; ++i, ++ppLB )
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 364dad36c7ad..791d4e81e173 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -34,8 +34,8 @@ class SwFldPage : public SfxTabPage
SwFldMgr m_aMgr;
SwField *m_pCurFld;
SwWrtShell* m_pWrtShell;
- sal_uInt16 m_nTypeSel;
- sal_uInt16 m_nSelectionSel;
+ sal_Int32 m_nTypeSel;
+ sal_Int32 m_nSelectionSel;
bool m_bFldEdit;
sal_Bool m_bInsert;
sal_Bool m_bFldDlgHtmlMode;
@@ -44,10 +44,10 @@ class SwFldPage : public SfxTabPage
protected:
- sal_uInt16 GetTypeSel() const { return m_nTypeSel;}
- void SetTypeSel(sal_uInt16 nSet) { m_nTypeSel = nSet;}
- sal_uInt16 GetSelectionSel() const { return m_nSelectionSel;}
- void SetSelectionSel(sal_uInt16 nSet){ m_nSelectionSel = nSet;}
+ sal_Int32 GetTypeSel() const { return m_nTypeSel;}
+ void SetTypeSel(sal_Int32 nSet) { m_nTypeSel = nSet;}
+ sal_Int32 GetSelectionSel() const { return m_nSelectionSel;}
+ void SetSelectionSel(sal_Int32 nSet){ m_nSelectionSel = nSet;}
sal_Bool IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;}
sal_Bool IsRefresh() const { return m_bRefresh;}
SwField* GetCurField() { return m_pCurFld;}
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index dbfd35cfc660..9236ef145cb0 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -125,7 +125,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
if ( nTypeId == REFFLDFLAG_HEADING )
{
mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData()));
- if ( mnSavedSelectedPos < maOutlineNodes.size() )
+ if ( static_cast<size_t>(mnSavedSelectedPos) < maOutlineNodes.size() )
{
mpSavedSelectedTxtNode = maOutlineNodes[mnSavedSelectedPos];
}
@@ -133,7 +133,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
else if ( nTypeId == REFFLDFLAG_NUMITEM )
{
mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData()));
- if ( mnSavedSelectedPos < maNumItems.size() )
+ if ( static_cast<size_t>(mnSavedSelectedPos) < maNumItems.size() )
{
mpSavedSelectedTxtNode = maNumItems[mnSavedSelectedPos]->GetTxtNode();
}
@@ -147,7 +147,7 @@ const SwTxtNode* SwFldRefPage::GetSavedSelectedTxtNode() const
return mpSavedSelectedTxtNode;
}
-sal_uInt16 SwFldRefPage::GetSavedSelectedPos() const
+sal_Int32 SwFldRefPage::GetSavedSelectedPos() const
{
return mnSavedSelectedPos;
}
@@ -170,7 +170,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
// fill Type-Listbox
- sal_uInt16 nPos;
+ sal_Int32 nPos;
// set/insert reference
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
@@ -246,7 +246,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.toInt32());
if(nVal != USHRT_MAX)
{
- for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
+ for(sal_Int32 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
if(nVal == (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(i))
{
m_pTypeLB->SelectEntryPos(i);
@@ -270,7 +270,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
IMPL_LINK_NOARG(SwFldRefPage, TypeHdl)
{
// save old ListBoxPos
- const sal_uInt16 nOld = GetTypeSel();
+ const sal_Int32 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(m_pTypeLB->GetSelectEntryPos());
@@ -332,7 +332,7 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl)
if (m_pTypeLB->GetEntryPos(sName) == LISTBOX_ENTRY_NOTFOUND) // reference to deleted mark
{
- sal_uInt16 nPos = m_pTypeLB->InsertEntry(sName);
+ sal_Int32 nPos = m_pTypeLB->InsertEntry(sName);
m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nFlag));
}
@@ -393,7 +393,7 @@ IMPL_LINK_NOARG(SwFldRefPage, TypeHdl)
m_pNameFT->Enable(bName);
// fill Format-Listbox
- sal_uInt16 nSize = FillFormatLB(nTypeId);
+ sal_Int32 nSize = FillFormatLB(nTypeId);
bool bFormat = nSize != 0;
m_pFormat->Enable(bFormat);
@@ -467,7 +467,7 @@ void SwFldRefPage::UpdateSubType()
// #i83479#
if ( m_pSelectionLB->IsVisible() )
{
- const sal_uInt16 nSelectionSel = m_pSelectionLB->GetSelectEntryPos();
+ const sal_Int32 nSelectionSel = m_pSelectionLB->GetSelectEntryPos();
if (nSelectionSel != LISTBOX_ENTRY_NOTFOUND)
{
sOldSel = m_pSelectionLB->GetEntry(nSelectionSel);
@@ -667,11 +667,11 @@ void SwFldRefPage::UpdateSubType()
}
}
-sal_uInt16 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId)
+sal_Int32 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId)
{
OUString sOldSel;
- sal_uInt16 nFormatSel = m_pFormatLB->GetSelectEntryPos();
+ sal_Int32 nFormatSel = m_pFormatLB->GetSelectEntryPos();
if (nFormatSel != LISTBOX_ENTRY_NOTFOUND)
sOldSel = m_pFormatLB->GetEntry(nFormatSel);
@@ -715,14 +715,14 @@ sal_uInt16 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId)
for (sal_uInt16 i = 0; i < nSize; i++)
{
- sal_uInt16 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i ));
+ sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i ));
m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )));
}
// #i83479#
if ( bAddCrossRefFormats )
{
sal_uInt16 nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN;
- sal_uInt16 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
+ sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, nFormat )));
nFormat = FMT_REF_NUMBER_NO_CONTEXT - FMT_REF_BEGIN;
nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
@@ -975,7 +975,7 @@ void SwFldRefPage::FillUserData()
{
OUString sData(USER_DATA_VERSION);
sData += ";";
- sal_uInt16 nTypeSel = m_pTypeLB->GetSelectEntryPos();
+ sal_Int32 nTypeSel = m_pTypeLB->GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index 453ca8ada11b..47dde6c62542 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -59,19 +59,19 @@ class SwFldRefPage : public SwFldPage
// in order to restore selection after update of selection listbox
const SwTxtNode* mpSavedSelectedTxtNode;
// fallback, if previously selected text node doesn't exist anymore
- sal_uInt16 mnSavedSelectedPos;
+ sal_Int32 mnSavedSelectedPos;
DECL_LINK(TypeHdl, void *);
DECL_LINK(SubTypeHdl, void * = 0);
DECL_LINK(ModifyHdl, void * = 0);
void UpdateSubType();
- sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
+ sal_Int32 FillFormatLB(sal_uInt16 nTypeId);
// #i83479#
void SaveSelectedTxtNode();
const SwTxtNode* GetSavedSelectedTxtNode() const;
- sal_uInt16 GetSavedSelectedPos() const;
+ sal_Int32 GetSavedSelectedPos() const;
protected:
virtual sal_uInt16 GetGroup();
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index a400560258c2..2f844a358650 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -96,7 +96,8 @@ void SwFldVarPage::Reset(const SfxItemSet& )
m_pTypeLB->SetUpdateMode(false);
m_pTypeLB->Clear();
- sal_uInt16 nPos, nTypeId;
+ sal_Int32 nPos;
+ sal_uInt16 nTypeId;
if (!IsFldEdit())
{
@@ -154,7 +155,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
sal_uInt16 nVal = (sal_uInt16)sVal.toInt32();
if( USHRT_MAX != nVal )
{
- for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
+ for(sal_Int32 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
if(nVal == (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(i))
{
m_pTypeLB->SelectEntryPos(i);
@@ -183,7 +184,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
IMPL_LINK_NOARG(SwFldVarPage, TypeHdl)
{
// save old ListBoxPos
- const sal_uInt16 nOld = GetTypeSel();
+ const sal_Int32 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(m_pTypeLB->GetSelectEntryPos());
@@ -215,10 +216,11 @@ IMPL_LINK_NOARG(SwFldVarPage, TypeHdl)
IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
- sal_uInt16 nSelPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_Int32 nSelPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_uInt16 nSelData = USHRT_MAX;
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
- nSelPos = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nSelPos);
+ nSelData = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nSelPos);
if (IsFldEdit() && (!pBox || bInit))
{
@@ -237,7 +239,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
m_pFormatLB->SetUpdateMode(false);
FillFormatLB(nTypeId);
- sal_uInt16 nSize = m_pFormatLB->GetEntryCount();
+ sal_Int32 nSize = m_pFormatLB->GetEntryCount();
sal_Bool bValue = sal_False, bName = sal_False, bNumFmt = sal_False,
bInvisible = sal_False, bShowChapterFrame = sal_False;
@@ -249,7 +251,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
// change or create user type
SwUserFieldType* pType = (SwUserFieldType*)
- GetFldMgr().GetFldType(RES_USERFLD, nSelPos);
+ GetFldMgr().GetFldType(RES_USERFLD, nSelData);
if (pType)
{
@@ -295,7 +297,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
else
{
m_pNumFormatLB->Clear();
- sal_uInt16 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
+ sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
m_pNumFormatLB->SetEntryData(nPos, (void *)ULONG_MAX);
m_pNumFormatLB->SelectEntryPos(0);
}
@@ -411,7 +413,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
m_pNumFormatLB->Clear();
- sal_uInt16 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0);
+ sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0);
m_pNumFormatLB->SetEntryData(nPos, (void *)ULONG_MAX);
m_pNumFormatLB->SelectEntryPos(0);
}
@@ -432,7 +434,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
SwDDEFieldType* pType =
- (SwDDEFieldType*) GetFldMgr().GetFldType(RES_DDEFLD, nSelPos);
+ (SwDDEFieldType*) GetFldMgr().GetFldType(RES_DDEFLD, nSelData);
if(pType)
{
@@ -546,9 +548,11 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
nSelPos = m_pSelectionLB->GetSelectEntryPos();
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
- nSelPos = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nSelPos);
+ nSelData = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nSelPos);
+ else
+ nSelData = USHRT_MAX;
- if (nSelPos != LISTBOX_ENTRY_NOTFOUND && pBox && !bInit)
+ if (nSelData != USHRT_MAX && pBox && !bInit)
{
m_pValueED->ReplaceSelected(m_pSelectionLB->GetSelectEntry());
ModifyHdl();
@@ -666,16 +670,16 @@ void SwFldVarPage::UpdateSubType()
m_pSelectionLB->SetUpdateMode(true);
}
-sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
+sal_Int32 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
{
OUString sOldSel, sOldNumSel;
sal_uLong nOldNumFormat = 0;
- sal_uInt16 nFormatSel = m_pFormatLB->GetSelectEntryPos();
+ sal_Int32 nFormatSel = m_pFormatLB->GetSelectEntryPos();
if (nFormatSel != LISTBOX_ENTRY_NOTFOUND)
sOldSel = m_pFormatLB->GetEntry(nFormatSel);
- sal_uInt16 nNumFormatSel = m_pNumFormatLB->GetSelectEntryPos();
+ sal_Int32 nNumFormatSel = m_pNumFormatLB->GetSelectEntryPos();
if (nNumFormatSel != LISTBOX_ENTRY_NOTFOUND)
{
sOldNumSel = m_pNumFormatLB->GetEntry(nNumFormatSel);
@@ -717,7 +721,7 @@ sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
{
if (!IsFldEdit() || bSpecialFmt)
{
- sal_uInt16 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0);
+ sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0);
m_pNumFormatLB->SetEntryData(nPos, (void *)ULONG_MAX);
nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_USERVAR_CMD), 1);
m_pNumFormatLB->SetEntryData(nPos, (void *)ULONG_MAX);
@@ -729,7 +733,7 @@ sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
{
if (!IsFldEdit() || bSpecialFmt)
{
- sal_uInt16 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
+ sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
m_pNumFormatLB->SetEntryData(nPos, (void *)ULONG_MAX);
}
}
@@ -737,14 +741,14 @@ sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
case TYP_FORMELFLD:
{
- sal_uInt16 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
+ sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
m_pNumFormatLB->SetEntryData(nPos, (void *)ULONG_MAX);
}
break;
case TYP_GETFLD:
{
- sal_uInt16 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
+ sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
m_pNumFormatLB->SetEntryData(nPos, (void *)ULONG_MAX);
}
break;
@@ -769,7 +773,7 @@ sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
for (sal_uInt16 i = 0; i < nSize; i++)
{
- sal_uInt16 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_Int32 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
sal_uInt16 nFldId = GetFldMgr().GetFormatId( nTypeId, i );
m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(nFldId) );
if (IsFldEdit() && nFldId == GetCurField()->GetFormat())
@@ -965,7 +969,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
OUString sName(m_pNameED->GetText()), sValue(m_pValueED->GetText());
SwFieldType* pType = 0;
sal_uInt16 nId = 0;
- sal_uInt16 nNumFormatPos = m_pNumFormatLB->GetSelectEntryPos();
+ sal_Int32 nNumFormatPos = m_pNumFormatLB->GetSelectEntryPos();
switch (nTypeId)
{
@@ -977,7 +981,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
sal_uLong nFormat = m_pFormatLB->GetSelectEntryPos();
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
- nFormat = (sal_uLong)m_pFormatLB->GetEntryData((sal_uInt16)nFormat);
+ nFormat = (sal_uLong)m_pFormatLB->GetEntryData((sal_Int32)nFormat);
if (pType) // change
{
@@ -1096,22 +1100,20 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
OUString aVal(m_pValueED->GetText());
OUString aName(m_pNameED->GetText());
- sal_uInt16 nSubType = m_pSelectionLB->GetSelectEntryPos();
- if(nSubType == LISTBOX_ENTRY_NOTFOUND)
- nSubType = 0;
- else
- nSubType = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nSubType);
+ sal_Int32 nSubPos = m_pSelectionLB->GetSelectEntryPos();
+ sal_uInt16 nSubType = (nSubPos == LISTBOX_ENTRY_NOTFOUND) ? 0 :
+ (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nSubPos);
sal_uLong nFormat;
if (!m_pNumFormatLB->IsVisible())
{
- nFormat = m_pFormatLB->GetSelectEntryPos();
+ sal_Int32 nFormatPos = m_pFormatLB->GetSelectEntryPos();
- if(nFormat == LISTBOX_ENTRY_NOTFOUND)
+ if(nFormatPos == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (sal_uLong)m_pFormatLB->GetEntryData((sal_uInt16)nFormat);
+ nFormat = (sal_uLong)m_pFormatLB->GetEntryData(nFormatPos);
}
else
{
@@ -1280,7 +1282,7 @@ void SwFldVarPage::FillUserData()
{
OUString sData(USER_DATA_VERSION);
sData += ";";
- sal_uInt16 nTypeSel = m_pTypeLB->GetSelectEntryPos();
+ sal_Int32 nTypeSel = m_pTypeLB->GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index 295a6d42f896..7165117a6e8b 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -84,7 +84,7 @@ class SwFldVarPage : public SwFldPage
DECL_LINK(SeparatorHdl, void * = 0);
void UpdateSubType();
- sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
+ sal_Int32 FillFormatLB(sal_uInt16 nTypeId);
protected:
virtual sal_uInt16 GetGroup();
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index c09a075027d9..c11df6737bbd 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -846,7 +846,7 @@ void SwColumnPage::Init()
bool SwColumnPage::isLineNotNone() const
{
// nothing is turned off
- const sal_uInt16 nPos = m_pLineTypeDLB->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pLineTypeDLB->GetSelectEntryPos();
return nPos != LISTBOX_ENTRY_NOTFOUND && nPos != 0;
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 040cbc87afba..b67ab00fecde 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -447,7 +447,7 @@ static void lcl_InsertVectors(ListBox& rBox,
nEntry = rBox.InsertEntry(*aIt);
rBox.SetSeparatorPos(nEntry);
//now insert all strings sorted
- sal_uInt16 nStartPos = rBox.GetEntryCount();
+ sal_uInt16 nStartPos = static_cast<sal_uInt16>(rBox.GetEntryCount());
for(aIt = rPrev.begin(); aIt != rPrev.end(); ++aIt)
::InsertStringSorted(*aIt, rBox, nStartPos );
@@ -1063,7 +1063,7 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtHoriOrient aHoriOrient( (const SwFmtHoriOrient&)
rOldSet.Get(RES_HORI_ORIENT) );
- sal_uInt16 nMapPos = GetMapPos(pHMap, *m_pHorizontalDLB);
+ sal_uInt16 nMapPos = static_cast<sal_uInt16>(GetMapPos(pHMap, *m_pHorizontalDLB));
short nAlign = GetAlignment(pHMap, nMapPos, *m_pHorizontalDLB, *m_pHoriRelationLB);
short nRel = GetRelation(pHMap, *m_pHoriRelationLB);
@@ -1102,7 +1102,7 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtVertOrient aVertOrient( (const SwFmtVertOrient&)
rOldSet.Get(RES_VERT_ORIENT) );
- sal_uInt16 nMapPos = GetMapPos(pVMap, *m_pVerticalDLB);
+ sal_uInt16 nMapPos = static_cast<sal_uInt16>(GetMapPos(pVMap, *m_pVerticalDLB));
short nAlign = GetAlignment(pVMap, nMapPos, *m_pVerticalDLB, *m_pVertRelationLB);
short nRel = GetRelation(pVMap, *m_pVertRelationLB);
@@ -1151,7 +1151,7 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
const SwFmtFrmSize& rOldSize = (const SwFmtFrmSize& )rOldSet.Get(RES_FRM_SIZE);
SwFmtFrmSize aSz( rOldSize );
- sal_uInt16 nRelWidthRelation = m_pRelWidthRelationLB->GetSelectEntryPos();
+ sal_Int32 nRelWidthRelation = m_pRelWidthRelationLB->GetSelectEntryPos();
if (nRelWidthRelation != LISTBOX_ENTRY_NOTFOUND)
{
if (nRelWidthRelation == 0)
@@ -1159,7 +1159,7 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
else if (nRelWidthRelation == 1)
aSz.SetWidthPercentRelation(text::RelOrientation::PAGE_FRAME);
}
- sal_uInt16 nRelHeightRelation = m_pRelHeightRelationLB->GetSelectEntryPos();
+ sal_Int32 nRelHeightRelation = m_pRelHeightRelationLB->GetSelectEntryPos();
if (nRelHeightRelation != LISTBOX_ENTRY_NOTFOUND)
{
if (nRelHeightRelation == 0)
@@ -1250,7 +1250,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
long nX,
long nY)
{
- sal_uInt16 nPos = m_pVerticalDLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pVerticalDLB->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && pVMap )
{
nOldV = pVMap[nPos].nAlign;
@@ -1325,7 +1325,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
nH = nOldH;
nHRel = nOldHRel;
}
- sal_uInt16 nMapPos = FillPosLB(pHMap, nH, nHRel, *m_pHorizontalDLB);
+ sal_Int32 nMapPos = FillPosLB(pHMap, nH, nHRel, *m_pHorizontalDLB);
FillRelLB(pHMap, nMapPos, nH, nHRel, *m_pHoriRelationLB, *m_pHoriRelationFT);
// vertical
@@ -1376,7 +1376,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
UpdateExample();
}
-sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
+sal_Int32 SwFrmPage::FillPosLB(const FrmMap* _pMap,
const sal_uInt16 _nAlign,
const sal_uInt16 _nRel,
ListBox& _rLB )
@@ -1471,7 +1471,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
bIsVerticalL2R,
bIsInRightToLeft);
OUString sEntry = aFramePosString.GetString(sStrId1);
- sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
+ sal_Int32 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]);
if (_pMap[nMapPos].nAlign == _nAlign)
sSelEntry = sEntry;
@@ -1488,7 +1488,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (!_rLB.GetSelectEntryCount())
{
- for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
+ for (sal_Int32 i = 0; i < _rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
if (pEntry->nLBRelation == LB_REL_CHAR) // default
@@ -1536,7 +1536,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
bIsVerticalL2R,
bIsInRightToLeft);
OUString sEntry = aFramePosString.GetString(eStrId1);
- sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
+ sal_Int32 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aRelationMap[nRelPos]);
if (sSelEntry.isEmpty() && aRelationMap[nRelPos].nRelation == _nRel)
sSelEntry = sEntry;
@@ -1569,7 +1569,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
break;
}
- for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
+ for (sal_Int32 i = 0; i < _rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
if (pEntry->nRelation == _nRel)
@@ -1598,7 +1598,7 @@ sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
{
short nRel = 0;
- sal_uInt16 nPos = rRelationLB.GetSelectEntryPos();
+ sal_Int32 nPos = rRelationLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1609,11 +1609,19 @@ short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
return nRel;
}
-short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos,
+short SwFrmPage::GetAlignment(FrmMap *pMap, sal_Int32 nMapPos,
ListBox &/*rAlignLB*/, ListBox &rRelationLB)
{
short nAlign = 0;
+ if (!pMap || nMapPos < 0)
+ return nAlign;
+
+ size_t nMapCount = ::lcl_GetFrmMapCount(pMap);
+
+ if (static_cast<size_t>(nMapPos) >= nMapCount)
+ return nAlign;
+
// i#22341 special handling also for map <aVCharMap>,
// because it contains ambigous items for alignment
if ( pMap == aVAsCharHtmlMap || pMap == aVAsCharMap ||
@@ -1622,7 +1630,6 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos,
if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND)
{
sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation;
- size_t nMapCount = ::lcl_GetFrmMapCount(pMap);
SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId;
for (size_t i = 0; i < nMapCount; i++)
@@ -1645,10 +1652,10 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos,
return nAlign;
}
-sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
+sal_Int32 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
{
- sal_uInt16 nMapPos = 0;
- sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos();
+ sal_Int32 nMapPos = 0;
+ sal_Int32 nLBSelPos = rAlignLB.GetSelectEntryPos();
if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1666,7 +1673,7 @@ sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
if (sEntry == sSelEntry)
{
- nMapPos = static_cast< sal_uInt16 >(i);
+ nMapPos = static_cast< sal_Int32 >(i);
break;
}
}
@@ -1797,7 +1804,7 @@ IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl)
if ( pHMap )
{
// alignment horizonal
- sal_uInt16 nMapPos = GetMapPos(pHMap, *m_pHorizontalDLB);
+ sal_uInt16 nMapPos = static_cast<sal_uInt16>(GetMapPos(pHMap, *m_pHorizontalDLB));
short nAlign = GetAlignment(pHMap, nMapPos, *m_pHorizontalDLB, *m_pHoriRelationLB);
short nRel = GetRelation(pHMap, *m_pHoriRelationLB);
@@ -1810,7 +1817,7 @@ IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl)
if ( pVMap )
{
// alignment vertical
- sal_uInt16 nMapPos = GetMapPos(pVMap, *m_pVerticalDLB);
+ sal_uInt16 nMapPos = static_cast<sal_uInt16>(GetMapPos(pVMap, *m_pVerticalDLB));
short nAlign = GetAlignment(pVMap, nMapPos, *m_pVerticalDLB, *m_pVertRelationLB);
short nRel = GetRelation(pVMap, *m_pVertRelationLB);
@@ -1940,7 +1947,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
FixedText *pRelFT = bHori ? m_pHoriRelationFT : m_pVertRelationFT;
FrmMap *pMap = bHori ? pHMap : pVMap;
- sal_uInt16 nMapPos = GetMapPos(pMap, *pLB);
+ sal_uInt16 nMapPos = static_cast<sal_uInt16>(GetMapPos(pMap, *pLB));
short nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB);
if (bHori)
@@ -2118,10 +2125,10 @@ IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit )
void SwFrmPage::UpdateExample()
{
- sal_uInt16 nPos = m_pHorizontalDLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pHorizontalDLB->GetSelectEntryPos();
if ( pHMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
- sal_uInt16 nMapPos = GetMapPos(pHMap, *m_pHorizontalDLB);
+ sal_uInt16 nMapPos = static_cast<sal_uInt16>(GetMapPos(pHMap, *m_pHorizontalDLB));
short nAlign = GetAlignment(pHMap, nMapPos, *m_pHorizontalDLB, *m_pHoriRelationLB);
short nRel = GetRelation(pHMap, *m_pHoriRelationLB);
@@ -2132,7 +2139,7 @@ void SwFrmPage::UpdateExample()
nPos = m_pVerticalDLB->GetSelectEntryPos();
if ( pVMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
- sal_uInt16 nMapPos = GetMapPos(pVMap, *m_pVerticalDLB);
+ sal_uInt16 nMapPos = static_cast<sal_uInt16>(GetMapPos(pVMap, *m_pVerticalDLB));
short nAlign = GetAlignment(pVMap, nMapPos, *m_pVerticalDLB, *m_pVertRelationLB);
short nRel = GetRelation(pVMap, *m_pVertRelationLB);
@@ -3044,7 +3051,8 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
sal_uLong nData = FRMDIR_VERT_TOP_RIGHT;
pTextFlowLB->RemoveEntry(pTextFlowLB->GetEntryPos((void*)nData));
}
- sal_uInt16 nPos, nVal = ((SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR)).GetValue();
+ sal_uInt16 nVal = ((SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR)).GetValue();
+ sal_Int32 nPos;
for( nPos = pTextFlowLB->GetEntryCount(); nPos; )
if( (sal_uInt16)(sal_IntPtr)pTextFlowLB->GetEntryData( --nPos ) == nVal )
break;
@@ -3085,12 +3093,12 @@ sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
// textflow
if( pTextFlowLB->IsVisible() )
{
- sal_uInt16 nPos = pTextFlowLB->GetSelectEntryPos();
+ sal_Int32 nPos = pTextFlowLB->GetSelectEntryPos();
if( nPos != pTextFlowLB->GetSavedValue() )
{
- nPos = (sal_uInt16)(sal_IntPtr)pTextFlowLB->GetEntryData( nPos );
+ sal_uInt16 nData = (sal_uInt16)(sal_IntPtr)pTextFlowLB->GetEntryData( nPos );
bRet |= 0 != rSet.Put( SvxFrameDirectionItem(
- (SvxFrameDirection)nPos, RES_FRAMEDIR ));
+ (SvxFrameDirection)nData, RES_FRAMEDIR ));
}
}
if(pWrtSh)
@@ -3155,7 +3163,7 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox)
{
bool bNextBox = pNextLB == pBox;
ListBox& rChangeLB = bNextBox ? *pPrevLB : *pNextLB;
- for(sal_uInt16 nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
+ for(sal_Int32 nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
rChangeLB.RemoveEntry(nEntry - 1);
//determine chainable frames
::std::vector< OUString > aPrevPageFrames;
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx
index c93d1fe50edb..2c896c17d3eb 100644
--- a/sw/source/ui/inc/bookmark.hxx
+++ b/sw/source/ui/inc/bookmark.hxx
@@ -31,16 +31,16 @@ class SfxRequest;
class BookmarkCombo : public SwComboBox
{
- sal_uInt16 GetFirstSelEntryPos() const;
- sal_uInt16 GetNextSelEntryPos(sal_uInt16 nPos) const;
- sal_uInt16 GetSelEntryPos(sal_uInt16 nPos) const;
+ sal_Int32 GetFirstSelEntryPos() const;
+ sal_Int32 GetNextSelEntryPos(sal_Int32 nPos) const;
+ sal_Int32 GetSelEntryPos(sal_Int32 nPos) const;
virtual bool PreNotify(NotifyEvent& rNEvt);
public:
BookmarkCombo(Window* pWin, WinBits nStyle);
- sal_uInt16 GetSelectEntryCount() const;
- sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
+ sal_Int32 GetSelectEntryCount() const;
+ sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const;
static const OUString aForbiddenChars;
};
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index b9dfbb5b87bc..5949195c81c8 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -155,20 +155,20 @@ class SwFrmPage: public SfxTabPage
void Init(const SfxItemSet& rSet, sal_Bool bReset = sal_False);
// OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous
// in the alignment.
- sal_uInt16 FillPosLB( const FrmMap* _pMap,
+ sal_Int32 FillPosLB( const FrmMap* _pMap,
const sal_uInt16 _nAlign,
const sal_uInt16 _nRel,
ListBox& _rLB );
// OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous
// in their string entries.
- sal_uLong FillRelLB( const FrmMap* _pMap,
+ sal_uLong FillRelLB( const FrmMap* _pMap,
const sal_uInt16 _nLBSelPos,
const sal_uInt16 _nAlign,
sal_uInt16 _nRel,
ListBox& _rLB,
FixedText& _rFT );
- sal_uInt16 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
- short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
+ sal_Int32 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
+ short GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
short GetRelation(FrmMap *pMap, ListBox &rRelationLB);
RndStdIds GetAnchor();
diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx
index 0ee5023e89a6..6013d8b8dfc3 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -152,7 +152,7 @@ private:
DECL_LINK(SaveEntryHdl, void *);
void DelUserData();
- void SetOptions( const sal_uInt16 nPos,
+ void SetOptions( const sal_uLong nPos,
const SwCapObjType eType,
const SvGlobalName *pOleId = 0);
void SaveEntry( SvTreeListEntry* pEntry );
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index 502e48370fce..49ac2b096892 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -40,10 +40,10 @@ class SW_DLLPUBLIC SwBoxEntry
sal_Bool bNew : 1;
OUString aName;
- sal_uInt16 nId;
+ sal_Int32 nId;
public:
- SwBoxEntry(const OUString& aName, sal_uInt16 nId=0);
+ SwBoxEntry(const OUString& aName, sal_Int32 nId=0);
SwBoxEntry(const SwBoxEntry& rOrg);
SwBoxEntry();
@@ -70,15 +70,15 @@ public:
~SwComboBox();
void InsertSwEntry(const SwBoxEntry&);
- virtual sal_uInt16 InsertEntry(const OUString& rStr, sal_uInt16 = 0) SAL_OVERRIDE;
+ virtual sal_Int32 InsertEntry(const OUString& rStr, sal_Int32 = 0) SAL_OVERRIDE;
- virtual void RemoveEntryAt(sal_uInt16 nPos) SAL_OVERRIDE;
+ virtual void RemoveEntryAt(sal_Int32 nPos) SAL_OVERRIDE;
- sal_uInt16 GetSwEntryPos(const SwBoxEntry& rEntry) const;
- const SwBoxEntry& GetSwEntry(sal_uInt16) const;
+ sal_Int32 GetSwEntryPos(const SwBoxEntry& rEntry) const;
+ const SwBoxEntry& GetSwEntry(sal_Int32) const;
- sal_uInt16 GetRemovedCount() const;
- const SwBoxEntry& GetRemovedEntry(sal_uInt16 nPos) const;
+ sal_Int32 GetRemovedCount() const;
+ const SwBoxEntry& GetRemovedEntry(sal_Int32 nPos) const;
};
#endif // INCLUDED_SW_SOURCE_UI_INC_SWLBOX_HXX
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index a0a1823e9b54..3dda87016be2 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -923,7 +923,7 @@ void SwTOXSelectTabPage::SetWrtShell(SwWrtShell& rSh)
if(nUserTypeCount > 1)
{
//insert all new user indexes names after the standard user index
- sal_uInt16 nPos = m_pTypeLB->GetEntryPos((void*)(sal_uInt32)TO_USER);
+ sal_Int32 nPos = m_pTypeLB->GetEntryPos((void*)(sal_uInt32)TO_USER);
nPos++;
for(sal_uInt16 nUser = 1; nUser < nUserTypeCount; nUser++)
{
@@ -1070,14 +1070,14 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
m_pFromObjectNamesRB->Check(rDesc.IsCreateFromObjectNames());
m_pFromCaptionsRB->Check(!rDesc.IsCreateFromObjectNames());
m_pCaptionSequenceLB->SelectEntry(rDesc.GetSequenceName());
- m_pDisplayTypeLB->SelectEntryPos( static_cast< sal_uInt16 >(rDesc.GetCaptionDisplay()) );
+ m_pDisplayTypeLB->SelectEntryPos( static_cast< sal_Int32 >(rDesc.GetCaptionDisplay()) );
RadioButtonHdl(m_pFromCaptionsRB);
}
else if(TOX_OBJECTS == aCurType.eType)
{
long nOLEData = rDesc.GetOLEOptions();
- for(sal_uInt16 nFromObj = 0; nFromObj < m_pFromObjCLB->GetEntryCount(); nFromObj++)
+ for(sal_uLong nFromObj = 0; nFromObj < m_pFromObjCLB->GetEntryCount(); nFromObj++)
{
sal_IntPtr nData = (sal_IntPtr)m_pFromObjCLB->GetEntryData(nFromObj);
m_pFromObjCLB->CheckEntryPos(nFromObj, 0 != (nData & nOLEData));
@@ -1099,13 +1099,13 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
m_pLanguageLB->SelectLanguage(rDesc.GetLanguage());
LanguageHdl(0);
- for( long nCnt = 0; nCnt < m_pSortAlgorithmLB->GetEntryCount(); ++nCnt )
+ for( sal_Int32 nCnt = 0; nCnt < m_pSortAlgorithmLB->GetEntryCount(); ++nCnt )
{
- const OUString* pEntryData = (const OUString*)m_pSortAlgorithmLB->GetEntryData( (sal_uInt16)nCnt );
+ const OUString* pEntryData = (const OUString*)m_pSortAlgorithmLB->GetEntryData( nCnt );
OSL_ENSURE(pEntryData, "no entry data available");
if( pEntryData && *pEntryData == rDesc.GetSortAlgorithm())
{
- m_pSortAlgorithmLB->SelectEntryPos( (sal_uInt16)nCnt );
+ m_pSortAlgorithmLB->SelectEntryPos( nCnt );
break;
}
}
@@ -1174,7 +1174,7 @@ void SwTOXSelectTabPage::FillTOXDescription()
case TOX_OBJECTS:
{
long nOLEData = 0;
- for(sal_uInt16 i = 0; i < m_pFromObjCLB->GetEntryCount(); i++)
+ for(sal_uLong i = 0; i < m_pFromObjCLB->GetEntryCount(); i++)
{
if(m_pFromObjCLB->IsChecked(i))
{
@@ -1414,19 +1414,18 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
if( 0 != (pUserData = m_pSortAlgorithmLB->GetEntryData( m_pSortAlgorithmLB->GetSelectEntryPos())) )
sOldString = *(OUString*)pUserData;
void* pDel;
- sal_uInt16 nEnd = m_pSortAlgorithmLB->GetEntryCount();
- for( sal_uInt16 n = 0; n < nEnd; ++n )
+ sal_Int32 nEnd = m_pSortAlgorithmLB->GetEntryCount();
+ for( sal_Int32 n = 0; n < nEnd; ++n )
if( 0 != ( pDel = m_pSortAlgorithmLB->GetEntryData( n )) )
delete (OUString*)pDel;
m_pSortAlgorithmLB->Clear();
- sal_uInt16 nInsPos;
OUString sAlg, sUINm;
- nEnd = static_cast< sal_uInt16 >(aSeq.getLength());
- for( sal_uInt16 nCnt = 0; nCnt < nEnd; ++nCnt )
+ nEnd = aSeq.getLength();
+ for( sal_Int32 nCnt = 0; nCnt < nEnd; ++nCnt )
{
sUINm = pIndexRes->GetTranslation( sAlg = aSeq[ nCnt ] );
- nInsPos = m_pSortAlgorithmLB->InsertEntry( sUINm );
+ sal_Int32 nInsPos = m_pSortAlgorithmLB->InsertEntry( sUINm );
m_pSortAlgorithmLB->SetEntryData( nInsPos, new OUString( sAlg ));
if( sAlg == sOldString )
m_pSortAlgorithmLB->SelectEntryPos( nInsPos );
@@ -1884,10 +1883,10 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
for (sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i)
{
OUString sTmp(SW_RES(STR_AUTH_FIELD_START + i));
- sal_uInt16 nPos = m_pAuthFieldsLB->InsertEntry(sTmp);
+ sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(sTmp);
m_pAuthFieldsLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(i)));
}
- sal_uInt16 nPos = m_pFirstKeyLB->InsertEntry(sNoCharSortKey);
+ sal_Int32 nPos = m_pFirstKeyLB->InsertEntry(sNoCharSortKey);
m_pFirstKeyLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(USHRT_MAX)));
nPos = m_pSecondKeyLB->InsertEntry(sNoCharSortKey);
m_pSecondKeyLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(USHRT_MAX)));
@@ -2140,7 +2139,7 @@ IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, PushButton*, pButton)
bool bInsert = pButton == m_pAuthInsertPB;
if(bInsert)
{
- sal_uInt16 nSelPos = m_pAuthFieldsLB->GetSelectEntryPos();
+ sal_Int32 nSelPos = m_pAuthFieldsLB->GetSelectEntryPos();
OUString sToInsert(m_pAuthFieldsLB->GetSelectEntry());
SwFormToken aInsert(TOKEN_AUTHORITY);
aInsert.nAuthorityField = (sal_uInt16)(sal_uIntPtr)m_pAuthFieldsLB->GetEntryData(nSelPos);
@@ -2169,7 +2168,7 @@ void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken)
//fill it into the ListBox
sal_uInt32 nData = rToken.nAuthorityField;
OUString sTemp(SW_RES(STR_AUTH_FIELD_START + nData));
- sal_uInt16 nPos = m_pAuthFieldsLB->InsertEntry(sTemp);
+ sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(sTemp);
m_pAuthFieldsLB->SetEntryData(nPos, (void*)(sal_uIntPtr)(nData));
}
@@ -2296,7 +2295,7 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
for( sal_uInt32 i = 0; i < AUTH_FIELD_END; i++)
{
OUString sTmp(SW_RES(STR_AUTH_FIELD_START + i));
- sal_uInt16 nPos = m_pAuthFieldsLB->InsertEntry(sTmp);
+ sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(sTmp);
m_pAuthFieldsLB->SetEntryData(nPos, (void*)(sal_uIntPtr)(i));
}
@@ -2310,7 +2309,7 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox)
if(TOKEN_AUTHORITY == aToken.eTokenType)
{
sal_uInt32 nSearch = aToken.nAuthorityField;
- sal_uInt16 nLstBoxPos = m_pAuthFieldsLB->GetEntryPos( (void*)(sal_uIntPtr)nSearch );
+ sal_Int32 nLstBoxPos = m_pAuthFieldsLB->GetEntryPos( (void*)(sal_uIntPtr)nSearch );
OSL_ENSURE(LISTBOX_ENTRY_NOTFOUND != nLstBoxPos, "Entry not found?");
m_pAuthFieldsLB->RemoveEntry(nLstBoxPos);
}
@@ -2470,7 +2469,7 @@ IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox)
IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox)
{
- sal_uInt16 nPos = pBox->GetSelectEntryPos();
+ sal_Int32 nPos = pBox->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
Control* pCtrl = m_pTokenWIN->GetActiveControl();
@@ -2498,7 +2497,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox*, pBox)
{
- const sal_uInt16 nPos = pBox->GetSelectEntryPos();
+ const sal_Int32 nPos = pBox->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
@@ -2571,7 +2570,7 @@ void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
SwDocShell* pDocSh = rSh.GetView().GetDocShell();
::FillCharStyleListBox(*m_pCharStyleLB, pDocSh, true, true);
const OUString sDefault(SW_RES(STR_POOLCOLL_STANDARD));
- for(sal_uInt16 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++)
+ for(sal_Int32 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++)
{
OUString sEntry = m_pCharStyleLB->GetEntry(i);
if(sDefault != sEntry)
@@ -3700,8 +3699,8 @@ IMPL_LINK( SwTOXStylesTabPage, EditStyleHdl, Button *, pBtn )
// allocate templates
IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl)
{
- sal_uInt16 nLevPos = m_pLevelLB->GetSelectEntryPos();
- sal_uInt16 nTemplPos = m_pParaLayLB->GetSelectEntryPos();
+ sal_Int32 nLevPos = m_pLevelLB->GetSelectEntryPos();
+ sal_Int32 nTemplPos = m_pParaLayLB->GetSelectEntryPos();
if(nLevPos != LISTBOX_ENTRY_NOTFOUND &&
nTemplPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -3727,7 +3726,7 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl)
IMPL_LINK_NOARG(SwTOXStylesTabPage, StdHdl)
{
- sal_uInt16 nPos = m_pLevelLB->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLevelLB->GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
{
OUString aStr(m_pLevelLB->GetEntry(nPos));
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 58d415077614..64c6c6f3a780 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -65,7 +65,7 @@
#define POS_CONTENT 0
#define POS_INDEX 1
-static sal_uInt16 nTypePos = 1; // TOX_INDEX as standard
+static sal_Int32 nTypePos = 1; // TOX_INDEX as standard
static sal_uInt16 nKey1Pos = USHRT_MAX;
static sal_uInt16 nKey2Pos = USHRT_MAX;
@@ -455,7 +455,7 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool
void SwIndexMarkPane::InsertMark()
{
- sal_uInt16 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry());
+ sal_Int32 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry());
TOXTypes eType = nPos == POS_CONTENT ? TOX_CONTENT :
nPos == POS_INDEX ? TOX_INDEX : TOX_USER;
@@ -519,7 +519,7 @@ void SwIndexMarkPane::UpdateMark()
UpdateKeyBoxes();
- sal_uInt16 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry());
+ sal_Int32 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry());
TOXTypes eType = TOX_USER;
if(POS_CONTENT == nPos)
eType = TOX_CONTENT;
@@ -554,9 +554,9 @@ void SwIndexMarkPane::UpdateMark()
void SwIndexMarkPane::UpdateKeyBoxes()
{
OUString aKey(m_pKey1DCB->GetText());
- sal_uInt16 nPos = m_pKey1DCB->GetEntryPos(aKey);
+ sal_Int32 nPos = m_pKey1DCB->GetEntryPos(aKey);
- if(nPos == LISTBOX_ENTRY_NOTFOUND && !aKey.isEmpty())
+ if(nPos == COMBOBOX_ENTRY_NOTFOUND && !aKey.isEmpty())
{ // create new key
m_pKey1DCB->InsertEntry(aKey);
}
@@ -564,7 +564,7 @@ void SwIndexMarkPane::UpdateKeyBoxes()
aKey = m_pKey2DCB->GetText();
nPos = m_pKey2DCB->GetEntryPos(aKey);
- if(nPos == LISTBOX_ENTRY_NOTFOUND && !aKey.isEmpty())
+ if(nPos == COMBOBOX_ENTRY_NOTFOUND && !aKey.isEmpty())
{ // create new key
m_pKey2DCB->InsertEntry(aKey);
}
@@ -658,7 +658,7 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox )
if (m_pTypeDCB == pBox)
{
// set index type
- sal_uInt16 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry());
+ sal_Int32 nPos = m_pTypeDCB->GetEntryPos(m_pTypeDCB->GetSelectEntry());
sal_Bool bLevelEnable = sal_False,
bKeyEnable = sal_False,
bSetKey2 = sal_False,
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 0367f40b75a5..f8b383cce5fe 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -72,7 +72,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl)
{
// remove text marks from the ComboBox
- for (sal_uInt16 i = m_pBookmarkBox->GetSelectEntryCount(); i; i-- )
+ for (sal_Int32 i = m_pBookmarkBox->GetSelectEntryCount(); i; i-- )
m_pBookmarkBox->RemoveEntryAt(m_pBookmarkBox->GetSelectEntryPos(i - 1));
m_pBookmarkBox->SetText(OUString());
@@ -90,7 +90,7 @@ void SwInsertBookmarkDlg::Apply()
{
//at first remove deleted bookmarks to prevent multiple bookmarks with the same
//name
- for (sal_uInt16 nCount = m_pBookmarkBox->GetRemovedCount(); nCount > 0; nCount--)
+ for (sal_Int32 nCount = m_pBookmarkBox->GetRemovedCount(); nCount > 0; nCount--)
{
OUString sRemoved = m_pBookmarkBox->GetRemovedEntry( nCount -1 ).GetName();
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
@@ -160,21 +160,21 @@ BookmarkCombo::BookmarkCombo(Window* pWin, WinBits nStyle)
{
}
-sal_uInt16 BookmarkCombo::GetFirstSelEntryPos() const
+sal_Int32 BookmarkCombo::GetFirstSelEntryPos() const
{
return GetSelEntryPos(0);
}
-sal_uInt16 BookmarkCombo::GetNextSelEntryPos(sal_uInt16 nPos) const
+sal_Int32 BookmarkCombo::GetNextSelEntryPos(sal_Int32 nPos) const
{
return GetSelEntryPos(nPos + 1);
}
-sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const
+sal_Int32 BookmarkCombo::GetSelEntryPos(sal_Int32 nPos) const
{
sal_Unicode cSep = GetMultiSelectionSeparator();
- sal_uInt16 nCnt = comphelper::string::getTokenCount(GetText(), cSep);
+ sal_Int32 nCnt = comphelper::string::getTokenCount(GetText(), cSep);
for (; nPos < nCnt; nPos++)
{
@@ -186,11 +186,11 @@ sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const
return COMBOBOX_ENTRY_NOTFOUND;
}
-sal_uInt16 BookmarkCombo::GetSelectEntryCount() const
+sal_Int32 BookmarkCombo::GetSelectEntryCount() const
{
- sal_uInt16 nCnt = 0;
+ sal_Int32 nCnt = 0;
- sal_uInt16 nPos = GetFirstSelEntryPos();
+ sal_Int32 nPos = GetFirstSelEntryPos();
while (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
nPos = GetNextSelEntryPos(nPos);
@@ -203,10 +203,10 @@ sal_uInt16 BookmarkCombo::GetSelectEntryCount() const
/*------------------------------------------------------------------------
Description: position inside of the listbox (the ComboBox)
-----------------------------------------------------------------------*/
-sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
+sal_Int32 BookmarkCombo::GetSelectEntryPos( sal_Int32 nSelIndex ) const
{
- sal_uInt16 nCnt = 0;
- sal_uInt16 nPos = GetFirstSelEntryPos();
+ sal_Int32 nCnt = 0;
+ sal_Int32 nPos = GetFirstSelEntryPos();
while (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 7c8ee93a2e22..88f32450f97a 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -188,7 +188,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
else
{
OSL_ENSURE(!pColl->IsDefault(), "default style for footnotes is wrong");
- const sal_uInt16 nPos = m_pParaTemplBox->GetEntryPos(pColl->GetName());
+ const sal_Int32 nPos = m_pParaTemplBox->GetEntryPos(pColl->GetName());
if( LISTBOX_ENTRY_NOTFOUND != nPos )
m_pParaTemplBox->SelectEntryPos( nPos );
else
@@ -253,7 +253,7 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum)
int SwEndNoteOptionPage::GetNumbering() const
{
- const sal_uInt16 nPos = m_pNumCountBox->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pNumCountBox->GetSelectEntryPos();
return (int) bPosDoc? nPos + 1: nPos;
}
@@ -364,7 +364,7 @@ sal_Bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
m_pFtnCharAnchorTemplBox->GetSelectEntry() ) );
// paragraph template
- sal_uInt16 nPos = m_pParaTemplBox->GetSelectEntryPos();
+ sal_Int32 nPos = m_pParaTemplBox->GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
const OUString aFmtName( m_pParaTemplBox->GetSelectEntry() );
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index da2d76abbdf6..d37c1d66ebbd 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -75,7 +75,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
IDocumentStylePoolAccess* pIDSPA = pSh->getIDocumentStylePoolAccess();
OUString sStyleName(rInf.GetCharFmt( *pIDSPA )->GetName());
- const sal_uInt16 nPos = m_pCharStyleLB->GetEntryPos(sStyleName);
+ const sal_Int32 nPos = m_pCharStyleLB->GetEntryPos(sStyleName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
m_pCharStyleLB->SelectEntryPos(nPos);
@@ -94,7 +94,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
m_pFormatLB->SelectNumberingType(nSelFmt);
// position
- m_pPosLB->SelectEntryPos((sal_uInt16)rInf.GetPos());
+ m_pPosLB->SelectEntryPos((sal_Int32)rInf.GetPos());
// offset
sal_uInt16 nOffset = rInf.GetPosFromLeft();
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index abf041025090..d319a131e3df 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -85,7 +85,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
{
sal_IntPtr nValue = rNames.GetValue(i);
bool bInsert = true;
- sal_uInt16 nPos = LISTBOX_APPEND;
+ sal_Int32 nPos = LISTBOX_APPEND;
switch(nValue)
{
case style::NumberingType::NUMBER_NONE:
@@ -115,7 +115,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
}
if(bInsert)
{
- sal_uInt16 nEntry = InsertEntry(rNames.GetString(i), nPos);
+ sal_Int32 nEntry = InsertEntry(rNames.GetString(i), nPos);
SetEntryData( nEntry, (void*)nValue );
}
}
@@ -131,7 +131,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(sal_uLong)nCurrent))
{
OUString aIdent = pImpl->xInfo->getNumberingIdentifier( nCurrent );
- sal_uInt16 nPos = InsertEntry(aIdent);
+ sal_Int32 nPos = InsertEntry(aIdent);
SetEntryData(nPos,(void*)(sal_uLong)nCurrent);
}
}
@@ -144,7 +144,7 @@ void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
{
sal_Int16 nRet = 0;
- sal_uInt16 nSelPos = GetSelectEntryPos();
+ sal_Int32 nSelPos = GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nSelPos)
nRet = (sal_Int16)(sal_uLong)GetEntryData(nSelPos);
#if OSL_DEBUG_LEVEL > 0
@@ -156,7 +156,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
sal_Bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType)
{
- sal_uInt16 nPos = GetEntryPos((void*)(sal_uLong)nType);
+ sal_Int32 nPos = GetEntryPos((void*)(sal_uLong)nType);
SelectEntryPos( nPos );
return LISTBOX_ENTRY_NOTFOUND != nPos;
}
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 372b6526b2da..3e356866548f 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -231,7 +231,7 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
}
// select color in the list or add it as a user color
- sal_uInt16 nSelPos = m_pLineColorBox->GetEntryPos( pFtnInfo->GetLineColor() );
+ sal_Int32 nSelPos = m_pLineColorBox->GetEntryPos( pFtnInfo->GetLineColor() );
if( nSelPos == LISTBOX_ENTRY_NOTFOUND )
nSelPos = m_pLineColorBox->InsertEntry( pFtnInfo->GetLineColor(),
OUString( SW_RES( RID_SVXSTR_COLOR_USER ) ) );
@@ -241,7 +241,7 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
m_pLineTypeBox->SetColor( pFtnInfo->GetLineColor() );
// position
- m_pLinePosBox->SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) );
+ m_pLinePosBox->SelectEntryPos( static_cast< sal_Int32 >(pFtnInfo->GetAdj()) );
// width
Fraction aTmp( 100, 1 );
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index c31c650911eb..60ac680ffd66 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -1334,13 +1334,13 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
sEntry = sSpace;
if(!pChild || (nLevel == 0))
pChild = InsertEntry(sEntry, pParent,
- sal_False, LIST_APPEND,(void*)pCnt);
+ sal_False, TREELIST_APPEND,(void*)pCnt);
else
{
//back search parent.
if(((SwOutlineContent*)pCntType->GetMember(i-1))->GetOutlineLevel() < nLevel)
pChild = InsertEntry(sEntry, pChild,
- sal_False, LIST_APPEND, (void*)pCnt);
+ sal_False, TREELIST_APPEND, (void*)pCnt);
else
{
pChild = Prev(pChild);
@@ -1353,7 +1353,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
}
if(pChild)
pChild = InsertEntry(sEntry, pChild,
- sal_False, LIST_APPEND, (void*)pCnt);
+ sal_False, TREELIST_APPEND, (void*)pCnt);
}
}
}
@@ -1370,7 +1370,7 @@ void SwContentTree::RequestingChildren( SvTreeListEntry* pParent )
if (sEntry.isEmpty())
sEntry = sSpace;
SvTreeListEntry* pChild = InsertEntry(sEntry, pParent,
- sal_False, LIST_APPEND, (void*)pCnt);
+ sal_False, TREELIST_APPEND, (void*)pCnt);
//If object is marked , the corresponding entry is set true,
//else the corresponding entry is set false .
@@ -1639,7 +1639,7 @@ void SwContentTree::Display( bool bActive )
const Image& rImage = aEntryImages.GetImage(SID_SW_START + nCntType);
sal_Bool bChOnDemand = 0 != (*ppContentT)->GetMemberCount();
pEntry = InsertEntry(sEntry, rImage, rImage,
- 0, bChOnDemand, LIST_APPEND, (*ppContentT));
+ 0, bChOnDemand, TREELIST_APPEND, (*ppContentT));
if(nCntType == nLastSelType)
pSelEntry = pEntry;
sal_Int32 nExpandOptions = bIsActive || bIsConstant ?
@@ -1690,7 +1690,7 @@ void SwContentTree::Display( bool bActive )
const Image& rImage = aEntryImages.GetImage(20000 + nRootType);
SvTreeListEntry* pParent = InsertEntry(
(*ppRootContentT)->GetName(), rImage, rImage,
- 0, sal_False, LIST_APPEND, *ppRootContentT);
+ 0, sal_False, TREELIST_APPEND, *ppRootContentT);
if(nRootType != CONTENT_TYPE_OUTLINE)
{
@@ -1703,7 +1703,7 @@ void SwContentTree::Display( bool bActive )
if(sEntry.isEmpty())
sEntry = sSpace;
InsertEntry( sEntry, pParent,
- sal_False, LIST_APPEND, (void*)pCnt);
+ sal_False, TREELIST_APPEND, (void*)pCnt);
}
}
}
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 2065d9370230..9cdcf71b7e4b 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -201,7 +201,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
if( bIsInternalDrag )
{
SvTreeListEntry* pDummy = 0;
- sal_uLong nInsertionPos = LIST_APPEND;
+ sal_uLong nInsertionPos = TREELIST_APPEND;
NotifyMoving( pDropEntry, pDDSource, pDummy, nInsertionPos );
}
else
@@ -219,7 +219,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
int nAbsContPos = pDropEntry ?
(int) GetModel()->GetAbsPos(pDropEntry):
- 1;
- sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
+ sal_uLong nEntryCount = GetEntryCount();
// Get data
FileList aFileList;
@@ -421,8 +421,8 @@ void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox)
sal_uInt16 SwGlobalTree::GetEnableFlags() const
{
SvTreeListEntry* pEntry = FirstSelected();
- sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
- sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
+ sal_uLong nSelCount = GetSelectionCount();
+ sal_uLong nEntryCount = GetEntryCount();
SvTreeListEntry* pPrevEntry = pEntry ? Prev(pEntry) : 0;
sal_uInt16 nRet = 0;
@@ -499,9 +499,9 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
void SwGlobalTree::SelectHdl()
{
- sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
+ sal_uLong nSelCount = GetSelectionCount();
SvTreeListEntry* pSel = FirstSelected();
- sal_uInt16 nAbsPos = pSel ? (sal_uInt16)GetModel()->GetAbsPos(pSel) : 0;
+ sal_uLong nAbsPos = pSel ? GetModel()->GetAbsPos(pSel) : 0;
SwNavigationPI* pNavi = GetParentWindow();
bool bReadonly = !pActiveShell ||
pActiveShell->GetView().GetDocShell()->IsReadOnly();
@@ -511,7 +511,7 @@ void SwGlobalTree::SelectHdl()
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_UP,
nSelCount == 1 && nAbsPos && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_DOWN,
- nSelCount == 1 && nAbsPos < ((sal_uInt16)GetEntryCount()) - 1 && !bReadonly);
+ nSelCount == 1 && nAbsPos < GetEntryCount() - 1 && !bReadonly);
}
@@ -540,8 +540,8 @@ sal_Bool SwGlobalTree::NotifyMoving( SvTreeListEntry* pTarget,
)
{
SvTreeList* _pModel = GetModel();
- sal_uInt16 nSource = (sal_uInt16) _pModel->GetAbsPos(pSource);
- sal_uInt16 nDest = pTarget ? (sal_uInt16) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->size();
+ sal_uLong nSource = _pModel->GetAbsPos(pSource);
+ sal_uLong nDest = pTarget ? _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->size();
if( pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
@@ -626,11 +626,11 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP));
bIsImageListInitialized = true;
}
- sal_uInt16 nCount = pSwGlblDocContents->size();
+ size_t nCount = pSwGlblDocContents->size();
if(bOnlyUpdateUserData && GetEntryCount() == pSwGlblDocContents->size())
{
SvTreeListEntry* pEntry = First();
- for( sal_uInt16 i = 0; i < nCount; i++)
+ for( size_t i = 0; i < nCount; i++)
{
SwGlblDocContent* pCont = (*pSwGlblDocContents)[i];
pEntry->SetUserData(pCont);
@@ -642,18 +642,18 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
SetUpdateMode( sal_False );
SvTreeListEntry* pOldSelEntry = FirstSelected();
OUString sEntryName; // Name of the entry
- sal_uInt16 nSelPos = USHRT_MAX;
+ sal_uLong nSelPos = TREELIST_ENTRY_NOTFOUND;
if(pOldSelEntry)
{
sEntryName = GetEntryText(pOldSelEntry);
- nSelPos = (sal_uInt16)GetModel()->GetAbsPos(pOldSelEntry);
+ nSelPos = GetModel()->GetAbsPos(pOldSelEntry);
}
Clear();
if(!pSwGlblDocContents)
Update( sal_False );
SvTreeListEntry* pSelEntry = 0;
- for( sal_uInt16 i = 0; i < nCount; i++)
+ for( size_t i = 0; i < nCount; i++)
{
SwGlblDocContent* pCont = (*pSwGlblDocContents)[i];
OUString sEntry;
@@ -682,7 +682,7 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
break;
}
SvTreeListEntry* pEntry = InsertEntry(sEntry, aImage, aImage,
- 0, sal_False, LIST_APPEND, pCont);
+ 0, sal_False, TREELIST_APPEND, pCont);
if(sEntry == sEntryName)
{
pSelEntry = pEntry;
@@ -692,7 +692,7 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
{
Select(pSelEntry);
}
- else if(nSelPos != USHRT_MAX && nSelPos < nCount)
+ else if(nSelPos != TREELIST_ENTRY_NOTFOUND && nSelPos < nCount)
{
Select(GetEntry(nSelPos));
}
@@ -847,7 +847,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry
{
pActiveShell->DeleteGlobalDocContent(
pTempContents ? *pTempContents : *pSwGlblDocContents,
- (sal_uInt16)GetModel()->GetAbsPos(pSelEntry));
+ GetModel()->GetAbsPos(pSelEntry));
pSelEntry = PrevSelected(pSelEntry);
if(pSelEntry)
{
@@ -1052,13 +1052,13 @@ void SwGlobalTree::ExecCommand(sal_uInt16 nCmd)
if(GetSelectionCount() == 1)
{
bool bMove = false;
- sal_uInt16 nSource = (sal_uInt16)GetModel()->GetAbsPos(pEntry);
- sal_uInt16 nDest = nSource;
+ sal_uLong nSource = GetModel()->GetAbsPos(pEntry);
+ sal_uLong nDest = nSource;
switch(nCmd)
{
case FN_ITEM_DOWN:
{
- sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
+ sal_uLong nEntryCount = GetEntryCount();
bMove = nEntryCount > nSource + 1;
nDest+= 2;
}
@@ -1111,7 +1111,7 @@ sal_Bool SwGlobalTree::Update(sal_Bool bHard)
}
else
{
- for(sal_uInt16 i = 0; i < pTempContents->size() && !bCopy; i++)
+ for(size_t i = 0; i < pTempContents->size() && !bCopy; i++)
{
SwGlblDocContent* pLeft = (*pTempContents)[i];
SwGlblDocContent* pRight = (*pSwGlblDocContents)[i];
@@ -1264,7 +1264,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
bMove = true;
}
OUString sFilePassword;
- sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
+ sal_uLong nEntryCount = GetEntryCount();
const OUString* pFileNames = _rFiles.getConstArray();
SwWrtShell& rSh = GetParentWindow()->GetCreateView()->GetWrtShell();
rSh.StartAction();
@@ -1335,7 +1335,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
{
Update( sal_False );
rSh.MoveGlobalDocContent(
- *pSwGlblDocContents, nEntryCount, nEntryCount + (sal_uInt16)nFiles, nEntryCount - (sal_uInt16)nFiles );
+ *pSwGlblDocContents, nEntryCount, nEntryCount + nFiles, nEntryCount - nFiles );
}
rSh.EndAction();
Update( sal_False );
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index 4c239bc643b3..25434033d717 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -383,7 +383,7 @@ sal_uIntPtr INetRFC822Message::SetHeaderField (
const sal_Char *pStop = pData + aName.getLength() + 1;
const sal_Char *check = "";
- sal_uIntPtr nIdx = LIST_APPEND;
+ sal_uIntPtr nIdx = CONTAINER_APPEND;
int eState = INETMSG_RFC822_BEGIN;
int eOkState = INETMSG_RFC822_OK;
@@ -747,7 +747,7 @@ sal_uIntPtr INetMIMEMessage::SetHeaderField (
const sal_Char *pStop = pData + aName.getLength() + 1;
const sal_Char *check = "";
- sal_uIntPtr nIdx = LIST_APPEND;
+ sal_uIntPtr nIdx = CONTAINER_APPEND;
int eState = INETMSG_MIME_BEGIN;
int eOkState = INETMSG_MIME_OK;
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx
index 294f7c9a7c9e..502b04ee5b76 100644
--- a/vcl/inc/ilstbox.hxx
+++ b/vcl/inc/ilstbox.hxx
@@ -87,20 +87,20 @@ class ImplEntryList
{
private:
Window* mpWindow; ///< For getting the current locale when matching strings
- sal_uInt16 mnLastSelected;
- sal_uInt16 mnSelectionAnchor;
- sal_uInt16 mnImages;
+ sal_Int32 mnLastSelected;
+ sal_Int32 mnSelectionAnchor;
+ sal_Int32 mnImages;
- sal_uInt16 mnMRUCount;
- sal_uInt16 mnMaxMRUCount;
+ sal_Int32 mnMRUCount;
+ sal_Int32 mnMaxMRUCount;
Link maSelectionChangedHdl;
bool mbCallSelectionChangedHdl;
boost::ptr_vector<ImplEntryType> maEntries;
- ImplEntryType* GetEntry( sal_uInt16 nPos ) const
+ ImplEntryType* GetEntry( sal_Int32 nPos ) const
{
- if (nPos >= maEntries.size())
+ if (nPos < 0 || static_cast<size_t>(nPos) >= maEntries.size())
return NULL;
return const_cast<ImplEntryType*>(&maEntries[nPos]);
}
@@ -109,70 +109,70 @@ public:
ImplEntryList( Window* pWindow );
~ImplEntryList();
- sal_uInt16 InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, bool bSort );
- void RemoveEntry( sal_uInt16 nPos );
- const ImplEntryType* GetEntryPtr( sal_uInt16 nPos ) const { return (const ImplEntryType*) GetEntry( nPos ); }
- ImplEntryType* GetMutableEntryPtr( sal_uInt16 nPos ) const { return GetEntry( nPos ); }
+ sal_Int32 InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry, bool bSort );
+ void RemoveEntry( sal_Int32 nPos );
+ const ImplEntryType* GetEntryPtr( sal_Int32 nPos ) const { return (const ImplEntryType*) GetEntry( nPos ); }
+ ImplEntryType* GetMutableEntryPtr( sal_Int32 nPos ) const { return GetEntry( nPos ); }
void Clear();
- sal_uInt16 FindMatchingEntry( const OUString& rStr, sal_uInt16 nStart = 0, bool bForward = true, bool bLazy = true ) const;
- sal_uInt16 FindEntry( const OUString& rStr, bool bSearchMRUArea = false ) const;
- sal_uInt16 FindEntry( const void* pData ) const;
+ sal_Int32 FindMatchingEntry( const OUString& rStr, sal_Int32 nStart = 0, bool bForward = true, bool bLazy = true ) const;
+ sal_Int32 FindEntry( const OUString& rStr, bool bSearchMRUArea = false ) const;
+ sal_Int32 FindEntry( const void* pData ) const;
/// helper: add up heights up to index nEndIndex.
/// GetAddedHeight( 0 ) @return 0
/// GetAddedHeight( LISTBOX_ENTRY_NOTFOUND ) @return 0
/// GetAddedHeight( i, k ) with k > i is equivalent -GetAddedHeight( k, i )
- long GetAddedHeight( sal_uInt16 nEndIndex, sal_uInt16 nBeginIndex = 0, long nBeginHeight = 0 ) const;
- long GetEntryHeight( sal_uInt16 nPos ) const;
+ long GetAddedHeight( sal_Int32 nEndIndex, sal_Int32 nBeginIndex = 0, long nBeginHeight = 0 ) const;
+ long GetEntryHeight( sal_Int32 nPos ) const;
- sal_uInt16 GetEntryCount() const { return (sal_uInt16)maEntries.size(); }
+ sal_Int32 GetEntryCount() const { return (sal_Int32 )maEntries.size(); }
bool HasImages() const { return mnImages ? true : false; }
- OUString GetEntryText( sal_uInt16 nPos ) const;
+ OUString GetEntryText( sal_Int32 nPos ) const;
- bool HasEntryImage( sal_uInt16 nPos ) const;
- Image GetEntryImage( sal_uInt16 nPos ) const;
+ bool HasEntryImage( sal_Int32 nPos ) const;
+ Image GetEntryImage( sal_Int32 nPos ) const;
- void SetEntryData( sal_uInt16 nPos, void* pNewData );
- void* GetEntryData( sal_uInt16 nPos ) const;
+ void SetEntryData( sal_Int32 nPos, void* pNewData );
+ void* GetEntryData( sal_Int32 nPos ) const;
- void SetEntryFlags( sal_uInt16 nPos, long nFlags );
- long GetEntryFlags( sal_uInt16 nPos ) const;
+ void SetEntryFlags( sal_Int32 nPos, long nFlags );
+ long GetEntryFlags( sal_Int32 nPos ) const;
- void SelectEntry( sal_uInt16 nPos, bool bSelect );
+ void SelectEntry( sal_Int32 nPos, bool bSelect );
- sal_uInt16 GetSelectEntryCount() const;
- OUString GetSelectEntry( sal_uInt16 nIndex ) const;
- sal_uInt16 GetSelectEntryPos( sal_uInt16 nIndex ) const;
- bool IsEntryPosSelected( sal_uInt16 nIndex ) const;
+ sal_Int32 GetSelectEntryCount() const;
+ OUString GetSelectEntry( sal_Int32 nIndex ) const;
+ sal_Int32 GetSelectEntryPos( sal_Int32 nIndex ) const;
+ bool IsEntryPosSelected( sal_Int32 nIndex ) const;
- void SetLastSelected( sal_uInt16 nPos ) { mnLastSelected = nPos; }
- sal_uInt16 GetLastSelected() const { return mnLastSelected; }
+ void SetLastSelected( sal_Int32 nPos ) { mnLastSelected = nPos; }
+ sal_Int32 GetLastSelected() const { return mnLastSelected; }
- void SetSelectionAnchor( sal_uInt16 nPos ) { mnSelectionAnchor = nPos; }
- sal_uInt16 GetSelectionAnchor() const { return mnSelectionAnchor; }
+ void SetSelectionAnchor( sal_Int32 nPos ) { mnSelectionAnchor = nPos; }
+ sal_Int32 GetSelectionAnchor() const { return mnSelectionAnchor; }
void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; }
void SetCallSelectionChangedHdl( bool bCall ) { mbCallSelectionChangedHdl = bCall; }
- void SetMRUCount( sal_uInt16 n ) { mnMRUCount = n; }
- sal_uInt16 GetMRUCount() const { return mnMRUCount; }
+ void SetMRUCount( sal_Int32 n ) { mnMRUCount = n; }
+ sal_Int32 GetMRUCount() const { return mnMRUCount; }
- void SetMaxMRUCount( sal_uInt16 n ) { mnMaxMRUCount = n; }
- sal_uInt16 GetMaxMRUCount() const { return mnMaxMRUCount; }
+ void SetMaxMRUCount( sal_Int32 n ) { mnMaxMRUCount = n; }
+ sal_Int32 GetMaxMRUCount() const { return mnMaxMRUCount; }
/** An Entry is selectable if its mnFlags does not have the
LISTBOX_ENTRY_FLAG_DISABLE_SELECTION flag set. */
- bool IsEntrySelectable( sal_uInt16 nPos ) const;
+ bool IsEntrySelectable( sal_Int32 nPos ) const;
/** @return the first entry found from the given position nPos that is selectable
or LISTBOX_ENTRY_NOTFOUND if non is found. If the entry at nPos is not selectable,
it returns the first selectable entry after nPos if bForward is true and the
first selectable entry after nPos is bForward is false.
*/
- sal_uInt16 FindFirstSelectable( sal_uInt16 nPos, bool bForward = true );
+ sal_Int32 FindFirstSelectable( sal_Int32 nPos, bool bForward = true );
};
class ImplListBoxWindow : public Control, public ::vcl::ISearchableStringList
@@ -193,20 +193,20 @@ private:
long mnMaxWidth; ///< Maximum width of an entry
long mnMaxHeight; ///< Maximum height of an entry
- sal_uInt16 mnCurrentPos; ///< Position (Focus)
- sal_uInt16 mnTrackingSaveSelection; ///< Selection before Tracking();
+ sal_Int32 mnCurrentPos; ///< Position (Focus)
+ sal_Int32 mnTrackingSaveSelection; ///< Selection before Tracking();
- sal_uInt16 mnSeparatorPos; ///< Separator
+ sal_Int32 mnSeparatorPos; ///< Separator
- sal_uInt16 mnUserDrawEntry;
+ sal_Int32 mnUserDrawEntry;
- sal_uInt16 mnTop; ///< output from line on
+ sal_Int32 mnTop; ///< output from line on
long mnLeft; ///< output from column on
long mnBorder; ///< distance border - text
long mnTextHeight; ///< text height
ProminentEntry meProminentType; ///< where is the "prominent" entry
- sal_uInt16 mnSelectModifier; ///< Modifiers
+ sal_uInt16 mnSelectModifier; ///< Modifiers
/// bitfield
bool mbHasFocusRect : 1;
@@ -250,8 +250,8 @@ protected:
virtual void GetFocus();
virtual void LoseFocus();
- bool SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, bool bShift = false, bool bCtrl = false, bool bSelectPosChange = false );
- void ImplPaint( sal_uInt16 nPos, bool bErase = false, bool bLayout = false );
+ bool SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bool bShift = false, bool bCtrl = false, bool bSelectPosChange = false );
+ void ImplPaint( sal_Int32 nPos, bool bErase = false, bool bLayout = false );
void ImplDoPaint( const Rectangle& rRect, bool bLayout = false );
void ImplCalcMetrics();
void ImplUpdateEntryMetrics( ImplEntryType& rEntry );
@@ -272,32 +272,32 @@ public:
ImplEntryList* GetEntryList() const { return mpEntryList; }
- sal_uInt16 InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry );
- void RemoveEntry( sal_uInt16 nPos );
+ sal_Int32 InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry );
+ void RemoveEntry( sal_Int32 nPos );
void Clear();
void ResetCurrentPos() { mnCurrentPos = LISTBOX_ENTRY_NOTFOUND; }
- sal_uInt16 GetCurrentPos() const { return mnCurrentPos; }
- sal_uInt16 GetDisplayLineCount() const;
- void SetEntryFlags( sal_uInt16 nPos, long nFlags );
+ sal_Int32 GetCurrentPos() const { return mnCurrentPos; }
+ sal_uInt16 GetDisplayLineCount() const;
+ void SetEntryFlags( sal_Int32 nPos, long nFlags );
- void DrawEntry( sal_uInt16 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false, bool bLayout = false );
+ void DrawEntry( sal_Int32 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false, bool bLayout = false );
- void SelectEntry( sal_uInt16 nPos, bool bSelect );
+ void SelectEntry( sal_Int32 nPos, bool bSelect );
void DeselectAll();
- sal_uInt16 GetEntryPosForPoint( const Point& rPoint ) const;
- sal_uInt16 GetLastVisibleEntry() const;
+ sal_Int32 GetEntryPosForPoint( const Point& rPoint ) const;
+ sal_Int32 GetLastVisibleEntry() const;
bool ProcessKeyInput( const KeyEvent& rKEvt );
- void SetTopEntry( sal_uInt16 nTop );
- sal_uInt16 GetTopEntry() const { return mnTop; }
+ void SetTopEntry( sal_Int32 nTop );
+ sal_Int32 GetTopEntry() const { return mnTop; }
/** ShowProminentEntry will set the entry correspoding to nEntryPos
either at top or in the middle depending on the chosen style*/
- void ShowProminentEntry( sal_uInt16 nEntryPos );
+ void ShowProminentEntry( sal_Int32 nEntryPos );
void SetProminentEntryType( ProminentEntry eType ) { meProminentType = eType; }
ProminentEntry GetProminentEntryType() const { return meProminentType; }
using Window::IsVisible;
- bool IsVisible( sal_uInt16 nEntry ) const;
+ bool IsVisible( sal_Int32 nEntry ) const;
long GetLeftIndent() const { return mnLeft; }
void SetLeftIndent( long n );
@@ -306,8 +306,8 @@ public:
void AllowGrabFocus( bool b ) { mbGrabFocus = b; }
bool IsGrabFocusAllowed() const { return mbGrabFocus; }
- void SetSeparatorPos( sal_uInt16 n ) { mnSeparatorPos = n; }
- sal_uInt16 GetSeparatorPos() const { return mnSeparatorPos; }
+ void SetSeparatorPos( sal_Int32 n ) { mnSeparatorPos = n; }
+ sal_Int32 GetSeparatorPos() const { return mnSeparatorPos; }
void SetTravelSelect( bool bTravelSelect ) { mbTravelSelect = bTravelSelect; }
bool IsTravelSelect() const { return mbTravelSelect; }
@@ -330,7 +330,7 @@ public:
bool IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; }
Size CalcSize(sal_Int32 nMaxLines) const;
- Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const;
+ Rectangle GetBoundingRectangle( sal_Int32 nItem ) const;
long GetEntryHeight() const { return mnMaxHeight; }
long GetMaxEntryWidth() const { return mnMaxWidth; }
@@ -362,7 +362,7 @@ public:
using Control::ImplInitSettings;
void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
- sal_uInt16 ImplGetTextStyle() const;
+ sal_uInt16 ImplGetTextStyle() const;
/// pb: #106948# explicit mirroring for calc
inline void EnableMirroring() { mbMirroring = true; }
@@ -422,30 +422,30 @@ public:
virtual const Wallpaper& GetDisplayBackground() const;
virtual Window* GetPreferredKeyInputWindow();
- sal_uInt16 InsertEntry( sal_uInt16 nPos, const OUString& rStr );
- sal_uInt16 InsertEntry( sal_uInt16 nPos, const OUString& rStr, const Image& rImage );
- void RemoveEntry( sal_uInt16 nPos );
- void SetEntryData( sal_uInt16 nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); }
+ sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr );
+ sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr, const Image& rImage );
+ void RemoveEntry( sal_Int32 nPos );
+ void SetEntryData( sal_Int32 nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); }
void Clear();
- void SetEntryFlags( sal_uInt16 nPos, long nFlags );
+ void SetEntryFlags( sal_Int32 nPos, long nFlags );
- void SelectEntry( sal_uInt16 nPos, bool bSelect );
+ void SelectEntry( sal_Int32 nPos, bool bSelect );
void SetNoSelection();
void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); }
- sal_uInt16 GetCurrentPos() const { return maLBWindow.GetCurrentPos(); }
+ sal_Int32 GetCurrentPos() const { return maLBWindow.GetCurrentPos(); }
bool ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); }
bool HandleWheelAsCursorTravel( const CommandEvent& rCEvt );
- void SetSeparatorPos( sal_uInt16 n ) { maLBWindow.SetSeparatorPos( n ); }
- sal_uInt16 GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); }
+ void SetSeparatorPos( sal_Int32 n ) { maLBWindow.SetSeparatorPos( n ); }
+ sal_Int32 GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); }
- void SetTopEntry( sal_uInt16 nTop ) { maLBWindow.SetTopEntry( nTop ); }
- sal_uInt16 GetTopEntry() const { return maLBWindow.GetTopEntry(); }
- void ShowProminentEntry( sal_uInt16 nPos ) { maLBWindow.ShowProminentEntry( nPos ); }
+ void SetTopEntry( sal_Int32 nTop ) { maLBWindow.SetTopEntry( nTop ); }
+ sal_Int32 GetTopEntry() const { return maLBWindow.GetTopEntry(); }
+ void ShowProminentEntry( sal_Int32 nPos ) { maLBWindow.ShowProminentEntry( nPos ); }
using Window::IsVisible;
- bool IsVisible( sal_uInt16 nEntry ) const { return maLBWindow.IsVisible( nEntry ); }
+ bool IsVisible( sal_Int32 nEntry ) const { return maLBWindow.IsVisible( nEntry ); }
void SetProminentEntryType( ProminentEntry eType ) { maLBWindow.SetProminentEntryType( eType ); }
ProminentEntry GetProminentEntryType() const { return maLBWindow.GetProminentEntryType(); }
@@ -468,7 +468,7 @@ public:
bool IsReadOnly() const { return maLBWindow.IsReadOnly(); }
- Size CalcSize( sal_uInt16 nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); }
+ Size CalcSize( sal_Int32 nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); }
long GetEntryHeight() const { return maLBWindow.GetEntryHeight(); }
long GetMaxEntryWidth() const { return maLBWindow.GetMaxEntryWidth(); }
@@ -490,13 +490,13 @@ public:
void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); }
void SetCallSelectionChangedHdl( bool bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); }
bool IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); }
- sal_uInt16 GetSelectModifier() const { return maLBWindow.GetSelectModifier(); }
+ sal_uInt16 GetSelectModifier() const { return maLBWindow.GetSelectModifier(); }
void SetMRUEntries( const OUString& rEntries, sal_Unicode cSep );
OUString GetMRUEntries( sal_Unicode cSep ) const;
- void SetMaxMRUCount( sal_uInt16 n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); }
- sal_uInt16 GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); }
- sal_uInt16 GetDisplayLineCount() const
+ void SetMaxMRUCount( sal_Int32 n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); }
+ sal_Int32 GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); }
+ sal_uInt16 GetDisplayLineCount() const
{ return maLBWindow.GetDisplayLineCount(); }
bool GetEdgeBlending() const { return mbEdgeBlending; }
@@ -512,8 +512,8 @@ class ImplListBoxFloatingWindow : public FloatingWindow
private:
ImplListBox* mpImplLB;
Size maPrefSz;
- sal_uInt16 mnDDLineCount;
- sal_uInt16 mnPopupModeStartSaveSelection;
+ sal_uInt16 mnDDLineCount;
+ sal_Int32 mnPopupModeStartSaveSelection;
bool mbAutoWidth;
protected:
@@ -539,9 +539,9 @@ public:
{ FloatingWindow::SetPosSizePixel( rNewPos, rNewSize ); }
void SetDropDownLineCount( sal_uInt16 n ) { mnDDLineCount = n; }
- sal_uInt16 GetDropDownLineCount() const { return mnDDLineCount; }
+ sal_uInt16 GetDropDownLineCount() const { return mnDDLineCount; }
- sal_uInt16 GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; }
+ sal_Int32 GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; }
virtual void Resize();
};
@@ -550,7 +550,7 @@ class ImplWin : public Control
{
private:
- sal_uInt16 mnItemPos; ///< because of UserDraw I have to know which item I draw
+ sal_Int32 mnItemPos; ///< because of UserDraw I have to know which item I draw
OUString maString;
Image maImage;
@@ -580,8 +580,8 @@ public:
virtual void LoseFocus();
virtual bool PreNotify( NotifyEvent& rNEvt );
- sal_uInt16 GetItemPos() const { return mnItemPos; }
- void SetItemPos( sal_uInt16 n ) { mnItemPos = n; }
+ sal_Int32 GetItemPos() const { return mnItemPos; }
+ void SetItemPos( sal_Int32 n ) { mnItemPos = n; }
const OUString& GetString() const { return maString; }
void SetString( const OUString& rStr ) { maString = rStr; }
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 6b806031d2b6..adb9988653af 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -33,13 +33,13 @@
#include <ilstbox.hxx>
#include <controldata.hxx>
-static void lcl_GetSelectedEntries( ::std::set< sal_uInt16 >& rSelectedPos, const OUString& rText, sal_Unicode cTokenSep, const ImplEntryList* pEntryList )
+static void lcl_GetSelectedEntries( ::std::set< sal_Int32 >& rSelectedPos, const OUString& rText, sal_Unicode cTokenSep, const ImplEntryList* pEntryList )
{
for (sal_Int32 n = comphelper::string::getTokenCount(rText, cTokenSep); n;)
{
OUString aToken = rText.getToken( --n, cTokenSep );
aToken = comphelper::string::strip(aToken, ' ');
- sal_uInt16 nPos = pEntryList->FindEntry( aToken );
+ sal_Int32 nPos = pEntryList->FindEntry( aToken );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
rSelectedPos.insert( nPos );
}
@@ -216,11 +216,11 @@ void ComboBox::ImplLoadRes( const ResId& rResId )
{
Edit::ImplLoadRes( rResId );
- sal_uLong nNumber = ReadLongRes();
+ sal_Int32 nNumber = ReadLongRes();
if( nNumber )
{
- for( sal_uInt16 i = 0; i < nNumber; i++ )
+ for( sal_Int32 i = 0; i < nNumber; i++ )
{
InsertEntry( ReadStringRes(), LISTBOX_APPEND );
}
@@ -298,7 +298,7 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
{
OUString aFullText = pEdit->GetText();
OUString aStartText = aFullText.copy( 0, (sal_Int32)aSel.Max() );
- sal_uInt16 nStart = mpImplLB->GetCurrentPos();
+ sal_Int32 nStart = mpImplLB->GetCurrentPos();
if ( nStart == LISTBOX_ENTRY_NOTFOUND )
nStart = 0;
@@ -312,7 +312,7 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
nStart = nStart ? nStart - 1 : mpImplLB->GetEntryList()->GetEntryCount()-1;
}
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if( ! mbMatchCase )
{
// Try match case insensitive from current position
@@ -359,7 +359,7 @@ IMPL_LINK_NOARG(ComboBox, ImplSelectHdl)
OUString aToken = aText.getToken( 0, mcMultiSep, nIndex );
sal_Int32 nTokenLen = aToken.getLength();
aToken = comphelper::string::strip(aToken, ' ');
- sal_uInt16 nP = mpImplLB->GetEntryList()->FindEntry( aToken );
+ sal_Int32 nP = mpImplLB->GetEntryList()->FindEntry( aToken );
if ( (nP != LISTBOX_ENTRY_NOTFOUND) && (!mpImplLB->GetEntryList()->IsEntryPosSelected( nP )) )
{
aText = aText.replaceAt( nPrevIndex, nTokenLen, "" );
@@ -376,12 +376,12 @@ IMPL_LINK_NOARG(ComboBox, ImplSelectHdl)
}
// attach missing entries
- ::std::set< sal_uInt16 > aSelInText;
+ ::std::set< sal_Int32 > aSelInText;
lcl_GetSelectedEntries( aSelInText, aText, mcMultiSep, mpImplLB->GetEntryList() );
- sal_uInt16 nSelectedEntries = mpImplLB->GetEntryList()->GetSelectEntryCount();
- for ( sal_uInt16 n = 0; n < nSelectedEntries; n++ )
+ sal_Int32 nSelectedEntries = mpImplLB->GetEntryList()->GetSelectEntryCount();
+ for ( sal_Int32 n = 0; n < nSelectedEntries; n++ )
{
- sal_uInt16 nP = mpImplLB->GetEntryList()->GetSelectEntryPos( n );
+ sal_Int32 nP = mpImplLB->GetEntryList()->GetSelectEntryPos( n );
if ( !aSelInText.count( nP ) )
{
if ( !aText.isEmpty() && (aText[ aText.getLength()-1 ] != mcMultiSep) )
@@ -448,7 +448,7 @@ IMPL_LINK( ComboBox, ImplSelectionChangedHdl, void*, n )
{
if ( !mpImplLB->IsTrackingSelect() )
{
- sal_uInt16 nChanged = (sal_uInt16)(sal_uLong)n;
+ sal_Int32 nChanged = (sal_Int32)(sal_uLong)n;
if ( !mpSubEdit->IsReadOnly() && mpImplLB->GetEntryList()->IsEntryPosSelected( nChanged ) )
mpSubEdit->SetText( mpImplLB->GetEntryList()->GetEntryText( nChanged ) );
}
@@ -809,7 +809,7 @@ void ComboBox::ImplUpdateFloatSelection()
if ( !IsMultiSelectionEnabled() )
{
OUString aSearchStr( mpSubEdit->GetText() );
- sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nSelect = LISTBOX_ENTRY_NOTFOUND;
bool bSelect = true;
if ( mpImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND )
@@ -843,27 +843,55 @@ void ComboBox::ImplUpdateFloatSelection()
}
else
{
- ::std::set< sal_uInt16 > aSelInText;
+ ::std::set< sal_Int32 > aSelInText;
lcl_GetSelectedEntries( aSelInText, mpSubEdit->GetText(), mcMultiSep, mpImplLB->GetEntryList() );
- for ( sal_uInt16 n = 0; n < mpImplLB->GetEntryList()->GetEntryCount(); n++ )
+ for ( sal_Int32 n = 0; n < mpImplLB->GetEntryList()->GetEntryCount(); n++ )
mpImplLB->SelectEntry( n, aSelInText.count( n ) );
}
mpImplLB->SetCallSelectionChangedHdl( true );
}
-sal_uInt16 ComboBox::InsertEntry(const OUString& rStr, sal_uInt16 const nPos)
+sal_Int32 ComboBox::InsertEntry(const OUString& rStr, sal_Int32 const nPos)
{
- sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
- nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ if (nPos < 0 || COMBOBOX_MAX_ENTRIES <= mpImplLB->GetEntryList()->GetEntryCount())
+ return COMBOBOX_ERROR;
+
+ sal_Int32 nRealPos;
+ if (nPos == COMBOBOX_APPEND)
+ nRealPos = nPos;
+ else
+ {
+ const sal_Int32 nMRUCount = mpImplLB->GetEntryList()->GetMRUCount();
+ if (nPos > COMBOBOX_MAX_ENTRIES - nMRUCount)
+ return COMBOBOX_ERROR;
+ nRealPos = nPos + nMRUCount;
+ }
+
+ nRealPos = mpImplLB->InsertEntry( nRealPos, rStr );
+ nRealPos -= mpImplLB->GetEntryList()->GetMRUCount();
CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
return nRealPos;
}
void ComboBox::InsertEntryWithImage(
- const OUString& rStr, const Image& rImage, sal_uInt16 const nPos)
+ const OUString& rStr, const Image& rImage, sal_Int32 const nPos)
{
- sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
- nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
+ if (nPos < 0 || COMBOBOX_MAX_ENTRIES <= mpImplLB->GetEntryList()->GetEntryCount())
+ return;
+
+ sal_Int32 nRealPos;
+ if (nPos == COMBOBOX_APPEND)
+ nRealPos = nPos;
+ else
+ {
+ const sal_Int32 nMRUCount = mpImplLB->GetEntryList()->GetMRUCount();
+ if (nPos > COMBOBOX_MAX_ENTRIES - nMRUCount)
+ return;
+ nRealPos = nPos + nMRUCount;
+ }
+
+ nRealPos = mpImplLB->InsertEntry( nRealPos, rStr, rImage );
+ nRealPos -= mpImplLB->GetEntryList()->GetMRUCount();
CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) );
}
@@ -872,9 +900,13 @@ void ComboBox::RemoveEntry( const OUString& rStr )
RemoveEntryAt(GetEntryPos(rStr));
}
-void ComboBox::RemoveEntryAt(sal_uInt16 const nPos)
+void ComboBox::RemoveEntryAt(sal_Int32 const nPos)
{
- mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
+ const sal_Int32 nMRUCount = mpImplLB->GetEntryList()->GetMRUCount();
+ if (nPos < 0 || nPos > COMBOBOX_MAX_ENTRIES - nMRUCount)
+ return;
+
+ mpImplLB->RemoveEntry( nPos + nMRUCount );
CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) );
}
@@ -884,27 +916,31 @@ void ComboBox::Clear()
CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(-1) );
}
-Image ComboBox::GetEntryImage( sal_uInt16 nPos ) const
+Image ComboBox::GetEntryImage( sal_Int32 nPos ) const
{
if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) )
return mpImplLB->GetEntryList()->GetEntryImage( nPos );
return Image();
}
-sal_uInt16 ComboBox::GetEntryPos( const OUString& rStr ) const
+sal_Int32 ComboBox::GetEntryPos( const OUString& rStr ) const
{
- sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
+ sal_Int32 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos -= mpImplLB->GetEntryList()->GetMRUCount();
return nPos;
}
-OUString ComboBox::GetEntry( sal_uInt16 nPos ) const
+OUString ComboBox::GetEntry( sal_Int32 nPos ) const
{
- return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
+ const sal_Int32 nMRUCount = mpImplLB->GetEntryList()->GetMRUCount();
+ if (nPos < 0 || nPos > COMBOBOX_MAX_ENTRIES - nMRUCount)
+ return OUString();
+
+ return mpImplLB->GetEntryList()->GetEntryText( nPos + nMRUCount );
}
-sal_uInt16 ComboBox::GetEntryCount() const
+sal_Int32 ComboBox::GetEntryCount() const
{
return mpImplLB->GetEntryList()->GetEntryCount() - mpImplLB->GetEntryList()->GetMRUCount();
}
@@ -1212,7 +1248,7 @@ void ComboBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDraw
mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
}
-void ComboBox::SetSeparatorPos( sal_uInt16 n )
+void ComboBox::SetSeparatorPos( sal_Int32 n )
{
mpImplLB->SetSeparatorPos( n );
}
@@ -1227,17 +1263,17 @@ OUString ComboBox::GetMRUEntries( sal_Unicode cSep ) const
return mpImplLB->GetMRUEntries( cSep );
}
-void ComboBox::SetMaxMRUCount( sal_uInt16 n )
+void ComboBox::SetMaxMRUCount( sal_Int32 n )
{
mpImplLB->SetMaxMRUCount( n );
}
-sal_uInt16 ComboBox::GetMaxMRUCount() const
+sal_Int32 ComboBox::GetMaxMRUCount() const
{
return mpImplLB->GetMaxMRUCount();
}
-sal_uInt16 ComboBox::GetMRUCount() const
+sal_Int32 ComboBox::GetMRUCount() const
{
return mpImplLB->GetEntryList()->GetMRUCount();
}
@@ -1247,19 +1283,19 @@ sal_uInt16 ComboBox::GetDisplayLineCount() const
return mpImplLB->GetDisplayLineCount();
}
-void ComboBox::SetEntryData( sal_uInt16 nPos, void* pNewData )
+void ComboBox::SetEntryData( sal_Int32 nPos, void* pNewData )
{
mpImplLB->SetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount(), pNewData );
}
-void* ComboBox::GetEntryData( sal_uInt16 nPos ) const
+void* ComboBox::GetEntryData( sal_Int32 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryData( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
-sal_uInt16 ComboBox::GetTopEntry() const
+sal_Int32 ComboBox::GetTopEntry() const
{
- sal_uInt16 nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND;
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = 0;
return nPos;
@@ -1289,29 +1325,29 @@ const Wallpaper& ComboBox::GetDisplayBackground() const
return rBack;
}
-sal_uInt16 ComboBox::GetSelectEntryCount() const
+sal_Int32 ComboBox::GetSelectEntryCount() const
{
return mpImplLB->GetEntryList()->GetSelectEntryCount();
}
-sal_uInt16 ComboBox::GetSelectEntryPos( sal_uInt16 nIndex ) const
+sal_Int32 ComboBox::GetSelectEntryPos( sal_Int32 nIndex ) const
{
- sal_uInt16 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
+ sal_Int32 nPos = mpImplLB->GetEntryList()->GetSelectEntryPos( nIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
if ( nPos < mpImplLB->GetEntryList()->GetMRUCount() )
nPos = mpImplLB->GetEntryList()->FindEntry( mpImplLB->GetEntryList()->GetEntryText( nPos ) );
- nPos = sal::static_int_cast<sal_uInt16>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
+ nPos = sal::static_int_cast<sal_Int32>(nPos - mpImplLB->GetEntryList()->GetMRUCount());
}
return nPos;
}
-bool ComboBox::IsEntryPosSelected( sal_uInt16 nPos ) const
+bool ComboBox::IsEntryPosSelected( sal_Int32 nPos ) const
{
return mpImplLB->GetEntryList()->IsEntryPosSelected( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
-void ComboBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect)
+void ComboBox::SelectEntryPos( sal_Int32 nPos, bool bSelect)
{
if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() )
mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect );
@@ -1323,7 +1359,7 @@ void ComboBox::SetNoSelection()
mpSubEdit->SetText( OUString() );
}
-Rectangle ComboBox::GetBoundingRectangle( sal_uInt16 nItem ) const
+Rectangle ComboBox::GetBoundingRectangle( sal_Int32 nItem ) const
{
Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem );
Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( (Window*)this );
@@ -1343,7 +1379,7 @@ void ComboBox::SetBorderStyle( sal_uInt16 nBorderStyle )
}
-long ComboBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const
+long ComboBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const
{
if( !HasLayoutData() )
FillLayoutData();
@@ -1363,7 +1399,7 @@ long ComboBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rPos ) const
aConvPoint = pMain->PixelToLogic( aConvPoint );
// try to find entry
- sal_uInt16 nEntry = pMain->GetEntryPosForPoint( aConvPoint );
+ sal_Int32 nEntry = pMain->GetEntryPosForPoint( aConvPoint );
if( nEntry == LISTBOX_ENTRY_NOTFOUND )
nIndex = -1;
else
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index ffe59c8794bd..ad67f9ffc047 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -273,8 +273,8 @@ static void ImplUpdateSeparators( const OUString& rOldDecSep, const OUString& rN
if( pCombo )
{
// update box entries
- sal_uInt16 nEntryCount = pCombo->GetEntryCount();
- for ( sal_uInt16 i=0; i < nEntryCount; i++ )
+ sal_Int32 nEntryCount = pCombo->GetEntryCount();
+ for ( sal_Int32 i=0; i < nEntryCount; i++ )
{
aText = pCombo->GetEntry( i );
void* pEntryData = pCombo->GetEntryData( i );
@@ -981,8 +981,8 @@ void NumericBox::ReformatAll()
sal_Int64 nValue;
OUString aStr;
SetUpdateMode( false );
- sal_uInt16 nEntryCount = GetEntryCount();
- for ( sal_uInt16 i=0; i < nEntryCount; i++ )
+ sal_Int32 nEntryCount = GetEntryCount();
+ for ( sal_Int32 i=0; i < nEntryCount; i++ )
{
ImplNumericReformat( GetEntry( i ), nValue, aStr );
RemoveEntryAt(i);
@@ -992,7 +992,7 @@ void NumericBox::ReformatAll()
SetUpdateMode( true );
}
-void NumericBox::InsertValue( sal_Int64 nValue, sal_uInt16 nPos )
+void NumericBox::InsertValue( sal_Int64 nValue, sal_Int32 nPos )
{
ComboBox::InsertEntry( CreateFieldText( nValue ), nPos );
}
@@ -1828,8 +1828,8 @@ void MetricBox::ReformatAll()
double nValue;
OUString aStr;
SetUpdateMode( false );
- sal_uInt16 nEntryCount = GetEntryCount();
- for ( sal_uInt16 i=0; i < nEntryCount; i++ )
+ sal_Int32 nEntryCount = GetEntryCount();
+ for ( sal_Int32 i=0; i < nEntryCount; i++ )
{
ImplMetricReformat( GetEntry( i ), nValue, aStr );
RemoveEntryAt(i);
@@ -1844,7 +1844,7 @@ void MetricBox::CustomConvert()
maCustomConvertLink.Call( this );
}
-void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_uInt16 nPos )
+void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_Int32 nPos )
{
// convert to previously configured units
nValue = MetricField::ConvertValue( nValue, mnBaseValue, GetDecimalDigits(),
@@ -1852,7 +1852,7 @@ void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_uInt16 nPo
ComboBox::InsertEntry( CreateFieldText( nValue ), nPos );
}
-sal_Int64 MetricBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const
+sal_Int64 MetricBox::GetValue( sal_Int32 nPos, FieldUnit eOutUnit ) const
{
double nValue = 0;
ImplMetricGetValue( ComboBox::GetEntry( nPos ), nValue, mnBaseValue,
@@ -1865,7 +1865,7 @@ sal_Int64 MetricBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const
return nRetValue;
}
-sal_uInt16 MetricBox::GetValuePos( sal_Int64 nValue, FieldUnit eInUnit ) const
+sal_Int32 MetricBox::GetValuePos( sal_Int64 nValue, FieldUnit eInUnit ) const
{
// convert to previously configured units
nValue = MetricField::ConvertValue( nValue, mnBaseValue, GetDecimalDigits(),
@@ -2143,8 +2143,8 @@ void CurrencyBox::ReformatAll()
{
OUString aStr;
SetUpdateMode( false );
- sal_uInt16 nEntryCount = GetEntryCount();
- for ( sal_uInt16 i=0; i < nEntryCount; i++ )
+ sal_Int32 nEntryCount = GetEntryCount();
+ for ( sal_Int32 i=0; i < nEntryCount; i++ )
{
ImplCurrencyReformat( GetEntry( i ), aStr );
RemoveEntryAt(i);
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 0c7aef3e91d4..d57c54f0d2f3 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -41,6 +41,8 @@
#include <comphelper/string.hxx>
#include <comphelper/processfactory.hxx>
+#include <limits>
+
#define MULTILINE_ENTRY_DRAW_FLAGS ( TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE | TEXT_DRAW_VCENTER )
using namespace ::com::sun::star;
@@ -111,9 +113,9 @@ void ImplEntryList::Clear()
maEntries.clear();
}
-void ImplEntryList::SelectEntry( sal_uInt16 nPos, bool bSelect )
+void ImplEntryList::SelectEntry( sal_Int32 nPos, bool bSelect )
{
- if (nPos < maEntries.size())
+ if (0 <= nPos && static_cast<size_t>(nPos) < maEntries.size())
{
boost::ptr_vector<ImplEntryType>::iterator iter = maEntries.begin()+nPos;
@@ -141,16 +143,19 @@ namespace
};
}
-sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, bool bSort )
+sal_Int32 ImplEntryList::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry, bool bSort )
{
+ if (nPos < 0 || LISTBOX_MAX_ENTRIES <= maEntries.size())
+ return LISTBOX_ERROR;
+
if ( !!pNewEntry->maImage )
mnImages++;
- sal_uInt16 insPos = 0;
+ sal_Int32 insPos = 0;
if ( !bSort || maEntries.empty())
{
- if (nPos < maEntries.size())
+ if (0 <= nPos && static_cast<size_t>(nPos) < maEntries.size())
{
insPos = nPos;
maEntries.insert( maEntries.begin() + nPos, pNewEntry );
@@ -170,7 +175,7 @@ sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry
nHigh = maEntries.size();
- ImplEntryType* pTemp = GetEntry( (sal_uInt16)(nHigh-1) );
+ ImplEntryType* pTemp = GetEntry( (sal_Int32)(nHigh-1) );
try
{
@@ -185,7 +190,7 @@ sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry
else
{
nLow = mnMRUCount;
- pTemp = (ImplEntryType*)GetEntry( (sal_uInt16)nLow );
+ pTemp = (ImplEntryType*)GetEntry( (sal_Int32)nLow );
nComp = rSorter.compare(rStr, pTemp->maStr);
if ( nComp <= 0 )
@@ -239,9 +244,9 @@ sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry
return insPos;
}
-void ImplEntryList::RemoveEntry( sal_uInt16 nPos )
+void ImplEntryList::RemoveEntry( sal_Int32 nPos )
{
- if (nPos < maEntries.size())
+ if (0 <= nPos && static_cast<size_t>(nPos) < maEntries.size())
{
boost::ptr_vector<ImplEntryType>::iterator iter = maEntries.begin()+ nPos;
@@ -252,10 +257,10 @@ void ImplEntryList::RemoveEntry( sal_uInt16 nPos )
}
}
-sal_uInt16 ImplEntryList::FindEntry( const OUString& rString, bool bSearchMRUArea ) const
+sal_Int32 ImplEntryList::FindEntry( const OUString& rString, bool bSearchMRUArea ) const
{
- sal_uInt16 nEntries = maEntries.size();
- for ( sal_uInt16 n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ )
+ sal_Int32 nEntries = maEntries.size();
+ for ( sal_Int32 n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ )
{
OUString aComp( vcl::I18nHelper::filterFormattingChars( maEntries[n].maStr ) );
if ( aComp == rString )
@@ -264,15 +269,15 @@ sal_uInt16 ImplEntryList::FindEntry( const OUString& rString, bool bSearchMRUAre
return LISTBOX_ENTRY_NOTFOUND;
}
-sal_uInt16 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_uInt16 nStart, bool bForward, bool bLazy ) const
+sal_Int32 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_Int32 nStart, bool bForward, bool bLazy ) const
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
- sal_uInt16 nEntryCount = GetEntryCount();
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nEntryCount = GetEntryCount();
if ( !bForward )
nStart++; // decrements right away
const vcl::I18nHelper& rI18nHelper = mpWindow->GetSettings().GetLocaleI18nHelper();
- for ( sal_uInt16 n = nStart; bForward ? n < nEntryCount : n != 0; )
+ for ( sal_Int32 n = nStart; bForward ? n < nEntryCount : n != 0; )
{
if ( !bForward )
n--;
@@ -300,10 +305,10 @@ sal_uInt16 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_uInt16 nS
return nPos;
}
-sal_uInt16 ImplEntryList::FindEntry( const void* pData ) const
+sal_Int32 ImplEntryList::FindEntry( const void* pData ) const
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
- for ( sal_uInt16 n = GetEntryCount(); n; )
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
+ for ( sal_Int32 n = GetEntryCount(); n; )
{
ImplEntryType* pImplEntry = GetEntry( --n );
if ( pImplEntry->mpUserData == pData )
@@ -315,12 +320,12 @@ sal_uInt16 ImplEntryList::FindEntry( const void* pData ) const
return nPos;
}
-long ImplEntryList::GetAddedHeight( sal_uInt16 i_nEndIndex, sal_uInt16 i_nBeginIndex, long i_nBeginHeight ) const
+long ImplEntryList::GetAddedHeight( sal_Int32 i_nEndIndex, sal_Int32 i_nBeginIndex, long i_nBeginHeight ) const
{
long nHeight = i_nBeginHeight;
- sal_uInt16 nStart = i_nEndIndex > i_nBeginIndex ? i_nBeginIndex : i_nEndIndex;
- sal_uInt16 nStop = i_nEndIndex > i_nBeginIndex ? i_nEndIndex : i_nBeginIndex;
- sal_uInt16 nEntryCount = GetEntryCount();
+ sal_Int32 nStart = i_nEndIndex > i_nBeginIndex ? i_nBeginIndex : i_nEndIndex;
+ sal_Int32 nStop = i_nEndIndex > i_nBeginIndex ? i_nEndIndex : i_nBeginIndex;
+ sal_Int32 nEntryCount = GetEntryCount();
if( nStop != LISTBOX_ENTRY_NOTFOUND && nEntryCount != 0 )
{
// sanity check
@@ -329,10 +334,16 @@ long ImplEntryList::GetAddedHeight( sal_uInt16 i_nEndIndex, sal_uInt16 i_nBeginI
if( nStart > nEntryCount-1 )
nStart = nEntryCount-1;
- sal_uInt16 nIndex = nStart;
+ sal_Int32 nIndex = nStart;
while( nIndex != LISTBOX_ENTRY_NOTFOUND && nIndex < nStop )
{
- nHeight += GetEntryPtr( nIndex )-> mnHeight;
+ long nPosHeight = GetEntryPtr( nIndex )->mnHeight;
+ if (nHeight > ::std::numeric_limits<long>::max() - nPosHeight)
+ {
+ SAL_WARN( "vcl", "ImplEntryList::GetAddedHeight: truncated");
+ break;
+ }
+ nHeight += nPosHeight;
nIndex++;
}
}
@@ -341,13 +352,13 @@ long ImplEntryList::GetAddedHeight( sal_uInt16 i_nEndIndex, sal_uInt16 i_nBeginI
return i_nEndIndex > i_nBeginIndex ? nHeight : -nHeight;
}
-long ImplEntryList::GetEntryHeight( sal_uInt16 nPos ) const
+long ImplEntryList::GetEntryHeight( sal_Int32 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? pImplEntry->mnHeight : 0;
}
-OUString ImplEntryList::GetEntryText( sal_uInt16 nPos ) const
+OUString ImplEntryList::GetEntryText( sal_Int32 nPos ) const
{
OUString aEntryText;
ImplEntryType* pImplEntry = GetEntry( nPos );
@@ -356,7 +367,7 @@ OUString ImplEntryList::GetEntryText( sal_uInt16 nPos ) const
return aEntryText;
}
-bool ImplEntryList::HasEntryImage( sal_uInt16 nPos ) const
+bool ImplEntryList::HasEntryImage( sal_Int32 nPos ) const
{
bool bImage = false;
ImplEntryType* pImplEntry = GetEntry( nPos );
@@ -365,7 +376,7 @@ bool ImplEntryList::HasEntryImage( sal_uInt16 nPos ) const
return bImage;
}
-Image ImplEntryList::GetEntryImage( sal_uInt16 nPos ) const
+Image ImplEntryList::GetEntryImage( sal_Int32 nPos ) const
{
Image aImage;
ImplEntryType* pImplEntry = GetEntry( nPos );
@@ -374,36 +385,36 @@ Image ImplEntryList::GetEntryImage( sal_uInt16 nPos ) const
return aImage;
}
-void ImplEntryList::SetEntryData( sal_uInt16 nPos, void* pNewData )
+void ImplEntryList::SetEntryData( sal_Int32 nPos, void* pNewData )
{
ImplEntryType* pImplEntry = GetEntry( nPos );
if ( pImplEntry )
pImplEntry->mpUserData = pNewData;
}
-void* ImplEntryList::GetEntryData( sal_uInt16 nPos ) const
+void* ImplEntryList::GetEntryData( sal_Int32 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? pImplEntry->mpUserData : NULL;
}
-void ImplEntryList::SetEntryFlags( sal_uInt16 nPos, long nFlags )
+void ImplEntryList::SetEntryFlags( sal_Int32 nPos, long nFlags )
{
ImplEntryType* pImplEntry = GetEntry( nPos );
if ( pImplEntry )
pImplEntry->mnFlags = nFlags;
}
-long ImplEntryList::GetEntryFlags( sal_uInt16 nPos ) const
+long ImplEntryList::GetEntryFlags( sal_Int32 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? pImplEntry->mnFlags : 0;
}
-sal_uInt16 ImplEntryList::GetSelectEntryCount() const
+sal_Int32 ImplEntryList::GetSelectEntryCount() const
{
- sal_uInt16 nSelCount = 0;
- for ( sal_uInt16 n = GetEntryCount(); n; )
+ sal_Int32 nSelCount = 0;
+ for ( sal_Int32 n = GetEntryCount(); n; )
{
ImplEntryType* pImplEntry = GetEntry( --n );
if ( pImplEntry->mbIsSelected )
@@ -412,18 +423,18 @@ sal_uInt16 ImplEntryList::GetSelectEntryCount() const
return nSelCount;
}
-OUString ImplEntryList::GetSelectEntry( sal_uInt16 nIndex ) const
+OUString ImplEntryList::GetSelectEntry( sal_Int32 nIndex ) const
{
return GetEntryText( GetSelectEntryPos( nIndex ) );
}
-sal_uInt16 ImplEntryList::GetSelectEntryPos( sal_uInt16 nIndex ) const
+sal_Int32 ImplEntryList::GetSelectEntryPos( sal_Int32 nIndex ) const
{
- sal_uInt16 nSelEntryPos = LISTBOX_ENTRY_NOTFOUND;
- sal_uInt16 nSel = 0;
- sal_uInt16 nEntryCount = GetEntryCount();
+ sal_Int32 nSelEntryPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nSel = 0;
+ sal_Int32 nEntryCount = GetEntryCount();
- for ( sal_uInt16 n = 0; n < nEntryCount; n++ )
+ for ( sal_Int32 n = 0; n < nEntryCount; n++ )
{
ImplEntryType* pImplEntry = GetEntry( n );
if ( pImplEntry->mbIsSelected )
@@ -440,19 +451,19 @@ sal_uInt16 ImplEntryList::GetSelectEntryPos( sal_uInt16 nIndex ) const
return nSelEntryPos;
}
-bool ImplEntryList::IsEntryPosSelected( sal_uInt16 nIndex ) const
+bool ImplEntryList::IsEntryPosSelected( sal_Int32 nIndex ) const
{
ImplEntryType* pImplEntry = GetEntry( nIndex );
return pImplEntry ? pImplEntry->mbIsSelected : false;
}
-bool ImplEntryList::IsEntrySelectable( sal_uInt16 nPos ) const
+bool ImplEntryList::IsEntrySelectable( sal_Int32 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
return pImplEntry ? ((pImplEntry->mnFlags & LISTBOX_ENTRY_FLAG_DISABLE_SELECTION) == 0) : true;
}
-sal_uInt16 ImplEntryList::FindFirstSelectable( sal_uInt16 nPos, bool bForward /* = true */ )
+sal_Int32 ImplEntryList::FindFirstSelectable( sal_Int32 nPos, bool bForward /* = true */ )
{
if( IsEntrySelectable( nPos ) )
return nPos;
@@ -552,7 +563,7 @@ void ImplListBoxWindow::ImplCalcMetrics()
if ( maUserItemSize.Width() > mnMaxWidth )
mnMaxWidth= (sal_uInt16) maUserItemSize.Width();
- for ( sal_uInt16 n = mpEntryList->GetEntryCount(); n; )
+ for ( sal_Int32 n = mpEntryList->GetEntryCount(); n; )
{
ImplEntryType* pEntry = mpEntryList->GetMutableEntryPtr( --n );
ImplUpdateEntryMetrics( *pEntry );
@@ -696,10 +707,10 @@ void ImplListBoxWindow::ImplCallSelect()
if ( !IsTravelSelect() && GetEntryList()->GetMaxMRUCount() )
{
// Insert the selected entry as MRU, if not already first MRU
- sal_uInt16 nSelected = GetEntryList()->GetSelectEntryPos( 0 );
- sal_uInt16 nMRUCount = GetEntryList()->GetMRUCount();
+ sal_Int32 nSelected = GetEntryList()->GetSelectEntryPos( 0 );
+ sal_Int32 nMRUCount = GetEntryList()->GetMRUCount();
OUString aSelected = GetEntryList()->GetEntryText( nSelected );
- sal_uInt16 nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, true );
+ sal_Int32 nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, true );
if ( nFirstMatchingEntryPos || !nMRUCount )
{
bool bSelectNewEntry = false;
@@ -732,10 +743,13 @@ void ImplListBoxWindow::ImplCallSelect()
mbSelectionChanged = false;
}
-sal_uInt16 ImplListBoxWindow::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry )
+sal_Int32 ImplListBoxWindow::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry )
{
+ if (nPos < 0 || LISTBOX_MAX_ENTRIES <= mpEntryList->GetEntryCount())
+ return LISTBOX_ERROR;
+
ImplClearLayoutData();
- sal_uInt16 nNewPos = mpEntryList->InsertEntry( nPos, pNewEntry, mbSort );
+ sal_Int32 nNewPos = mpEntryList->InsertEntry( nPos, pNewEntry, mbSort );
if( (GetStyle() & WB_WORDBREA