diff options
Diffstat (limited to 'connectivity/source/drivers/mork/MQueryHelper.cxx')
-rw-r--r-- | connectivity/source/drivers/mork/MQueryHelper.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx index 3d9a9aeed384..6139d5e54504 100644 --- a/connectivity/source/drivers/mork/MQueryHelper.cxx +++ b/connectivity/source/drivers/mork/MQueryHelper.cxx @@ -195,7 +195,15 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression OString oStringTable = OUStringToOString( m_aAddressbook, RTL_TEXTENCODING_UTF8 ); std::set<int> listRecords; bool handleListTable = false; - MorkParser* xMork = xConnection->getMorkParser(oStringTable); + + // 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()) + { + // so the list is in Address book + // TODO : manage case where an address book has been created + xMork = xConnection->getMorkParser(OString("AddressBook")); + } // check if we are retrieving the default table if (oStringTable != "AddressBook" && oStringTable != "CollectedAddressBook") |