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

--- Comment #12 from Martin Nathansen <marsia...@gmail.com> ---
Meanwhile I found the reason why the page numbers in the table of content  are
not exported when the document was originally created by LO Writer and why it
is exported from OO Writer documents.

The difference between both Writer documents are the links in the LO Writer
Table of Content. The OO Table of Content has no such links:

LO Writer Table of Content::
…
<text:p text:style-name="P4"><text:a xlink:type="simple"
xlink:href="#__RefHeading___Toc164_1531117683" text:style-name="Index_20_Link"
text:visited-style-name="Index_20_Link">Heading1<text:tab/>1</text:a></text:p>
…

OO Writer Table of Content:
…
<text:p text:style-name="P3">Heading1<text:tab/>1</text:p>
…

Because of this difference there are different XSL templates for the XHTML
transformation chosen. The selector between both templates is in 
Modul_filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl - Line 
40:
<xsl:when test="parent::table-of-content and */text:tab[1] or */*/text:tab[1]">

For the LO Writer Table of Content the template "createIndexBodyTable" is
applied and this template seems to be unfinished. When disabling the selector
for this template the LO Table of Content is transformed in the same way like
the OO Table of Content.

So there are two options to continue with the EasyHack:

1) Fixing the bug in the XSL template "createIndexBodyTable" and improving the
HTML table created by this template.

2) Implementing a new XSL template which exports HTML paragraphs (instead of a
HTML table) and realizing the formatting similar to the HTML4 formatting in
SwHTMLWriter.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to