Issue 121810 - Event OnPrint problem
Event OnPrint problem
Status: RESOLVED FIXED
Product: App Dev
Classification: Unclassified
Component: api
OOo 3.3 or older
PC Windows 7
: P3 normal
: 4.0.0
Assigned To: Ariel Constenla-Haile
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-21 19:23 UTC by Renato H. Alexandre
Modified: 2013-07-21 10:17 UTC (History)
3 users (show)

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


Attachments
snippet of code IN vb6 (1.89 KB, text/plain)
2013-02-21 19:23 UTC, Renato H. Alexandre
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Renato H. Alexandre 2013-02-21 19:23:14 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
Comment 1 Ariel Constenla-Haile 2013-02-22 03:08:42 UTC
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.
Comment 2 Renato H. Alexandre 2013-02-23 21:13:35 UTC
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
Comment 3 Ariel Constenla-Haile 2013-02-24 10:07:28 UTC
(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.
Comment 4 SVN Robot 2013-02-24 19:23:20 UTC
"arielch" committed SVN 0 into trunk:
i121810 - Adapt SfxPrintingHint to work with the "new" XDocumentEventBroadcaster
Comment 5 Ariel Constenla-Haile 2013-02-24 19:27:58 UTC
Fixed on trunk.
Verified with the demo component from http://svn.apache.org/viewvc/openoffice/devtools/sdk-examples/trunk/cpp/components/PrintListener/