e77db6b
From 0d498e36ba3957a63e6d2cde3af1c51267950a07 Mon Sep 17 00:00:00 2001
e77db6b
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
e77db6b
Date: Mon, 19 Sep 2016 21:21:58 +0100
e77db6b
Subject: [PATCH] Resolves: tdf#102293 triple click results in visually
e77db6b
 unselected word
e77db6b
e77db6b
in previously unselected textboxes in impress
e77db6b
e77db6b
started happening after...
e77db6b
e77db6b
commit 16c7f8916661df24f4681ec82f6bd4d7ad85d141
e77db6b
Date:   Tue Jan 12 16:36:49 2016 +0000
e77db6b
e77db6b
    tdf#97075 - don't render sdr overlays before we paint
e77db6b
e77db6b
in impress instead flush the overlay after activating the edit object
e77db6b
if we go on to put the cursor in there. Seems to work.
e77db6b
e77db6b
Change-Id: Ib746c36d1074aee09771a3dc1d69834ce80a9c08
e77db6b
(cherry picked from commit 38a61ddaf63768ebe19c92d561eac6f50d67ded7)
e77db6b
---
e77db6b
 sd/source/ui/func/futext.cxx | 15 +++++++++++++++
e77db6b
 1 file changed, 15 insertions(+)
e77db6b
e77db6b
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
e77db6b
index cb0e848..9a5b1bc 100644
e77db6b
--- a/sd/source/ui/func/futext.cxx
e77db6b
+++ b/sd/source/ui/func/futext.cxx
e77db6b
@@ -21,6 +21,8 @@
e77db6b
 #include <editeng/eeitem.hxx>
e77db6b
 #include <editeng/editerr.hxx>
e77db6b
 #include <svx/dlgutil.hxx>
e77db6b
+#include <svx/sdrpagewindow.hxx>
e77db6b
+#include <svx/sdrpaintwindow.hxx>
e77db6b
 #include <svx/svxerr.hxx>
e77db6b
 #include <tools/urlobj.hxx>
e77db6b
 #include <vcl/help.hxx>
e77db6b
@@ -1062,6 +1064,19 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
e77db6b
 
e77db6b
                     if (mpView->SdrBeginTextEdit(pTextObj, pPV, mpWindow, true, pOutl) && mxTextObj->GetObjInventor() == SdrInventor)
e77db6b
                     {
e77db6b
+                        //tdf#102293 flush overlay before going on to pass clicks down to
e77db6b
+                        //the outline view which will want to paint selections
e77db6b
+                        for (sal_uInt32 b = 0; b < pPV->PageWindowCount(); ++b)
e77db6b
+                        {
e77db6b
+                            const SdrPageWindow& rPageWindow = *pPV->GetPageWindow(b);
e77db6b
+                            if (!rPageWindow.GetPaintWindow().OutputToWindow())
e77db6b
+                                continue;
e77db6b
+                            rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
e77db6b
+                            if (!xManager.is())
e77db6b
+                                continue;
e77db6b
+                            xManager->flush();
e77db6b
+                        }
e77db6b
+
e77db6b
                         bFirstObjCreated = true;
e77db6b
                         DeleteDefaultText();
e77db6b
 
e77db6b
-- 
e77db6b
2.7.4
e77db6b