[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: [PATCH] #1 Make KoPageFormat::formatFromString more useful
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2001-10-31 19:59:17
[Download RAW message or body]

On Wednesday, 31. October 2001 10:47, Thomas Zander wrote:
> On Tue, Oct 30, 2001 at 08:28:45PM +0100, Nicolas Goutte wrote:
> > I propose the attached patch for the file lib/kofficeui/koGlobal.cc to
> > make the method KoPageFormat::formatFromString more useful by returning
> > the custom format by default.
> >
> > Changed in this way, the function can be used by import filters (for
> > example KWord's AbiWord import filter) to find KWord's page format from
> > the page format name.
>
> Hmm, but is an import filter not suppost to create a page format equals to
> the imported document? So when opening a A5 abiword file, the created KWord
> file should also be A5.
> If I missed your intend completely, just ignore me :)

Sure, but AbiWord saves the page format as a string, so the function 
KoPageFormat::formatFromString was very useful to convert it for KWord. 

However, when a page format is not understood by KWord (like for example 
B5-Japan), we can always make KWord use a custom format to simulate the 
format that KWord does not know about.

However, with the former default return value of A4, it meant that the filter 
code had to catch PG_DIN_A4 and to verify if it was a real A4 page format 
that was requested or if it was just an unknown format.

By defaulting to PG_CUSTOM, we just call the code for custom page format, 
which reads the height and the width values.

As the only use of KoPageFormat::formatFromString was in KSpread, I have 
changed its code to leave the previous behaviour.

Have a nice day/evening/night!

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic