Bug 146356 - ODT: No easy way to create an empty paragraph before Table of Content if document starts with table of content
Summary: ODT: No easy way to create an empty paragraph before Table of Content if docu...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Oliver Specht (CIB)
URL:
Whiteboard: target:24.8.0 target:24.2.2 inRelease...
Keywords:
: 146565 (view as bug list)
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2021-12-21 14:43 UTC by Telesto
Modified: 2024-06-27 11:11 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (10.06 KB, application/vnd.oasis.opendocument.text)
2021-12-21 14:44 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:43:47 UTC
Description:
ODT: No easy way to create an empty paragraph before Table of Content if document starts with table of content

Steps to Reproduce:
1. Open the attached file
2. Press Enter
3. Empty line before (export the file to DOCX and try). Currently a bit broken (expanding the field) but still ok with Version: 7.1.0.0.alpha0+ (x64)

Actual Results:
Not possible to move the index downwardfs

Expected Results:
Would be nice to have (and consistency across document formats is also appreciated) 


Reproducible: Always


User Profile Reset: No



Additional Info:
Found
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
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 Telesto 2021-12-21 14:44:24 UTC
Created attachment 177056 [details]
Example file
Comment 2 Regina Henschel 2021-12-21 16:16:04 UTC
The method to set the cursor before a section (and a TOC is kind of section) is Alt+Enter.

It is a very old problem, see https://bz.apache.org/ooo/show_bug.cgi?id=25280

LibreOffice has in the meantime the advantage over AOO, that it is no longer needed to unprotect the TOC. But the problem of the additional line still exists.

I thought, there would be a report in LO Bugzilla too, but I do not find one.
Comment 3 Heiko Tietze 2022-01-04 10:33:08 UTC
Same for tables, enter goes into the first cell and you have to press alt+enter to add a paragraph before. This is clearly a WF.

With the ongoing work for bug 130318 the (missing) use case will be solved too.
Comment 4 Telesto 2022-01-04 10:51:17 UTC
(In reply to Heiko Tietze from comment #3)
> Same for tables, enter goes into the first cell and you have to press
> alt+enter to add a paragraph before. This is clearly a WF.
> 
> With the ongoing work for bug 130318 the (missing) use case will be solved
> too.

I read comment 2 as going into different direction, suggesting it's a bug? 
And there is still the discrepancy with LibO behavior for DOCX where enter does work (and shouldn't if ALT+ENTER should be the only way)
Comment 5 Heiko Tietze 2022-01-04 11:16:12 UTC
Don't see how we can improve this. Users just have to learn Alt+Enter.
Comment 6 Telesto 2022-01-04 12:02:12 UTC
(In reply to Heiko Tietze from comment #5)
> Don't see how we can improve this. Users just have to learn Alt+Enter.

FWIW: alt+enter didn't do anything until 7.1 branch. And appears to be bugged too :-). At least it expanding the 'field area' for first ALT+Enter
Comment 7 Telesto 2022-01-04 12:53:34 UTC
(In reply to Telesto from comment #6)
> (In reply to Heiko Tietze from comment #5)
> > Don't see how we can improve this. Users just have to learn Alt+Enter.
> 
> FWIW: alt+enter didn't do anything until 7.1 branch. And appears to be
> bugged too :-). At least it expanding the 'field area' for first ALT+Enter

See bug 146565. So  Alt+ENTER functioning is somewhat of a coincidence (and as such slightly bugged).
Comment 8 Telesto 2022-01-04 16:11:18 UTC
@Heiko
Don't get me wrong, if you think ALT+ENTER is the way to go, fine (as better compared to nothing, prior to 7.1). But this is not some(long) established fact.

A) It didn't work at all, but it does by coincidence since 7.1 (and has issues because of that)
B) And behaviour is apparently depending on file-format (DOCX/DOC/ODT). Which good for lot of confusion
Comment 9 Heiko Tietze 2022-01-05 07:24:28 UTC
(In reply to Telesto from comment #8)
> A) It didn't work at all, but it does by coincidence since 7.1 (and has
> issues because of that)

So you want to turn this request into "Block alt+enter for ToC"? Gren from my side - as long bug 130318 has not been implemented.

> B) And behaviour is apparently depending on file-format (DOCX/DOC/ODT).

Haven't tested compatibility and wouldn't care at this stage.
Comment 10 Mike Kaganski 2022-07-21 15:59:09 UTC
Alt+Enter doesn't work for me in Version: 7.4.0.1 (x64) / LibreOffice Community
Build ID: 43e5fcfbbadd18fccee5a6f42ddd533e40151bcf
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: CL 

unless I unprotect ToC first.

So - NEW - at least for enabling Alt+Enter working both without unprotection, *and* without insertion of an empty paragraph inside ToC first time.
Comment 11 Buovjaga 2022-11-30 13:26:02 UTC
Added some findings in bug 146357 comment 3, might be relevant or not.
Comment 12 sdc.blanco 2023-02-28 11:29:46 UTC
Repro OP and repro comment 10 (i.e., unprotect and double Alt+Enter works)

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c41e872ed248f804249ecf4d65c4afc2e426e329
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded
Comment 13 Commit Notification 2024-03-01 10:22:49 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/aebdc79dbc5bf059ee0921a00d2795e526a52c42

tdf#146356 insert new paragraph before table of contents

It will be available in 24.8.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 14 Gabor Kelemen (allotropia) 2024-03-01 11:01:09 UTC
*** Bug 146565 has been marked as a duplicate of this bug. ***
Comment 15 Commit Notification 2024-03-01 14:28:37 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/51f872cbc1291123401cf22f27a7185801660e4a

tdf#146356 insert new paragraph before table of contents

It will be available in 24.2.2.

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 16 Commit Notification 2024-03-07 20:45:04 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bfb6904d8c0b054409faf8469752b033d7c2955a

test of tdf#146356

It will be available in 24.8.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 17 Commit Notification 2024-03-08 13:44:01 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4206cdaa3621cd95b81496ade829112db9e6a935

tdf#146356: sw: move UItest to CppUnittest

It will be available in 24.8.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.