Thank you for your response. From your response, I guess that you means that one copy of the data in document should be kept and every time we want to change the primary document, 1st, change the copy one, 2st, regenerate the structure and put each one in corresponding page.
According to your method, in a GUI, we need a list of textedits, then how can we select the last few words in previous textedit and the first few words in next textedit at the same time?

At first, I think Qt has some method to ensure that I can show a QWidget(eg. QTextEdit) in several parts. But I can not find it.

2011/5/20 <koffice-devel-request@kde.org>
Send koffice-devel mailing list submissions to
       koffice-devel@kde.org

To subscribe or unsubscribe via the World Wide Web, visit
       https://mail.kde.org/mailman/listinfo/koffice-devel
or, via email, send a message with subject or body 'help' to
       koffice-devel-request@kde.org

You can reach the person managing the list at
       koffice-devel-owner@kde.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of koffice-devel digest..."


Today's Topics:

  1. How does kword implement the pagination of pages? (???)
  2. Re: How does kword implement the pagination of pages? (C. Boemann)


----------------------------------------------------------------------

Message: 1
Date: Thu, 19 May 2011 19:26:22 +0800
From: ??? <binxxd9@gmail.com>
Subject: How does kword implement the pagination of pages?
To: koffice-devel@kde.org
Message-ID: <BANLkTikzsZrJmRC2NyoMNbZLs_W9uzcz4w@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi, there.
Recently, I'm working on a project about implement a word-processor-like
textedit. In this project, multiple pages is needed and we should be able to
edit text in the multi-page textedit  just like in kword, in another word, I
need to implement the function that users can select text covering different
pages and after input in the previous page, overflow text should automatic
be in the next page or after delete text in the previous page, some word
that was in the next page will come up to the previous page.
However, I failed to implement this function. I tried to search in the
source code of kword, but failed too. Can anyone tell me how to do it?
Thanks a lot.
by binxxd9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/koffice-devel/attachments/20110519/2dbbb755/attachment.htm

------------------------------

Message: 2
Date: Thu, 19 May 2011 14:38:20 +0200
From: "C. Boemann" <cbo@boemann.dk>
Subject: Re: How does kword implement the pagination of pages?
To: "For developer's discussion about KOffice" <koffice-devel@kde.org>
Message-ID: <201105191438.20936.cbo@boemann.dk>
Content-Type: Text/Plain;  charset="utf-8"

On Thursday 19 May 2011 13:26:22 ??? wrote:
> Hi, there.
> Recently, I'm working on a project about implement a word-processor-like
> textedit. In this project, multiple pages is needed and we should be able
> to edit text in the multi-page textedit  just like in kword, in another
> word, I need to implement the function that users can select text covering
> different pages and after input in the previous page, overflow text should
> automatic be in the next page or after delete text in the previous page,
> some word that was in the next page will come up to the previous page.
> However, I failed to implement this function. I tried to search in the
> source code of kword, but failed too. Can anyone tell me how to do it?
> Thanks a lot.
> by binxxd9
Hi

Basically we store the data without pages, but just as one long list of
paragraphs (for you that would be lines i guess)

We then have a layout pass that creates it's own set of structures that tell
where in the data a new page starts. These structures are regenerated every
time the user enters or deletes anything in the data. An optimization is that
we only starts regenerating from the page the change was made, and it's also
planned (but not implemented) top stop regenerating the pages if we catch up
with a state where we now the remaining pages are placed correctly.

To not be too slow the layout process is not done all in one go but a number
of pages at a time.

hope this helps


------------------------------

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


End of koffice-devel Digest, Vol 98, Issue 3
********************************************