From 71a8c7a5c4dcd440ed603810467b80cc7265cd2f Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 9 Aug 2017 19:10:46 +0200 Subject: editviewoverlay: correct reaction on property change Do not hand over LogicalSelectionRanges directly on selection change, better let the visulizer do what he needs. On AttributeChange, tge resulting repaint needs to refresh all OverlayObjects, not only text, but also the selection to make look okay e.g. at font size change Change-Id: Ibb9737c33d6f85a9f68df3edbb989c0443cd4a5c --- editeng/source/editeng/impedit.cxx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'editeng') diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 3d71f9a92b0f..aa2a257c5343 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -197,24 +197,8 @@ void ImpEditView::SelectionChanged() { if (hasEditViewCallbacks()) { - std::vector aLogicRects; - std::vector aLogicRanges; - const Size aLogicPixel(pOutWin ? pOutWin->PixelToLogic(Size(1, 1)) : Size(1, 1)); - - GetSelectionRectangles(GetEditSelection(), aLogicRects); - - for (const auto& aRect : aLogicRects) - { - // convert from logic Rectangles to logic Ranges, do not forget to add - // one Unit (in this case logical unit, thus calculate first) - aLogicRanges.push_back( - basegfx::B2DRange( - aRect.Left(), aRect.Top(), - aRect.Right() + aLogicPixel.Width(), aRect.Bottom() + aLogicPixel.Height())); - } - // use callback to tell about change in selection visualisation - mpEditViewCallbacks->EditViewSelectionChange(aLogicRanges); + mpEditViewCallbacks->EditViewSelectionChange(); } } @@ -229,7 +213,7 @@ void ImpEditView::SelectionChanged() // the Region*, see GetSelectionRectangles below. void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, OutputDevice* pTargetDevice ) { - if (hasEditViewCallbacks() && !pRegion) + if (hasEditViewCallbacks() && !pRegion && !comphelper::LibreOfficeKit::isActive()) { // we are done, do *not* visualize self // CAUTION: do not use when comphelper::LibreOfficeKit::isActive() -- cgit