Bug 92613 - .rtf justifications lost on saving wtih LO 4.4.4
Summary: .rtf justifications lost on saving wtih LO 4.4.4
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.4.1 rc
Hardware: x86-64 (AMD64) Windows (All)
: high major
Assignee: Miklos Vajna
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 93374 96817 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-08 02:14 UTC by John R Mead
Modified: 2016-01-08 22:41 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
rtf file with full justification (33.63 KB, application/rtf)
2015-07-13 21:16 UTC, Jacques Guilleron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John R Mead 2015-07-08 02:14:42 UTC
Following upgrading to build 4.4.4.3, every .rtf file I have opened has had it's paragraph justifications globally changed to left; text which was previously center or full justification is now left justified. I just verified that it does this each time I open the file; I just made changes, saved, exited, re-opened, and found the justification changes erased.
Comment 1 Jacques Guilleron 2015-07-13 21:10:55 UTC
Hi John Robert,

Paragraph justifications are changed only when you save the file, right?
I reproduce this behaviour with 
LO 4.4.4.3 Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8 Locale: fr_FR
& Windows 7 Home Premium.
This began with LO 4.4.4.1.0+ Build ID: 24c5f9979e61fde7b098af60756a4890e5713390
Previous version, LO 4.4.3.2 Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16 keeps paragraph justifications when saving.

I set status to NEW.

Thanks to report it.
Comment 2 Jacques Guilleron 2015-07-13 21:16:13 UTC
Created attachment 117217 [details]
rtf file with full justification
Comment 3 John R Mead 2015-07-15 17:31:03 UTC
My impression is that the justification is being reset to left justified when the rtf file is opened; I discovered this problem when a file I got from Wes Boyd no longer had chapter headings center justified. The default justification is left justified, so might it be that the program is not reading the data coding for other justifications and then defaulting to left justified? This would differ from not saving justification data at save/exit, in that it might be doing save/exit just fine, but stripping out the justification data at file opening. I bring this up as I think it would be a different section of code to look at.
Comment 4 Buovjaga 2015-12-30 20:08:19 UTC
*** Bug 93374 has been marked as a duplicate of this bug. ***
Comment 5 Buovjaga 2015-12-30 20:08:30 UTC
*** Bug 96817 has been marked as a duplicate of this bug. ***
Comment 6 raal 2016-01-04 10:44:51 UTC
This seems to have begun at the below commit.
Adding Cc: to Miklos Vajna ; Could you possibly take a look at this one? Thanks
 c6125412588c8176a1295417eb7cb73a1624ed04 is the first bad commit
commit c6125412588c8176a1295417eb7cb73a1624ed04
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sun May 31 21:34:45 2015 -0500

    source 4ee2a882dddb395a816cd54004b634d57cfb2446

    source 4ee2a882dddb395a816cd54004b634d57cfb2446

	author	Miklos Vajna <vmiklos@collabora.co.uk>	2015-04-17 08:44:47 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2015-04-17 09:35:27 (GMT)
commit 4ee2a882dddb395a816cd54004b634d57cfb2446 (patch)
tdf#86182 RTF import: fix handling of \rtlpar
Comment 7 Miklos Vajna 2016-01-07 22:05:29 UTC
Sorry, it's not exactly clear to me what is the bug. Could you please provide a list of steps to perform, then an expected and an actual result?

Thanks.
Comment 8 John R Mead 2016-01-08 18:33:18 UTC
(In reply to Miklos Vajna from comment #7)
> Sorry, it's not exactly clear to me what is the bug. Could you please
> provide a list of steps to perform, then an expected and an actual result?
> 
> Thanks.

I purchase books from Wes Boyd in .rtf format. The title information, and chapter headings are center justified. The problem is that opening them with LO the center justification goes away, and everything that was center justified is now left justified. It's intermittent; it doesn't happen every time now, but it started with 4.4.4.1 rc, and as a result I've been converting the documents to .odt and reformatting to restore the center justification to the bibliographic information and chapter headings. Having center justification stripped upon opening the file makes for poor .rtf compatibility.
Comment 9 Thomas Boehm 2016-01-08 19:23:44 UTC
(In reply to Miklos Vajna from comment #7)
> Sorry, it's not exactly clear to me what is the bug. Could you please
> provide a list of steps to perform, then an expected and an actual result?
> 
> Thanks.

I wrote the steps to re-produce in this bug report, which got marked as duplicate of this one

https://bugs.documentfoundation.org/show_bug.cgi?id=93374
Comment 10 Miklos Vajna 2016-01-08 22:39:12 UTC
Thanks, managed to reproduce it with those steps in 5.0.
Comment 11 Miklos Vajna 2016-01-08 22:41:34 UTC
The fix for bug 94435 fixes this as well. Commits:

- master/libreoffice-5-1: 92fd894ea18672cba4cf961bdc4c0bc98f168102
- libreoffice-5-0: d5db91d310de658631f4cb85d1335fbe55c82453

Given that it's backported to all maintained release branches already, marking as resolved.