Bug 65100 - Table of Content's field is changed when saving as *.doc and *.docx file formats
Summary: Table of Content's field is changed when saving as *.doc and *.docx file formats
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: filter:doc, filter:docx
Depends on:
Blocks: DOCX-TableofContents DOC-TableofContents
  Show dependency treegraph
 
Reported: 2013-05-28 21:38 UTC by Zeki Bildirici
Modified: 2018-10-09 11:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Toc saved in doc format (150.04 KB, image/png)
2013-05-28 21:39 UTC, Zeki Bildirici
Details
Toc saved in docx format (148.60 KB, image/png)
2013-05-28 21:39 UTC, Zeki Bildirici
Details
Toc saved in odf format (172.45 KB, image/png)
2013-05-28 21:40 UTC, Zeki Bildirici
Details
ODT file (15.17 KB, application/vnd.oasis.opendocument.text)
2013-05-28 21:41 UTC, Zeki Bildirici
Details
Saved as doc (26.50 KB, application/msword)
2013-05-28 21:41 UTC, Zeki Bildirici
Details
Saved as docx (5.95 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2013-05-28 21:41 UTC, Zeki Bildirici
Details
screenshot of new testcase (211.57 KB, image/png)
2017-08-18 03:40 UTC, Bastián Díaz
Details
TOC Adsız 1 compared in LO: ODT and MSO: DOC DOCX (192.62 KB, image/png)
2018-10-09 11:37 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zeki Bildirici 2013-05-28 21:38:20 UTC
Problem description: 

LibreOffice's Table of Contents style is not protected by saving as *.doc and *.docx file formats. 

Steps to reproduce:
1. Create a new document including a table of content(or convert an odf) and save it as doc or docx
2. Open it with Microsoft Office 2007 or 2010

Current behavior:

ToC style is not protected and Microsoft Office impelents it own style, which looks crappy and shifts the document layout. 

I am attaching 3 files: odt(master) and doc and docx files created from it.

And also attaching 3 screenshots showing how different it looks from LibreOffice to Microsoft Office

**Also doc and docx seems to read the toc different, as doc has intends from left on number side

This is a very important problem of compatibility because, this mixes all the layout, 1 page toc consist 2 pages and think that it is a 200 paged thesis or a business report and you want to print. I don't think nobody wants to face such situation. You have to re arrange all page layouts separately. 

Yes using PDF's is a solution but it is a matter of  compatibility

Expected behavior:
Protecting the (default)Table of content style while saving as doc or docx

Best regards,
Zeki


              
Operating System: All
Version: 4.0.3.3 release
Comment 1 Zeki Bildirici 2013-05-28 21:39:00 UTC
Created attachment 79914 [details]
Toc saved in doc format
Comment 2 Zeki Bildirici 2013-05-28 21:39:25 UTC
Created attachment 79915 [details]
Toc saved in docx format
Comment 3 Zeki Bildirici 2013-05-28 21:40:18 UTC
Created attachment 79917 [details]
Toc saved in odf format
Comment 4 Zeki Bildirici 2013-05-28 21:41:02 UTC
Created attachment 79918 [details]
ODT file
Comment 5 Zeki Bildirici 2013-05-28 21:41:25 UTC
Created attachment 79919 [details]
Saved as doc
Comment 6 Zeki Bildirici 2013-05-28 21:41:48 UTC
Created attachment 79920 [details]
Saved as docx
Comment 7 Francisco 2013-06-06 00:04:13 UTC
Zeki:

So far, I can obtain the same result as you show using your file, and Times New Roman as typeface  with LibO 4.0.3, but not with LibO 3.5, so it's a regression.

But it seems to be a weirder bug, because I imported a DOC file created with LibO 4.0.3 into Calligra Words 2.6.1, and the styles are there (nevertheless, there are some other issues in this case)

What I see here, in my case, is that Word 2007 is not changing the style, but adding a newline after the number of the page (I mean, like locating the cursor after any pagenumber of the table of content and then pressing the Enter key). 

Don't know why, but it is doing it. If I open your DOC file with Word 2007 I see the same result you already shown in the 5th attachment. But if I open the same file with LibO 3.5.7 or 4.0.3, the "newline" isn't there. Interestingly, if one updates the table (right click->Update field) the table is shown as in LibO

Moreover, the one thing I see LibO is doing wrong, even with version 3.5, is that it's changing the style "Content 2" and Content 3", etc., adding some kind of indent after the line, that isn't shown in the paragraph information. I mean, indentation after text is "0", but this indent is there!

But this becomes even weirder, when I tried to check the styles used in Word 2007. Fast styles are shown properly on the Ribbon, but when the styles panel is opened, nothing is shown there. Creating a new file and pasting all the content of the file created with LibO shows in this case all the styles used in the panel. And the style shown for the table of contents seems to be the same I see in LibO.

I suggest you to do some other tests, if you'd mind.
Comment 8 Zeki Bildirici 2013-06-13 09:28:52 UTC
(In reply to comment #7)
> Zeki:
>Hi,
> Moreover, the one thing I see LibO is doing wrong, even with version 3.5, is
> that it's changing the style "Content 2" and Content 3", etc., adding some
> kind of indent after the line, that isn't shown in the paragraph
> information. I mean, indentation after text is "0", but this indent is there!

There are bug reports related to them and other issues about toc: https://bugs.freedesktop.org/buglist.cgi?list_id=311242&short_desc=table%20of%20contents&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&short_desc_type=allwordssubstr&product=LibreOffice 

> I suggest you to do some other tests, if you'd mind.

I think the problem is quite clear, i don't see any further test is needed to confirm this bug and mark as NEW also i do not have the knowledge to spot the issues on doc and docx filter.

Regards,
Zeki
Comment 9 Francisco 2013-06-13 12:29:09 UTC
> I think the problem is quite clear, i don't see any further test is needed 
> to confirm this bug and mark as NEW
 
Your bug report states that TOC's is not proteced while saving a document as DOC and DOCX, and that MS Word implements its own styles.

I have told you that that's not what I've found: I have done some tests with those files, and although I did found issues, they *doesn't* correspond with you have reported.

Yes, I'm just asking you, please, confirm, reject, complete or correct what I have found, which I try to describe the best I could.

>  also i do not have the knowledge to spot the issues on doc and docx filter.

Neither do I.
Comment 10 Zeki Bildirici 2013-06-25 07:10:06 UTC
(In reply to comment #9)

> I have told you that that's not what I've found: I have done some tests with
> those files, and although I did found issues, they *doesn't* correspond with
> you have reported.

I think line spacing(adding newlines) and intends are components of "styles".

> Yes, I'm just asking you, please, confirm, reject, complete or correct what
> I have found, which I try to describe the best I could.

Yes i can confirm your findings. But i can see them as style problems(whether not saved properly or not be read properly)the TOC. 

Regards,
Zeki
Comment 11 QA Administrators 2014-02-02 02:06:44 UTC Comment hidden (obsolete)
Comment 12 Francisco 2014-02-02 14:57:43 UTC
The bug is present, but the title itself does not describe what's happening. As in comment 7, styles are not changes, but an extra line is inserted and *no*, that's not a problem in style because Line Spaces *is not* affected. I really suggest to change the title, or at least, delete the word "styles" as they aren't affected
Comment 13 Francisco 2014-02-02 15:05:44 UTC
As far as I can see, this bug seems t be a dup of Bug 66165, which has been solved for LibO 4.2, supposedly. Zeki, could you check if it has been solved?
Comment 14 Zeki Bildirici 2014-02-11 08:08:26 UTC
(In reply to comment #13)
> As far as I can see, this bug seems t be a dup of Bug 66165, which has been
> solved for LibO 4.2, supposedly. Zeki, could you check if it has been solved?
Hi,

Sorry, i still reproduce with 4.2. The style, and layout is not protected. I still got the results as attachements above.

Best regards,
Zeki
Comment 15 QA Administrators 2014-09-03 21:32:52 UTC Comment hidden (obsolete)
Comment 16 QA Administrators 2014-10-05 22:59:57 UTC Comment hidden (obsolete)
Comment 17 Zeki Bildirici 2014-10-07 13:33:27 UTC
f) I'm praying to god to make someone see this bug report to confirm as new.
Comment 18 Francisco 2014-10-16 15:12:49 UTC
I'm setting it as new, even though I think the description of the problem is wrong. The bug is present so at least I'll change the title to reflect the problem, which is *NOT* the style applied to the ToC.
Comment 19 Bastián Díaz 2017-08-18 03:40:14 UTC
Created attachment 135633 [details]
screenshot of new testcase

I can't replicate the problem in version 5.4.0.3 (7556cbc6811c9d992f4064ab9287069087d7f62c) on fedora xfce 64 bit. When exporting a document in *.doc file format looks the same as original *.odt and in the case of exporting to OOXML or Word 2007-2013 XML, only the page numbers are not well aligned, something that is best described in Bug 92786.

For the test I used the original file presented here as other new ones created by me. The same screenshot results occur when opening documents exported by LibreOffice using MS Office 2013 - MS 2016 (Windows 10), WPS Office Writer 10.1.0.5707 (gnu/linux) and OnlyOffice desktop editors 4.4.1.338 (gnu/linux).

I think it's better to close this ticket and contribute to other more delimited reports.

Cheers
Comment 20 QA Administrators 2018-10-06 02:50:12 UTC Comment hidden (obsolete)
Comment 21 Timur 2018-10-09 11:37:23 UTC
Created attachment 145521 [details]
TOC Adsız 1 compared in LO: ODT and MSO: DOC DOCX

I agree with the previous comment and I'll close as WFM.
Comment 22 Timur 2018-10-09 11:43:31 UTC
Note: I may have not fully understood the description because it doesn't have expected and experienced details. But current test done from LO 6.2+ doesn't confirm the issue. 
I reported a few bugs for TCO, such as  bug 118972.