diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-07-01 11:40:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-07-01 15:44:48 +0200 |
commit | 4206a258510f25dbd07fb654033cf775aedd43ea (patch) | |
tree | 4f7feea6ec276e3e6f8edc5670309a99f0147a00 | |
parent | a23172e88c3f82d590bba31894c0935067ee7c13 (diff) |
sw content controls: fix picture placeholders
This went wrong in commit c321498f915f4e8b3f4853232860ce040ab48e46 (sw
content controls: reject typing inside checkbox or picture content
controls, 2022-06-10), now a freshly inserted picture content control is
not replaced with an image on click.
The problem is that we want to forbid typing into a picture content
control (it should only host a single as-char image), but changing the
picture's bitmap is meant to be still possible.
Fix the problem by allowing SID_CHANGE_PICTURE even if the cursor is
protected: this allows changing the picture again, and a real read-only
document still doesn't show the "change" menu item in its context menu.
If we later find some other corner-case where this command should be
still disabled, we can extend SwGrfShell::GetAttrState(), similar to how
e.g. inserting images in input fields is disabled there.
Change-Id: I8b55e930330b9748ecda950dedae907b86c57e2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136729
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit c769c369c87a46ec877b7eefee27988044a2798f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136711
-rw-r--r-- | sw/sdi/_grfsh.sdi | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi index 8291745966bb..5475017d448e 100644 --- a/sw/sdi/_grfsh.sdi +++ b/sw/sdi/_grfsh.sdi @@ -63,7 +63,6 @@ interface BaseTextGraphic [ ExecMethod = Execute ; StateMethod = GetAttrState ; - DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] SID_EXTERNAL_EDIT |