diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-27 17:53:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-27 17:53:19 +0100 |
commit | 35b07ae7a3ef2163de7dcff7a96029e28240fe11 (patch) | |
tree | 75d6d7b214e0636d70b3decff0bcf2d3c3966afe /connectivity | |
parent | 6a319aa381a1ab704a6c523198baccca021918bd (diff) |
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
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/mork/MQueryHelper.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx index 6398466f7b49..08e5447d5f73 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(); |