Apache OpenOffice (AOO) Bugzilla – Issue 107568
presenter screen services gets instantiated for all apps
Last modified: 2017-05-20 10:22:25 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.
Created attachment 66576 [details] a fix
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 ...
@cd: care to have a look at that? I could then dump it into some random 3.3 cws ...
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.
cd->thb: Thanks for your patch. This enhancement makes sense and helps to reduce the amount of loaded libraries.
@cd: thx for the review, good catch. Should then possibly also be changed for framework/source/uielement/addonstoolbarmanager.cxx:IsCorrectContext()?
cd->thb: Yes, please also correct the part in addonstoolbarmanager.cxx.
Target etc.
@af: any objections against dumping the code around PresenterScreenJob in favor of this solution?
@thb: No, no objections at all.
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.
cd: Take over patch.
cd: Patch applied to CWS fwk160.
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..