summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-19 20:59:01 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-19 23:27:17 +0100
commit95c65a363fa4cd0cbbfa93d53e10d86b3fb275f2 (patch)
treeb0d4748ae760b83a90305062e7acb9db1ae8c5c1
parent52faa80a81a69ef2c1aca72653e688c6616d395f (diff)
check for negative sheet number here too, fdo#47503
-rw-r--r--sc/source/core/data/documen5.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 3cdade0807b2..998f330a3cf1 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -639,7 +639,7 @@ void ScDocument::SetChartRangeList( const rtl::OUString& rChartName,
bool ScDocument::HasData( SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ if ( VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->HasData( nCol, nRow );
else
return false;