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

List:       koffice-devel
Subject:    Re: missing pattern in msword.desktop file
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-04-01 2:05:26
[Download RAW message or body]

On Saturday 31 March 2001 21:26, Richard Bos wrote:
> Why misses the patterns in the mimelnk files for msword?
> I would expect *.doc;*.DOC at least here for msword.desktop Pattern

Hi.
Prefect timing for this question :-)
Answer: because for instance /usr/doc/python-docs-1.5.2/Doc/ref/ref1.doc
or /usr/lib/cvs/contrib/intro.doc are named .doc, but are not MSWord files.

The "extension characterises the file" era is over. We have enough suffered
from it under Windows ;)

As of today - thanks to Carsten for the KFileDialog improvements - it's possible
to select a file by mimetype in the file dialog, instead of strictly by extension.
This means, if the mimetype is defined by the contents of the file (the "magic"
method, similar to the "file" command), the file will be recognized as such.
Mimetypes defined by patterns (*.jpg) are still recognized of course.

So if you update kdelibs and koffice, you'll be able to import MSWord docs
again without trouble. Note: koffice still works fine over kdelibs-2.1, since
in kdelibs-2.1 the *.doc was still there.

And since today as well - it's what I've been working on for 2 days now - 
KOffice recognizes its files by contents too. So you don't have to name
a KWord file "blah.kwd" anymore, it can be anything you want without
extension (rather not use known extensions though!).
For that we save an identification string in the gzip headers, which KMimeMagic
can recognize to identify the file. For instance, "file" says now :
embedded.kwd:         gzip compressed data, deflated, original filename, `KOffice \
application/x-kword', last modified: Thu Jan  1 01:00:00 1970, os: Unix 

At the place where the "original filename" usually appears for any gzipped file,
you can see KOffice, and the mimetype of the document.
This is how the identification of KOffice documents is "magically" done ;-)

--  
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