Bug 92518 - Hardcoded resource ID should be replaced by RID names
Summary: Hardcoded resource ID should be replaced by RID names
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.4.4.3 release
Hardware: All All
: medium normal
Assignee: JoNi
URL:
Whiteboard: target:5.3.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2015-07-03 09:45 UTC by Philippe Jung
Modified: 2017-02-14 08:58 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Jung 2015-07-03 09:45:15 UTC
The file core/sfx2/source/appl/workwin.cxx contains resource ids as numeric constants.

They should be replaced by defined names.

Exemple:


{ 18005,    "moreformcontrols"     },
{ 18006,    "formdesign"           },
{ 20050,    "toolbar"              },      //math
{ 30001,    "objectbar"            },      //chart
{ 30513,    "toolbar"              },      //chart

should be 

{ RID_XXXX_YYYY,    "moreformcontrols"     },
{ SID_TTTT_UUUU,    "formdesign"           },
Comment 1 Robinson Tryon (qubit) 2016-03-24 15:47:20 UTC
(In reply to Philippe Jung from comment #0)
> The file core/sfx2/source/appl/workwin.cxx contains resource ids as numeric
> constants.
> 
> They should be replaced by defined names.

Sounds like something for a dev to triage:
Keywords -> needAdvice
Comment 2 jani 2016-05-16 06:42:43 UTC
All the numbers in the file have already defined constants, find the constant and replace the number with the constant.
Comment 3 krishna keshav 2016-05-29 21:28:14 UTC
Does the patch need to have all the numbers with defined names?I would like if i can submit a patch with partial completion.
Comment 4 jani 2016-05-30 06:38:59 UTC
(In reply to krishna keshav from comment #3)
> Does the patch need to have all the numbers with defined names?I would like
> if i can submit a patch with partial completion.


It would be nice to have all names, but a house is build of bricks so are issues, so a small patch is better than nothing :-)

rgds
jan I.
Comment 5 Commit Notification 2016-08-18 07:56:32 UTC
Jochen Nitschke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b276db51dcb5a9f5a2390a23880ba0a10bed0f4a

remove dead resource names, related to tdf#92518

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2016-08-23 07:50:54 UTC
Jochen Nitschke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3f5fc4c29e12c2c8ae8b0c8f57f7f1d6036dfd72

remove dead resource names, related to tdf#92518

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2016-08-23 07:52:22 UTC
Jochen Nitschke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=962719df881a8aefdec7f564293d1e0cd42a5540

remove dead resource name, related to tdf#92518

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2016-08-23 08:05:29 UTC
Jochen Nitschke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c6d594df392e7cb6c7a340454be69555f0e208b

tdf#92518 replace hard coded resource ids

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.