Issue 114817 - missing com.sun.star.view.XPrintJobListener JOB_STARTED/JOB_COMPLETED events
Summary: missing com.sun.star.view.XPrintJobListener JOB_STARTED/JOB_COMPLETED events
Status: ACCEPTED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: OOO330m9
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 10:37 UTC by Oliver Brinzing
Modified: 2017-05-20 11:29 UTC (History)
6 users (show)

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


Attachments
PrintableState_Demo (672 bytes, text/plain)
2010-09-29 10:39 UTC, Oliver Brinzing
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2010-09-29 10:37:16 UTC
We noticed in OO 3.2 "PrintableState" events during print were:

0 - JOB_STARTED
1 - JOB_COMPLETED

In OO 330m9 there is only a

2 - JOB_SPOOLED

so programs waiting for a "JOB_COMPLETED" in OO 3.2 can
fail to print in OO 330 ...

maybe this is related to issue 
http://www.openoffice.org/issues/show_bug.cgi?id=113479
(On particular printers only 1 copy printed although No of copies > 1 and not
collated)

please have a look at the attachment
Comment 1 Oliver Brinzing 2010-09-29 10:39:39 UTC
Created attachment 71885 [details]
PrintableState_Demo
Comment 2 Olaf Felka 2010-09-29 10:45:12 UTC
@ hi/pl: Please have a look.
Comment 3 philipp.lohmann 2010-09-29 12:04:38 UTC
actually this was supposed to be a cleanup; OOo has currently no means to know
when a job might be completed, it only knows when the job is delivered to the
system specific print subsystem (whence "spooled" instead of "completed").
However I don't feel strongly about this and could also send "completed" again.

@mba: any opinion on this ?
Comment 4 philipp.lohmann 2010-10-12 10:29:49 UTC
taking

@mba: ping ?
Comment 5 philipp.lohmann 2010-10-25 11:57:25 UTC
@cd: the instances of PrintableState_JOB_SPOOLED in vcl could be harmlessly
replaced by PrintableState_JOB_COMPLETED (if desired)

The more problematic thing however is that PrintableState_JOB_STARTED is lost
somewhere; this notification should be done in sfx2/source/view/viewprn.cxx:289
(in fxPrinterController::jobStarted) where this is broadcasted. I verified that
we go through that code, but what happens then I don't know.
Comment 6 Martin Hollmichel 2011-03-15 21:03:24 UTC
set target to 3.x since not release relevant for 3.4 release.
Comment 7 Ariel Constenla-Haile 2013-02-24 10:21:22 UTC
For the JOB_STARTED part:

void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
http://svn.apache.org/viewvc/openoffice/trunk/main/sfx2/source/doc/printhelper.cxx?revision=1413471&view=markup#l786


793 	if ( pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_STARTED )
794 	{
            // ...
798 	}
799 	else if ( pPrintHint->GetWhich() != -2 ) // -2 : CancelPrintJob
800 	{
           // notify listeners
810 	}

The if ... else ... makes that com::sun::star::view::PrintableState_JOB_STARTED is never notified.

About JOB_COMPLETED, see the comment 3 from Philip Lohmann.

@brizing: as everything got broken in 3.3, I'm not sure if reverting back to notify JOB_COMPLETED for 4.0, or leaving things as they are (fixing the JOB_STARTED bug). What do you think?
Comment 8 Oliver Brinzing 2013-02-24 14:09:44 UTC
> I'm not sure if reverting back to notify JOB_COMPLETED for 4.0, 
>or leaving things as they are (fixing the JOB_STARTED bug). What do you think?
@ariel: good question ;-) 
we fixed our custom print dialog in the meantime so it will work with oo 3.2 and oo3.3/3.4.1. but i think it would be helpfull to send a JOB_STARTED and if it
make sense ("OOo has currently no means to know when a job might be completed...", 
a JOB_COMPLETED, too.
Comment 9 SVN Robot 2013-02-24 19:23:09 UTC
"arielch" committed SVN revision 1449532 into trunk:
i114817 - Fix missing css::view::PrintableState_JOB_STARTED notification
Comment 10 Ariel Constenla-Haile 2013-02-24 19:35:55 UTC
(In reply to comment #9)
> "arielch" committed SVN revision 1449532 into trunk:
> i114817 - Fix missing css::view::PrintableState_JOB_STARTED notification

This fixes only the PrintableState_JOB_STARTED

While fixing bug 121810, revision 1449533 fixes also the bug that the css::view::XPrintJob (the css::lang::EventObject::Source in printJobEvent() ) returned an empty css::beans::PropertyValue sequence in ::getPrintOptions()
Comment 11 Marcus 2017-05-20 11:29:40 UTC
Reset assigne to the default "issues@openoffice.apache.org".