Created attachment 196379 [details] ToC wihtout numbers In MSO, when creating Table of Contents (ToC) there is the option "Show Page Numbers" which is turned on by default. If that option is turned off ToC is created without numbers. LO opens it correctly. But, Update index shows the page numbers. Tested with 25.2.
Bisected in 4.3 to https://git.libreoffice.org/core/+/2e7bb8d12647e1c4adb4fa86961b4839afaca253: commit 2e7bb8d12647e1c4adb4fa86961b4839afaca253 Author: Michael Stahl <mstahl@redhat.com> CommitDate: Thu Dec 5 23:25:37 2013 +0100 fdo#71866: sw: un-break index updates
Confirm with Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: b418f3d8d332276e6990cf7532a8f66aeb1d2f6c CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded
The bibisect situation is a lot more complex than comment 1 suggests. In 4.2 the file loaded with the page numbers showing, until commit d6e321f8264188ce8371c060ebeb75b213f0c90f Author: Noel Grandin on Fri Oct 18 09:59:22 2013 +0200 convert sw/source/core/doc/*.cxx from String to OUString That commit can hardly be called a "fix" for TOC numbering, and was specifically reverted by mstahl in 4.3 as referenced by comment 1. Note that this fix returned the page numbers AT LOAD TIME - so it can hardly be called the regression of this bug report. The load time numbering was probably eliminated later in 4.3 with commit 9679e9c23216decb5f9f25f85b04cb3f25211111 Vinaya Mandke <vinaya.mandke@synerzip.com> on Mon Dec 30 16:22 2013 fdo#69649 Fix for pre-rendered Table Of Contents Reviewed on: https://gerrit.libreoffice.org/7207 I suspect that Vinaya's patch just renders the last-seen-view-of-the-field-as-recorded-in-the-document instead of rendering an updated TOC. In other words I'm sure this has never worked. I expect that LO simply doesn't have the ability to display the TOC without page numbers, making this an enhancement request. DomainMapper_Impl.cxx's handleToc for \n has "todo: what does the description mean?" ----- The TOC field can have an \n field-argument "Without field-argument, omits page numbers from the table of contents. Page numbers are omitted from all levels unless a range of entry levels is specified by text in this switch's field-argument. A range is specified as for \l."
Very interesting - we already export this just fine - since initial import. ww8atr.cxx StartTOX sStr += "\\n " + OUString::number( nNoPgStt ) + "-" + OUString::number( nNoPgEnd ) + " "; That's because it works for DOC - both import and export (since DOC also writes the same sFieldCmd string).
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/9112a4a4cc700569f8321b8191abb4238697a404 tdf#162916 writerfilter TOC: import "no page number" flag It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.