Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3962
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/62/3962/1
fdo#47951 flat text table: update m_nRowPos when moving by bookmark
Change-Id: Iac154020b4b6309f92b1f68fa5bf79611dfcc91b
---
M connectivity/source/drivers/flat/ETable.cxx
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/connectivity/source/drivers/flat/ETable.cxx
b/connectivity/source/drivers/flat/ETable.cxx
index b7f61ed..fc1124e 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -873,15 +873,29 @@
break;
case IResultSetHelper::BOOKMARK:
{
+ m_nRowPos = 0;
TRowPositionsInFile::const_iterator aFind = m_aFilePosToEndLinePos.find(nOffset);
m_bNeedToReadLine = aFind != m_aFilePosToEndLinePos.end();
if ( m_bNeedToReadLine )
{
m_nFilePos = aFind->first;
nCurPos = aFind->second;
+ for(::std::map<sal_Int32, TRowPositionsInFile::iterator>::const_iterator p =
m_aRowPosToFilePos.begin();
+ p != m_aRowPosToFilePos.end();
+ ++p)
+ {
+ assert(p->second->first <= nOffset);
+ if(p->second->first == nOffset)
+ {
+ m_nRowPos = p->first;
+ break;
+ }
+ }
+ assert(m_nRowPos > 0);
}
else
{
+ assert(false);
m_nFilePos = nOffset;
m_pFileStream->Seek(nOffset);
if (m_pFileStream->IsEof() || !readLine(nCurPos) )
--
To view, visit https://gerrit.libreoffice.org/3962
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac154020b4b6309f92b1f68fa5bf79611dfcc91b
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Lionel Elie Mamane <lionel@mamane.lu>
Context
- [PATCH libreoffice-3-6] fdo#47951 flat text table: update m_nRowPos when moving by b... · Lionel Elie Mamane (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.