From 896ac21a92d7617f2a1795ce7df3612493e12ba0 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Mon, 10 Nov 2014 23:23:13 +1100 Subject: vcl: move OutputDevice::ImplDrawFrameDev() to Window I have moved ImplDrawFrameDev() from OutputDevice to Window, because it deals with frames which is clearly the responsibility of the Window class, not the OutputDevice class which shouldn't really care about it at all. I've also renamed it to drawFrameDev() as it's a private function. Change-Id: I45fd50e8e34fe4a97730c3c857080e4e1ddb1c17 Reviewed-on: https://gerrit.libreoffice.org/12340 Tested-by: LibreOffice gerrit bot Reviewed-by: Chris Sherlock --- vcl/source/window/window.cxx | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'vcl/source/window/window.cxx') diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index c6086dabaebd..e0c2bc6c01bc 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1204,6 +1204,52 @@ void Window::getFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDe mbMap = bOldMap; } +void Window::drawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize, + const OutputDevice& rOutDev, const vcl::Region& rRegion ) +{ + + GDIMetaFile* pOldMetaFile = mpMetaFile; + bool bOldMap = mbMap; + RasterOp eOldROP = GetRasterOp(); + mpMetaFile = NULL; + mbMap = false; + SetRasterOp( ROP_OVERPAINT ); + + if ( !IsDeviceOutputNecessary() ) + return; + + if ( !mpGraphics ) + { + if ( !AcquireGraphics() ) + return; + } + + // ClipRegion zuruecksetzen + if ( rRegion.IsNull() ) + mpGraphics->ResetClipRegion(); + else + SelectClipRegion( rRegion ); + + SalTwoRect aPosAry; + aPosAry.mnSrcX = rDevPt.X(); + aPosAry.mnSrcY = rDevPt.Y(); + aPosAry.mnSrcWidth = rDevSize.Width(); + aPosAry.mnSrcHeight = rDevSize.Height(); + aPosAry.mnDestX = rPt.X(); + aPosAry.mnDestY = rPt.Y(); + aPosAry.mnDestWidth = rDevSize.Width(); + aPosAry.mnDestHeight = rDevSize.Height(); + drawOutDevDirect( &rOutDev, aPosAry ); + + // Ensure that ClipRegion is recalculated and set + mbInitClipRegion = true; + + SetRasterOp( eOldROP ); + mbMap = bOldMap; + mpMetaFile = pOldMetaFile; +} + + ImplWinData* Window::ImplGetWinData() const { if ( !mpWindowImpl->mpWinData ) -- cgit