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

List:       koffice-devel
Subject:    Re: question about autoCreateNewFrame
From:       Holger =?iso-8859-1?q?Schr=F6der?= <holger () holgis ! net>
Date:       2002-04-30 13:42:14
[Download RAW message or body]

Am Tuesday 30 April 2002 14:47 schrieb David Faure:
> On Tuesday 30 April 2002 14:27, Holger Schröder wrote:
> > Hi,
> >
> > i am still working on the kword->openwriter filter. i have the
> > problem, that the ow xml does not know about AutoCreateNewFrame,
> > like kw. in kw the a frameset is only created for the first page it
> > appears, and then it is implicitly created on the following pages,
> > as many pages as are needed to contain the whole text.
> > now the problem is atm i have to guess, how many pages a given text
> > will need. i think it is wrong design, if my filter would have to
> > do some kind of "font metrics calculation", so i would like to hace
> > a numberOfPages attribute to the FRAME or FRAMESET element, which
> > contains this number of pages actually needed to contain the whole
> > text.
> > it would belong to frame, but when i write a text needing more than
> > one page, on the second page there is not only created the first
> > frame, but already all frames, so it would also fit into
> > frameset...
> >
> > so how do the other filters handle this ?
> > did i miss something?
> > is this hard to implement / can somebody do this quickly ? ;-)
>
> Interesting that this didn't pop up before indeed.
> I see hmm, 3 solutions.
> * Using the FRAME tags to know how many frames the frameset needs -
> this will give you the number of pages directly, no ?
> You don't need to do any fontmetrics calculation, however you might
> have to use a calculation like (int)( frame->y / doc->ptPaperHeight )
> to know on which page a given frame is.

perhaps i didn't explain it good enough:
the number of frames gives you the number of frames on _one_ page.
then when these frames are full, and you continue typing, you will fill 
the second, third, ... page, and nothing changes with the number of of 
frames, as they are all only saved for the first page, and are placed 
on the next pages with the same coordinates as on the first.

so the number of frames in a set doesn't help, as that is not the 
problem.
>
> * Saving the total number of pages - might not be a bad idea in all
> cases, e.g. for the document information plugin (properties dialog)

saving this is also good, of course, but imagine you write a book (i 
will say kword is almost done, when i will have written a book with it 
;-) ). here the total number of pages dosn't help that much:

you write chapter one with a special layout and fill five pages. frames 
only saved for the first page, and "autoplaced" for 2 to 5.
2nd chapter starts on page 6, 4 pages long, frames saved on page 6 and 
not the following.

you get the idea?
>
> * Saving the number of pages needed by each frameset, as you
> suggested. But AFAICS this can be easily determined from the actual
> frame coordinates, see first point.

i don't have an idea of how to do this. i need to know how often the 
frameset has to be repeated in ow...

Holger
_______________________________________________
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