Issue 107568 - presenter screen services gets instantiated for all apps
Summary: presenter screen services gets instantiated for all apps
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: current
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: 3.4.0
Assignee: carsten.driesner
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-09 22:52 UTC by thb
Modified: 2017-05-20 10:22 UTC (History)
3 users (show)

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


Attachments
a fix (15.88 KB, patch)
2009-12-09 22:58 UTC, thb
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description thb 2009-12-09 22:52:20 UTC
Since the presenter screen makes use of the onDocumentOpened event type, and
adds a job for that which checks for an Impress document, the service & thus the
lib get loaded for each & every document.

Currently hacking up a "Context" config node for Office.Jobs.Jobs.*, similar to
the Addon menu thing, to have events defined only for specific modules.
Comment 1 thb 2009-12-09 22:58:51 UTC
Created attachment 66576 [details]
a fix
Comment 2 thb 2009-12-09 23:00:15 UTC
Initial attempt at fixing this. Can of course then bin a bunch of code in sdext
which previously made sure only impress docs are infected with the presenter
screen ...
Comment 3 thb 2009-12-11 14:53:37 UTC
@cd: care to have a look at that? I could then dump it into some random 3.3 cws ...
Comment 4 carsten.driesner 2009-12-11 16:00:26 UTC
cd->thb: Sorry, I was busy with show stopper issues. 
There is one note to your patch. Andreas Schluens the code owner wants to have a
real comparison (instead of indexOf) between each module entry in the Jobs.xcu
and the module identifier. It would be possible that we introduce something like: 
"com.sun.star.text.TextDocumentWithSomethingMore"
where your code would also match with "com.sun.star.text.TextDocument".
I have no further remarks for your patch. So please fix the part with indexOf
and commit your changes.
Comment 5 carsten.driesner 2009-12-11 16:01:25 UTC
cd->thb: Thanks for your patch. This enhancement makes sense and helps to reduce
the amount of loaded libraries.
Comment 6 thb 2009-12-14 13:17:56 UTC
@cd: thx for the review, good catch. Should then possibly also be changed for
framework/source/uielement/addonstoolbarmanager.cxx:IsCorrectContext()?
Comment 7 carsten.driesner 2009-12-14 13:56:27 UTC
cd->thb: Yes, please also correct the part in addonstoolbarmanager.cxx.
Comment 8 thb 2009-12-14 14:12:53 UTC
Target etc.
Comment 9 thb 2009-12-14 14:15:29 UTC
@af: any objections against dumping the code around PresenterScreenJob in favor
of this solution?
Comment 10 groucho266 2009-12-14 15:05:51 UTC
@thb: No,  no objections at all.
Comment 11 thorsten.ziehm 2010-09-23 15:26:38 UTC
OOo 3.3 is in showstopper-mode. This issue doesn't look like a stopper for the
current release. I change the target to OOo 3.x. Please change the target
accordingly when a fix is near to be integrated into a code line or promote it
as stopper issues at the mailing list releases@openoffice.org, when it is urgent
enough for OOo 3.3.
Comment 12 carsten.driesner 2010-10-29 10:52:00 UTC
cd: Take over patch.
Comment 13 carsten.driesner 2010-11-04 16:55:00 UTC
cd: Patch applied to CWS fwk160.
Comment 14 carsten.driesner 2010-12-03 11:36:45 UTC
cd: Verified on CWS fw160. 

cd: This can be verified by using a debugger. The library
PresenterScreen.uno.dll should only be loaded when an impress document has been
loaded/created..