sc/source/ui/unoobj/docuno.cxx | 19 +++++++++++++------ sc/source/ui/view/gridwin.cxx | 6 ++++-- svx/source/svdraw/svdmrkv.cxx | 3 +++ 3 files changed, 20 insertions(+), 8 deletions(-)
New commits: commit cb1274abf95c99e386cb5655e20a613ed433f405 Author: Jan Holesovsky <ke...@collabora.com> Date: Fri Mar 27 22:25:28 2015 +0100 sc tiled editing: Hide the cell selection when we select graphic. Change-Id: I50f68cc292e971af8bb59782e0495d6142007d67 diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 36d9fb1..717c633 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 c40e76e..40d1c68 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()); } commit 08a501558bba91b6be0e94c615de4075f238f163 Author: Jan Holesovsky <ke...@collabora.com> Date: Fri Mar 27 22:23:33 2015 +0100 sc tiled editing: Improve the deselection. Change-Id: Ia7e320bbb8b61497f33e20b9b80aabfed4f75234 diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 21d30e1..9a83105 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -567,7 +567,8 @@ void ScModelObj::setTextSelection(int nType, int nX, int nY) SolarMutexGuard aGuard; ScViewData* pViewData = ScDocShell::GetViewData(); - ScInputHandler* pInputHandler = SC_MOD()->GetInputHdl(pViewData->GetViewShell()); + ScTabViewShell* pViewShell = pViewData->GetViewShell(); + ScInputHandler* pInputHandler = SC_MOD()->GetInputHdl(pViewShell); if (pInputHandler && pInputHandler->IsInputMode()) { @@ -594,8 +595,6 @@ void ScModelObj::setTextSelection(int nType, int nX, int nY) } else { - // moving the cell selection handles - // There seems to be no clear way of getting the grid window for this // particular document, hence we need to hope we get the right window. ScGridWindow* pGridWindow = pViewData->GetActiveWin(); @@ -603,6 +602,7 @@ void ScModelObj::setTextSelection(int nType, int nX, int nY) if (!pGridWindow) return; + // move the cell selection handles pGridWindow->SetCellSelectionPixel(nType, nX * pViewData->GetPPTX(), nY * pViewData->GetPPTY()); } } @@ -648,10 +648,17 @@ void ScModelObj::resetSelection() SolarMutexGuard aGuard; ScViewData* pViewData = ScDocShell::GetViewData(); - ScTabView* pTabView = pViewData->GetView(); + ScTabViewShell* pViewShell = pViewData->GetViewShell(); - // deselect the shapes - pTabView->DrawDeselectAll(); + // deselect the shapes & texts + ScDrawView* pDrawView = pViewShell->GetScDrawView(); + if (pDrawView) + { + pDrawView->ScEndTextEdit(); + pDrawView->UnmarkAll(); + } + else + pViewShell->Unmark(); // and hide the cell and text selection pDocShell->GetDocument().GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, ""); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits