Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3959

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/59/3959/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 4a675dc..d2a1d49 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -210,6 +210,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;
@@ -360,14 +368,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(rtl::OUString("EMAIL"));
 

-- 
To view, visit https://gerrit.libreoffice.org/3959
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I628d9b870df2bbc402637818f987637d3bd62897
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Lionel Elie Mamane <lionel@mamane.lu>


Context


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.