https://bugs.documentfoundation.org/show_bug.cgi?id=117280
--- Comment #12 from Mike Kaganski <[email protected]> --- I suppose that we just need to supply a proper data to the Supplement member of com.sun.star.document.DocumentEvent struct getting passed as an argument to the event handler. It could be a string, or an integer constant, so that the handler could differentiate the events. (In reply to Julien Nabet from comment #11) > The pb is we got several printable states: > - JOB_STARTED > - JOB_COMPLETED > etc. > and only 1 event onPrint The approach above allows to address that. com.sun.star.view.PrintableState enum looks a natural choice here... unless we want something more powerful. I assume that we actually want two events (before and after) out of three, and the first one maybe can go. But the two calls in SfxPrinterController::jobStarted appear before and after calling getJobProperties - maybe that has a value, and we only need to clarify what options are available for developer at each call (and then we definitely need something else than com.sun.star.view.PrintableState there, since there's no values to disambiguate the two; and actually, I don't know what user can really do with the getJobProperties, so the above is just a guess). Also the two methods not only call Basic methods, but do other work - I would expect problems simply removing the calls from here - we'd need to provide a way for passing the information "do not call events" there, e.g. setting a SfxApplication flag, or pushing a context (see <comphelper/SetFlagContextHelper.hxx>). -- You are receiving this mail because: You are the assignee for the bug.
