[PATCH libreoffice-3-6] fdo#47951 work around underlying cause
Lionel Elie Mamane (via Code Review)
gerrit at gerrit.libreoffice.org
Sun May 19 04:30:21 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3963
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/63/3963/1
fdo#47951 work around underlying cause
The true cause is that the flat text file database driver mishandles
the case of two ResultSets being open on the same table: the moving
commands of one impact the other.
Since in this case:
- one ResultSet is open by the dispatch of
".component:DB/DataSourceBrowser", that is the grid UI shown to the
user, and that ResultSet is kept open to serve requests by the user
to scroll;
- the second ResultSet is opened by the call to
pNewDBMgr->GetColumnNames
and that ResultSet is closed by the time GetColumnNames returns
We just swap the order of these calls to work around the underlying
driver bug.
Change-Id: I628d9b870df2bbc402637818f987637d3bd62897
---
M sw/source/ui/envelp/mailmrge.cxx
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 14cc5b2..2c04b06 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -224,6 +224,14 @@
aAttachED.Show(sal_False);
aAttachPB.Show(sal_False);
+ SwNewDBMgr* pNewDBMgr = rSh.GetNewDBMgr();
+ if(_xConnection.is())
+ pNewDBMgr->GetColumnNames(&aAddressFldLB, _xConnection, rTableName);
+ else
+ pNewDBMgr->GetColumnNames(&aAddressFldLB, rDBName, rTableName);
+ for(sal_uInt16 nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++)
+ aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry));
+
Point aMailPos = aMailingRB.GetPosPixel();
Point aFilePos = aFileRB.GetPosPixel();
aFilePos.X() -= (aFilePos.X() - aMailPos.X()) /2;
@@ -374,14 +382,6 @@
aToNF.SetModifyHdl(aLk);
aFromNF.SetMax(SAL_MAX_INT32);
aToNF.SetMax(SAL_MAX_INT32);
-
- SwNewDBMgr* pNewDBMgr = rSh.GetNewDBMgr();
- if(_xConnection.is())
- pNewDBMgr->GetColumnNames(&aAddressFldLB, _xConnection, rTableName);
- else
- pNewDBMgr->GetColumnNames(&aAddressFldLB, rDBName, rTableName);
- for(sal_uInt16 nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++)
- aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry));
aAddressFldLB.SelectEntry(C2S("EMAIL"));
--
To view, visit https://gerrit.libreoffice.org/3963
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I628d9b870df2bbc402637818f987637d3bd62897
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Lionel Elie Mamane <lionel at mamane.lu>
More information about the LibreOffice
mailing list