Bug 84061 - Listeners are not set correctly in SdrTextObj::ImpSetTextStyleSheetListeners
Summary: Listeners are not set correctly in SdrTextObj::ImpSetTextStyleSheetListeners
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
Whiteboard: target:4.4.0
Depends on:
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:


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:
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":


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:
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.