Bug 159963 - Copying from Calc cells is possible even after setting LockContentExtraction to true in MediaDescriptor
Summary: Copying from Calc cells is possible even after setting LockContentExtraction ...
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-29 13:58 UTC by Alex
Modified: 2024-03-13 09:32 UTC (History)
1 user (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 Alex 2024-02-29 13:58:08 UTC
Description:
I use EncryptionData model argumnets to told to LibreOffice that user doesn't have rights on copy. It's work fine for almost every cases, but I can copy text from cell of Calc document if I select the text insede cell

Steps to Reproduce:
1 make restriction on copy on Calc document
2 pick cell
3 select text incide cell and press Ctr+c
4 past in some editor

Actual Results:
text was copied

Expected Results:
text wesn't copied


Reproducible: Always


User Profile Reset: No

Additional Info:
.
Comment 1 DuyN 2024-03-05 11:30:55 UTC
Thank you for reporting the bug. I can confirm that the bug is present in:

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 2 Buovjaga 2024-03-07 16:12:55 UTC
(In reply to Alex from comment #0)
> Description:
> I use EncryptionData model argumnets to told to LibreOffice that user
> doesn't have rights on copy. It's work fine for almost every cases, but I
> can copy text from cell of Calc document if I select the text insede cell
> 
> Steps to Reproduce:
> 1 make restriction on copy on Calc document

Can you explain how you do this step?

In any case, if you right-click the sheet name, select Protect Sheet, then uncheck Select protected cells, you will be unable to select anything, but there is this way: bug 102162. By selecting all from the corner you can copy & paste everything to a new document.
Comment 4 Buovjaga 2024-03-13 09:32:04 UTC
(In reply to Alex from comment #3)
> I set LockContentExtraction to true in MediaDescriptor. 
> Link:
> https://api.libreoffice.org/docs/idl/ref/
> servicecom_1_1sun_1_1star_1_1document_1_1MediaDescriptor.
> html#aa16816a4605383b6483edd0063cc7af5

If you could also share the full code that you are using to do this, it would be great.