Apache OpenOffice (AOO) Bugzilla – Issue 121810
Event OnPrint problem
Last modified: 2017-05-20 09:32:05 UTC
Created attachment 80345 [details] snippet of code IN vb6 I developed an application in VB6 that communicates with Writer for automating text processing, was created a listener to intercept events generated by user actions such as closing the Writer, etc ... I can capture many events triggered by Writer but the event OnPrint in the version I'm not getting intercept. Test performed on WINXP and WIN7 OS with version 3.3 and 3.4.1 without success. I performed another test with version 3.1 of BRoffice and this was successful. I am sending a snippet of code in VB6 to facilitate understanding. I hope I was clear in my explanation of the problem. Thanks
This bug might be a duplicated, though right now I can't find the original one. Besides, com.sun.star.document.XEventListener and com.sun.star.document.XEventBroadcaster are deprecated, you should use XDocumentEventListener and XDocumentEventBroadcaster instead.
Thanks for your help Ariel Constenla-Haile I try use XDocumentEventListener but don't work, many events are fired but 'OnPrint' don't, if you want i attach my project test to you see. Thanks
(In reply to comment #2) > Thanks for your help Ariel Constenla-Haile > > I try use XDocumentEventListener but don't work, many events are fired but > 'OnPrint' don't, if you want i attach my project test to you see. I suggested to use XDocumentEventListener because the other API is deprecated, and will be removed. But you are right, both are broken (the implementation is the same). Adding a css::view::XPrintJobListener and listening for a css::view::PrintJobEvent with State == css::view::PrintableState::JOB_STARTED is also broken.
"arielch" committed SVN revision 1449533 into trunk: i121810 - Adapt SfxPrintingHint to work with the "new" XDocumentEventBroadcaster
Fixed on trunk. Verified with the demo component from http://svn.apache.org/viewvc/openoffice/devtools/sdk-examples/trunk/cpp/components/PrintListener/
*** Issue 118893 has been marked as a duplicate of this issue. ***