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


On Tue, Oct 09, 2012 at 10:15:55AM +0200, d.ostrovsky@idaia.de wrote:
Quoting Michael Meeks <michael.meeks@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

sdbc:address:thunderbird:profile:FOO

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

sdbc:address:thunderbird:file:/home/user/backup/blah.mab

for more clarity?

-- 
Lionel

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.