[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-12-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

Heiko Tietze  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |andreas.heini...@yahoo.de
   |desktop.org |
 Status|NEW |ASSIGNED

--- Comment #33 from Heiko Tietze  ---
(In reply to Andreas Heinisch from comment #29)
> WIP-Patch: https://gerrit.libreoffice.org/c/core/+/125727
> 
> Comments are highly appreciated :)

Pretty cool stuff. I can load the document on MSO and get the ToC at the
correct place (MSO is not activated so I cannot test further). 

But while loading with older versions (7.2.3.2) works, the app goes into an
infinite loop on interaction. Meaning, when I click on the ToC it occupies 100%
CPU and I have to kill the application. Happens also when the ToC is placed on
top.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-12-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #32 from Emanuele Gissi  ---
Created attachment 176936
  --> https://bugs.documentfoundation.org/attachment.cgi?id=176936=edit
Updated test case for the proposed patch (generated PDF)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-12-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #31 from Emanuele Gissi  ---
Created attachment 176935
  --> https://bugs.documentfoundation.org/attachment.cgi?id=176935=edit
Updated test case for the proposed patch

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-12-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #30 from Emanuele Gissi  ---
I applied your patch and recompiled LO.

All ToCs and indexes are created correctly.
No regression appears when ToCs and indexes are generated on the entire
document, or first outline level.

Only problem left is that the "List of Figures" created per "Chapter" does not
correctly select the figures contained by the cursor heading, and display all
the figures of the document.

I attach the updated test case, with updated comments in it.
See the yellow inline comments for issues.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-12-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #29 from Andreas Heinisch  ---
WIP-Patch: https://gerrit.libreoffice.org/c/core/+/125727

Comments are highly appreciated :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-11-23 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #28 from Andreas Heinisch  ---
Created attachment 176453
  --> https://bugs.documentfoundation.org/attachment.cgi?id=176453=edit
Result after the first WIP commit

WIP Patch for this enhancement: https://gerrit.libreoffice.org/c/core/+/125727

Above you have the current status of the implementation for this enhancement
request. There are still some presentation and implementation issues. For
instance, the ToC should not be intended if there is no top level entry for the
current index (see ToC of Paragraph H4 and others). Then, do we take into
account the level of evaluation ("Evaluate up to level" in th UI)?

Last but not least, I do not have enough insight in the ToC creation. For
instance, how does the SwRootFrame const*const pLayout influence the generation
of the ToC? How are other ToCs (UpdateTemplate, UpdateContent, UpdateTable,
...) influenced with this change? Maybe a developer with more insight could
give some advice in order to proceed because I will sureley miss many points
making this work :)

Thanks to Emanuele for the support!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-11-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #27 from Andreas Heinisch  ---
So after investigating the request, I checked the code:

In void SwTOXBaseSection::UpdateOutline [1] the outlines will be updated for
the index. The same function checks if a TextNode belongs to the own chapter or
not if the create index for chapter is set [2]. 

If we change the current behaviour and create the index from the cursor
position, the IsFromChapter and lcl_FindChapterNode functions [3] have to be
changed in order to find the first parent node from the current node where the
cursor is.

I am not an expert in the ToC index creation and I have to check how to
retrieve the current cursor position in order to get the correct parent node
for the index. Maybe we have to set also the starting level to make this
working correctly.

[1]
https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/doctxm.cxx?r=5f9ffc31#1234
[2]
https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/doctxm.cxx?r=5f9ffc31#1253
[3]
https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/doctxm.cxx?r=5f9ffc31#857

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-11-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #26 from Emanuele Gissi  ---
Thank you, let me know if I can support you

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-11-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #25 from Andreas Heinisch  ---
I will give it a try in the next days and will report back. Busy times ...

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-11-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #24 from Emanuele Gissi  ---
Any good news?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-10-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #23 from Andreas Heinisch  ---
I will take a look at this, after finishing some work.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-10-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

Heiko Tietze  changed:

   What|Removed |Added

 CC||t...@libreoffice.org

--- Comment #22 from Heiko Tietze  ---
(In reply to Emanuele Gissi from comment #21)
> I suggest adding this bug that work, I could finance the additional request.

Thorsten, what do you think?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-10-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

--- Comment #21 from Emanuele Gissi  ---
I have seen that the Document Foundation assigned a tender to implement master
document fixes (#202106-02) to Allotropia:
https://blog.allotropia.de/2021/09/16/libreoffice-master-document-fixes/

I suggest adding this bug that work, I could finance the additional request.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-10-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

Heiko Tietze  changed:

   What|Removed |Added

 CC||andreas.heini...@yahoo.de

--- Comment #20 from Heiko Tietze  ---
(In reply to Emanuele Gissi from comment #18)
> Any news? Could I help out with financing?

You can contact a company that provides professional support. See for a list
https://www.libreoffice.org/get-help/professional-support/. Adding also
Andreas, maybe he's interested.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 130318] Use the actual cursor position to create ToC "for chapter" beginning at the current level (impacts odm master documents)

2021-10-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=130318

Emanuele Gissi  changed:

   What|Removed |Added

Summary|Use the actual cursor   |Use the actual cursor
   |position to create ToC "for |position to create ToC "for
   |chapter" beginning at the   |chapter" beginning at the
   |current level   |current level (impacts odm
   ||master documents)

-- 
You are receiving this mail because:
You are the assignee for the bug.