summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-05-16 09:46:05 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-05-21 17:43:11 +0000
commit500aa2b680c036f0d171b274423ab8a832459572 (patch)
treebd0d11542b6e4e82dee5372693441b4442884ddd
parentfd3e9a136da6f119e6f722ac409ff32bd52c8ea0 (diff)
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 Reviewed-on: https://gerrit.libreoffice.org/3959 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 4a675dcd2bcd..d2a1d4964ecd 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -210,6 +210,14 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
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;
@@ -361,14 +369,6 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
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(rtl::OUString("EMAIL"));
String sPath(pModOpt->GetMailingPath());