Bug 134960 - No logic in the object order in the navigator
Summary: No logic in the object order in the navigator
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2 tar...
Keywords:
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2020-07-19 14:48 UTC by Telesto
Modified: 2022-05-04 04:31 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
File used in screencast (57.09 KB, application/vnd.oasis.opendocument.text)
2020-07-19 17:37 UTC, Telesto
Details
Screencast (959.27 KB, video/mp4)
2020-07-19 17:37 UTC, Telesto
Details
Example file (42.86 KB, application/vnd.oasis.opendocument.text)
2020-07-27 15:10 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-07-19 14:48:53 UTC
Description:
No logic in the object order in the navigator

Steps to Reproduce:
1. Open attachment 163278 [details]
2. Sidebar -> Navigator -> Expand OLE Objects
3. Start with click object1008 and go down until 1015

Actual Results:
Object1009 follow up 1008 (fine)
Object1011 is before 1010 (odd). So we going from right to left. 

Same happens with 1013-1015

For the record i'm not object numbers (as to can mix). It's more about how those are ordered in the document compared to the listing in the navigator

Expected Results:
Top down left right. And maybe right left for RTL


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 52820b52b3bca45e2db527d1cc5f4488b2e0b9d0
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-07-19 14:50:22 UTC
I'm possibly missing something; I surely didn't read the manual or help :-). So only based on what I intuitively would expect
Comment 2 Regina Henschel 2020-07-19 16:41:39 UTC
The Navigator shows the objects in the order, which is used when you traverse through the objects with the Tab-key. The principle idea is, that you can change this order by dragging the object names in the Navigator. But I think, that was never implemented in Writer. It works in principle in Draw, but has errors, e.g bug 130196.

@Telesto: You should discuss such problems on the mailing list or forum before opening a bug report.
Comment 3 V Stuart Foote 2020-07-19 17:16:01 UTC
No mystery...

Open the ODF archive with something (e.g. 7-zip) and then edit/view the 'content.xml' that hold the linkages to the draw objects holding OLE (sm formulas in this case).

You'll see the objects listed by name in Navigator are just the 'draw:name=' "strings" that were applied in some distant source document.

As extracted for this sample--the object sequence in the Navigator is simply the sequence of the 64 objects as held in this ODF archive, sequenced T->B in the XML stream, and R->L per line.

The original "name" strings for objects appearing no longer have any relevance in *this* ODF archive. Sequence is top to bottom in order.

=> NAB
Comment 4 Telesto 2020-07-19 17:34:22 UTC
(In reply to Regina Henschel from comment #2)
> The Navigator shows the objects in the order, which is used when you
> traverse through the objects with the Tab-key. 

-> It's surely not following order as when pressing tab in the document; that was the point.. i double clicked them 1 by 1.. and goes back forwards..

The principle idea is, that you can change this order by dragging the object names in the Navigator.
-> And what would the point be? I assumed it was a plain listing of the objects the order as positioned in the document

@Telesto: You should discuss such problems on the mailing list or forum before opening a bug report.

About the mailing list: A) which mailing list (UX/QA/Dev/Board). B) Not of fan of the mailing list anyhow. Does it allow attachments etc.. Forum? Where is the forum located not aware of a LibreOffice forum. Ask doesn't seem the proper place.
Comment 5 Telesto 2020-07-19 17:36:03 UTC
(In reply to V Stuart Foote from comment #3)
> No mystery...
> 
> Open the ODF archive with something (e.g. 7-zip) and then edit/view the
> 'content.xml' that hold the linkages to the draw objects holding OLE (sm
> formulas in this case).
> 
> You'll see the objects listed by name in Navigator are just the 'draw:name='
> "strings" that were applied in some distant source document.
> 
> As extracted for this sample--the object sequence in the Navigator is simply
> the sequence of the 64 objects as held in this ODF archive, sequenced T->B
> in the XML stream, and R->L per line.
> 
> The original "name" strings for objects appearing no longer have any
> relevance in *this* ODF archive. Sequence is top to bottom in order.
> 
> => NAB

The sequence is not following the document order (at least not at the same level). Will upload a screencast
Comment 6 Telesto 2020-07-19 17:37:28 UTC
Created attachment 163280 [details]
File used in screencast
Comment 7 Telesto 2020-07-19 17:37:48 UTC
Created attachment 163281 [details]
Screencast
Comment 8 V Stuart Foote 2020-07-19 19:44:39 UTC
And yet if I open (or copy -> open) attachment 163280 [details] and open the OLE for object1 (i.e. object538) and while in the OLE sm session click another object--on close back to the document view--the list order for the OLE in Navigator shifts to match document sequence for objects held in the table cells.

The 'undo' dialog shows it as a 'change style' for the OLE object--unclear how the object style (and which attribute) impacts its sequencing on the list of the objects--but it seems to.
Comment 9 Heiko Tietze 2020-07-20 07:23:04 UTC
I see two options to progress:

a1) NAB (the order follows the tab sequence, there is a logic behind)
a2) forward the ticket to documentation (to add this somewhere)
b1) change the order so it follows the appearance in the document (Writer only)
b2) make the sorting optional (overkill to me)

