From koffice Sun Nov 09 15:15:23 2003 From: David Faure Date: Sun, 09 Nov 2003 15:15:23 +0000 To: koffice Subject: Re: please , help me ! X-MARC-Message: https://marc.info/?l=koffice&m=106839096412521 On Saturday 08 November 2003 04:01, HOANG ANH wrote: > Hi ! I'm a student now .In school , i have a project that is " add function Sort for KWord" (Sort for some paragraphs which are is selected) . But i don't know start where , i don't know the structure of kword , i don't know detail object which manager textobject in . Can you please tell me how i can do it . Please ! I'm waiting you advice . Thank you very much ! Bye . This sounds like a job for KoTextDocument or KoTextObject indeed. KoTextDocument holds the paragraphs (KoTextParag), which are linked to one another (next and prev pointers). You could exchange paragraphs in that list to implement sorting. This would be the fastest at runtime - but it doesn't really allow to implement undo/redo, unless you keep a copy of the 'original order' somehow. So the other way to do it would be much more high-level, e.g. with the cut-n-paste undo/redo commands, to get undo/redo for free... -- David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se Qt/KDE/KOffice developer Klarälvdalens Datakonsult AB, Platform-independent software solutions ____________________________________ koffice mailing list koffice@mail.kde.org To unsubscribe please visit: https://mail.kde.org/mailman/listinfo/koffice