Bug 84061 - Listeners are not set correctly in SdrTextObj::ImpSetTextStyleSheetListeners
Summary: Listeners are not set correctly in SdrTextObj::ImpSetTextStyleSheetListeners
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-18 18:02 UTC by Tobias Lippert
Modified: 2014-11-14 09:13 UTC (History)
1 user (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 Tobias Lippert 2014-09-18 18:02:26 UTC
The code in SdrTextObj::ImpSetTextStyleSheetListeners is obviously not working correctly.

The families of the stylesheets are appended to the name of the family for further usage.
An encoded string looks like "STYLE_NAME|3     "
The family is then extracted by copying the first (length-6) bytes, e.g., "STYLE_NAME" in this example. Then another copy starting a position 1 is created, e.g., "TYLE_NAME". This string is cast to an Int32. Since this is not possible, 0 is returned, and the originally stored family is lost.
Comment 1 Tobias Lippert 2014-09-18 18:03:23 UTC
The proposed patch can be found here:
https://gerrit.libreoffice.org/#/c/10818/
Comment 2 Commit Notification 2014-09-19 21:55:25 UTC
Tobias Lippert committed a patch related to this issue.
It has been pushed to "master":

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

fdo#84061 Fix setting text style sheet listeners in SdrTextObj



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 3 Buovjaga 2014-11-14 09:13:26 UTC
Thanks for the patch, closing this as fixed.