To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=57526 Issue #:|57526 Summary:|Selection attribute not honoured when using dispatch |api to print Component:|Spreadsheet Version:|OOO 2.0 Beta2 Platform:|All URL:| OS/Version:|All Status:|UNCONFIRMED Status whiteboard:| Keywords:| Resolution:| Issue type:|DEFECT Priority:|P3 Subcomponent:|code Assigned to:|spreadsheet Reported by:|npower
------- Additional comments from [EMAIL PROTECTED] Tue Nov 8 10:24:02 -0800 2005 ------- The macro ( see below ) was recorded to print the selected sheets of a calc document. When you run this macro ALL sheets are printed and not the selected ones. it seems to me the logic in sfx2/source/view/viewprn.cxx is slightly skewed. Given that Range and Selection printing are mutually exclusive ( or so it appears from the code ) the order of checking for the selection attribute is wrong. will attach a patch that fixes that. sub Macro5 rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ---------------------------------------------------------------------- dim args1(2) as new com.sun.star.beans.PropertyValue args1(0).Name = "Copies" args1(0).Value = 1 args1(1).Name = "Selection" args1(1).Value = true args1(2).Name = "Collate" args1(2).Value = false dispatcher.executeDispatch(document, ".uno:Print", "", 0, args1()) end sub --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]