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

List:       koffice-devel
Subject:    Re: Modifying KWord files / Interaction with KWord
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-05-01 21:05:38
[Download RAW message or body]

On Tuesday 01 May 2001 21:58, Pascal A. Niklaus wrote:
> At 10:38 AM 01/05/2001, you wrote:
> 
> >On Wednesday 25 April 2001 23:50, Pascal A. Niklaus wrote:
> > > KCite needs access to the whole document and should be able to insert
> > > formatted text (bold/underline etc, but also inserting indented paragraphs
> > > etc. - it's really turning the document upside down). What data should be
> > > passed to the data tool then? The whole document as an XML string? Then
> > > I'll have to deal with all the internals of KWord's format again. Ideally
> > > there would be a possibility to parse and manipulate the document from 
> > some
> > > kind of 'meta' level, with KWord doing the lower level maintenance of the
> > > document's structure.
> >
> >Yes. Well. Two solutions.
> >Either you want to do this without KWord running, and in that case you'll
> >have to manipulate the XML itself (but with QDom it's clean and easy).
> >Or you can rely on KWord running [whether the tool is interactive or not,
> >this doesn't matter]. And in that case, the QRichText classes indeed provide
> >the 'meta' level, that's unrelated to the XML file format. They represent
> >the whole data of the document, organized in paragraphs, and characters,
> >with formatting information.
> >I thought that the data tool could in fact pass a QTextCursor. From there
> >you can get the current paragraph, and from there the document. This way
> >a tool can act on the current cursor, on the selection, on the whole 
> >document, etc.
> >(Not through framesets though, only in the current frameset, but that should
> >hopefully be ok).
> 
> I think being able to access only one frame is a limitation I'd like to 
> avoid. 

I didn't say one frame, but one frame_set_. That is, a set of frames showing
a piece of text, the text flowing through frames.
In a normal word processing document, there is a single text frameset,
and one frame per page. You would access the whole document (frameset),
but not the headers/footers, nor embedded parts etc.

> It can imagine that a text is organised in different frames, and one 
> wants a reference list somewhere in the last frame. The QTextCursor-data 
> tool would be fine to insert citations into the text. For the formatting of 
> the whole document, however, access to the whole XML document will be needed.

The document is not XML while it's in KWord's memory.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.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