Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||Opening empty *.odt File (0 bytes) -> "Character Encoding"-Dialog instead of a *newly* created Document|
|Status:||CLOSED NOT_AN_OOO_ISSUE||QA Contact:||issues@framework <issues>|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description benif 2009-02-26 00:23:56 UTC
I just found out that when I create a new (empty) file like this: touch foo.odt And I try to open it in OOo-Writer I get prompted for the Character Encoding and line separation to use. Instead of this behaviour it would be very helpful just to check whether the file has a length of zero and create a new Document of the appropriate type. This should work not only for .odt, but for .ods / .odp aswell. Thanks for your time.
Comment 1 michael.ruess 2009-02-26 07:49:28 UTC
Filetypes are recognized by their header, not the suffix. If a file does not contain a valid header it is interpreted as plain-text file. What will happen if someone renames his file from hello.odt to hello.ooo? OOO must have a chance to recognize the correct file type...
Comment 2 michael.ruess 2009-02-26 07:50:29 UTC
Closed, current implemented solution is the best IMO.
Comment 3 benif 2009-02-26 09:04:16 UTC
I fear you didn't get my point: I'm talking about /empty/ files with a length of zero bytes. In Microsoft Windows the user is given the opportunity, to right-click in any directory and choose "Create new ... >> New OpenOffice.org-Writer Document". On Ubuntu Linux (gnome / metacity), I don't have the opportunity to do this because there are no such options in the context menu. So the only way to create a new OO File is to choose "Create new ... >> Empty File" and rename it to something like "My New Document.odt". When I open this document, OO won't recognize it because of missing headers. At this point it should check the file size and if its greater than 0 bytes the well-known "Character Encoding"-Dialog is shown. Otherwise - in case the file is empty - OO should just act as if a new Document has been created via the built-in "New Document"-Button and let the user work with this one. Sorry for my poor English skills but I hope you get the point. :-)
Comment 4 michael.ruess 2009-02-27 12:07:02 UTC
That is not fully true... I really got what you said. But you did not regard, that generating an empty document via context menu on Windows does not build a zero-size file... An empty document is not an empty file! A file having header and format information will be generated by this - without any text content! A zero size file named foo.odt will also not be recognized on Windows!
Comment 5 michael.ruess 2009-02-27 12:07:38 UTC