Bug 44812 - Sort ignores links from local url buttons to cells in the sorted range
Summary: Sort ignores links from local url buttons to cells in the sorted range
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Sorting
  Show dependency treegraph
 
Reported: 2012-01-15 11:04 UTC by andréb
Modified: 2022-10-20 03:44 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
sample of problem (15.54 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-12-05 08:07 UTC, andréb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andréb 2012-01-15 11:04:46 UTC
(Note 1 : my version of Libreoffice is in french, so the names given may not be exact translations.)
(Note 2 : would expect this bug to affect all hardware and os.)

If there is a table with links to various cells of the table from url buttons, and the table is sorted, the links are not changed to correspond to the new cell positions.

case 1) First I tried direct relative url links to specific buttons.
Inserting lines or rows properly adjusted the links.
To this point the url buttons all worked properly.
Sorting the table left the links pointing to the same position in the table, so they became corrupted.  (No longer pointing to the appropriate cells.)

case 2) Then I tried creating named ranges to the single cells in question, associating the url buttons with the named ranges.
The routine to create/modify the links insisted on creating absolute links.  However, inserting lines or rows properly adjusted the links used by the url buttons.
To this point the url buttons all worked properly.
Sorting the table left the named ranges to the same position in the table, so they became corrupted.  (No longer pointing to the appropriate cells.)

3) Note that in both cases, the url buttons still followed the links, but they pointed to the original positions, and not the new positions of the concerned cells.

4) What was expected :
The links would point to the same cells in their new positions in the table.

5) Note that if case 2 worked, it would work for any link (external or local), as the name is maintained locally.
However case 1 is easier for the user to code, since links to the local cells are made directly, without the need to create named ranges.
Comment 1 ign_christian 2013-06-22 07:24:57 UTC
Please attach sample file & explanation how to see that problem.
Then mark this bug UNCONFIRMED.
Comment 2 andréb 2013-06-22 08:15:06 UTC
(In reply to comment #1)

will do.
have to create a new sample file, since my original file from 17 months ago is no longer available.
Comment 3 Jean-Baptiste Faure 2013-12-03 05:15:19 UTC
No answer from reporter since 5 months. So closing as INVALID.

Please, feel free to reopen if you are willing to provide requested informations.

Note: the behavior of sorting may depend on the way you define your links. Generally you should use HYPERLINK() function.

Best regards. JBF
Comment 4 andréb 2013-12-05 08:07:30 UTC
Created attachment 90293 [details]
sample of problem

This shows the problem.

If the col-1 is sorted (the initial state), each button is linked to a word beginning with the first 3 letters displayed on the button.

If col-2 is sorted, each button remains linked to the same location, and does not move with the cell content.
Easily seen, as no button points to a word beginning with the first 3 letters.

If col-1 is again sorted (returning to the initial state), each button again is linked ot a word beginning with the first 3 letters, as the cells have returned to their initial position, and the links did not move with the content.

One use case for this would be a table where content is regularly added randomly, and then table is sorted.
The buttons would no longer point to the same cell content.

Note that if lines (or colomns) were inserted in the correct location, then the links would move with the insertion, and would continue to point to the correct cell content.
Comment 5 andréb 2013-12-05 08:21:57 UTC
(In reply to comment #3)
> Note: the behavior of sorting may depend on the way you define your links.
> Generally you should use HYPERLINK() function.
> 
It is defined by the formula + button definition controls, presumably using the hyperlink function behind the scenes.

Note that the "action" for defining a hyperlink is strangely called
 "open a page web" (« Ouvrir la page web »)
instead of a more appropriate
 "open a hyperlink"
or better
 "define a hyperlink"
I would be very surprised if it is not usually used for local references.

As readily seen in the definitions, all the links are defined relative to the current sheet, in the form of
 #a10
Comment 6 Algot Runeman 2014-07-27 16:41:12 UTC
Test Setup:
Kubuntu 4.13.4
LibreOffice: 4.2.4.2

The behavior on my test setup is consistent with the "bug" description.

QUESTION: Is this behavior the same in Excel?

It has been recommended to consider this as an enhancement request rather than a bug.
Comment 7 QA Administrators 2015-09-04 02:48:17 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2016-09-20 10:29:27 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2020-10-19 04:19:06 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2022-10-20 03:44:44 UTC
Dear andréb,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug