[Libreoffice-commits] core.git: connectivity/source

Stephan Bergmann sbergman at redhat.com
Fri Feb 27 08:56:29 PST 2015


 connectivity/source/drivers/mork/MQueryHelper.cxx |   22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 35b07ae7a3ef2163de7dcff7a96029e28240fe11
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 27 17:53:19 2015 +0100

    Re tdf#87789: Fix opening mork CollectedAddressBook Table
    
    ...which now opened the AddressBook Table instead.  Apparently a regression from
    a527ad98e58a7fc9af482f9088687d82e5c52cca "Resolves fdo#87789: show groups in
    collected addresses."
    
    Change-Id: I413adb3ee963262cac71547cde6e5ccc5a9a19ab

diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index 6398466..08e5447 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -195,19 +195,23 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
     OString oStringTable = OUStringToOString( m_aAddressbook, RTL_TEXTENCODING_UTF8 );
     std::set<int> listRecords;
     bool handleListTable = false;
+    MorkParser* xMork;
 
-    // Let's try to retrieve the list in Collected Addresses book
-    MorkParser* xMork = xConnection->getMorkParser(OString("CollectedAddressBook"));
-    if (std::find(xMork->lists_.begin(), xMork->lists_.end(), m_aAddressbook) == xMork->lists_.end())
+    // check if we are retrieving the default table
+    if (oStringTable == "AddressBook" || oStringTable == "CollectedAddressBook")
     {
-        // so the list is in Address book
-        // TODO : manage case where an address book has been created
-        xMork = xConnection->getMorkParser(OString("AddressBook"));
+        xMork = xConnection->getMorkParser(oStringTable);
     }
-
-    // check if we are retrieving the default table
-    if (oStringTable != "AddressBook" && oStringTable != "CollectedAddressBook")
+    else
     {
+        // Let's try to retrieve the list in Collected Addresses book
+        xMork = xConnection->getMorkParser(OString("CollectedAddressBook"));
+        if (std::find(xMork->lists_.begin(), xMork->lists_.end(), m_aAddressbook) == xMork->lists_.end())
+        {
+            // so the list is in Address book
+            // TODO : manage case where an address book has been created
+            xMork = xConnection->getMorkParser(OString("AddressBook"));
+        }
         handleListTable = true;
         // retrieve row ids for that list table
         std::string listTable = oStringTable.getStr();


More information about the Libreoffice-commits mailing list