Kaydet (Commit) f90a4804 authored tarafından Caolán McNamara's avatar Caolán McNamara

split out toplevel window area invalidate

Change-Id: I840ed6cbb3f7950230b1f7169ae3245a4a669249
Reviewed-on: https://gerrit.libreoffice.org/72410Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 5ccaa897
......@@ -238,6 +238,7 @@ public:
SdrPaintWindow* GetPaintWindow(sal_uInt32 nIndex) const;
// Replacement for GetWin(0), may return 0L (!)
OutputDevice* GetFirstOutputDevice() const;
static void InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice);
private:
SVX_DLLPRIVATE void ImpClearVars();
......
......@@ -413,11 +413,11 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
if (GetPageView().IsVisible() && GetPaintWindow().OutputToWindow())
{
const SvtOptionsDrawinglayer aDrawinglayerOpt;
vcl::Window& rWindow(static_cast< vcl::Window& >(GetPaintWindow().GetOutputDevice()));
OutputDevice& rWindow(GetPaintWindow().GetOutputDevice());
basegfx::B2DRange aDiscreteRange(rRange);
aDiscreteRange.transform(rWindow.GetViewTransformation());
if(aDrawinglayerOpt.IsAntiAliasing())
if (aDrawinglayerOpt.IsAntiAliasing())
{
// invalidate one discrete unit more under the assumption that AA
// needs one pixel more
......@@ -429,10 +429,10 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
static_cast<long>(floor(aDiscreteRange.getMinY())),
static_cast<long>(ceil(aDiscreteRange.getMaxX())),
static_cast<long>(ceil(aDiscreteRange.getMaxY())));
const bool bWasMapModeEnabled(rWindow.IsMapModeEnabled());
const bool bWasMapModeEnabled(rWindow.IsMapModeEnabled());
rWindow.EnableMapMode(false);
rWindow.Invalidate(aVCLDiscreteRectangle, InvalidateFlags::NoErase);
SdrPaintView::InvalidateWindow(aVCLDiscreteRectangle, rWindow);
rWindow.EnableMapMode(bWasMapModeEnabled);
}
else if (comphelper::LibreOfficeKit::isActive())
......
......@@ -225,6 +225,12 @@ rtl::Reference<sdr::overlay::OverlayManager> SdrPaintView::CreateOverlayManager(
return xOverlayManager;
}
void SdrPaintView::InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice)
{
vcl::Window& rWindow(static_cast<vcl::Window&>(rDevice));
rWindow.Invalidate(rArea, InvalidateFlags::NoErase);
}
void SdrPaintWindow::impCreateOverlayManager()
{
// not yet one created?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment