https://bugs.documentfoundation.org/show_bug.cgi?id=107779
--- Comment #24 from Luca <[email protected]> --- (In reply to Eike Rathke from comment #23) > However, with the option checked the current behaviour comes to a surprise > because the sort range is shrunk to the actual used area and thus the > formula points outside. Shrinking is done because sorting empty areas (no > data and no attribution) is superfluous It's the logic of "arbitrarily shrinking user selected areas" that's plain dangerous. When a user specifically selects something, then the program should execute. If there is some reason not to execute, the program should issue a warning (and user should be able to disable that warning). Program's own arbitrary decision not to comply with user's disposition, without any warning, is dangerously bad design. In this particular case it causes data loss. This is priority against any other consideration. > and sorting those areas as well would just slow down things significantly. Is the slowing down caused by empty cells sorting really an issue? Maybe not a very scientific test, but I just added a value in cell ZZ10000 to extend the "select all" area in one of my spreadsheets to a ~5 million empty cells area and I didn't notice any significant slowdown when sorting. > This is especially important *because* people hit Ctrl+A select all or > select entire rows or columns to sort an actually smaller range. That's true, and why that happens? Right because of general lack of transparency about how areas to be sorted are arbitrarily selected by the program without warning, nor appropriate documentation. E.g., if there are empty rows or columns creating gaps between data, and I hit the sorting button without selecting anything, who says that I want to sort only the area within the gaps around the cell that has focus? That's Calc's arbitrary decision, breaking integrity of my records, no warning. If gaps are outside the window and I don't remember that there are some, here again, I lose data. This cause insecurity. To be sure and avoid data loss, users just hit ctr+a all the times. In the example case, the program should instead select all or nothing at all. If I need to partially sort a sheet, I will select the area myself. > In case the option is checked, shrinking the sort range must take references > in formula cells into account, if they point to within the selected area but > outside the used area, then stop shrinking there if so to have the > references adjusted (or rather not adjusted) as expected. Yes, that would solve this problem, but not the others. Till breaking records is considered a normal harmless behaviour, there will always be problems with the sorting functions. -- You are receiving this mail because: You are the assignee for the bug.
