To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=87267
                 Issue #|87267
                 Summary|Calc print-from-macro problem when hidden
               Component|Spreadsheet
                 Version|OOo 2.3.1
                Platform|All
                     URL|
              OS/Version|All
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|programming
             Assigned to|spreadsheet
             Reported by|gpappas





------- Additional comments from [EMAIL PROTECTED] Wed Mar 19 20:40:07 +0000 
2008 -------
It seems that, unlike Writer, Calc can not print a document from within a macro
unless the oo window is shown. I use the quick fix below otherwise it won`t 
print:

if HasUnoInterfaces( oDoc, "com.sun.star.sheet.XSpreadsheetDocument" ) then
  oDocWindow = oDoc.CurrentController.Frame.ContainerWindow
  oDocWindow.Visible = True
  oDocWindow.Visible = False
end if
oDoc.print(mPrintOptions()) 

mPrintOptions() contains: "Collate"=False, "CopyCount"=1, "Pages"=1

Note: 
Obviously this occurs when the Hidden property is true in loadComponentFromURL()

Also noticed that CalculateAll() doesn't work either, unless the document is
shown (even briefly).
To be exact CalculateAll() kind of works. 
I have some cells that look up values from other cells and a graph that needs to
get updated as well. AutoCalculation is True.
CalculateAll() fills the lookup cells but does not refresh the graph (unless the
window is shown using the quick fix).
I don`t know if this should be filed as a different issue. I mention it here
because I feel they are related and may help the developers pinpoint this Calc
problem. 

Please note that the exact same macro prints a hidden Writer document w/o any
problems.

---------------------------------------------------------------------
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]

Reply via email to