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

List:       koffice
Subject:    Re: please ,  help me !
From:       David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date:       2003-11-09 15:15:23
[Download RAW message or body]

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


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

Configure | About | News | Add a list | Sponsored by KoreLogic