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

List:       koffice-devel
Subject:    Re: Page Variable Support
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2009-08-21 3:55:09
Message-ID: 200908210555.09863.t.zachmann () zagge ! de
[Download RAW message or body]

On Thu August 20 2009, Thomas Zander wrote:
> On Thursday 20. August 2009 07.32.39 you wrote:
> > If you a have a document with a header that shows the current page and at
> > least two headers are visible at the same time (page 1 and 2), in the
> > header 2 is displayed instead of 1. The same happens in split view when 2
> > different pages are shown. See the following screen shot:
> >
> > http://www.zagge.de/files/variable.png
> >
> > The problem is due to the relayoutFor triggers a repaint of both shapes.
> > The same would happen in kopageapp applications when multiple pages are
> > shown.
>
> Good catch!
> I'll see if I can fix that soon.
>
> > A solution I see is to check the variable in the paint method to get the
> > correct value that needs for painting.
>
> The solution as it is now is done because a shape doesn't know on which
> page it is. This is the reason you always need to set the KoTextPage for
> every text shape.  I don't see how doing any check in the paint method will
> help as that doesn't change the situation that the shape doesn't know which
> page it is on.
>

Sure I need a method to return the correct page for which the painting is done 
and that should be done via an interface that is the same in every 
application.

> Notice that the solution of KoTextShapeData::relayoutFor() is only needed
> for the shapes on a master page in kpresenter.
			
I can't see how that could work for shapes that are shown on multiple pages. 
The shape is the same when it is used on a master page. So when we show a 
split view with two different pages and the same master page you can't call 
shape update as it will repaint both pages, which will lead to show the same 
page number on both pages.

An other reason is that page movement will also change the page numbers. With 
your proposed solution we need to iterate over the pages (when e.g. a page is 
moved/deleted/added) and iterate over all shapes in there to set the page to 
the correct value. That is something I really like to avoid.

Thorsten
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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