diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-10-02 14:32:07 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-10-03 08:27:31 +0200 |
commit | c9336bfb6bbf6d73d3f23c124262ade30133448d (patch) | |
tree | d0775431460f61bd7fd7a05b2855ed2f7817fc92 /svx | |
parent | f9aac900ada3d507526eeeed5b51fc7a10ab4cae (diff) |
tdf#125565 always send the graphic selection for the table
Change-Id: I7085b2f1ddcfd83eccbbcaba4892cde95b6bd85c
Reviewed-on: https://gerrit.libreoffice.org/80034
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 16 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 3 |
2 files changed, 3 insertions, 16 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index fecb8852659c..ec1c96bdd65a 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -741,7 +741,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } SfxViewShell* pViewShell = GetSfxViewShell(); - bool bIsInTextEditMode = false; + // check if text edit or ole is active and handles need to be suppressed. This may be the case // when a single object is selected // Using a strict return statement is okay here; no handles means *no* handles. @@ -759,9 +759,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) if (pSdrTextObj && pSdrTextObj->IsInEditMode()) { - if (bTiledRendering) - bIsInTextEditMode = true; - else + if (!bTiledRendering) return; } } @@ -827,19 +825,11 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) OString sSelectionText; boost::property_tree::ptree aTableJsonTree; bool bTableSelection = false; - bool bCellsAreSelected = false; if (mpMarkedObj && mpMarkedObj->GetObjIdentifier() == OBJ_TABLE) { auto& rTableObject = dynamic_cast<sdr::table::SdrTableObj&>(*mpMarkedObj); bTableSelection = rTableObject.createTableEdgesJson(aTableJsonTree); - - rtl::Reference<sdr::SelectionController> xController = static_cast<SdrView*>(this)->getSelectionController(); - if (xController.is() && xController->hasSelectedCells()) - { - // The table shape has selected cells, which provide text selection already -> no graphic selection. - bCellsAreSelected = true; - } } if (GetMarkedObjectCount()) { @@ -997,7 +987,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } } - if (sSelectionText.isEmpty() || bCellsAreSelected || bIsInTextEditMode) + if (sSelectionText.isEmpty()) sSelectionText = "EMPTY"; if (bTableSelection) diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 45a3840149ac..efec00fdd95f 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2299,9 +2299,6 @@ void SvxTableController::updateSelectionOverlay() { pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_SELECTION_AREA, aSelection.toString().getStr()); pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, aSelection.toString().getStr()); - OString sSelection("EMPTY"); - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelection.getStr()); - SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", sSelection); } } } |