sw/source/ui/envelp/mailmrge.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit 500aa2b680c036f0d171b274423ab8a832459572 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Thu May 16 09:46:05 2013 +0200 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 <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 4a675dc..d2a1d49 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()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits