[Libreoffice-commits] core.git: include/vcl vcl/source
Chris Sherlock
chris.sherlock79 at gmail.com
Tue Nov 11 01:12:06 PST 2014
include/vcl/outdev.hxx | 11 ---------
include/vcl/window.hxx | 6 ++++-
vcl/source/outdev/outdev.cxx | 47 -----------------------------------------
vcl/source/window/clipping.cxx | 14 ++++++------
vcl/source/window/window.cxx | 46 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 58 insertions(+), 66 deletions(-)
New commits:
commit 896ac21a92d7617f2a1795ce7df3612493e12ba0
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Mon Nov 10 23:23:13 2014 +1100
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 <gerrit at libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index c899017..a59b642 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -481,17 +481,6 @@ public:
///@}
- /** @name Frame functions
- */
- ///@{
-
-private:
-
- SAL_DLLPRIVATE void ImplDrawFrameDev ( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
- const OutputDevice& rOutDev, const vcl::Region& rRegion );
- ///@}
-
-
/** @Name Direct OutputDevice drawing functions
*/
///@{
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 2e072ba..7e09b26 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -539,7 +539,11 @@ private:
SAL_DLLPRIVATE void ImplInitWindowData( WindowType nType );
SAL_DLLPRIVATE void getFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
- OutputDevice& rOutDev );
+ OutputDevice& rOutDev );
+
+
+ SAL_DLLPRIVATE void drawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
+ const OutputDevice& rOutDev, const vcl::Region& rRegion );
SAL_DLLPRIVATE void ImplSetFrameParent( const vcl::Window* pParent );
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 0e11f17..5295fd4 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -396,53 +396,6 @@ bool OutputDevice::SupportsOperation( OutDevSupportType eType ) const
return bHasSupport;
}
-// Frame public functions
-
-void OutputDevice::ImplDrawFrameDev( 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;
-}
-
// Direct OutputDevice drawing public functions
void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index d3e40d9..b2054f8 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -884,22 +884,22 @@ bool Window::ImplRestoreOverlapBackground( vcl::Region& rInvRegion )
Point aDestPt( mnOutOffX, mnOutOffY );
Size aDevSize = mpWindowImpl->mpOverlapData->mpSaveBackDev->GetOutputSizePixel();
- OutputDevice *pOutDev = mpWindowImpl->mpFrameWindow->GetOutDev();
+ Window *pWin = mpWindowImpl->mpFrameWindow;
if ( mpWindowImpl->mpOverlapData->mpSaveBackRgn )
{
mpWindowImpl->mpOverlapData->mpSaveBackRgn->Intersect( mpWindowImpl->maWinClipRegion );
rInvRegion = mpWindowImpl->maWinClipRegion;
rInvRegion.Exclude( *mpWindowImpl->mpOverlapData->mpSaveBackRgn );
- pOutDev->ImplDrawFrameDev( aDestPt, aDevPt, aDevSize,
- *(mpWindowImpl->mpOverlapData->mpSaveBackDev),
- *mpWindowImpl->mpOverlapData->mpSaveBackRgn );
+ pWin->drawFrameDev( aDestPt, aDevPt, aDevSize,
+ *(mpWindowImpl->mpOverlapData->mpSaveBackDev),
+ *mpWindowImpl->mpOverlapData->mpSaveBackRgn );
}
else
{
- pOutDev->ImplDrawFrameDev( aDestPt, aDevPt, aDevSize,
- *(mpWindowImpl->mpOverlapData->mpSaveBackDev),
- mpWindowImpl->maWinClipRegion );
+ pWin->drawFrameDev( aDestPt, aDevPt, aDevSize,
+ *(mpWindowImpl->mpOverlapData->mpSaveBackDev),
+ mpWindowImpl->maWinClipRegion );
}
ImplDeleteOverlapBackground();
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c6086da..e0c2bc6 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 )
More information about the Libreoffice-commits
mailing list