Bug 93374 - text alignment broken when re-saving RTF document
Summary: text alignment broken when re-saving RTF document
Status: RESOLVED DUPLICATE of bug 92613
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.4.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-11 21:54 UTC by Thomas Boehm
Modified: 2015-12-30 20:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test file created as described in bug report (8.04 KB, application/rtf)
2015-08-11 21:54 UTC, Thomas Boehm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Boehm 2015-08-11 21:54:34 UTC
Created attachment 117846 [details]
test file created as described in bug report

Text formatting is lost in LO >= 4.4.4.1 in RTF created with LO when re-opened and saved.

Steps to re-produce:
1. Create new document
2. write "test" in the first line
3. align this line to center or right
4. save as RTF
5. open document again and everything is aligned as it should
6. add more text to the document and save or just "save as" without making changes
7. re-open document and all alignments are gone

Document still looks fine in LO < 4.4.4.1 and Abiword though.
Comment 1 Thomas Boehm 2015-08-12 09:28:25 UTC
originaly created test file with alignment working:
...
{\pgdsc0\pgdscuse451\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default Style;}}
\formshade\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
{\*\ftnsep\chftnsep}\pgndec\pard\plain \s0\nowidctlpar\hyphpar0\cf0\kerning1\dbch\af8\langfe2052\dbch\af6\afs24\alang1081\loch\f3\fs24\lang2057\qc{\rtlch \ltrch\loch
test}
\par }

re-opened and re-saved test file with broken alignment:
...
{\pgdsc0\pgdscuse451\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default Style;}}
\formshade{\*\pgdscno0}\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
{\*\ftnsep\chftnsep}\pgndec\pard\plain \s0\ql\nowidctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af6\langfe1081\dbch\af7\afs24\alang1081\loch\f3\fs24\lang2057\qc\nowidctlpar\hyphpar0{\rtlch \ltrch\loch
test}
\par }


Removing the additional "\ql" seems to solve the problem, but I don't know whether there is more to it as there are a lot more differences between the versions before and after re-saving.
Comment 2 Gordo 2015-08-14 16:52:39 UTC
I can reproduce from steps.  I used 4.4.3.2 to look at my document and it displayed correctly.

Windows Vista 64
Version: 4.4.5.2
Build ID: a22f674fd25a3b6f45bdebf25400ed2adff0ff99

Version: 5.1.0.0.alpha1+
Build ID: 7bdc6be9c23517eec02ce7139edd7003abbee1f8
TinderBox: Win-x86@39, Branch:master, Time: 2015-08-11_03:32:55
Comment 3 Buovjaga 2015-12-30 20:08:19 UTC

*** This bug has been marked as a duplicate of bug 92613 ***