Description: User-defined indexes created with Styles remained empty. Regression. Works with LO 7.5. Steps to Reproduce: 1. Open a document with headings. 2. Create a User-defined index. 3. Select option “Create from” “Styles” 4. Click on “Assign Styles” and select headings that are present in the document. Actual Results: Empty index. Expected Results: Selected headings should be visible in the index. Reproducible: Always User Profile Reset: No Additional Info: Here is a document where I created a user-defined index at the end. If you open it with LO 7.6, you’ll see no entries in the index. If you open it with LO 7.5, you’ll see no entries in the index, but if you right-click on it and update it, entries will appear.
Created attachment 191961 [details] Document with headings and user-defined index
With Menu/Tools/Updates/Update all, shows the TOC. Version: 7.6.4.1 (X86_64) / LibreOffice Community Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
The bug occurs on Windows. I didn’t test it on another OS. Version: 7.6.4.1 (X86_64) / LibreOffice Community Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: fr-FR (fr_FR); UI: fr-FR Calc: CL threaded
Please test in safe mode, Menu/Help/Restart in Safe Mode
This is confusing. If I create an user-defined index with Styles, it’s empty. But if I close the document and reload it, then update the created index, the entries appear. The behavior is the same in safe mode and in normal mode.
Bibisected with linux-64-7.6 to 5c04c4474236cc50009aea6d89f7c443c861af19 tdf#40142 - Consider level settings of the various text nodes I tested by reproducing from scratch. Not with the attached file.
Did you create the user indexes with the correct level? I don't know if the fix of the bug 40142 creates more confusion then it fixed in the first place.
(In reply to Andreas Heinisch from comment #7) > Did you create the user indexes with the correct level? I don't know if the > fix of the bug 40142 creates more confusion then it fixed in the first place. I picked 1 for Heading 1 and 2 for Heading 2. Did I do it correctly?
Investigated the problem. I added the check in [1] and if I try to create an index from scratch the loop continues in [2] and doesn't create the index. [1] https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/doctxm.cxx?r=ae7807c8#1380 [2] https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/doctxm.cxx?r=ae7807c8#1365
So CHAR(9) doesn't seem to get translated for the clipboard to \t. If you copy the tab character from a notepad and paste it into your formula inseat of CHAR(9), then everything works as expected. The issue arises from the failure to convert CHAR(9) to \t in the clipboard.
Uff, wrong bug report :( remove the previous two comments ;(
Does this work now with: https://github.com/LibreOffice/core/commit/7178d6197b892e456a8db8a3d085a24bfd52cf32
Tested with the patch and should be fixed with the above patch. Feel free to open the ticket again if other problems remain.