Bug 151051 - Writer navigator promote/demote outline level promotes/demotes the outline level of the following same level outline when outline content ends with a table followed immediately by an outline heading of the same level
Summary: Writer navigator promote/demote outline level promotes/demotes the outline le...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2022-09-19 08:00 UTC by Jim Raykowski
Modified: 2023-01-27 07:33 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
repro test file (45.06 KB, application/vnd.oasis.opendocument.text)
2022-09-19 08:00 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Raykowski 2022-09-19 08:00:16 UTC
Created attachment 182539 [details]
repro test file

For a document with the following outline which Heading1 outline content ends with a table and is followed immediately by Heading2, using the Promote or Demote button in the Navigator toolbox when Heading1 is selected results in both Heading1 and Heading2 outline level level change. Expected result is Heading1 outline level change.

Headings
       Heading1 <-- outline content ends with a table
       Heading2 <-- immediately follows the table

Steps to repro:
1) Open the attached test file 'promote-demote-outline-level-test-file.odt'
2) Open the Navigator (F5 for floating or Ctrl+F5 and Navigator tab for sidebar)
3) Select Heading1 in the Navigator
4) Press the 'Promote outline level' or 'Demote outline level' button in the Navigator toolbox (third row of toolbox contents, second and third button)

Result: Both Heading1 and Heading2 outline level changes

Expected result: Only Heading1 outline level is changed

Repro'd back to Version: 4.3.0.0.alpha1+
Comment 1 Dieter 2022-10-07 09:58:28 UTC
I confirm it with

Version: 7.4.1.2 (x64) / LibreOffice Community
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
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
Comment 2 Jim Raykowski 2022-10-09 21:30:45 UTC
Proposed patch with UITest:
https://gerrit.libreoffice.org/c/core/+/141128
Comment 3 Commit Notification 2022-12-31 03:50:09 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5a06b3b789063e77afe7395226359c6ce8aad156

tdf#151051 Fix promote/demote outline-level promotes/demotes both

It will be available in 7.6.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 4 Dieter 2023-01-27 07:33:09 UTC
VERIFIED with

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1c638b7ac46d8077994c8483e6becc4a33efd12b
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-GB
Calc: CL threaded

Jim, thanks for fixing it!