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

            Bug ID: 153683
           Summary: CLI: Show the module which is used in --convert-to
           Product: LibreOffice
           Version: unspecified
          Hardware: All
               URL: https://ask.libreoffice.org/t/convert-to-txt-text-enco
                    ded-utf8-fails/88123
                OS: All
            Status: UNCONFIRMED
          Keywords: difficultyMedium, easyHack, skillCpp
          Severity: enhancement
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

In command-line interface, --convert-to prints some diagnostics. E.g., this
command:

> soffice --convert-to "txt:Text (encoded):UTF8" myfile

would produce this diagnostic:

> convert /path/to/myfile -> /path/to/myfile.txt using filter : Text 
> (encoded):UTF8

If 'myfile' happens to be opened in a module other than Writer (say, it's a PDF
or ODS), then conversion would fail like this:

> Error: Please verify input parameters... (SfxBaseModel::impl_store
> <file:///path/to/myfile.txt> failed: 0xc10(Error Area:Io Class:Write Code:16))

And there is no hint to user, what the problem was. See e.g.
https://ask.libreoffice.org/t/convert-to-txt-text-encoded-utf8-fails/88123.

The proposal is to print the module that is used to import the source document,
which defines which export filters are available. This could look like:

> convert /path/to/myfile -> /path/to/myfile.txt as a Draw document
> using filter : Text (encoded):UTF8

and should be done in desktop/source/app/dispatchwatcher.cxx [1] by examining
the implemented service of xModel.

[1]
https://opengrok.libreoffice.org/xref/core/desktop/source/app/dispatchwatcher.cxx?r=1f59cbe6&mo=29729&fi=667#667

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to