[Libreoffice-bugs] [Bug 143114] Libclplug: kf5 support errors

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Jul 23 19:34:54 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=143114

--- Comment #3 from Jan-Marek Glogowski <glogow at fbihome.de> ---
(1) should be fixed by the fix for tdf#143334
(3) should be fixed by commit 63f92f185b78db5a575da58efac3f94a8cb5a5f6 ("Qt5
fix Qt::Popup window handling")

(2) is ... complex. It's not a normal checkbox problem. These work correct. The
problem is a checkbox inside a treeview.

If you have a treeview, you're actually handling rows. And if you hold the left
button and move the mouse, you start a drag operation of the row.

void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel )
{
    Point aEventPos( rPosPixel );
    MouseEvent aMouseEvt( aEventPos, 1, MouseEventModifiers::SELECT, MOUSE_LEFT
);
    MouseButtonUp( aMouseEvt );

So now you know that actually when starting a drag you don't, because LO now
generates a MouseButtonUp + MouseEventModifiers::SELECT event...

And select means toggle for a checkbox, which is what you observe as wrong,
when you start the drag. Then there is a lot of special handling code, when you
actually start the drag operation on a checkbox (AKA SvLBoxItemType::Button),
see SvImpLBox::ButtonDownCheckCtrl and friends.

If you comment these three lines, you get a selection following your mouse.
Maybe that is actually the correct behavior for a normal list view? AKA you
just select on mouse up (but just if you don't start the drag by clicking on a
button currently). But then it still toggles the checkbox for the last selected
row, even when you release the mouse outside the widget. And what should
happen, if you start the select on a row, but release on a 2nd? If you follow
the "selection on up", that should select the current row.

And it gets more interesting if you have rows with multiple buttons, like in
Options >> Load/Save >> MS Office. There toggle on selection doesn't make any
sense IMHO...

P.S. and there was tdf#116675, the parent for a whole lot of regression and
other "pleasantries", like https://gerrit.libreoffice.org/c/core/+/108947 (and
instead of implementing a click handler for the autofilter list box, NIST
changed the general widget...). Instead of having a special handler for row
selection, which toggles the checkbox, we get a more complex general widget...

Current conclusion: any fix on top of this can get messy with potential
regressions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210723/61036471/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list