Bug 148103 - Navigator hides some H1 paragraphs when choosing 2 outline levels (probably document specific)
Summary: Navigator hides some H1 paragraphs when choosing 2 outline levels (probably d...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2022-03-20 22:12 UTC by Eyal Rozenberg
Modified: 2022-05-02 09:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A document exhibiting the bug (28.96 KB, application/vnd.oasis.opendocument.text)
2022-03-20 22:12 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2022-03-20 22:12:59 UTC
Created attachment 178997 [details]
A document exhibiting the bug

Consider the attached document. It has 3 Heading 1 paragraphs, two of which have paragraphs whose outline level is 2 (but they are not Heading 2).

Now, open Navigator in this document. Set the maximum outline level (the H menubutton) to 1, then to 2. You will see only the first two Heading 1 paragraphs in the content tree, one of them with a level 2 item below it. Now switch the maximum outline level back to 1; all three H1 items now appear.

The third H1 item being missing is a fragile state. An edit within it might bring it back to the tree; but then if you switch to max level 2 and back to max level 1 again, it will be gone again.


Note: I don't know that this bug has anything to do with RTL vs RTL, but it might. I encountered it in an RTL document I had imported from .doc format originally.
Comment 1 Dieter 2022-04-04 06:32:51 UTC
i confirm it with

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 040b3198fde3385e19e7380fdcabae84a0abac9d
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

=> NEW

cc: Jim Rykowski, any ideas?

Additional informations
I've tried to make document more simple:
- deleting section
- changing text direction to LTR
- deleting page breaks

Bug is still present. But what is really weird: I you select als and remove direct formatting, some paragraphs are completely removed

So problem might be document specific. Eyal, could be helpful to add a test document from scratch.
Comment 2 Jim Raykowski 2022-04-04 20:55:27 UTC
Regression from commit 3771a81060f9e1f60ada37c3b7fa0a51b3042952

Here is a fix:
https://gerrit.libreoffice.org/c/core/+/132533

Eyal, Dieter, Thanks!
Comment 3 Eyal Rozenberg 2022-04-04 21:40:48 UTC
(In reply to Jim Raykowski from comment #2)

Thanks for the quick fix. BTW, when I look at that code you touched...

oh, it looks like I can add a comment on gerrit. Please have a look at it.
Comment 4 Commit Notification 2022-04-05 02:22:02 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/097bcd530c7facde50c7fe21e1cee9b4bf4a7949

tdf#148103 SwNavigator: fix outline levels shown

It will be available in 7.4.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.
Comment 5 Dieter 2022-05-02 09:38:10 UTC
VERIFIED with

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 83d0f2eebae41d431d9a5bfd1a918523977752d0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Jim, thank you for fixing it!