diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-07-04 13:05:08 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-07-04 16:28:53 +0200 |
commit | 4002a399af823055b6ba59db18ded1caba4969c9 (patch) | |
tree | 93f35d6fa7807fd72806168001f55bdd09e22f03 /.git-hooks | |
parent | 895643431e6aea672158bae3772a36f26cd05cde (diff) |
sw content control, picture, lok: fix change of placeholder after insert
Commit c769c369c87a46ec877b7eefee27988044a2798f (sw content controls:
fix picture placeholders, 2022-07-01) fixed picture placeholders on the
desktop, but left the LOK case still broken.
This is a problem since picture placeholders are protected (which is
wanted), and these only allow SID_CHANGE_PICTURE, not
SID_INSERT_GRAPHIC.
Fix the problem by adapting
SwXTextDocument::executeContentControlEvent() to dispatch
SID_CHANGE_PICTURE (and not SID_INSERT_GRAPHIC), but do keep the slot ID
of the argument as SID_INSERT_GRAPHIC, since SwView::InsertGraphicDlg()
looks for a non-interactive URL as SID_INSERT_GRAPHIC even if we're
changing an image, not inserting a new one.
This means that LOK clients can't use SID_INSERT_GRAPHIC to change
picture placeholders, they have to go via
SwXTextDocument::executeContentControlEvent(), which is what
gtktiledviewer does already.
Change-Id: Ica42939f6564da3d59396a4b302be826d3968f8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136797
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to '.git-hooks')
0 files changed, 0 insertions, 0 deletions