Apache OpenOffice (AOO) Bugzilla – Issue 52449
Allow using KDE Address Book from OOo
Last modified: 2006-01-05 15:04:53 UTC
Éric Bishof proposed me source code for integrate the availability of use Kde Address Book as known as "KAB" Code will be in extensions/sources/drivers/kab dir All needed changes are already proposed. Waiting for JCA acceptation, I just open the issue.
Added kendy
Other addressbook drivers are in 'connectivity/source/drivers'. Is 'extensions' used on purpose?
Ooops, sorry : Code will be in connectivity/source/driver/kab :-)
Yeah, and my name is "Éric Bischoff", but that's not important... Thanks for the issue, Éric ! ;-)
Created attachment 28387 [details] Screenshot of a view to the KDE address book in OpenOffice.org
Created attachment 28408 [details] Alpha source code, does not interpret real SQL queries yet
Created attachment 28481 [details] SQL analysis : column selection works
Created attachment 28500 [details] Alpha source code, handles basic SQL queries
Created attachment 28579 [details] Localized column names
Created attachment 28581 [details] Alpha source code, patches tested against m122
Created attachment 28641 [details] Real selections like WHERE "Name" = 'Smith' work
Created attachment 28656 [details] Alpha source code : handling WHERE "Name" = 'Smith' requests
assigning to ebischoff (who's working on the code) as per his request
Started working on this
Created attachment 28782 [details] Variant of the patch that applies to OOo m124+ooo-build 20050815
Created attachment 28872 [details] Patches against standard m124 ; some more SQL parsing ; better TODO list
Created attachment 28941 [details] Handling WHERE "Mobile phone" IS NOT NULL and WHERE Name LIKE 'Smit%'
Created attachment 28962 [details] Modification that doesn't hardcode KDE/Qt include paths
The patch I've attached changes makefile.mk to not hardcode /opt/kde3, and use KDE_CFLAGS / KDE_LIBS as set by config_office/configure instead.
Thanks for the corrections, Bernhard, they will be included to the next patch against "regular" CVS. I will just do a little change to makefile.mk: 99c99 < KAB_LIB=-L$(KDE_LIBS) -lkabc --- > KAB_LIB=$(KDE_LIBS) -lkabc (otherwise it breaks my build.)
Hi Éric (please note the accent ;-) ) , Regarding the status of this issue, I see a very good work has been done. Is a cws created ? If not, may I help you ?
Hi Éric (with accent too ;-) ) Yes, a CWS has been created (it's named "kaddrbook"), I am just waiting for my SSH key to get approved, and then work will happen in a branch of the CVS repository. Incidentally, that means that : I WILL NOT ATTACH ANYMORE SOURCE TARBALLS TO THIS ISSUE. THE SOURCE TARBALLS ATTACHED TO THIS ISSUE ARE OUTDATED. DO NOT USE THEM. (that does not apply to Bero's patches, of course, if he likes continuing here) Also, please note I have opened a page for the project on http://opensource.bureau-cornavin.com/kab/
Added complex WHERE expressions management (AND, OR grouped with parentheses). I did it with my own code (I did not reuse other drivers' code). The code in the "file" driver would have been cool, but it was a bit hard to isolate the classes I needed. And simply derive from file driver wouldn't work, because KDE address book does not necessarily work with files. The code is available on the project's home page. Hopefully it should land in the CWS very soon too.
The code is in the CWS now.
Created attachment 29158 [details] review of the changes in connectivity so far
Created attachment 29159 [details] review, part 2
fs->ebischoff: part 2 of the review is attached. Only two items therein (hmm, forgot to mark the second one with + :) One questions out of interest: What is the removal of QT_NO_EMIT from config_office/configure good for?
Thanks for the in-depth code review, Frank. I already started addressing the issues. Why does -DQT_NO_EMITS need to be removed? Because the kabc headers use the "emit" syntax: void emitAddressBookLocked() { emit addressBookLocked( this ); } void emitAddressBookUnlocked() { emit addressBookUnlocked( this ); } void emitAddressBookChanged() { emit addressBookChanged( this ); } Usually, "emit" is #define'd to nothing, and the C compiler does not fail. This strange "emit" syntax is intended for the "moc" preprocessor and is linked to the signals/slots architecture of Qt. If QT_NO_EMIT is defined, "emit" stays in the header, and provokes a compilation error. The removal of -DQT_NO_EMITS has been tested not to break other KDE stuff (thanks kendy for testing that). This flag was once needed by kendy because he had one method named emit(), which is not the case anymore.
Ah, I see, thanks for explaining.
Not exactly me, it was somewhere in VCL ;-) (At the times when Native Widget Framework was not a part of vclplug, and all the VCL had to be linked against the KDE libraries to have the KDE theming.)
Finished the alpha code review. Now we have a smaller, simpler, more elegant and more robust implementation. Thanks Frank for all the nice remarks and help. Out of 42 suggestions, 34 have been implemented and 8 have been rejected. Attached to this issue is the list of items that have not been implemented, and the reason why they have been dismissed.
Created attachment 31818 [details] List of code review items that have not been implemented
Kendy kindly resynchronized the CWS from m124 to m141. Thanks so much!
targeting to 2.0.2 in agreement with QA and program management
fs->msc: this is implemented by Eric in CWS kaddrbook. Please verify (against http://dba.openoffice.org/specifications/kde_address_book_access.odt). Thanks.
reassign to QA
FIXED
change type to FEATURE
verified in cws kaddrbook
Hi, this is fixed in the current master. The current master is available at http://download.openoffice.org/680/index.html I close this issue now. Bye Marc