Bug Hunting Session
Bug 111773 - Wrong selection after merge cells in an Impress table
Summary: Wrong selection after merge cells in an Impress table
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Daniel Silva
URL:
Whiteboard: target:6.1.0 target:6.0.0.1
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2017-08-13 16:59 UTC by Tamás Zolnai
Modified: 2017-11-30 21:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot after the merge (103.28 KB, image/png)
2017-08-13 16:59 UTC, Tamás Zolnai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Zolnai 2017-08-13 16:59:00 UTC
Description:
After merging four cells (2 rows and 2 columns) the cell selection is wrong. Not only the merged cell is selected, but also the two other cells next to the merged cell.

Steps to Reproduce:
1. Open Impress
2. Create a tabel with the default row and column number
3. Select the (1,1), (1,2), (2,1), (2,2) cells
4. Merge them (contect menu -> Cell -> Merge cells

Actual Results:  
After merge not only the merged cell is selected, but two others too.

Expected Results:
Only the merged cell should be selected.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Comment 1 Tamás Zolnai 2017-08-13 16:59:56 UTC
Created attachment 135523 [details]
Screenshot after the merge
Comment 2 Tamás Zolnai 2017-08-24 17:47:00 UTC
Let's turn this into an easy hack. The code is here:
\svx\source\table\tablecontroller.cxx
SvxTableController::updateSelectionOverlay() method can be a good starting point.
Comment 3 Daniel Silva 2017-11-29 09:44:26 UTC
I submitted a patch that tries to solve this bug: https://gerrit.libreoffice.org/#/c/45451/
Comment 4 Commit Notification 2017-11-30 13:03:08 UTC
Daniel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9b5062a3eeed6b94a2020b97f6dab9316af5d357

tdf#111773 tdf#111780 Fix selection after merge cells in an Impress table

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2017-11-30 21:09:15 UTC
Daniel committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cf715c7c60bd37d69f6fd6cbcb55e320503d9e36&h=libreoffice-6-0

tdf#111773 tdf#111780 Fix selection after merge cells in an Impress table

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.