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

List:       koffice-devel
Subject:    Page numbering in KWord
From:       Mani N C <maninc () gmail ! com>
Date:       2009-12-21 15:18:18
Message-ID: 9445e5350912210706ue8e1c72ie204f058814eba () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi all,

I'm Working on Page numbering in KWord, which uses PageVariable to display
page numbers in Header/Footers.
PageVariable uses KWPageTextInfo::pagenumber() to get the current page
number viewed. We have just one Header/Footer per document, And this is
being reused in all the pages.

For Example, to display footer in 1st Page.
Footer(KWTextFrameSet) created while loading odf is used to display. So
while creating KWPageTextInfo Object, we use 1st page's KWPage object is
used.
While displaying page 2, Same Footer object is reused. But KWPageTextInfo is
created using 2nd page's KWPage Object.
So when we scroll up to first page, we have 2nd page's KWPage object. So 2
is displayed on page 1 also.

I tried to connect the resourceChanged signal (KoCanvasResource::CurrentPage
) So that we get page update event.
But this is buggy, When i scroll up from page 2 to page 1, It displays '2'
in Page 1 untill the event is fired for page 1.
And it will fail when more than one page is visible .

I'm wondering how this issue can be solved,
* Having header/Footer for every page ;) would solve this issue, I know it
is not the right solution.
* Will having a PageVariable for each KWPage would be a good idea ? But
PageVaribale has to aware if it is moved to next/prev page.

What you guys think would be the right solution for this issue?

-- 
Mani

[Attachment #5 (text/html)]

Hi all,<br><br>I&#39;m Working on Page numbering in KWord, which uses PageVariable to \
display page numbers in Header/Footers. <br>PageVariable uses \
KWPageTextInfo::pagenumber() to get the current page number viewed. We have just one \
Header/Footer per document, And this is being reused in all the pages. <br>

<br>For Example, to display footer in 1st Page. <br>Footer(KWTextFrameSet) created \
while loading odf is used to display. So while creating KWPageTextInfo Object, we use \
1st page&#39;s KWPage object is used.<br>While displaying page 2, Same Footer object \
is reused. But KWPageTextInfo is created using 2nd page&#39;s KWPage Object. <br>

So when we scroll up to first page, we have 2nd page&#39;s KWPage object. So 2 is \
displayed on page 1 also. <br><br>I tried to connect the resourceChanged signal \
(KoCanvasResource::CurrentPage ) So that we get page update event. <br>

But this is buggy, When i scroll up from page 2 to page 1, It displays &#39;2&#39; in \
Page 1 untill the event is fired for page 1. <br>And it will fail when more than one \
page is visible .<br><br>I&#39;m wondering how this issue can be solved, <br>

* Having header/Footer for every page ;) would solve this issue, I know it is not the \
right solution.<br>* Will having a PageVariable for each KWPage would be a good idea \
? But PageVaribale has to aware if it is moved to next/prev page.<br>

<br>What you guys think would be the right solution for this issue? <br \
clear="all"><br>-- <br>Mani<br><br>



_______________________________________________
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