Issue 23411 - API: sw.SwXTextDocument::XPagePrintable
Summary: API: sw.SwXTextDocument::XPagePrintable
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Solaris
: P2 Trivial
Target Milestone: ---
Assignee: stephan.wunderlich
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-10 14:34 UTC by stephan.wunderlich
Modified: 2013-02-24 21:09 UTC (History)
1 user (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 2003-12-10 14:34:13 UTC
The method printPages crashes the office on Solaris and Linux. The same method
seems to work properly on Windows except the fact that the document where the
macro is attached to is closed here.

Just execute the following macro to rebuild the behaviour
oDoc = ThisComponent
Dim aPrintingOptions(0) As New com.sun.star.beans.PropertyValue
oDoc.printPages(aPrintingOptions())
Comment 1 thomas.lange 2003-12-16 11:24:49 UTC
.
Comment 2 andrew 2004-04-02 04:11:48 UTC
The following macro crashes my Linux computer every time. This used to work on a
windows computer, but it apparantly stopped working with the latest release of OOo.

Sub PrintTwoPerPage
  Dim Props(0 To 1) As New com.sun.star.beans.PropertyValue
  Props(0).Name = "PageColumns" : Props(0).Value = 2
  Props(1).Name = "IsLandscape" : Props(1).Value = True
  If HasUnoInterfaces(ThisComponent, "com.sun.star.text.XPagePrintable") Then
    ThisComponent.setPagePrintSettings(Props())  '
    ThisComponent.printPages(Array())            'Use default properties
  Else
    Print "Sorry, this document does not support the XPagePrintable interface"
  End If
End Sub

In an attempt to at least allow this to work with my Linux computer, even though
it crashes OOo 1.1.1 with my Fedora box, I first called getPagePrintSettings()
and then I modified the properties that I wanted to use and then used those to
call printPages(). I could then print, but things still crashed. And life goes on...
Comment 3 thomas.lange 2004-06-02 11:33:04 UTC
TL->MBA: Please take over as discussed. Thanks!
Comment 4 Mathias_Bauer 2004-06-02 13:28:38 UTC
One issue fixed in sfx2, one in Writer
Comment 5 stephan.wunderlich 2004-09-09 08:54:05 UTC
isn't fixed on mav09 the crash still persists
Comment 6 Mathias_Bauer 2004-11-03 08:06:14 UTC
A crash should get a P2, shouldn't it?
Comment 7 Mathias_Bauer 2004-11-03 08:07:58 UTC
The reason is that the Controller shows a CloseVetoException against closing the
hidden frame that is used for printing, but afterwards closes the document. 
Comment 8 Mathias_Bauer 2004-11-08 08:06:09 UTC
Reopened for verification
Comment 9 Mathias_Bauer 2004-11-08 08:08:50 UTC
.
Comment 10 Mathias_Bauer 2004-11-08 17:15:34 UTC
.
Comment 11 stephan.wunderlich 2004-11-09 10:07:27 UTC
the office fwkp2fix02 still crashes after the maco

oDoc = ThisComponent
Dim aPrintingOptions(0) As New com.sun.star.beans.PropertyValue
oDoc.printPages(aPrintingOptions())

is executed,
Comment 12 stephan.wunderlich 2004-11-09 10:08:20 UTC
reassigning
Comment 13 Mathias_Bauer 2004-11-09 14:15:15 UTC
fixed in sfx2/source/view/prnmon.cxx
Comment 14 Mathias_Bauer 2004-11-09 14:15:32 UTC
.
Comment 15 stephan.wunderlich 2004-11-10 09:48:38 UTC
no crash in cws_fwkp2fix02 anymore => verified
Comment 16 stephan.wunderlich 2005-01-06 14:12:32 UTC
ok in src680_m68 => closed