https://bugs.freedesktop.org/show_bug.cgi?id=38511
Maxim Monastirsky <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #17 from Maxim Monastirsky <[email protected]> --- (In reply to comment #9) > $ /usr/local/lib/libreoffice/program/soffice --convert-to txt:writer_Text This command is wrong. The filter is called "Text", not "writer_Text". And it works for me when using the correct name. (In reply to comment #10) > xDetection->queryTypeByURL( rMedium.GetURLObject().GetMainURL( > INetURLObject::NO_DECODE ) ); > > to get the type of the file that will be exported. But, this function > returns writer_T602_Document. When several file types register the same extension, TypeDetection::queryTypeByURL is guaranteed to return the one that has the "Preferred" flag set to true. In this case we have two types that use the "txt" extension: generic_Text, and writer_T602_Document. generic_Text has Preferred=false [1], and writer_T602_Document has Preferred=true [2]. That's the reason it returns writer_T602_Document. > What can I do now? Setting Preferred=true for generic_Text solves this bug for me (not sure regarding side effects it may have). But it just a workaround hiding the real problem: TypeDetection::queryTypeByURL is not suited for searching an export filter, because it may return types (like writer_T602_Document) that don't have an export filter at all. [1] http://opengrok.libreoffice.org/xref/core/filter/source/config/fragments/types/generic_Text.xcu#23 [2] http://opengrok.libreoffice.org/xref/core/filter/source/config/fragments/types/writer_T602_Document.xcu#23 -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
