summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-05-10 16:33:13 +0200
committerLuboš Luňák <l.lunak@suse.cz>2011-05-10 16:46:32 +0200
commite0c9d8a0c8f39207bb6ba67dc120999ce05945c6 (patch)
treeb178ec774286844b0c35dc59a00d9f74411ee185 /sw/inc
parent9837e008738f1f3841bc990326d660e4571f8c43 (diff)
update SdrPaintView's region when it changes in writer (bnc#683550)
ViewShell::DLPrePaint2() gets a region as an argument, but uses it only during the first call, following calls only increment the lock counter, so if the region changes, the change doesn't take effect, causing redraw problems. So the fix is the replace the lock counter with a stack of used regions and update the region as appropriate.
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/viewsh.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index c37577e66ef1..88280b45613b 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -37,6 +37,7 @@
#include <ring.hxx>
#include <swrect.hxx>
#include <boost/shared_ptr.hpp> // swmod 080115
+#include <stack>
#include <vcl/mapmod.hxx>
#include <vcl/print.hxx>
@@ -233,7 +234,7 @@ public:
//////////////////////////////////////////////////////////////////////////////
// #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
protected:
- sal_uInt32 mnPrePostPaintCount;
+ std::stack<Region> mPrePostPaintRegions; // acts also as a lock counter (empty == not locked)
OutputDevice* mpPrePostOutDev;
MapMode maPrePostMapMode;
public:
@@ -245,7 +246,7 @@ public:
virtual void Paint(const Rectangle &rRect);
sal_Bool IsPaintInProgress() const { return bPaintInProgress; }
- bool IsDrawingLayerPaintInProgress() const { return 0 != mnPrePostPaintCount; }
+ bool IsDrawingLayerPaintInProgress() const { return !mPrePostPaintRegions.empty(); }
// Notification that visible area has been changed.
// VisArea is reset, after that scrolling takes place.