diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-08-09 19:10:46 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-08-10 15:17:59 +0200 |
commit | 71a8c7a5c4dcd440ed603810467b80cc7265cd2f (patch) | |
tree | ae7a7bf63dad1bc3f8cabd006bb2e47be9200f07 /editeng | |
parent | 68eff5b6c28a136a79a7d7ad5c04e10f8ce69980 (diff) |
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
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 20 |
1 files changed, 2 insertions, 18 deletions
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<tools::Rectangle> aLogicRects; - std::vector<basegfx::B2DRange> 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() |