Bug 88454 - EDITING: Erroneous Behaviour of Selection Modes “Extended” and “Block” in Documents with tables
Summary: EDITING: Erroneous Behaviour of Selection Modes “Extended” and “Block” in Doc...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Statusbar Writer-Tables
  Show dependency treegraph
 
Reported: 2015-01-15 11:03 UTC by Harald Koester
Modified: 2024-05-18 16:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Koester 2015-01-15 11:03:56 UTC
There are remarkable differences of behaviour between the selection modes “normal” and “add” on the one side and “Extend” and “Block” on the other side in documents with tables. To my opinion the behaviour in the modes “Extend” and “Block” are not correct and should be equal to the other modes. 

Steps in order to reproduce the bug:

[1] Create new text document.
[2] In the status bar select “Extending selection” or “Block selection”.
[3] Insert table: Table > Insert > Table...: A table with 1 column and 1 row is inserted. Expected: Opening of “Insert Table” dialogue. 
[4] Move cursor to selection icon in the status bar. A tip is displayed: “Standard selection”. So the selection mode has been changed by the insertion of the table. Expected: No change of selection mode.
[5] Click somewhere below the table: The cursor is still in the table: Expected: Cursor directly below table.
[6] Undo insertion of table. Selection mode is still “Standard”.
[7] Insert table again: A table with 1 column and 1 row is inserted. Expected: Opening of “Insert table” dialogue.
Comment 1 Buovjaga 2015-01-17 14:19:31 UTC
Something is fishy with this, it's true.
4.5 alpha crashed for me several times, when inspecting the selection mode either by clicking or hovering. This was after I created the table.
Extended was already selected the first time I clicked, btw.

I could not get 4.3.3 to crash. Or 4.5 Windows.

Also, the tooltip might display Standard, but when I clicked, the selection menu showed Extended. Or even Adding, if I had selected it at some point!

I also observed, that if I as much as click to see the selection type and then insert table, the table dialog does not appear. This can be observed already with 3.3.0, although it has a different display of selection modes.

It's also true that one cannot click the cursor below the "weird table".

I'm setting to inherited from OOo because the weird table is inserted with it already.

Crash msg from 4.5 on Ubuntu:
soffice.bin: /home/buildslave/source/libo-core/sw/source/core/bastyp/bparr.cxx:86: BigPtrEntry* BigPtrArray::operator[](sal_uLong) const: Assertion `idx < nSize' failed.

Tested on:
Win 7 Pro 64-bit Version: 4.5.0.0.alpha0+
Build ID: 5f6bdce0c0ac687f418821ce328f2987bf340cda
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-01-17_01:06:46

Ubuntu 14.10 64-bit Version: 4.5.0.0.alpha0+
Build ID: 0ffa3abc7d6c0437ece30cfb1430d28ffcc9f5c1
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2015-01-15_22:47:16

Version: 4.3.3.2
Build ID: 430m0(Build:2)

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 2 QA Administrators 2016-01-17 20:02:09 UTC Comment hidden (obsolete)
Comment 3 Harald Koester 2016-01-18 18:25:49 UTC
Bug still exists in version 5.0.4 with Win7.
Comment 4 Andrew 2016-02-16 05:38:01 UTC
Still exist in 5.1.0.3 in win 8.1
But I don't understand what is the meaning of this option?
Comment 5 Harald Koester 2016-02-16 19:37:32 UTC
Hi Andrew,

the Selection Modes are described here:
https://help.libreoffice.org/Common/Selection_Mode
Comment 6 QA Administrators 2017-03-06 15:04:04 UTC Comment hidden (obsolete)
Comment 7 Harald Koester 2017-03-16 14:31:03 UTC
Bug still exists in version 5.3.0. 

Meanwhile also in mode "Adding Selection" the behaviour is not correct.
Comment 8 QA Administrators 2018-03-17 03:32:53 UTC Comment hidden (obsolete)
Comment 9 Harald Koester 2018-03-17 22:18:39 UTC
Bug still exists with version 6.0.2 (64 bit, Win 10).
Comment 10 QA Administrators 2019-03-18 03:45:34 UTC Comment hidden (obsolete)
Comment 11 Harald Koester 2019-04-04 19:34:28 UTC
Bug still exists in version 6.2.2 (64 Bit, Win10).
Comment 12 QA Administrators 2021-04-04 04:00:55 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2023-04-16 03:24:50 UTC Comment hidden (obsolete)
Comment 14 Julien Nabet 2024-05-18 16:57:11 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

After some debugging, I found that in SwBaseShell::InsertTable
we go to the first if block when using "extending select" and in the else block when using "standard select".
(see https://opengrok.libreoffice.org/xref/core/sw/source/uibase/shells/basesh.cxx?r=1a91641f#3070).

If I force the use of the else block when using "extending select", the result is almost perfect, the only remaining pb is in [6], when undoing, it removes the table AND puts back "standard select".

Michael: any thoughts here?