Apache OpenOffice (AOO) Bugzilla – Issue 23411
API: sw.SwXTextDocument::XPagePrintable
Last modified: 2013-02-24 21:09:21 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())
.
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...
TL->MBA: Please take over as discussed. Thanks!
One issue fixed in sfx2, one in Writer
isn't fixed on mav09 the crash still persists
A crash should get a P2, shouldn't it?
The reason is that the Controller shows a CloseVetoException against closing the hidden frame that is used for printing, but afterwards closes the document.
Reopened for verification
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,
reassigning
fixed in sfx2/source/view/prnmon.cxx
no crash in cws_fwkp2fix02 anymore => verified
ok in src680_m68 => closed