[Libreoffice-bugs] [Bug 142840] New: Libre Office conversion of .odf files to Microsoft Word (.doc) files screws up table of contents for Smashwords

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Jun 13 21:48:46 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=142840

            Bug ID: 142840
           Summary: Libre Office conversion of .odf files to Microsoft
                    Word (.doc) files screws up table of contents for
                    Smashwords
           Product: LibreOffice
           Version: 7.1.0.3 release
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: patpowers1995 at yahoo.com

Description:
I have been writing manuscripts for publication on Smashwords using LibreOffice
7.0.3.1 (x64) on a Windows 10 desktop computer, and a problem has cropped up
with the table of contents. 

The Smashwords technique for creating a table of contents involves placing
bookmarks at the beginnings of all your chapter headings (or anything else you
want to show up in the table of contents) thorughout the manuscript. Then you
type out your table of content listing and highlight each entry and create a
hyperlink between it and the appropriate bookmark within your document.

After you do that, you can test your links by hitting control-click using the
mouse. If it's set up right, you to directly to your bookmarked entry.

All that works fine, in Libre Office. But Smashwords prefers documents in
Microsoft Word format. So before I upload the doc to Smashwords I convert it to
a Word 97-2003 document using Save As.

I made a mistake there, I did not test my table of contents after converting it
to Microsoft Word. (Possibly because I've never had a problem with it before.)
But after I uploaded the file I bought a copy of the book and checked it out,
and discovered that my table of contents didn't work in the Epub format. (For
the record, I use Calibre for all my epub files.) 

That's when I checked my microsoft word document and discovered that the table
of contents didn't work.  That's not completely true: the two table of contents
entries that were on the same page as the table of contents worked fine.
Everything else, when you did a Ctrl-click on the entry, nothing happened.
Absolutely nothing.

 Going back to my Libre Office document (yes, I saved it, damned glad I did) I
found that the table of contents worked fine. Every entry, the doc opened up
right where it should be when I clicked on a tofc entry.

I then made a Microsoft Word copy of the Libre Office document again, to see if
there had been some hiccough in the conversion process, and once again, the
Table of Contents didn't work in the new Microsoft Word version -- and all I
had done was convert it.

I figured the problem was the bookmarks and hyperlinks so I then spent a couple
of merry hours deleting bookmarks and creating new bookmarks and setting up new
hyperlinks to those bookmarks and testing them (always working fine in
LibreOffice format, always screwed up after the doc is converted to Microsoft
Word. (Also when testing an existing Microsoft word doc with new bookmarks and
hyperlinks.)

I remembered that I never used to have this problem with Open Office
(LibreOffice's predecessor). So I downloaded Open Office and  opened up my
Libre Office doc in Open Office. It worked fine. I then saved the document in
Microsoft Word format (specifically Microsoft Word 97/2000/XP format). I
reopened it and the Table of contents worked just fine. So my problem is
solved, I can just use Open Office to convert all my docs.

So my problem was solved (Yay!) but Libre Office still has a problem. And I'm
pretty sure its the Libre Office document conversion process that's the
problem, because the table of contents works fine in Libre Office format, and
Open Office converts the document to Microsoft Word and the table of contents
works fine.

It's only when the document is saved to Microsoft Word format in Libre Office
that there's a problem with the table of contents.

On the advice of others I have downloaded and installed LibreOffice 7.1.4 and
tried converting a working plain ODT document to Microsoft Word and got the
same results: the table of contents does not work after conversion.

Steps to Reproduce:
1. Create a text document. It can be random gibberish, just make sure it's long
enough to take up several pages -- don't create a document that's just one page
long.
2. Create a series of headings in your text document (call them chapter
headings if you like, like Chapter 1, 2, 3 ... etc.) Place a bookmark at the
beginning of each or your headings. Make sure that at least some of your
headings are not n the first page of your file.
3. Go back to the beginning of your document and create a table of contents
listing, just the name of the headings (Chapter 1, 2, 3, etc. with each heading
on its own line.
4. Link the entries in your table of contents to the appropriate bookmarks in
your document. To do this, highlight the appropriate entry on your table of
contents, then click on Insert Hyperlink under Insert menu. This will open the
"Hyhperlink" window. On the left side of the window, click on "Document" and in
the main portion of the window, go to "Target in Document" and click on the
crosshairs to the right of the text box. This will open up the "Target in
Document" window which will have a list of options inside it, one of which
should be "Bookmarks" with a plus sign beside it. Click on the plus sign in
front of "Bookmarks" and that should give you a list of the Bookmarks you've
created in the document. Click on the appropriate bookmark, highlighting it,
and then click on the "Apply" button at the bottom of the window and then click
the "Close" button next to it. This will close the "Target in Document window.
Now go back to the "Hyperlink" window and click on the "Apply" button at the
bottom of the window and the "OK" button. This will close the Hyperlink window
and you can now return to your document. Congratulations, you have now created
a table of contents entry. Now do the same for every entry in your table of
contents. (Tedious I know but this is how Smashwords wants tables of contents
created for their Meatgrinder software.)

5. Once you have your table of contents created, test it by going to each entry
in the table of contents, then holding down the control key and clicking on it
with your mouse (ctrl-click) and you should immediately be sent to the heading
you book marked. Repeat it for all your entries.

6. If you then save your document as a LibreOffice ODT file, close it and
reopen it, then repeat the test, you should still have a functional table of
contents.

7. Smashwords, however, prefers documents in Microsoft Word format, so if you
save your document in Word 97-2003 format, close it and reopen it, then test
the table of contents, nothing will happen if you click on the entries for the
table of contents that are not on the first page. You will not go anywhere.
Nothing will happen.

Actual Results:
When a table of contents is tested after its document has been converted to
Microsoft Word format, nothing happens for any entries in the table that are
not on the first page. You do not go to the bookmarked chapter heading.

Expected Results:
The software should have sent the user to the bookmarked location in the text
corresponding to the appropriate entry in the table of contents.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
In my text, each chapter heading that I bookmarked was in Heading 1 format,
whereas the text was in "text body" format. So far as I know, this should not
affect things, but hell, I'm not a software engineer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210613/e449b585/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list