From 5e43b9a9a05f1146c71fbce46a2ddce44c59c77b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 25 Mar 2015 16:01:57 +0100 Subject: SdrMarkView tiled rendering: fix unexpected empty graphic selection events There are a number of mark views, but we're only interested in the one that belongs to the editing window. Ignore the virtual device of the slide sorter and everything else. With this, a shape remains selected after resized, and can be resized multiple times again properly. Change-Id: I7f31c72567b9d01aaa75871ff5d1efdb3151a0e4 --- svx/source/svdraw/svdmrkv.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 6adfa2f0f2b1..66a2a323b2bf 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -669,6 +669,9 @@ void SdrMarkView::SetMarkHandles() // correct position ) Point aGridOff = GetGridOffset(); + // There can be multiple mark views, but we're only interested in the one that has a window associated. + const bool bTiledRendering = GetModel()->isTiledRendering() && GetFirstOutputDevice() && GetFirstOutputDevice()->GetOutDevType() == OUTDEV_WINDOW; + // 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. @@ -686,7 +689,7 @@ void SdrMarkView::SetMarkHandles() if(pSdrTextObj && pSdrTextObj->IsInEditMode()) { - if (GetModel()->isTiledRendering()) + if (bTiledRendering) // Suppress handles -> empty graphic selection. GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY"); return; @@ -704,7 +707,7 @@ void SdrMarkView::SetMarkHandles() Rectangle aRect(GetMarkedObjRect()); - if (GetModel()->isTiledRendering()) + if (bTiledRendering) { Rectangle aSelection(aRect); OString sSelection; -- cgit v1.2.3