Bug 146357 - Editing DOCX: Table of content grows when pressing enter at the start of Index
Summary: Editing DOCX: Table of content grows when pressing enter at the start of Index
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.beta1+
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2021-12-21 14:51 UTC by Telesto
Modified: 2023-03-29 16:44 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (5.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-12-21 14:51 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-12-21 14:51:31 UTC
Description:
Editing DOCX: Table of content grows when pressing enter at the start of Index, previously you could create an empty area above

Steps to Reproduce:
1. Open the attached file
2. Press Enter
3. Paragraph formatting dropdown -> Clear formatting 

Actual Results:
The gray Table content field expand with a line above. Clear Direct formatting clears the 'paragraph formatting' but not the field properties

Expected Results:
With 7.1 oldest (and every older version) the field doesn't expand (but has paragraph formatting). And clear formatting creates an empty paragraph before the TOC. Which is mimicking the behaviour of MSO


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: b9c159361abd79862b30412c433fb355d63299e2
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

and in
Version: 7.1.0.0.beta1+ (x64)
Build ID: f9fab4203c1aa0b9a3f27ce2713b6d5addc7df19
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

not in 7.1 oldest
Comment 1 Telesto 2021-12-21 14:51:46 UTC
Created attachment 177057 [details]
Example file
Comment 2 Dieter 2022-01-05 06:14:25 UTC
Telesto, I can't see a difference between odt-file and dcx-file here. So please explain difference to bug 146356.
Comment 3 Buovjaga 2022-11-30 13:25:31 UTC
(In reply to Telesto from comment #0)
> Description:
> Editing DOCX: Table of content grows when pressing enter at the start of
> Index, previously you could create an empty area above
> 
> Steps to Reproduce:
> 1. Open the attached file
> 2. Press Enter
> 3. Paragraph formatting dropdown -> Clear formatting 
> 
> Actual Results:
> The gray Table content field expand with a line above. Clear Direct
> formatting clears the 'paragraph formatting' but not the field properties
> 
> Expected Results:
> With 7.1 oldest (and every older version) the field doesn't expand (but has
> paragraph formatting). And clear formatting creates an empty paragraph
> before the TOC. Which is mimicking the behaviour of MSO

With 7.1 oldest, there is no difference. Tested with both Windows and Linux.

The only difference is in version 6.3. Before this commit, the ToC title was not recognised in DOCX import, so it did not show the "fieldness":
https://git.libreoffice.org/core/commit/ff4f2ba3242d303f7f238a7a142440f1f4b1f288
sw: DOCX: recognize TOC title during import

When testing with ODT, or a ToC created from scratch, there is a change in 7.1. Earlier, hitting Enter does nothing, it is ignored. Then, with this commit it creates a paragraph while extending the fieldness:
https://git.libreoffice.org/core/commit/2e32f4ed5af16a68c97a50806a42ffa2d10f1d7a
get rid of long deprecated SwModify::BroadcastModify

Let's maybe keep this as a separate report from bug 146356. Feel free to close, if there is a good reason.