[Libreoffice-commits] .: 2 commits - dbaccess/source wizards/com

Lionel Elie Mamane lmamane at kemper.freedesktop.org
Thu Aug 2 03:06:03 PDT 2012


 dbaccess/source/core/api/RowSetCache.cxx         |    2 +-
 wizards/com/sun/star/wizards/db/CommandName.java |   11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 94809ee4bf9b98769751aed4d1390ad12bcedc0a
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Aug 2 11:58:24 2012 +0200

    handle "no schema" case
    
    This is especially the case when the source is a (saved) query.
    Fixes: Report Builder wizard "Finish" button does nothing -> cannot create report through wizard
    
    Change-Id: I266772035435a7c623beb0c0f66fc88e6316be8e

diff --git a/wizards/com/sun/star/wizards/db/CommandName.java b/wizards/com/sun/star/wizards/db/CommandName.java
index 91b25e3..2621b96 100644
--- a/wizards/com/sun/star/wizards/db/CommandName.java
+++ b/wizards/com/sun/star/wizards/db/CommandName.java
@@ -108,8 +108,15 @@ public class CommandName
                     String[] NameList;
                     NameList = new String[0];
                     NameList = JavaTools.ArrayoutofString(_DisplayName, ".");
-                    SchemaName = NameList[0];
-                    TableName = NameList[1]; // TODO Was ist mit diesem Fall: CatalogSep = "." und CatalogName = PropertyNames.EMPTY_STRING
+                    if (NameList.length > 1)
+                    {
+                        SchemaName = NameList[0];
+                        TableName = NameList[1];
+                    }
+                    else
+                    {
+                        TableName = _DisplayName;
+                    }
                 }
                 else
                 {
commit 5b85f6c1ef24b7189a78b64ebafd1679f090fd2b
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Aug 2 11:58:55 2012 +0200

    nPos is 1-based, so allowed to be equal to row count
    
    Change-Id: Idb37cd23a58816bd16c725fda49a2f9875450e79

diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 549b00d..f72f4ff 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -1042,7 +1042,7 @@ sal_Bool ORowSetCache::moveWindow()
                 else if(!m_bRowCountFinal)
                     m_nRowCount = std::max(nPos+1, m_nRowCount); //+1 because we successfully moved to row after nPos
                 else
-                    OSL_ENSURE(m_nRowCount > nPos, "Final m_nRowCount is smaller than row I moved to!");
+                    OSL_ENSURE(m_nRowCount >= nPos, "Final m_nRowCount is smaller than row I moved to!");
             }
             else
             {   // the end was reached before or at end() so we can set the start before or at nNewStartPos


More information about the Libreoffice-commits mailing list