From 7fbfd04c2e348dbebd7d97ceecfcbea547de5b52 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Fri, 27 Mar 2015 22:25:28 +0100 Subject: [PATCH] sc tiled editing: Hide the cell selection when we select graphic. Change-Id: I50f68cc292e971af8bb59782e0495d6142007d67 --- sc/source/ui/view/gridwin.cxx | 6 ++++-- svx/source/svdraw/svdmrkv.cxx | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 0856107b5999..5c301f0cce59 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5913,9 +5913,11 @@ void ScGridWindow::UpdateCursorOverlay() mpOOCursors->append(*pOverlay); // notify the LibreOfficeKit too, but only if there's no - // selection yet, to avoid setting the LOK selection twice + // selection yet (either cell selection, or graphic object), + // to avoid setting the LOK selection twice // (once for the cell only, and then for the selection) - if (!pViewData->GetMarkData().IsMarked() && !pViewData->GetMarkData().IsMultiMarked()) + if (!pViewData->GetMarkData().IsMarked() && !pViewData->GetMarkData().IsMultiMarked() && + !pViewData->GetViewShell()->GetScDrawView()->IsMarking()) { updateLibreOfficeKitSelection(pViewData, pDoc->GetDrawLayer(), aPixelRects); } diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 28629e55cf50..52194e44620a 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -737,6 +737,9 @@ void SdrMarkView::SetMarkHandles() } sSelection = aSelection.toString(); + + // hide the text selection too + GetModel()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, ""); } GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelection.getStr()); }