diff options
Diffstat (limited to 'svx/source/fmcomp/gridcell.cxx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index fd140a8c28e9..dbafe5270166 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -4170,7 +4170,8 @@ sal_Int16 SAL_CALL FmXListBoxCell::getSelectedItemPos() throw( RuntimeException, { UpdateFromColumn(); sal_Int32 nPos = m_pBox->GetSelectEntryPos(); - assert(nPos < SHRT_MAX); + if (nPos > SHRT_MAX || nPos < SHRT_MIN) + throw std::out_of_range("awt::XListBox::getSelectedItemPos can only return a short"); return nPos; } return 0; |