Apache OpenOffice (AOO) Bugzilla – Issue 26264
API: sd.SdXImpressDocument::XPrintable
Last modified: 2013-02-24 21:08:01 UTC
A "SolarMutex not locked" assertion is thrown what occassionally lets the office crash. And if this doesn't happen a "Print Options" dialog appears, what shouldn't happen when calling print() via API. Just execute %solarenv\bin\checkapi -o sd.SdXImpressDocument::com::sun::star::view::XPrintable in a solar-shell to reproduce the behaviour.
Accepted.
The dialog is opened ::sd::PrintManager::Print() (defined in sd/source/ui/view/PrintManager.cxx) because that method does not know that it has been called from the API. This information exists, however, further up in the call stack. SfxViewShell::ExecPrint_Impl() sets the bIsAPI flag when the SfxRequest given to it has at least one argument. For fixing this bug we have to somehow pass the information that SfxBaseModel::print() is called from the API down to Print() method mentioned above.
I do not see a way how we can this fix in sd (alone). Please have a look at it.
SUS->MBA: This issue is blocking several automated SDK tests. Can you please consider to raise your personal prioritization on this issue.
Please use the following macro for testing, the java test program has a problem with URLs: Sub Main dim args(1) as new com.sun.star.beans.PropertyValue args(0).Name = "FileName" args(0).Value = "C:\temp\test.prn" args(1).Name = "Wait" args(1).Value = True ThisComponent.print(args()) End Sub The problem is that the information wether a dialog may be shown or not is available in the DoPrint() call, but Impress ignores it and shows a dialog in the Print() call later. This call shouldn't show any dialogs. The dialog should be moved to the DoPrint() call and if the parameter bSilent is True a default should be used instead of the dialog.
As indicated above I moved the code for fitting document pages to printer pages from Print() to DoPrint() (the code itself was made into its own FitPageToPrinterWithDialog() method; but now it is called from DoPrint()). There the bSilent flag is obeyed. When set the dialog is created. But instead of showing it the new method just takes its default value and proceeds with printing.
reopened to send back to qa
send back to qa
fixed in cws_impress34
works as expected in cws_impress34 => verified
ook in src680_m84 => closed