Environment: - any OS (reproduced on OpenSUSE 13.1 and Windows) - LibreOffice 3.6 or newer (reproduced on 3.6, 4.1.x, 4.3.1) Steps to duplicate: 1. Create a new document in Writer 2. Type some text. For example Hello world! 3. Select the paragraph and change its style to 'Text body' 4. Modify the style (either by using 'Styles and formatting' dialog or by right-clicking the paragraph and choose 'Edit paragraph style'. For example, change font size of Text body size to 72. 5. Press Ctrl+Z or click Undo. Result: Font size will not change back, Text body style changes remain. Expected result: All changes to text body style should be undone when pressing Ctrl+Z. Facts: - the issue can be reproduced with any style that is a conditional one. Follow these steps to create a style that produces the issue: 1. In 'Styles and formatting' dialog, select any style. 2. Click 'New...' 3. On the appearing dialog, select 'Condition' tab, and make sure 'Conditional style' checkbox is selected.
Reproduced with LO 4.2.6.3, 3.3.0.4 under Ubuntu 12.04 x86. Also with AOO 4.1.1, seems inherited from OOO. Click undo 2 times will undo the change
Incorrect. 2 undos will revert the application of the style. The new style change cannot be undone.
> Incorrect. 2 undos will revert the application of the style. > The new style change cannot be undone. Yes, you're right János. 2 undos makes it back to default style. Modified 'Text Body' not reverted. Sorry for not observing carefully. I'll revert the summary back.
it's just that the Undo class for this does not handle the ID of conditional styles; no idea why that is; it seems to work if i just add it. fixed on master
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=37e936996acb4a8329fad2ec73a35f66be446e90 tdf#83223: sw: fix Undo of format change of conditional para style It will be available in 5.1.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.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=183c317f01ccade1c7865e05e608ea7295c8d39e&h=libreoffice-5-0 tdf#83223: sw: fix Undo of format change of conditional para style It will be available in 5.0.1. 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.
Verified as fixed in 5.0.1