summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-05-05 14:25:42 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-05-05 14:25:42 +0200
commit30ac1017c2c7ac9b6aa355f51fd85ab16fe48541 (patch)
tree4a395dce2eb153ad808db1c3ee496d9484401d31 /sc/source/ui/unoobj
parent76743b2e555bc59b75e6c3d4cf0ef7f27b824630 (diff)
check for less equal, not greater equal
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r--sc/source/ui/unoobj/datauno.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 0138412ba..f8d123ae8 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -2401,7 +2401,7 @@ void ScUnnamedDatabaseRangesObj::setByTable( const table::CellRangeAddress& aRan
bool bDone = false;
if (pDocShell)
{
- if ( pDocShell->GetDocument()->GetTableCount() >= aRange.Sheet )
+ if ( pDocShell->GetDocument()->GetTableCount() <= aRange.Sheet )
throw lang::IndexOutOfBoundsException();
ScDBDocFunc aFunc(*pDocShell);
@@ -2422,7 +2422,7 @@ uno::Any ScUnnamedDatabaseRangesObj::getByTable( const sal_Int32 nTab )
SolarMutexGuard aGuard;
if (pDocShell)
{
- if ( pDocShell->GetDocument()->GetTableCount() >= nTab )
+ if ( pDocShell->GetDocument()->GetTableCount() <= nTab )
throw lang::IndexOutOfBoundsException();
uno::Reference<sheet::XDatabaseRange> xRange( new ScDatabaseRangeObj(pDocShell, (SCTAB) nTab) );
if (xRange.is())
@@ -2441,7 +2441,7 @@ sal_Bool ScUnnamedDatabaseRangesObj::hasByTable( sal_Int32 nTab )
SolarMutexGuard aGuard;
if (pDocShell)
{
- if (pDocShell->GetDocument()->GetTableCount() >= nTab)
+ if (pDocShell->GetDocument()->GetTableCount() <= nTab)
throw lang::IndexOutOfBoundsException();
if (pDocShell->GetDocument()->GetAnonymousDBData((SCTAB) nTab))
return true;