summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-16 13:57:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-17 18:10:30 +0200
commit810e1a86b0f87086f972f0b1190130ce3ec088b2 (patch)
tree8dd455a4c78b5c5a48426b61eec4faa572e60742 /svx
parentb5bc0d40ce55ced3c5019bdce27395e2a4f74454 (diff)
there's already a way to customize the invalidation
Change-Id: I486494de730b8665e56cfc664b62830fb0b8b8ee Reviewed-on: https://gerrit.libreoffice.org/72415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/graphctl.cxx15
-rw-r--r--svx/source/svdraw/sdrpagewindow.cxx2
-rw-r--r--svx/source/svdraw/sdrpaintwindow.cxx6
-rw-r--r--svx/source/svdraw/svdpagv.cxx2
-rw-r--r--svx/source/svdraw/svdpntv.cxx10
5 files changed, 21 insertions, 14 deletions
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index d77a7c6e6069..470912a649c5 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -1494,7 +1494,18 @@ rtl::Reference<sdr::overlay::OverlayManager> SvxGraphCtrlView::CreateOverlayMana
return SdrView::CreateOverlayManager(rDevice);
}
-void SvxGraphCtrlView::InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice) const
+void SvxGraphCtrlView::InvalidateOneWin(OutputDevice& rDevice)
+{
+ assert(&rDevice == &rGraphCtrl.GetDrawingArea()->get_ref_device());
+ if (rDevice.GetOutDevType() == OUTDEV_VIRDEV)
+ {
+ rGraphCtrl.Invalidate();
+ return;
+ }
+ SdrView::InvalidateOneWin(rDevice);
+}
+
+void SvxGraphCtrlView::InvalidateOneWin(OutputDevice& rDevice, const tools::Rectangle& rArea)
{
assert(&rDevice == &rGraphCtrl.GetDrawingArea()->get_ref_device());
if (rDevice.GetOutDevType() == OUTDEV_VIRDEV)
@@ -1502,7 +1513,7 @@ void SvxGraphCtrlView::InvalidateWindow(const tools::Rectangle& rArea, OutputDev
rGraphCtrl.Invalidate(rArea);
return;
}
- SdrView::InvalidateWindow(rArea, rDevice);
+ SdrView::InvalidateOneWin(rDevice, rArea);
}
Point SvxGraphCtrl::GetPositionInDialog() const
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index 126caea8cdf1..b85ab66a9e12 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -432,7 +432,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
const bool bWasMapModeEnabled(rWindow.IsMapModeEnabled());
rWindow.EnableMapMode(false);
- GetPageView().GetView().InvalidateWindow(aVCLDiscreteRectangle, rWindow);
+ GetPageView().GetView().InvalidateOneWin(rWindow, aVCLDiscreteRectangle);
rWindow.EnableMapMode(bWasMapModeEnabled);
}
else if (comphelper::LibreOfficeKit::isActive())
diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx
index 7adda28c0e84..666a81c92312 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -225,12 +225,6 @@ rtl::Reference<sdr::overlay::OverlayManager> SdrPaintView::CreateOverlayManager(
return xOverlayManager;
}
-void SdrPaintView::InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice) const
-{
- vcl::Window& rWindow(static_cast<vcl::Window&>(rDevice));
- rWindow.Invalidate(rArea, InvalidateFlags::NoErase);
-}
-
void SdrPaintWindow::impCreateOverlayManager()
{
// not yet one created?
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index ebbbe8deca15..426f883447f0 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -670,7 +670,7 @@ void SdrPageView::ImpInvalidateHelpLineArea(sal_uInt16 nNum) const
aR.AdjustRight(aSiz.Width() );
aR.AdjustTop( -(aSiz.Height()) );
aR.AdjustBottom(aSiz.Height() );
- const_cast<SdrView&>(GetView()).InvalidateOneWin(static_cast<vcl::Window&>(rOutDev), aR);
+ const_cast<SdrView&>(GetView()).InvalidateOneWin(rOutDev, aR);
}
}
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index cbac5517dfab..458a22f60bc2 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -859,7 +859,7 @@ void SdrPaintView::InvalidateAllWin()
if(pPaintWindow->OutputToWindow())
{
- InvalidateOneWin(static_cast<vcl::Window&>(pPaintWindow->GetOutputDevice()));
+ InvalidateOneWin(pPaintWindow->GetOutputDevice());
}
}
}
@@ -884,20 +884,22 @@ void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect)
// In case of tiled rendering we want to get all invalidations, so visual area is not interesting.
if (aRect.IsOver(aOutRect) || comphelper::LibreOfficeKit::isActive())
{
- InvalidateOneWin(static_cast<vcl::Window&>(rOutDev), aRect);
+ InvalidateOneWin(rOutDev, aRect);
}
}
}
}
-void SdrPaintView::InvalidateOneWin(vcl::Window& rWin)
+void SdrPaintView::InvalidateOneWin(OutputDevice& rDevice)
{
+ vcl::Window& rWin(static_cast<vcl::Window&>(rDevice));
// do not erase background, that causes flicker (!)
rWin.Invalidate(InvalidateFlags::NoErase);
}
-void SdrPaintView::InvalidateOneWin(vcl::Window& rWin, const tools::Rectangle& rRect)
+void SdrPaintView::InvalidateOneWin(OutputDevice& rDevice, const tools::Rectangle& rRect)
{
+ vcl::Window& rWin(static_cast<vcl::Window&>(rDevice));
// do not erase background, that causes flicker (!)
rWin.Invalidate(rRect, InvalidateFlags::NoErase);
}