Instead of integrating a static list of filters, we definitely should using the FilterFactory service to query the available filters and extensions. The office instance knows best what filters can do, and some filters come and go.
Test-code exists, but lacks information about file extensions. Still ongoing...
Took some minutes to consider those *.xcd files. As you said, there's no infomation about the file extensions. So what about...
Inside unoconv: Defining a static list of file extensions linking them to formats.
When getting the filter details dynamically, there might be unused file extensions - but we'd make sure unoconv aborts correctly. And in case of new file extensions (as docx some time ago), unoconv could/should throw something in verbose mode in order to let us add it to the list.
Yes, seems the best approach. Although I expect something about extensions to be stored somewhere.
And there's a difference between import and export filters, where import filters do not care about the extension afaik, whereas export filters need an extension to name the file automatically.
For an example on how to get the list of filters/formats from LibreOffice, check out this code: