Issue 26264 - API: sd.SdXImpressDocument::XPrintable
Summary: API: sd.SdXImpressDocument::XPrintable
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: stephan.wunderlich
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-09 12:11 UTC by stephan.wunderlich
Modified: 2013-02-24 21:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description stephan.wunderlich 2004-03-09 12:11:27 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.
Comment 1 groucho266 2004-04-07 13:54:55 UTC
Accepted.
Comment 2 groucho266 2004-09-24 09:37:24 UTC
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.
Comment 3 groucho266 2004-09-24 09:38:09 UTC
I do not see a way how we can this fix in sd (alone).  Please have a look at it.
Comment 4 svante.schubert 2005-01-27 12:01:48 UTC
SUS->MBA:
This issue is blocking several automated SDK tests. Can you please consider to
raise your personal prioritization on this issue.
Comment 5 Mathias_Bauer 2005-01-31 17:08:05 UTC
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.
Comment 6 groucho266 2005-02-01 10:08:56 UTC
Accepted.
Comment 7 groucho266 2005-02-10 13:44:53 UTC
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.
Comment 8 clippka 2005-02-14 14:15:16 UTC
reopened to send back to qa
Comment 9 clippka 2005-02-14 14:19:12 UTC
send back to qa
Comment 10 stephan.wunderlich 2005-02-17 14:26:25 UTC
fixed in cws_impress34
Comment 11 stephan.wunderlich 2005-02-17 14:27:05 UTC
works as expected in cws_impress34 => verified
Comment 12 stephan.wunderlich 2005-03-10 12:42:44 UTC
ook in src680_m84 => closed