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

David Ostrovsky d.ostrovsky at idaia.de
Mon Oct 15 23:07:53 PDT 2012

Am 15.10.2012 09:50, schrieb Lionel Elie Mamane:
>> 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.
Actually it might be easy to create a comlete cpp unit test for a file 
based database driver:
1. create a data source and bind it to a file
2. execute some DDLs
3. execute some DMLs
4. check expected results
5. destroy datasource and file.
Do we have a programmatic way for creating data sources? If not how 
about to add it?

> 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"?
yepp. The only missing features compared to old mozab driver are missing 
regular expression implementation
in where criterion and handling of history.mab file (all gathered 
>> >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?
sounds reasonable. With that in place LO would have even more features 
as the thunderbird itself
At least I am not aware how you can open backup address book in 
Only thing that worked for me is to replace the deafult one from the 
user profile.
But take into considreation that on windows old mozab driver still used.
So if we are going to extend the databse creation UI and introduce new 
path input field
it should also work for old mozab driver (unless we sort that platform out).

> 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?
Interesting point, but how one should extend the profile? Ideas?


More information about the LibreOffice mailing list