Bug 120680 - Menu entries for shapes should be disabled in protected mode
Summary: Menu entries for shapes should be disabled in protected mode
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cell-Sheet-Protection 161431
  Show dependency treegraph
 
Reported: 2018-10-18 19:16 UTC by Xisco Faulí
Modified: 2024-06-05 20:22 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 Xisco Faulí 2018-10-18 19:16:39 UTC
Steps to Reproduce:
1. Take any sheet with protected cells, for example attachment 129104 [details]
2. Select one of the protected cells
3. Menu Insert > Shape > Any shape

Reproduced in

Version: 6.2.0.0.alpha0+
Build ID: 5fb66ae5595b7435e8954df31473fad15a74b8c2
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (ca_ES.UTF-8); Calc: threaded
Comment 1 Buovjaga 2018-12-27 16:21:58 UTC
Repro. Shape insertion was added to the menu somewhere between 5.0 and 5.3.
Comment 2 QA Administrators 2020-12-27 03:37:05 UTC Comment hidden (obsolete)
Comment 3 Xisco Faulí 2021-01-04 16:22:55 UTC
Still reproducible in

Version: 7.2.0.0.alpha0+
Build ID: 2c9708cbb870483a8a1c93d722085be5f789d234
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Heiko, candidate for easyhack ?
Comment 4 Heiko Tietze 2021-01-05 08:41:26 UTC
(In reply to Xisco Faulí from comment #3)
> @Heiko, candidate for easyhack ?

Shapes are generic commands, not only used in Calc. There is .uno:BasicShapes and .uno:BasicShapes.rectangle, .uno:BasicShapes.quadrat etc. with SID_DRAWTBX_CS_BASIC and SID_DRAWTBX_CS_BASIC1.. SID_DRAWTBX_CS_BASIC<n>. All the children commands needs to be disabled individually.

I would think about a new state method, assign this to all SIDs, add the code similar to ScModule::GetState( SfxItemSet& rSet ). Maybe ScTable::IsProtected returns whether the sheet is protected. OTOH, such a state method requires Calc specific commands...

Usually I fail with the first approach and things are more complicated than expected. So not an easyhack.
Comment 5 QA Administrators 2023-01-06 03:19:47 UTC
Dear Xisco Faulí,

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