Kaydet (Commit) a7db10e8 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

INTEGRATION: CWS mt802 (1.61.14); FILE MERGED

2004/01/27 11:42:13 mt 1.61.14.1: #i22558# addItems: Check for negative index
üst 10a3bacf
......@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrols.cxx,v $
*
* $Revision: 1.61 $
* $Revision: 1.62 $
*
* last change: $Author: kz $ $Date: 2003-12-11 11:59:33 $
* last change: $Author: hr $ $Date: 2004-02-04 11:11:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -1901,7 +1901,7 @@ void UnoListBoxControl::addItems( const uno::Sequence< ::rtl::OUString>& aItems,
::rtl::OUString* pNewData = aNewSeq.getArray();
::rtl::OUString* pOldData = aSeq.getArray();
if ( nPos > nOldLen )
if ( ( nPos < 0 ) || ( nPos > nOldLen ) )
nPos = (sal_uInt16) nOldLen;
sal_uInt16 n;
......@@ -2290,7 +2290,7 @@ void UnoComboBoxControl::addItems( const uno::Sequence< ::rtl::OUString>& aItems
::rtl::OUString* pNewData = aNewSeq.getArray();
const ::rtl::OUString* pOldData = aSeq.getConstArray();
if ( nPos > nOldLen )
if ( ( nPos < 0 ) || ( nPos > nOldLen ) )
nPos = (sal_uInt16) nOldLen;
sal_uInt16 n;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment