Bug 43644

Summary: Document Converter doesn't work without 'Legacy Filters'
Product: LibreOffice Reporter: khagaroth
Component: LibreOfficeAssignee: Caolán McNamara <caolan.mcnamara>
Status: RESOLVED FIXED    
Severity: normal CC: william.gathoye
Priority: medium    
Version: 3.5.0 Beta0   
Hardware: x86 (IA32)   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=59366
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 37361    
Attachments: The error message

Description khagaroth 2011-12-08 14:57:39 UTC
If Legacy Filters are not installed, Document Converter doesn't work. It completely fails to launch, just throwing a meaningless (that is, for normal users) error message and jumps to the code that caused the error.

Possible solutions:
if legacy filters are not installed, disable Document Converter menu entry
or
display a meaningful error message explaining the dependency instead of just erroring out and jumping to faulty line in code editor
or
fix Document Converter to work without legacy filters, conditionally disabling functionality that depends on them
Comment 1 Niklas Johansson 2012-01-18 09:34:05 UTC
Reproducible on Win7 Swedish with LibreOffice Beta 3. 

It seems to fail when trying to create the service com.sun.star.comp.office.BF_MigrateFilter 

I attach a screen-shot with the error message.

I haven't looked at the code for the code for the service and it is probably there it should be fixed but a quick and dirty solution in BASIC is to create a function:

Function createBF_MigrateFilterIfPossible()
Dim oService
	On Error GoTo RTError
	oService = createUnoService("com.sun.star.comp.office.BF_MigrateFilter")
	getBinFilterCompIfItExists = oService
	Exit Function
RTError:
	createBF_MigrateFilterIfPossible = Nothing
End Function


Then replace the line:
oBinFilterComp = createUnoService( "com.sun.star.comp.office.BF_MigrateFilter" )

with:
oBinFilterComp = createBF_MigrateFilterIfPossible()
Comment 2 Niklas Johansson 2012-01-18 09:35:43 UTC
Created attachment 55745 [details]
The error message
Comment 3 khagaroth 2012-02-07 07:32:50 UTC
*** Bug 45042 has been marked as a duplicate of this bug. ***
Comment 4 Caolán McNamara 2012-02-08 03:10:42 UTC
oh huh, *registered* but not actually installed. Current scenarios handled are "registered and installed" and "unregistered and not installed"