Bug 145609 - When selected cell is in a frozen row/column, the sheet right click event gets the wrong cell
Summary: When selected cell is in a frozen row/column, the sheet right click event get...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-10 02:59 UTC by mailforbugzilla
Modified: 2025-11-27 11:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example file showing the problem (11.86 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-05-22 03:35 UTC, mailforbugzilla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mailforbugzilla 2021-11-10 02:59:01 UTC
Description:
The right click event is offset by the frozen rows/columns height/width when the selected cell is in those frozen ranges and the right clicked cell is not or vice versa, changing the height/width changes the cell referenced by the event even when clicked on the same position.

Steps to Reproduce:
1. Freeze one or more rows/columns
2. Write a BASIC macro like this one:

Function RightClick (oEvent As Variant) As Boolean
    MsgBox "Right clicked: " & oEvent.AbsoluteName
    RightClick = True
End Function

3. Assign the macro to the Sheet's right click event
4. Select a cell inside the frozen range (left click), and right click any cell outside.
5. The address shown will be from the cell in the position clicked minus total height/width of frozen cells where the selected cell is. (properties like oEvent.String, oEvent.CellAddress and probably any other property has data from the wrong cell)

Actual Results:
get the wrong cell address

Expected Results:
get the correct cell address


Reproducible: Always


User Profile Reset: Yes



Additional Info:
If you freeze 1st row and 1st column and select A1, it will be offset by both, for B1 only row height and A2 only column width
This also happens in reverse (select outside frozen cells and right click inside)

Version: 7.1.7.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.14; UI render: default; VCL: kf5
Locale: pt-BR (en_US.UTF-8); UI: en-US
7.1.7-1
Calc: threaded

Same thing happens on OpenOffice 4.1.11 and Windows 7 with LibreOffice 7.2.2
Comment 1 Buovjaga 2022-11-22 11:16:42 UTC
(In reply to mailforbugzilla from comment #0)
> Description:
> The right click event is offset by the frozen rows/columns height/width when
> the selected cell is in those frozen ranges and the right clicked cell is
> not or vice versa, changing the height/width changes the cell referenced by
> the event even when clicked on the same position.
> 
> Steps to Reproduce:
> 1. Freeze one or more rows/columns
> 2. Write a BASIC macro like this one:
> 
> Function RightClick (oEvent As Variant) As Boolean
>     MsgBox "Right clicked: " & oEvent.AbsoluteName
>     RightClick = True
> End Function
> 
> 3. Assign the macro to the Sheet's right click event
> 4. Select a cell inside the frozen range (left click), and right click any
> cell outside.
> 5. The address shown will be from the cell in the position clicked minus
> total height/width of frozen cells where the selected cell is. (properties
> like oEvent.String, oEvent.CellAddress and probably any other property has
> data from the wrong cell)

I don't know how to do step 3.

Best would be, if you created an example document and attached it, so we can quickly test.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 2 QA Administrators 2023-05-22 03:15:12 UTC Comment hidden (obsolete)
Comment 3 mailforbugzilla 2023-05-22 03:35:41 UTC
Created attachment 187430 [details]
example file showing the problem
Comment 4 mailforbugzilla 2023-05-22 03:37:56 UTC
(In reply to Buovjaga from comment #1)
> (In reply to mailforbugzilla from comment #0)
> > Description:
> > The right click event is offset by the frozen rows/columns height/width when
> > the selected cell is in those frozen ranges and the right clicked cell is
> > not or vice versa, changing the height/width changes the cell referenced by
> > the event even when clicked on the same position.
> > 
> > Steps to Reproduce:
> > 1. Freeze one or more rows/columns
> > 2. Write a BASIC macro like this one:
> > 
> > Function RightClick (oEvent As Variant) As Boolean
> >     MsgBox "Right clicked: " & oEvent.AbsoluteName
> >     RightClick = True
> > End Function
> > 
> > 3. Assign the macro to the Sheet's right click event
> > 4. Select a cell inside the frozen range (left click), and right click any
> > cell outside.
> > 5. The address shown will be from the cell in the position clicked minus
> > total height/width of frozen cells where the selected cell is. (properties
> > like oEvent.String, oEvent.CellAddress and probably any other property has
> > data from the wrong cell)
> 
> I don't know how to do step 3.
> 
> Best would be, if you created an example document and attached it, so we can
> quickly test.
> 
> Set to NEEDINFO.
> Change back to UNCONFIRMED after you have provided the document.

Added an example file, also the step 3 is on Menu Sheet > Sheet Events
Comment 5 QA Administrators 2025-11-27 11:28:32 UTC
Dear mailforbugzilla,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug