summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2021-05-03 04:20:00 +0530
committerPranam Lashkari <lpranam@collabora.com>2021-05-04 13:36:56 +0200
commitee894c2de635616f7d63f1c5bcc8795db5f31638 (patch)
treeb90c7b13364d6a50e0d30f26fb52190a0843c7ab
parenta632d90b3e17c7efb9b9f712758896e8d8fdf2ea (diff)
LOK: calc: allow image selection on insertion
in calc online, image was not selected by default when inserted problems: it was inconsistent with writer and impress/draw it caused problem in cypress testing Change-Id: Ic18b7a918c485a1cd384694d72fbb0a598d26ba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115013 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 11e2290d08ff..c171a156b856 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -44,6 +44,7 @@
#include <scresid.hxx>
#include <strings.hrc>
#include <globstr.hrc>
+#include <comphelper/lok.hxx>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
@@ -197,7 +198,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
aAnchorType == SCA_CELL_RESIZE);
// don't select if from (dispatch) API, to allow subsequent cell operations
- SdrInsertFlags nInsOptions = bApi ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE;
+ SdrInsertFlags nInsOptions = (bApi && !comphelper::LibreOfficeKit::isActive()) ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE;
bool bSuccess = pView->InsertObjectAtView( pObj, *pPV, nInsOptions );
// SetGraphicLink has to be used after inserting the object,