While the tab order makes sense in Draw, does it also in Writer?
Comment 10 Telesto 2020-07-20 07:44:57 UTC
order follows the tab sequence, there is a logic behind

-> still no idea what I this means in the current case
Comment 11 Heiko Tietze 2020-07-27 13:27:30 UTC
(In reply to Telesto from comment #10)
> order follows the tab sequence, there is a logic behind
> 
> -> still no idea what I this means in the current case

If you traverse through the document (or UI) using the tabulator key you access the content (or controls) in a certain sequence. Usually but not necessarily sequential. In fact it's chronological.

Let's resolve as NAB.
Comment 12 Telesto 2020-07-27 15:10:01 UTC
Created attachment 163637 [details]
Example file

(In reply to Heiko Tietze from comment #11)
> (In reply to Telesto from comment #10)
> > order follows the tab sequence, there is a logic behind
> > 
> > -> still no idea what I this means in the current case
> 
> If you traverse through the document (or UI) using the tabulator key you
> access the content (or controls) in a certain sequence. Usually but not
> necessarily sequential. In fact it's chronological.

Sorry; I'm not giving in to easily. I want some kind of answer. From what I see it does some quirky 'random' thing. Sure code wise this maybe somehow explainable. 

I have actually two (maybe even more) issues with the navigator listing.

A) Object names are generated. They generated on insertion; So I assume sequential on insertion time. Shuffling the objects around after insertion, makes objects numbers are kind of random mess
B) Objects name are apparently created on free spots. So delete Object1.. they new insert item will be called Object1 (surely not chronological nor sequential. Copy A formula in the example file & paste.. it below
C) Now Cut they just pasted object, and paste it the beginning of the document. Object1 moves from last position in the navigator up to number 1 (so list in navigator isn't chronological).. but sequential to document position? Insert to Charts and shuffle them around.. the navigator objects order of the objects every time.. 

The current implementation unpredictable 
A) They object naming is troublesome (numbering; without logical order).  Not sure what the alternative would be Object + HASH)
B) They numbering doesn't start with say with 0001 but with 1  so not a nice list; jumbled with Object01 followed by Object010. 
C) They order isn't sequential nor chronological. Still no clue how it actually works; But sequential to document would make more sense; I think..
D) And if we gonna export this to DOC/DOCX/RTF and reopen you get again something else :-(.
Comment 13 Telesto 2020-07-27 15:11:21 UTC
@Luke
Sorry for dragging into this: any experience with they navigator?
Comment 14 Heiko Tietze 2020-07-28 08:59:48 UTC
(In reply to Telesto from comment #12)
> Sorry; I'm not giving in to easily.

You are very welcome. Point is you insert object 1 later object 2 but move it at the beginning. Should the order be chronologically or follow the appearance? Either way you do wrong.
Comment 15 Telesto 2020-07-28 10:18:40 UTC
(In reply to Heiko Tietze from comment #14)
> (In reply to Telesto from comment #12)
> > Sorry; I'm not giving in to easily.
> 
> You are very welcome. Point is you insert object 1 later object 2 but move
> it at the beginning. Should the order be chronologically or follow the
> appearance? Either way you do wrong.

As said there are multiple annoyances. 
A) Object naming; numbered is suggests some kind of sequential. Which isn't the case.. It's not numbering always up (chronological insertion), but uses also free slots (say deleted Object1). The numbering is also not in order of the content in document. And the numbering doesn't show as nice list. I would expect  Object000001 Object000002. 

So personally the whole numbering has to be replaced by something else. Maybe some kind of hash. Or drop the numbering at UI level and call everything Object if it has generated name without addition of numbering. They problem with that is of course that everything looks the same. So 100 objects called object without having a unique name. 

2) About they order in the navigator. It shows stuff sequential (or linear) so from top to bottom (and LTR or RTL depending)

They current way has no logic from user point of view (there is probably some kind of technical explanation; except i'm not seeing the pattern). It's not pure chronologically its not pure sequential as far I can tell.
Comment 16 Jim Raykowski 2021-12-10 07:46:37 UTC
Here is a patch that lists drawing objects under the Drawing objects category in the order they appear in the document:
https://gerrit.libreoffice.org/c/core/+/126627

@Telesto
The reason the Example file tabs and lists OLE objects in the order it does is because of the positions of the top of the objects frame rectangles in the document. For objects with the same top position, sort is done by object name.
Comment 17 Commit Notification 2021-12-14 00:33:24 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9e046e43fc6d3fecd193da076c0871a458ba71dd

tdf#134960 List drawing objects in order of appearance in document

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 18 Commit Notification 2021-12-14 10:13:49 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/2b035eb5ba1f9600ea19937519cbc9068c31263b

tdf#134960 List drawing objects in order of appearance in document

It will be available in 7.3.0.0.beta2.

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 19 Commit Notification 2021-12-21 05:36:22 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/64065ade86cac68b9d500f0495ffc5745a944819

tdf#134960 List hyperlinks in order of apperance in the document

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 20 Commit Notification 2021-12-21 12:44:37 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#134960 List hyperlinks in order of apperance in the document

It will be available in 7.3.0.0.beta2.

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 21 Commit Notification 2022-01-04 06:56:08 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#134960 SwNavigator: Improve table content member list ordering

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 22 Commit Notification 2022-01-05 06:59:56 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1aa49bb9cf2b960312bf1e65ea1eee2521873a16

tdf#134960 tdf#146419 use sorted array to list hyperlinks in Navigator

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 23 Commit Notification 2022-01-05 14:57:11 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#134960 SwNavigator: Improve table content member list ordering

It will be available in 7.3.0.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 24 Commit Notification 2022-01-11 03:54:01 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/3e224dc4e49b2a016bb7502031f002517237bea0

tdf#134960 tdf#146419 use sorted array to list hyperlinks in Navigator

It will be available in 7.3.0.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 25 Commit Notification 2022-01-13 20:34:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/45dee329c30f5548b0ba57cc1457c73f2fc870a3

tdf#134960: sw: Add test for multi-page view

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 26 Xisco Faulí 2022-05-03 11:50:39 UTC
A polite ping to Jim Raykowski:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ?
Otherwise, Could you please explain what's missing?
Thanks
Comment 27 Jim Raykowski 2022-05-04 04:31:50 UTC
I think all category members are now listed in order of document appearance or optionally, with exception of comments and footnotes, and endnotes, in alphabetical order. In addition to the merged patches directly linked to this request, here are some other merged patches that also contribute to providing logical order to category members.

https://gerrit.libreoffice.org/c/core/+/133101
https://gerrit.libreoffice.org/c/core/+/133342
https://gerrit.libreoffice.org/c/core/+/133350
https://gerrit.libreoffice.org/c/core/+/133359
https://gerrit.libreoffice.org/c/core/+/131448