summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-01-22 13:42:13 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-01-27 14:09:15 +0000
commit1f11b3cc091e7d5d5719e1309fb810da3f25242a (patch)
tree7913b7fa22db06a92a456b0e50390b8361735b08
parentResolves: tdf#81124 crash on setting autofilter on column with no content (diff)
downloadcore-1f11b3cc091e7d5d5719e1309fb810da3f25242a.tar.gz
core-1f11b3cc091e7d5d5719e1309fb810da3f25242a.zip
fdo#88475 RowSetBase: reposition cache before interrogating it
This partially reverts: commit d20232a77565f46fedc0b556f4d50addff4d3559 Author: Lionel Elie Mamane <lionel@mamane.lu> Date: Thu Dec 6 13:22:06 2012 +0100 Don't force refresh when higher up code did not request it Change-Id: I0f415c96fc05c1d776d14885751aef020c42f4ae which did not take into account that the cache is shared with the clones. This is not a cherry-pick from master, but a more conservative version of commit d7c9a1d9d65fe8b1a56c5c280d2ca6640a549d2f. Change-Id: I1fa5c3169806760d35dd07e1fc1b8d5522dd3641 Reviewed-on: https://gerrit.libreoffice.org/14105 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 5d9438e16fa7..47342a2a2a3e 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -657,6 +657,7 @@ sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException,
if ( impl_rowDeleted() )
return ( m_nDeletedPosition == 1 );
+ positionCache( MOVE_NONE_REFRESH_ONLY );
bool bIsFirst = m_pCache->isFirst();
SAL_INFO("dbaccess", "ORowSetBase::isFirst() = " << bIsFirst << " Clone = " << m_bClone);
@@ -686,6 +687,7 @@ sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException,
return ( m_nDeletedPosition == impl_getRowCount() );
}
+ positionCache( MOVE_NONE_REFRESH_ONLY );
bool bIsLast = m_pCache->isLast();
SAL_INFO("dbaccess", "ORowSetBase::isLast() = " << bIsLast << " Clone = " << m_bClone);