Apache OpenOffice (AOO) Bugzilla – Issue 118032
getPrinter behavior changed between oo3.2.1 and oo3.3 - causing exception
Last modified: 2012-06-13 12:22:49 UTC
I am maintaining an old Delphi app that works fine with oo3.2.1 and earlier. Its interface with OpenOffice uses Bernard Marcelly's "OOo Tool". Since oo3.3, getPrinter causes an exception as follows: EVariantBadVarTypeError Description: "Invalid Variant Type...raised when a variant operation fails because of a value that isn't a valid variant type." It looks like the getPrinter method behaves differently since oo3.3. Is this by design? Perhaps there is a bug? I would be very happy to look at the source code, but do not know how to obtain it. I would want to compare the source of getPrinter between v3.2.1 and v3.3. Regards Julian Brewer P.S. The code that throws the exception is marked (***) below. I stress that this all worked fine until v3.3: docs[di].v := StarDesktop.LoadComponentFromURL(URL, '_blank', 0, fileProp); [...] function ToOoDoc.docPrinterBusy( docIndex : integer) : boolean; var queryPrinter : variant; i : integer; begin result := false; if not docs[docIndex].isOpen then exit; (***)queryPrinter := docs[docIndex].v.getPrinter; [...] end;
,
getPrinter returns a sequence of PropertyValue, so this sounds like a duplicate of issue 117010 (fixed in CWS jl166, but not yet integrated). See also issue 117523.
i've the same trouble with a VB6 app when trying to apply printerproperties from a getPrinter (it was working fine in OOo 2.2, 3.1, 3.2 and crash in 3.3.0) would it be fixed in 3.4 or is there any change to do in our code ? thanks Jean-Pierre
Kudos to Niklas for identifying this issue as having the same root cause as the fixed bug 117010. *** This issue has been marked as a duplicate of issue 117010 ***
getting rid of value "enhancement" for field "severity". For enhancement the field "issue type" shall be used.