sw content controls, picture: replace placeholder image on click

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 19 May 2022 12:38 UTC

Previous content control types (rich text, checkbox, dropdown) had the cursor somewhere in the content control and click selected the content control in the placeholder case.

The picture case is somewhat different: the content control has a single as-char image, and by the time SwWrtShell::GotoContentControl() is invoked, the picture frame is already selected.

All we have to do here is to trigger the file picker to select a replacement and then insert that image to replace the already selected frame's bitmap.

Change-Id: Id3ad94ed8f7e13b0ebc2f57327bb8c0b1e374a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134511

b213abcb77e1 sw content controls, picture: replace placeholder image on click
sw/qa/core/unocore/unocore.cxx | 7 +++++-
sw/qa/uibase/wrtsh/wrtsh.cxx | 46 +++++++++++++++++++++++++++++++++++++++
sw/source/uibase/docvw/edtwin.cxx | 26 ++++++++++++++++++++++
sw/source/uibase/uiview/view2.cxx | 2 +-
sw/source/uibase/wrtsh/wrtsh3.cxx | 18 ++++++++++++++-
5 files changed, 96 insertions(+), 3 deletions(-)

Upstream: cgit.freedesktop.org


  • Share