fdo#51004: some progress and 10 years old bug pending

Lionel Elie Mamane lionel at mamane.lu
Mon Oct 15 00:50:08 PDT 2012

On Tue, Oct 09, 2012 at 10:15:55AM +0200, d.ostrovsky at idaia.de wrote:
> Quoting Michael Meeks <michael.meeks at suse.com>:

>> Of course - it would be -lovely- to have a native C++ unit test in
>> dbaccess/qa/extras/ that we could use to do a few queries on a sample
>> mork file (...)

> done: https://gerrit.libreoffice.org/#/c/841/

Hey, great! Next time I feel the need to scratch the unit test itch,
I'll certainly take "inspiration" from that.

It seems to do more than introduce the unit test, and also introduce
the feature that one can now access several tables, while before one
could access only one, namely "AddressBook"?

> I wasn't sure what would be the best way to differentiate between test
> and production case, so i abused driver url...
> It would be nice if someone could review it.

Rather than special-case the test case, how about extend the
production case so that it can be directed to an arbitrary file?

So that, for example:

"sdbc:address:thunderbird" would get the abook.mab from the default
profile, but "sdbc:address:thunderbird:/home/user/backup/blah.mab"
would open file /home/user/backup/blah.mab

This would be useful to open .mab files that come from backups, that
are copied from other computers or other users, etc.

Actually, I can see another specific case, which is to access other
profiles than the default. It would be nice not to hard-code the full
path there, so maybe something like


to open the profile called "FOO" in profiles.ini?

In connectivity/source/drivers/mork/MConnection.cxx, I see:

OUString defaultProfile = m_pProfileAccess->getDefaultProfile(::com::sun::star::mozilla::MozillaProductType_Thunderbird);

Not sure what object m_pProfileAccess is, but if it has something like
a method
getNamedProfile(::com::sun::star::mozilla::MozillaProductType_Thunderbird, "FOO")
we should be in business?

So maybe change the "file path" case to


for more clarity?


More information about the LibreOffice mailing list