Bug 66305 - FILESAVE: ToC exported to XHTML still has page numbers
Summary: FILESAVE: ToC exported to XHTML still has page numbers
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: Other All
: low enhancement
Assignee: Robert Antoni Buj i Gelonch
Whiteboard: target:5.0.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Reported: 2013-06-28 08:20 UTC by callow.mark
Modified: 2016-02-18 16:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

.odt containing ToC from large document (29.11 KB, application/vnd.oasis.opendocument.text)
2013-07-04 04:02 UTC, callow.mark

Note You need to log in before you can comment on or make changes to this bug.
Description callow.mark 2013-06-28 08:20:47 UTC
When an auto-generated table of contents is exported to XHTML, the exported table of contents still has page numbers. There seems no point as the exported document is not paginated.

Also, in the original ToC the page numbers are right justified and separated from the section name by a row of periods. In the exported ToC, the page numbers are on the right but not justified. They are separated from the section names by about 4 spaces.

I suggest just not exporting the page numbers.
Comment 1 retired 2013-07-03 13:14:41 UTC
Mark: Could you please attach an example document and the exact steps on how to reproduce this problem? Otherwise it is very difficult to confirm this bug.

After attaching the requested information, please set this bug to UNCONFIRMED.

Thanks :)
Comment 2 callow.mark 2013-07-04 04:02:43 UTC
Created attachment 82003 [details]
.odt containing ToC from large document

Here is a .odt to reproduce the issue. It has only a ToC cut from a larger document whose source I cannot post in this public forum.

Export this document via File->Export, selecting xhtml as the output format. Observe that the exported HTML file still has page numbers on each ToC line, though without the "..." leading and right justification of the original.
Comment 3 retired 2014-01-16 18:53:39 UTC
Mark I tried reproducing this. Open your test file in, but when trying to "Save as..." I see no XHTML option, but only HTML.

So exporting to HTML keeps the page numbers. But since that might be intentional I'm adding NeedAdvice.

NEW since confirmed behavior.
Comment 4 retired 2014-01-16 19:12:51 UTC
Let's go with valid enhancement request.
Comment 5 callow.mark 2014-01-16 19:29:51 UTC
The XHTML option is in the dialog that appears after you select Export... from the File menu.

[Last time I tried Save As... HTML, the result had even more problems than the XHTML export so I stopped using it.]

Both Export... XHTML and Save As... HTML options export the document as a single long HTML page so page numbers make no sense and have no meaning or usefulness. This is a BUG not an enhancement request so I have changed it back.
Comment 6 Joel Madero 2014-01-16 20:28:21 UTC
@FOSS - NeedAdvice is only for UNCONFIRMED bugs, we just move to NEW if it's confirmed, then, if a dev ever looks at it, they can investigate. We should do as much of the heavy lifting as possible -- especially as here where it's an enhancement request. NeedAdvice pings our top devs to look into it, here that's probably not needed :)

Enhancement (behaves as intended, but valid request to change behaviour)
Low (probably not going to impact many people at all but a logical request and probably an easy hack)
Comment 7 Joel Madero 2014-02-27 22:55:21 UTC
In order to limit the confusion between ProposedEasyHack and EasyHack and to make queries much easier we are changing ProposedEasyHack to NeedsDevEval.

Thank you and apologies for the noise
Comment 8 Radu 2015-02-26 21:37:07 UTC
On LO Version: page number is not exported anymore, but page number for each entry in TOC is not right aligned.
So Mark is still this a problem?
Comment 9 Commit Notification 2015-05-15 11:58:46 UTC
Robert Antoni Buj Gelonch committed a patch related to this issue.
It has been pushed to "master":


odf2xhtml: tdf#66305 do not display the page numbers in TOC

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Comment 10 Yury 2015-05-21 11:18:05 UTC
If I understood this right, you do not exclude the TOC itself.
Why not retain page numbers, e.g. in XHTML comments, then?
Comment 11 Robert Antoni Buj i Gelonch 2015-05-21 11:47:51 UTC
TOC can have hyperlinks which are very useful, but page number in a continuous output isn't.
Comment 12 Robinson Tryon (qubit) 2015-12-15 23:37:15 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp)
Comment 13 Robinson Tryon (qubit) 2016-02-18 16:37:16 UTC
Remove LibreOffice Dev List from CC on EasyHacks
(curtailing excessive email to list)