Re: koffice 2.3.0
[email protected] Wed, 29 Dec 2010 16:35:24 +0100
| Newsgroups | gmane.comp.kde.devel.koffice |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday 29 December 2010 16:29:42 [email protected] wrote: > On Wednesday 29 December 2010 16:07:26 Cyrille Berger Skott wrote: > > On Wednesday 29 December 2010, Bartosz Świątek wrote: > > > 2010/12/29 Kevin Kofler <[email protected]>: > > > > On Wednesday 29 December 2010, Bartosz Świątek wrote: > > > >> I was wondering if you plan on moving to or adding support for > > > >> libwpd 0.9 and libwpg 0.2. > > > > > > > > For the upcoming Fedora 15, this is a requirement to have libwp* > > > > support at all (unless we drag compatibility libraries through the > > > > new package review process), we don't have the old versions in > > > > Rawhide anymore. The current Rawhide KOffice package has libwp* > > > > support disabled. > > > > > > > >> I seem to have managed the issue with libwpd 0.9 for koffice 2.2.2 > > > >> (and since the code didn't change in 2.3 this would probably apply > > > >> there too - here's the patch > > > >> http://cvs.pld-linux.org/cgi-bin/cvsweb/packages/kde4-koffice/kde4-k > > > >> of fi ce- libwpdg.patch?rev=1.3) > > > > > > > > I see there's revision 1.5 now: > > > > http://cvs.pld-linux.org/cgi-bin/cvsweb/packages/kde4-koffice/kde4-ko > > > > ff ic e- libwpdg.patch?rev=1.5 > > > > with incomplete libwpg 0.2 support. > > > > > > Yes, I made my first steps in that direction, but as said earlier, I'm > > > stuck on OdgExporter.cxx which calls lots of primitive routines, that > > > do not exist in libwpg 0.2 anymore. > > > > > > Unfortunately the libwpg folks didn't care to document what exactly > > > changed and what to use instead, which makes the porting think yet a > > > bit more painful. > > > > > > >> - FIND_LIBRARY(LIBWPG_STREAM_LIBRARIES NAMES wpg-stream-0.1 > > > >> libwpg-stream-0.1 > > > >> + FIND_LIBRARY(LIBWPG_STREAM_LIBRARIES NAMES libwpg-stream-0.1 > > > >> wpg-stream-0.1 libwpd-stream-0.9 wpd-stream-0.9 > > > > > > > > Are you sure this is right? You add libwpd-stream as equivalent to > > > > libwpg- stream in FindWPG.cmake, wouldn't it make more sense to > > > > search for that in FindWPD.cmake? > > > > > > I'm not 100% sure, but it makes sense to me, as libwpd-stream-0.9 > > > obsoletes libwpg-stream completely. There is no libwpg-strem-0.2 now. > > > I didn't want to totally rewrite the .cmake file, so I just made sure > > > it finds -stream libs and defines its "FOUND" variable. > > > > > > Feel free to correct my logic. > > > > > > > Especially considering that it's used where libwpd is used: > > > >> +#if LIBWPD_VERSION_MINOR>8 > > > >> +#include <libwpd-stream/libwpd-stream.h> > > > >> +#else > > > >> > > > >> #include <libwpd/WPXStream.h> > > > >> #include <libwpd/WPXHLListenerImpl.h> > > > >> > > > >> +#endif > > > >> > > > >> but libwpg seems a bit more complicated (I'm stuck > > > >> on OdgExporter.cxx right now). > > > > > > > > Do you think you can sort it out? Do you need any help? > > > > > > Well, it is really hard to look for an API that will replace the old > > > one when you don't even know what really changed and what's the > > > equivalent to it. > > > > > > I googled a lot these days and found an interesting conversation with > > > one of the libwpg developers (who doesn't care about koffice at all) > > > who believed it was trivial to port these things (to which i agree in > > > case of libwpd, but libwpg seems to be a different story). > > > > Well the original author is Ariya Hidayat who used to be a koffice > > developers, I am CCing in hope he knows what has changed and who we can > > ask for more details. > > > > I did a quick browse through the source code, it seems the wpg filter in > > koffice is actually generating the odg file, and it seems that it is > > doing the ODG generation, my guess is that it is not needed with wpg > > 0.2, meaning that the filter would need to be rewritten, I don't think > > this is an acceptable change for a stable branch. For distribution that > > does not support installation of multiple library versions, I would > > suggest to drop the wpg support for koffice 2.3, and to add to their > > documentation how to convert wpg files to odg using wpg2odg that is > > provided with wpg 0.2. > > I also looked into this and I think there are 2 ways out: > > 1. Copy the releveant classes from wpg2odg utility and have these in two > versions, for old and new libwpg version. > > 2. Use the higher-level utility function libwpg::WPGraphics::generateSVG to > directly generate svg instead of odg. This would probably work for both lib > versions as that function seems not to have changed. > > I prefer the second, though it is probably a no-go for the stable branch. > At least for trunk it would be better as we are then not too dependent on > API changes in libwpg. See the follwing URL for how it could look like: http://libwpg.git.sourceforge.net/git/gitweb.cgi?p=libwpg/libwpg;a=blob;f=src/conv/svg/wpg2svg.cpp;h=1a37332637b5dc34b60fd16da208ad45c49fb4d6;hb=HEAD Ciao Jan _______________________________________________ koffice-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/koffice-devel