Bug 126998 - Part of the text formatting of the heading in a Table of Contents is lost in a .docx file
Summary: Part of the text formatting of the heading in a Table of Contents is lost in ...
Status: RESOLVED DUPLICATE of bug 118972
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-TableofContents
  Show dependency treegraph
 
Reported: 2019-08-17 18:14 UTC by hmslima1992
Modified: 2019-08-28 07:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Files used in the test. Pay attention to the file names, they are descriptions (92.92 KB, application/zip)
2019-08-23 19:22 UTC, hmslima1992
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hmslima1992 2019-08-17 18:14:40 UTC
In a .docx document created by Microsoft Office and opened/edited by LibreOffice: the title of the summary has its style lost when the summary is updated, but the rest of the summary is fine

In a .docx document created by LibreOffice and opened by Microsoft Office: When I update the summary, the page numbers of the levels 2, 3 and 4 are pushed to left. 
I mean, instead of having this...
--------------------------------------------
1 INTRODUCTION.............................1
2 CONTENT..................................5
2.1 Method.................................5
2.2 Results................................6
2.2.1 Conclusion ..........................7
3 REFERENCES ..............................8
--------------------------------------------
...I have this in Microsoft Office 2013:
--------------------------------------------
1 INTRODUCTION.............................1
2 CONTENT..................................5
2.1 Method...............................5
2.2 Results..............................6
2.2.1 Conclusion ......................7
3 REFERENCES ..............................8
--------------------------------------------

I've made other tests: https://old.reddit.com/r/libreoffice/comments/cro171/ive_made_a_comparison_between_the_different/
Comment 1 Dieter 2019-08-20 15:53:54 UTC Comment hidden (obsolete)
Comment 2 hmslima1992 2019-08-23 19:22:23 UTC
Created attachment 153606 [details]
Files used in the test. Pay attention to the file names, they are descriptions

Before I start, I wanna say some few things:

* When I say "update", I mean this process: I right click the summary and I choose the option "Update Table of Contents" (I suppose this is the name in the English version of LibreOffice, in Portuguese it is "Atualizar índice")

* The summary's title of the documents created by Microsoft Office are in Portuguese. I could edit it, but I leave it in that way because I fear taint the test. Just know that "Sumário" means "Summary" :)

* Don't only open the documents, you have to update their summaries in order to see the problem

* It's important that you have Microsoft Office 2013 in your machine (or virtual machine). All these tests were made with the 2013 version of Microsoft Office, but I suppose you'll get the same results with the 2010 version

* There is a lot of crossed information (what indeed makes the text very confusing), but THERE IS A VERY SIMPLE ABSTRACT at the end of this whole analysis, so don't worry!

.
.
.


THE FILES AND THEIR DESCRIPTIONS

(1) Summary.odt = the FRESH .odt document created by LibreOffice 6.3. You don't need to open this one.

(2) Summary (created by LibreOffice 6.3).docx = the FRESH .docx document generated from the previous file. It's just a file for control

(3) Summary (created by LibreOffice 6.3 and updated by this program).docx = a copy of the previous file, but in this one, I updated the summary with LibreOffice itself, saved the file and then closed it

(4) Summary (created by LibreOffice 6.3 and updated and corrected by this program).docx = a copy of the previous file, but I corrected the summary's title of this one with LibreOffice itself

(5) Summary (created by LibreOffice 6.3. corrected by this program and then updated by Microsoft Office 2013).docx = a copy of the previous file, here I just updated the summary with Microsoft Office

(6) Summary.docx = the FRESH .docx document created by Microsoft Office 2013, it's a file for control

(7) Summary (created by Microsoft Office 2013 and updated by LibreOffice 6.3).docx = a copy if the previous file that had its summary updated by LibreOffice

(8) Summary (created by Microsoft Office 2013, then updated and corrected by LibreOffice 6.3).docx = a copy of the previous file, but with this summary corrected by LibreOffice

(9) Summary (created by LibreOffice 6.3. corrected by this program, updated by Microsoft Office 2013 and again corrected by LibreOffice) = a copy of the file (5), but with its summary's items corrected by LibreOffice

(10) Summary (created by Microsoft Office 2013, updated and corrected by LibreOffice 6.3 and reupdated by Microsoft Office) = a copy of the file (8) that had its summary updated by Microsoft Office

