Bug 111780 - Wrong selection highlight for a merged cell in Impress table
Summary: Wrong selection highlight for a merged cell in 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: Selection
  Show dependency treegraph
 
Reported: 2017-08-14 00:35 UTC by Tamás Zolnai
Modified: 2017-11-30 21:48 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing how merge cell highlighted (210.36 KB, image/png)
2017-08-14 00:36 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-14 00:35:51 UTC
Description:
After we merge more cells into one merged cell and select that merged cell the whole cell should be highlighted as a selection. However in Impress tables some times not the whole cell is selected, but only a part of it (see attached screenshot). Interestingly if I merge also other cells in the table selection become OK for the original merged cell.

Steps to Reproduce:
1. Open Impress
2. Insert table with the default row and column number
3. Select two cells
4. Merge them

Actual Results:  
After merge, if you select the merged cell the displayed selection highlight is wrong.

Expected Results:
Selection highlight should cover the whole merged cell.


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-14 00:36:17 UTC
Created attachment 135526 [details]
Screenshot showing how merge cell highlighted
Comment 2 Telesto 2017-08-14 19:23:23 UTC
Repro with:
Version: 6.0.0.0.alpha0+
Build ID: f1a896c71c495bdef5861eb664581507b6b9b5bb
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-08-13_07:38:19
Locale: nl-NL (nl_NL); Calc: CL
Comment 3 Tamás Zolnai 2017-08-14 23:10:17 UTC Comment hidden (obsolete)
Comment 4 Tamás Zolnai 2017-08-14 23:20:57 UTC
(In reply to Tamás Zolnai from comment #3)
> Let's turn it into a easy hack. The code is here:
> sd/source/ui/table/TableDesignPane.hxx
> sd/source/ui/table/TableDesignPane.cxx

Wrong code pointers.

The real one is here, pointint to the table controller:
\svx\source\table\tablecontroller.cxx
SvxTableController::updateSelectionOverlay() method can be a good starting point.
Comment 5 Daniel Silva 2017-11-29 14:53:17 UTC
I've noticed that this bug is related to tdf#111773 that I am currently working on. So I submitted a patch that aims to fix both: https://gerrit.libreoffice.org/#/c/45451/
Comment 6 Commit Notification 2017-11-30 13:03:15 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 7 Commit Notification 2017-11-30 21:09:24 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.