[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Jun 30 09:05:18 PDT 2015


 sw/source/core/view/viewsh.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit a2c4bed594013ed9d671197cde53990fcede395d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jun 30 17:21:10 2015 +0200

    sw redercontext: fix missing draw of the overlay
    
    With this, if e.g. Ctrl-A is hit for a hello-world document, then
    selection is properly visible.
    
    Change-Id: If3fae1e73dc76c50e62f6e1f31d99873636f0e93

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index f3b9121..ad014b5 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -78,6 +78,7 @@
 #include <vcl/virdev.hxx>
 #include <vcl/svapp.hxx>
 #include <svx/sdrpaintwindow.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 
 #if !HAVE_FEATURE_DESKTOP
@@ -1685,7 +1686,19 @@ public:
     ~RenderContextGuard()
     {
         if (m_pRef != m_pShell->GetWin() && m_pShell->Imp()->GetDrawView())
+        {
+            // Need to explicitly draw the overlay on m_pRef, since by default
+            // they would be only drawn for m_pOriginalValue.
+            SdrPaintWindow* pOldPaintWindow = m_pShell->Imp()->GetDrawView()->GetPaintWindow(0);
+            rtl::Reference<sdr::overlay::OverlayManager> xOldManager = pOldPaintWindow->GetOverlayManager();
+            if (xOldManager.is())
+            {
+                SdrPaintWindow* pNewPaintWindow = m_pShell->Imp()->GetDrawView()->FindPaintWindow(*m_pRef);
+                xOldManager->completeRedraw(pNewPaintWindow->GetRedrawRegion(), m_pRef);
+            }
+
             m_pShell->Imp()->GetDrawView()->DeleteWindowFromPaintView(m_pRef);
+        }
         m_pRef = m_pOriginalValue;
     }
 };


More information about the Libreoffice-commits mailing list