summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-30 17:21:10 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-07-01 11:03:50 +0200
commit2fa23d10c32f77da121ecf03f77ff3f10ca0d580 (patch)
treee8d836ebd786eebb618acabaa633796888d69cd4 /sw
parentf36eaa079165a9109444b785ddda5e6f92891e50 (diff)
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 (cherry picked from commit a2c4bed594013ed9d671197cde53990fcede395d)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 71964e87ebe7..6e0a15026db8 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;
}
};