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

List:       koffice-devel
Subject:    Re: Help with koStore:open needed
From:       shaheed <srhaque () iee ! org>
Date:       2002-12-31 16:37:26
[Download RAW message or body]

On Monday 30 Dec 2002 10:49 pm, David Faure wrote:
> On Monday 30 December 2002 08:34, Werner Trobin wrote:
> > Inside the file a 0/root looks like part0/maindoc.xml, so the magic
> > happens inside the KoStore code to simplify the code in the applications.
> > Unfortunately the applications still store the short string inside their
> > maindoc.xml, so the same conversion has to happen on loading or the file
> > won't be found. Very ugly.
>
> Ah yes, the documents contain the internal name, that's what I forgot.

I lost some of this thread, so I hope that I am not repeating what has already 
been agreed...

IIRC, the way this issue was solved in the case of OLE was to abstract the API 
between the individual filter (e.g. the MS Word filter), and the main filter 
infrastrucure (i.e. kofilter stuff) and put it into olefilter itself. See

OLEFilter::slotSavePic

as a picture-orieted example. But, this is a very tricky problem because in 
the general case of embedding, the embedder filter may not even know the 
*type* of the embedee: that's a job for the infrastructure itself.

So, logically, both the type recognition and the name translation work HAS to 
be done above the individual filter, i.e. in kofilter*. Thus, the filter 
simply hands a blob to the infrastructure by providing

	name of object
	void *data
	size_t *length

and the infrstructure should return EVERYTHING that the filter needs. This 
would normally include:

	sniffed mime type
	short name of sotrage location selected

While the infrastructure is doing this, it should also check for duplicates: 
this allows for the case where a logo image appears on every page in the 
document - clearly, we only want to store the object once.

Thanks, Shaheed
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://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