summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-13 09:00:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-13 09:00:25 +0100
commitf3bf85b8cacb0bf43e646f3c67f704cc89b72323 (patch)
treeceaa7439a412a3b7d4c9eaed8d7b97f57d7122e3 /sw
parent348cc2ce1e932f0fcaf90f9cf4d6dc9594f3f8a2 (diff)
check for negative numbers too
Change-Id: I4a798a4f60d0064abd7fc4e689e4c80dff8459ff
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/vba/vbatablehelper.cxx4
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 ];