diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-13 09:00:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-13 09:00:25 +0100 |
commit | f3bf85b8cacb0bf43e646f3c67f704cc89b72323 (patch) | |
tree | ceaa7439a412a3b7d4c9eaed8d7b97f57d7122e3 /sw | |
parent | 348cc2ce1e932f0fcaf90f9cf4d6dc9594f3f8a2 (diff) |
check for negative numbers too
Change-Id: I4a798a4f60d0064abd7fc4e689e4c80dff8459ff
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/vba/vbatablehelper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 65f02fdb9710..8a960548ce6b 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -140,12 +140,12 @@ SwTableBox* SwVbaTableHelper::GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw { SwTableLines& rLines = pTable->GetTabLines(); sal_Int32 nRowCount = rLines.size(); - if (nRow >= nRowCount) + if (nRow < 0 || nRow >= nRowCount) throw uno::RuntimeException(); SwTableLine* pLine = rLines[ nRow ]; sal_Int32 nColCount = pLine->GetTabBoxes().size(); - if (nCol >= nColCount) + if (nCol < 0 || nCol >= nColCount) throw uno::RuntimeException(); SwTableBox* pStart = pLine->GetTabBoxes()[ nCol ]; |