basic/source/sbx/sbxvalue.cxx | 15 +++++---------- dbaccess/source/core/api/RowSetCache.cxx | 2 -- 2 files changed, 5 insertions(+), 12 deletions(-)
New commits: commit fd29a786e3e94710d1e79c0a6c510491ef461302 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Thu Jan 19 19:29:36 2012 +0100 fdo#44025: repair dbaccess::ORowSetCache::isLast() after matrix (re)fill After filling matrix, *do* check if we hit the last row and update m_nRowCount accordingly. Else, a subsequent isLast() will return true on the last row of the prefetch window, even if it is not the last row of the data. Thus the algorithm: while ( ! pResultSet->isLast() ) { //do stuff pResultSet->next() } will stop too soon, which is exactly the symptom in fdo#44025. Signed-off-by: Michael Stahl <mst...@redhat.com> diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 49f6368..272d260 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -803,7 +803,6 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos } // we have to read one row forward to ensure that we know when we are on last row // but only when we don't know it already - /* if(!m_bRowCountFinal) { if(!m_pCacheSet->next()) @@ -816,7 +815,6 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos m_nRowCount = std::max(i,m_nRowCount); } - */ return bCheck; } commit 7c18b784ce1e6a5e71e978cd3c896b2ddc73d649 Author: Noel Power <noel.po...@novell.com> Date: Fri Jan 20 17:13:41 2012 +0000 restore special DATE handling code for SbxValue::Compute fdo#44385 restore code that seemed to be erroneously moved as part of the currency enhancement feature Signed-off-by: Michael Stahl <mst...@redhat.com> diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 2c36ce5..ed413d4 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -1264,16 +1264,6 @@ Lbl_OpIsDouble: else aL.nDouble /= aR.nDouble; break; case SbxPLUS: aL.nDouble += aR.nDouble; break; -#if 0 - // See 'break' on preceding line... this - // is unreachable code. Do not delete this - // #if 0 block unless you know for sure - // the 'break' above is intentional. - - // #45465 Date needs with "+" a special handling: forces date type - if( GetType() == SbxDATE || rOp.GetType() == SbxDATE ) - aL.eType = SbxDATE; -#endif case SbxMINUS: aL.nDouble -= aR.nDouble; break; case SbxNEG: @@ -1282,6 +1272,11 @@ Lbl_OpIsDouble: SetError( SbxERR_NOTIMP ); } + // #45465 Date needs with "+" a special handling: forces date type + + if( eOp == SbxPLUS && (GetType() == SbxDATE || rOp.GetType() == SbxDATE ) ) + aL.eType = SbxDATE; + } } _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits