[Libreoffice-commits] .: sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Thu May 5 05:28:24 PDT 2011


 sc/source/ui/unoobj/datauno.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 30ac1017c2c7ac9b6aa355f51fd85ab16fe48541
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu May 5 14:25:42 2011 +0200

    check for less equal, not greater equal

diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 0138412..f8d123a 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;


More information about the Libreoffice-commits mailing list