Issue 86384

Summary: desktop: remove unused code from desktop
Product: General Reporter: caolanm
Component: codeAssignee: carsten.driesner
Status: CLOSED FIXED QA Contact: issues@framework <issues>
Severity: Trivial    
Priority: P3 CC: issues, joachim.lingner
Version: 680m247   
Target Milestone: OOo 3.0   
Hardware: All   
OS: Linux, all   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
patch to remove unused code none

Description caolanm 2008-02-23 12:22:38 UTC
attached is a patch to remove the unused code from desktop
Comment 1 caolanm 2008-02-23 12:24:36 UTC
Created attachment 51675 [details]
patch to remove unused code
Comment 2 Mathias_Bauer 2008-02-23 19:12:19 UTC
Caolan, when looking on the patch I wonder how the tool you are using treats
virtual methods. Does it exclude them from the list of candidates for unused
Comment 3 caolanm 2008-02-24 11:01:34 UTC
Yes, it explicitly detects and ignores virtual methods, the name of the game
isn't to detect all unused and uncallable code, but to give a list of guaranteed
uncallable methods. And I can't think of an easy way to ensure that a given
virtual method can never be called, though in theory I guess we should be able
to see that given an entire hierarchy of virtual methods that a given slot could
never be called and that all the virtual implementations of that slot are worthless.
Comment 4 Mathias_Bauer 2008-02-24 12:18:18 UTC
At least in case of UNO objects it is impossible to detect whether they are
used. APIs of UNO objects may not be used inside OOo code at all but in fact are
needed as part of the whole OOo API to be accessible from scripts. But if
virtual methods are excluded we are safe here.

Carsten, please take over.
Comment 5 carsten.driesner 2008-02-25 08:09:54 UTC
cd->sb: Please have a look at the patch from Coalan as you made several changes
regarding layering in the desktop project.
Comment 6 carsten.driesner 2008-02-25 08:10:23 UTC
cd: Target OOo 3.0 should be Ok.
Comment 7 Stephan Bergmann 2008-02-26 09:51:42 UTC
@cd: It appears there is no overlap between files touched on CWS sb83 and the
attached desktop.unusedmethods.patch.

@jl: Maybe you want to have a look at the changes to desktop/source/deployment
in the attached desktop.unusedmethods.patch.
Comment 8 joachim.lingner 2008-03-03 10:33:25 UTC
jl->cd: I cannot see any problems at a first glance. Go ahead applying the
patch, but let jsk test very thouroughly the extension manager.
Comment 9 carsten.driesner 2008-03-06 09:30:58 UTC
cd->cmc: I wasn't able to apply your changes to pages.hxx/pages.cxx as the
removed methods are used by DEV300m1. All other changes are ok.

cd: Revised patch applied.
Comment 10 carsten.driesner 2008-04-17 07:32:26 UTC
cd: Verified.
Comment 11 caolanm 2008-07-12 11:32:36 UTC
seen in master