Apache OpenOffice (AOO) Bugzilla – Issue 26782
Do documentation ANYWHERE on printer name formats!
Last modified: 2013-02-24 21:10:14 UTC
When working with a Properties object for changing the properties of an XPrintable object, printer names MUST be bracked like this: <printer> -- this is not in the documentation. For example, this does not work: XPrintable oPrint = (XPrintable) UnoRuntime.queryInterface(XPrintable.class, oDoc); PropertyValue[] printOpts = new PropertyValue[1]; printOpts[0].Name = "Name"; printOpts[0].Value = "<"+myPrinterString+">"; oPrint.setPrinter(printOpts); BUT This DOES NOT -- replace the 2nd to last line with: printOpts[0].Value = myPrinterString; and the printer is not changed at all. There is no documentation stating that a printer name needs to be bracketed (I lost a day troubleshooting this). The "Generic Printer" name is not bracketed. Please add to the documentation that this bracketing needs to be done in naming printers. Also reference another example where this is discussed: http://api.openoffice.org/docs/DevelopersGuide/Text/Text.htm#1+2+3+1+Printer+and+Print+Job+Settings
This should be on the API project as it deals with API documentation.
I have seen that this issue was assigned to OOo-1.1 and that the last entry was in April. Does this happens also with newer versions of OOo with their new API, documentation and such? Or could this issue be closed by the the original reporter?
thackert, there is a huge backlog of issues. Closing issues just because noone has yet the time to look at it does not help anyone. AFAICT this issue is still valid.
I have tested both on 1.1.4 and 2.0 beta and the brackets are not needed, they are actually wrong! It is like officially documented, no brackets needed.
set to invalid.
closed.