Blob Blame History Raw
From 07a7cf95d91cbd776490543762902136280994fe Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Tue, 13 Oct 2015 10:46:59 +0200
Subject: [PATCH 201/398] tdf#95002 sd tiled rendering: fix handling of images
 on page switch

It turns out a full invalidation is still needed to trigger the loading
of graphics on the new page, so instead of not invalidating just don't
emit the notification about it during page switch.

(cherry picked from commit 1631fa9a722553da1ebe0650a65e859862c4405d)

Change-Id: Ic99a3d4e268b3db61cf09c78ed0f310c9d365867
---
 include/svx/svdpagv.hxx            | 2 +-
 sd/source/ui/inc/DrawViewShell.hxx | 2 ++
 sd/source/ui/view/drviews1.cxx     | 3 +--
 sd/source/ui/view/sdwindow.cxx     | 4 ++++
 svx/source/svdraw/svdpagv.cxx      | 5 ++---
 5 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx
index 3b890c13cd70..f28e3e7cb79d 100644
--- a/include/svx/svdpagv.hxx
+++ b/include/svx/svdpagv.hxx
@@ -224,7 +224,7 @@ public:
     const SetOfByte& GetLockedLayers() const { return aLayerLock; }
 
     const SdrHelpLineList& GetHelpLines() const { return aHelpLines; }
-    void SetHelpLines(const SdrHelpLineList& rHLL, bool bInvalidate = true);
+    void SetHelpLines(const SdrHelpLineList& rHLL);
     //void SetHelpLinePos(sal_uInt16 nNum, const Point& rNewPos);
     void SetHelpLine(sal_uInt16 nNum, const SdrHelpLine& rNewHelpLine);
     void DeleteHelpLine(sal_uInt16 nNum);
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 405e7af90876..cba478b8af7e 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -376,6 +376,8 @@ public:
 
     OUString GetSidebarContextName() const;
 
+    bool IsInSwitchPage() { return mbIsInSwitchPage; }
+
     //move this method to ViewShell.
     //void  NotifyAccUpdate();
 protected:
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index c92cfde79262..3b749419e860 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -986,8 +986,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
                 }
                 else
                 {
-                    bool bInvalidate = !comphelper::LibreOfficeKit::isActive();
-                    pNewPageView->SetHelpLines( mpFrameView->GetStandardHelpLines(), bInvalidate );
+                    pNewPageView->SetHelpLines( mpFrameView->GetStandardHelpLines() );
                 }
             }
 
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index c9c4bfe15b61..7149cf99b694 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -1006,6 +1006,10 @@ Selection Window::GetSurroundingTextSelection() const
 
 void Window::LogicInvalidate(const Rectangle* pRectangle)
 {
+    DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell);
+    if (pDrawViewShell && pDrawViewShell->IsInSwitchPage())
+        return;
+
     OString sRectangle;
     if (!pRectangle)
         sRectangle = "EMPTY";
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 47fa8f52b471..9c74d433e1c9 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -741,11 +741,10 @@ void SdrPageView::ImpInvalidateHelpLineArea(sal_uInt16 nNum) const
     }
 }
 
-void SdrPageView::SetHelpLines(const SdrHelpLineList& rHLL, bool bInvalidate)
+void SdrPageView::SetHelpLines(const SdrHelpLineList& rHLL)
 {
     aHelpLines=rHLL;
-    if (bInvalidate)
-        InvalidateAllWin();
+    InvalidateAllWin();
 }
 
 void SdrPageView::SetHelpLine(sal_uInt16 nNum, const SdrHelpLine& rNewHelpLine)
-- 
2.12.0