.
.
.

MY RESULTS

* When I open the file (2) with LibreOffice, everything seems fine, but when I update the summary, the text formatting of the summary's title is reset to the default formatting and a space above the title is created. When I saved it I created the file (3).

* I corrected the text formatting of the summary's title with LibreOffice itself, but I could do nothing about the space above the summary's title. Thus I generated the file (4)

* Then I opened the file (4) with Microsoft Office, indeed LibreOffice itself was able to reformat the summary's title, but the space above this title still remains. I don't know if this space is a bug since it appears in both programs (LibreOffice and Microsoft Office), but I don't know how to solve it...

* Still with the file (4) opened by Microsoft Office, I updated the summary and I the page numbers of the summary's items got misaligned. I saved this file generating the file (5)
--------------------------------------------
1 INTRODUCTION.............................1
2 CONTENT..................................1
2.1 METHOD..............................1
2.2 RESULTS.............................1
2.2.1 CONCLUSION ....................1
3 REFERENCES ..............................1
--------------------------------------------

* When I opened the file (6) with LibreOffice, everything seemed fine, but when I updated the summary I got the same result of the file (3), which includes the annoying space above the summary's title... thus I created the file (7)

* I corrected the summary's title of file (7) with LibreOffice, generating the file (8).

* The summary's title of the file (5) is correct in Microsoft Office (remember that the page numbers of the summary's items are misaligned in this file), but when I update its summary with LibreOffice, the page numbers of the summary's items are correctly aligned, but its summary's title is reseted again... I saved this file generating the file (9)

* When I open the file (8) with Microsoft Office and I update its summary, nothing wrong happens (I saved this file generating file (10)). When I open file (10) with LibreOffice and update the summary, the text formatting of the title's summary is reseted...

.

* This is interesting, the original .docx document created by Microsoft Office (I mean file (6)) has 14.2 KiB, but when I update the summary of this file (thus file (7)) it has now only 11.1 KiB and when I (try to) correct this file (thus file (8)) the file is with the size of 11.2 KiB, still smaller than the size of the original file

* It's a lot of information and it seems confuse, I know, but if you calmly read it, you can understand. By the way, there is an abstract below:

.
.
.
.


ABSTRACT

* When I update (with LibreOffice 6.3) the summary of a .docx document created by Microsoft Office 2013, the text formatting of the summary's title is reseted

* When I update (with Microsoft Office 2013) the summary of a .docx document created by LibreOffice 6.3, the page numbers of the summary's items are misaligned

* You only need to do the following tests:

1 - Open the file (6) with LibreOffice and then update the summary

2 - Open the file (2) with Microsoft Word 2010/2013 and then update the summary
Comment 3 Dieter 2019-08-24 05:13:56 UTC
(In reply to hmslima1992 from comment #2)
> * You only need to do the following tests:
> 
> 1 - Open the file (6) with LibreOffice and then update the summary

I confirm, that the heading style changes / gets lost. With MS Office 2013 this doesn't happen
 
> 2 - Open the file (2) with Microsoft Word 2010/2013 and then update the
> summary

Heading style changes / is getting lost in LO, but remains with MS Office 2013



Version: 6.4.0.0.alpha0+ (x64)
Build ID: 3e64065612acec2eb29aa21e2b515953422256d7
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-08-15_22:57:26
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Perhaps related to bug 118972?
Comment 4 Timur 2019-08-28 07:45:17 UTC
Very detailed report, but search should've been done before.
As Dieter found (thanks!) this seems like a duplicate of Bug 118972.

(In reply to hmslima1992 from comment #2)
> ABSTRACT
> * When I update (with LibreOffice 6.3) the summary of a .docx document
> created by Microsoft Office 2013, the text formatting of the summary's title
> is reseted
That's bug 118972. Please note title style was "TOC Heading" but when LO updated TOC title is Contents Heading. 

 > * When I update (with Microsoft Office 2013) the summary of a .docx document
> created by LibreOffice 6.3, the page numbers of the summary's items are
> misaligned
That's another issue. We may say that import issue at MSO side, but I'd rather find a cause if can be dealt with in LO. At this moment I didn't find it. If you do, please search if already reported and report if not. Please keep the report succinct and focused on a single issue. Similar issues go to "See also".

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