[Libreoffice-commits] .: Branch 'libreoffice-3-6' - dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 10 03:34:47 PDT 2012


 dbaccess/source/core/api/KeySet.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit f80d0c180c7e98caf211059f54873001f9e0a64e
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Aug 31 18:14:59 2012 +0200

    fdo#53557: use metadata's idea of column count to allocate a row
    
    m_pColumnNames contains only the columns that come straight from a table, not calculated columns
    
    Change-Id: I2706790e8c1447d1c4e144bbdef773deeca3e2e8
    Reviewed-on: https://gerrit.libreoffice.org/522
    Reviewed-by: Michael Meeks <michael.meeks at suse.com>
    Tested-by: Michael Meeks <michael.meeks at suse.com>

diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index d9f4133..2797af9 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1441,11 +1441,12 @@ sal_Bool OKeySet::fetchRow()
         bRet = m_xDriverSet->next();
     if ( bRet )
     {
+        const int cc = m_xSetMetaData->getColumnCount();
+
         ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >((*m_pKeyColumnNames).size() + m_pForeignColumnNames->size());
-        ORowSetRow aFullRow = new connectivity::ORowVector< ORowSetValue >(m_pColumnNames->size());
+        ORowSetRow aFullRow = new connectivity::ORowVector< ORowSetValue >(cc);
 
         // Fetch the columns only once and in order, to satisfy restrictive backends such as ODBC
-        const int cc = m_xSetMetaData->getColumnCount();
         connectivity::ORowVector< ORowSetValue >::Vector::iterator aFRIter = aFullRow->get().begin();
         // Column 0 is reserved for the bookmark; unused here.
         ++aFRIter;


More information about the Libreoffice-commits mailing list