Avoid seeking a cursor to where it already is
Change-Id: I817aef57f3e028d77cf13f8cca1ecc7afcea9725
This commit is contained in:
@@ -2447,10 +2447,20 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute)
|
||||
if (!bSuccess)
|
||||
{
|
||||
if (bAbsolute || nSteps > 0)
|
||||
{
|
||||
if (m_pSeekCursor->isLast())
|
||||
bSuccess=sal_True;
|
||||
else
|
||||
bSuccess = m_pSeekCursor->last();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_pSeekCursor->isFirst())
|
||||
bSuccess = sal_True;
|
||||
else
|
||||
bSuccess = m_pSeekCursor->first();
|
||||
}
|
||||
}
|
||||
|
||||
if (bSuccess)
|
||||
m_nSeekPos = m_pSeekCursor->getRow() - 1;
|
||||
|
Reference in New Issue
Block a user