.xlr files are spreadsheets created with versions 6-9 of Microsoft Works. They open in Calc when using the file-open dialog, but the filetype is not associated with Calc (tested on Ubuntu 11.04). I guess that it's the same on other OS too. When someone can give me a hint where to start I could try and fix it by myself.
Can this be an Easy Hack?
Thanks for bugreport Please, attach small .xlr file for testing purposes
Well, I cannot create such a file, because I don't have MS Works, but you can find some on the web: www.google.com/search?q=filetype%3Axlr I also tested this on Windows, it's also not recognized, but can be opened via File->Open.
Yeah IMO this is a plausible easy hack. So here's a sample commit for adding the info that LibO can handle a mime-type so that Linux systems suggest it as a handler for the format http://cgit.freedesktop.org/libreoffice/core/commit/?id=a7082e3cd9171105d12c65d8364d29680b8d1801 I'm not actually entirely sure what the equivalent for Windows or MacOSX is, but more than likely examining git log sysui will (eventually) show the equivalent mechanism for those platforms. I suggest putting that aside for the moment and just make this the Linux filetype association bug. Now that I look I do see that "application/vnd.ms-works" which might be the correct mime-type for the format in our *writer* .desktop file so it might be that the problem is either on the shared-mime-info side which sniffs the filetype or that the mime-type is too broad and messy and it falls through the cracks somewhere (e.g. that all msworks file types share the same mime-type and they get given to writer first and there's no fallback to try calc if that doesn't work) So to narrow down the specific problem, can you a) attach a sample file here b) right click on it in nautilus and see what mime-type it detects it as ?
caolanm->fridrich: I have a feeling that shared-mime-info doesn't know about the format in order to even hand it to LibO in the first place. Here's the how-to to add a mime-type to that http://cgit.freedesktop.org/xdg/shared-mime-info/tree/HACKING#n31
Created attachment 69144 [details] XLR Test File
The mime type is application/x-ole-storage (Gnome tells me), but it seems that this is a generic mime type which can be used for different data, see http://searchwinit.techtarget.com/definition/OLE and http://msdn.microsoft.com/en-us/library/ms693383%28v=vs.85%29.aspx So we might need to look for the mime type AND the file extension (.xlr) to open it correctly?
So shared-mime-info is just detecting it as a generic ole container type. So this turns into "teach shared-mime-info to assign .xlr files their correct mime-type". Follow the link above for how to add another. It might be the case that just adding <glob pattern="*.xlr"/> to the existing freedesktop.org.xml.in under the <mime-type type="application/vnd.ms-works"> section is the right thing to do. At which point it will "just work" to double click on it and get it to be opened in LibreOffice with its existing claims in its .desktop files to support application/vnd.ms-works
Thanks for the help, I've created a patch for shared-mime-info at https://bugs.freedesktop.org/show_bug.cgi?id=56575 . How can this be fixed on Windows?
application/vnd.ms-works is in Writer's desktop file, should we move it to startcenter.desktop or so because it can also be opened with Impress or Calc.
re windows. I don't know how the file associations work there, but I suspect it'll be something in that same sysui module as well. re which .desktop for the mime-type. Its a nuisance of this mimetype that its shared by the .wps format and the .xlr format. Ideally there'd be two, and we could put one in calc and one in writer. I don't think there's any great solution. If we leave it in the writer .destop and calc is also installed then it should still "just work".
So, this can be closed now ? Is the file association working on working now?
Yeah, I suppose in theory there's the issue of the windows association, but I don't really know how that works :-)