diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-05-16 09:46:05 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-05-21 17:43:27 +0000 |
commit | 08a9b322ae0069d563730cfd7d61f2dfa0af3a26 (patch) | |
tree | 2d648ed70df470f24814f49a188947ba36fcdb06 | |
parent | 8f3147df3c309127382f800f9a2b19f355bd9d15 (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/3963
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r-- | sw/source/ui/envelp/mailmrge.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 14cc5b297ead..2c04b06bfe27 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -224,6 +224,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; @@ -375,14 +383,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(C2S("EMAIL")); String sPath(pModOpt->GetMailingPath()); |