[Libreoffice-bugs] [Bug 123476] Detect 0-byte files based on extension (esp. for MS Office and ODF formats)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Feb 15 12:27:35 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=123476

Aron Budea <baron at caesar.elte.hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Detect 0-byte files based   |Detect 0-byte files based
                   |on extension                |on extension (esp. for MS
                   |                            |Office and ODF formats)

--- Comment #5 from Aron Budea <baron at caesar.elte.hu> ---
(In reply to Mike Kaganski from comment #3)
> Regarding the initialization: should something specific be done with the new
> document depending on the filter? E.g., for a 0-byte .docx, should we simply
> create a new Writer document (using default template) and set its filter to
> DOCX, or should we initialize it as if that is a DOCX - which would mean
> different default fonts, compatibility options, etc. (whatever is done in
> DOCX importer when a valid DOCX is imported, before actual DOCX data is
> read)? Should all filters be modified to be able to do that then? Would that
> require to have own default templates for all filters, of should the one
> default template for the module be used anyway, with application of
> filter-specific modifications (with a risk of the resulting new document to
> differ from the template as used in normal new document creation)?
All very good questions, I'd say just create an empty
document/spreadsheet/presentation, set the export type to the identified one,
and do an export+import cycle. Out of that the last step is optional if it'd be
a larger task, the most important is to start in the correct application and
set the correct save format.

While I think the above method would be applicable to most formats, it's really
relevant for the formats that could come in as 0-byte files in real life, ie.
the ones that can be created by MS Office via Explorer context menu.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190215/e361d9bc/attachment-0001.html>


More information about the Libreoffice-bugs mailing list