diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-27 14:52:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-30 09:58:23 +0200 |
commit | 8dbde0845a3989528614addb9bd0333f60c522a5 (patch) | |
tree | c1f13bfc8e2841427eb6a07e2147445b309b1e9a /vcl/source/window | |
parent | b69478acff4f5b7a9d334a765a1a528d44d7b3a4 (diff) |
fdo#82577: Handle Region
Put the VCL Region class in the vcl namespace. Avoids clash with the X11
Region typedef.
Change-Id: I6e008111df7cf37121fbc3eaabd44a8306338291
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/brdwin.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/clipping.cxx | 84 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 86 | ||||
-rw-r--r-- | vcl/source/window/stacking.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 22 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 2 |
12 files changed, 118 insertions, 118 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index ce43ffe03f05..a9640614c887 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1565,7 +1565,7 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p // Draw Frame if ( nDrawFlags & BORDERWINDOW_DRAW_FRAME ) { - Region oldClipRgn( pDev->GetClipRegion( ) ); + vcl::Region oldClipRgn( pDev->GetClipRegion( ) ); // for popups, don't draw part of the frame if ( pData->mnTitleType == BORDERWINDOW_TITLE_POPUP ) @@ -1573,7 +1573,7 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p FloatingWindow *pWin = dynamic_cast< FloatingWindow* >( pData->mpBorderWindow->GetWindow( WINDOW_CLIENT ) ); if ( pWin ) { - Region aClipRgn( aInRect ); + vcl::Region aClipRgn( aInRect ); Rectangle aItemClipRect( pWin->ImplGetItemEdgeClipRect() ); if( !aItemClipRect.IsEmpty() ) { @@ -2070,7 +2070,7 @@ void ImplBorderWindow::InvalidateBorder() if ( nLeftBorder || nTopBorder || nRightBorder || nBottomBorder ) { Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() ); - Region aRegion( aWinRect ); + vcl::Region aRegion( aWinRect ); aWinRect.Left() += nLeftBorder; aWinRect.Top() += nTopBorder; aWinRect.Right() -= nRightBorder; diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx index b31e4ead8dcb..42b2c922c826 100644 --- a/vcl/source/window/clipping.cxx +++ b/vcl/source/window/clipping.cxx @@ -34,7 +34,7 @@ void Window::InitClipRegion() { DBG_TESTSOLARMUTEX(); - Region aRegion; + vcl::Region aRegion; // Put back backed up background if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) @@ -88,14 +88,14 @@ sal_uInt16 Window::GetParentClipMode() const return mpWindowImpl->mnParentClipMode; } -void Window::ExpandPaintClipRegion( const Region& rRegion ) +void Window::ExpandPaintClipRegion( const vcl::Region& rRegion ) { if( mpWindowImpl->mpPaintRegion ) { - Region aPixRegion = LogicToPixel( rRegion ); - Region aDevPixRegion = ImplPixelToDevicePixel( aPixRegion ); + vcl::Region aPixRegion = LogicToPixel( rRegion ); + vcl::Region aDevPixRegion = ImplPixelToDevicePixel( aPixRegion ); - Region aWinChildRegion = *ImplGetWinChildClipRegion(); + vcl::Region aWinChildRegion = *ImplGetWinChildClipRegion(); // --- RTL -- only this region is in frame coordinates, so re-mirror it if( ImplIsAntiparallel() ) { @@ -112,10 +112,10 @@ void Window::ExpandPaintClipRegion( const Region& rRegion ) } } -Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const +vcl::Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const { - Region aWinClipRegion; + vcl::Region aWinClipRegion; if ( nFlags & WINDOW_GETCLIPREGION_NOCHILDREN ) { @@ -125,7 +125,7 @@ Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const } else { - Region* pWinChildClipRegion = ((vcl::Window*)this)->ImplGetWinChildClipRegion(); + vcl::Region* pWinChildClipRegion = ((vcl::Window*)this)->ImplGetWinChildClipRegion(); aWinClipRegion = *pWinChildClipRegion; // --- RTL --- remirror clip region before passing it to somebody if( ImplIsAntiparallel() ) @@ -138,7 +138,7 @@ Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const if ( nFlags & WINDOW_GETCLIPREGION_NULL ) { Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); - Region aWinRegion( aWinRect ); + vcl::Region aWinRegion( aWinRect ); if ( aWinRegion == aWinClipRegion ) aWinClipRegion.SetNull(); @@ -150,9 +150,9 @@ Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const } -Region Window::GetActiveClipRegion() const +vcl::Region Window::GetActiveClipRegion() const { - Region aRegion(true); + vcl::Region aRegion(true); if ( mpWindowImpl->mbInPaint ) { @@ -168,7 +168,7 @@ Region Window::GetActiveClipRegion() const void Window::ClipToPaintRegion(Rectangle& rDstRect) { - const Region aPaintRgn(GetPaintRegion()); + const vcl::Region aPaintRgn(GetPaintRegion()); if (!aPaintRgn.IsNull()) rDstRect.Intersection(LogicToPixel(aPaintRgn.GetBoundRect())); @@ -183,7 +183,7 @@ void Window::EnableClipSiblings( bool bClipSiblings ) mpWindowImpl->mbClipSiblings = bClipSiblings; } -void Window::ImplClipBoundaries( Region& rRegion, bool bThis, bool bOverlaps ) +void Window::ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlaps ) { if ( bThis ) ImplIntersectWindowClipRegion( rRegion ); @@ -216,7 +216,7 @@ void Window::ImplClipBoundaries( Region& rRegion, bool bThis, bool bOverlaps ) ImplGetParent()->ImplIntersectWindowClipRegion( rRegion ); } -bool Window::ImplClipChildren( Region& rRegion ) +bool Window::ImplClipChildren( vcl::Region& rRegion ) { bool bOtherClip = false; vcl::Window* pWindow = mpWindowImpl->mpFirstChild; @@ -239,7 +239,7 @@ bool Window::ImplClipChildren( Region& rRegion ) return bOtherClip; } -void Window::ImplClipAllChildren( Region& rRegion ) +void Window::ImplClipAllChildren( vcl::Region& rRegion ) { vcl::Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) @@ -250,7 +250,7 @@ void Window::ImplClipAllChildren( Region& rRegion ) } } -void Window::ImplClipSiblings( Region& rRegion ) +void Window::ImplClipSiblings( vcl::Region& rRegion ) { vcl::Window* pWindow = ImplGetParent()->mpWindowImpl->mpFirstChild; while ( pWindow ) @@ -300,7 +300,7 @@ void Window::ImplInitWinChildClipRegion() else { if ( !mpWindowImpl->mpChildClipRegion ) - mpWindowImpl->mpChildClipRegion = new Region( mpWindowImpl->maWinClipRegion ); + mpWindowImpl->mpChildClipRegion = new vcl::Region( mpWindowImpl->maWinClipRegion ); else *mpWindowImpl->mpChildClipRegion = mpWindowImpl->maWinClipRegion; @@ -323,7 +323,7 @@ Region* Window::ImplGetWinChildClipRegion() } -bool Window::ImplSysObjClip( const Region* pOldRegion ) +bool Window::ImplSysObjClip( const vcl::Region* pOldRegion ) { bool bUpdate = true; @@ -333,13 +333,13 @@ bool Window::ImplSysObjClip( const Region* pOldRegion ) if ( bVisibleState ) { - Region* pWinChildClipRegion = ImplGetWinChildClipRegion(); + vcl::Region* pWinChildClipRegion = ImplGetWinChildClipRegion(); if ( !pWinChildClipRegion->IsEmpty() ) { if ( pOldRegion ) { - Region aNewRegion = *pWinChildClipRegion; + vcl::Region aNewRegion = *pWinChildClipRegion; pWinChildClipRegion->Intersect( *pOldRegion ); bUpdate = aNewRegion == *pWinChildClipRegion; } @@ -347,9 +347,9 @@ bool Window::ImplSysObjClip( const Region* pOldRegion ) if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) ImplInvalidateAllOverlapBackgrounds(); - Region aRegion = *pWinChildClipRegion; + vcl::Region aRegion = *pWinChildClipRegion; Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); - Region aWinRectRegion( aWinRect ); + vcl::Region aWinRectRegion( aWinRect ); sal_uInt16 nClipFlags = mpWindowImpl->mpSysObj->GetClipRegionType(); if ( aRegion == aWinRectRegion ) @@ -443,9 +443,9 @@ bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller ) bool bUpdate = true; if ( mpWindowImpl->mpSysObj ) { - Region* pOldRegion = NULL; + vcl::Region* pOldRegion = NULL; if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion ) - pOldRegion = new Region( mpWindowImpl->maWinClipRegion ); + pOldRegion = new vcl::Region( mpWindowImpl->maWinClipRegion ); mbInitClipRegion = true; mpWindowImpl->mbInitWinClipRegion = true; @@ -530,7 +530,7 @@ bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller ) return mpWindowImpl->mpFrameWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ); } -void Window::ImplIntersectWindowClipRegion( Region& rRegion ) +void Window::ImplIntersectWindowClipRegion( vcl::Region& rRegion ) { if ( mpWindowImpl->mbInitWinClipRegion ) ImplInitWinClipRegion(); @@ -538,7 +538,7 @@ void Window::ImplIntersectWindowClipRegion( Region& rRegion ) rRegion.Intersect( mpWindowImpl->maWinClipRegion ); } -void Window::ImplIntersectWindowRegion( Region& rRegion ) +void Window::ImplIntersectWindowRegion( vcl::Region& rRegion ) { rRegion.Intersect( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ) ); @@ -546,12 +546,12 @@ void Window::ImplIntersectWindowRegion( Region& rRegion ) rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); } -void Window::ImplExcludeWindowRegion( Region& rRegion ) +void Window::ImplExcludeWindowRegion( vcl::Region& rRegion ) { if ( mpWindowImpl->mbWinRegion ) { Point aPoint( mnOutOffX, mnOutOffY ); - Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); rRegion.Exclude( aRegion ); @@ -564,7 +564,7 @@ void Window::ImplExcludeWindowRegion( Region& rRegion ) } } -void Window::ImplExcludeOverlapWindows( Region& rRegion ) +void Window::ImplExcludeOverlapWindows( vcl::Region& rRegion ) { vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) @@ -579,7 +579,7 @@ void Window::ImplExcludeOverlapWindows( Region& rRegion ) } } -void Window::ImplExcludeOverlapWindows2( Region& rRegion ) +void Window::ImplExcludeOverlapWindows2( vcl::Region& rRegion ) { if ( mpWindowImpl->mbReallyVisible ) ImplExcludeWindowRegion( rRegion ); @@ -587,14 +587,14 @@ void Window::ImplExcludeOverlapWindows2( Region& rRegion ) ImplExcludeOverlapWindows( rRegion ); } -void Window::ImplIntersectAndUnionOverlapWindows( const Region& rInterRegion, Region& rRegion ) +void Window::ImplIntersectAndUnionOverlapWindows( const vcl::Region& rInterRegion, vcl::Region& rRegion ) { vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbReallyVisible ) { - Region aTempRegion( rInterRegion ); + vcl::Region aTempRegion( rInterRegion ); pWindow->ImplIntersectWindowRegion( aTempRegion ); rRegion.Union( aTempRegion ); pWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion ); @@ -604,11 +604,11 @@ void Window::ImplIntersectAndUnionOverlapWindows( const Region& rInterRegion, Re } } -void Window::ImplIntersectAndUnionOverlapWindows2( const Region& rInterRegion, Region& rRegion ) +void Window::ImplIntersectAndUnionOverlapWindows2( const vcl::Region& rInterRegion, vcl::Region& rRegion ) { if ( mpWindowImpl->mbReallyVisible ) { - Region aTempRegion( rInterRegion ); + vcl::Region aTempRegion( rInterRegion ); ImplIntersectWindowRegion( aTempRegion ); rRegion.Union( aTempRegion ); } @@ -616,7 +616,7 @@ void Window::ImplIntersectAndUnionOverlapWindows2( const Region& rInterRegion, R ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion ); } -void Window::ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& rRegion ) +void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion ) { // Clip Overlap Siblings vcl::Window* pStartOverlapWindow; @@ -642,13 +642,13 @@ void Window::ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion ); } -void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion, +void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, vcl::Region& rRegion, bool bChildren, bool bParent, bool bSiblings ) { - Region aRegion( rSourceRect ); + vcl::Region aRegion( rSourceRect ); if ( mpWindowImpl->mbWinRegion ) rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - Region aTempRegion; + vcl::Region aTempRegion; vcl::Window* pWindow; ImplCalcOverlapRegionOverlaps( aRegion, rRegion ); @@ -803,7 +803,7 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize, { if ( mpWindowImpl->mpPaintRegion ) { - Region aClip( *mpWindowImpl->mpPaintRegion ); + vcl::Region aClip( *mpWindowImpl->mpPaintRegion ); const Point aPixPos( LogicToPixel( rPos ) ); aClip.Move( -mnOutOffX, -mnOutOffY ); @@ -811,7 +811,7 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize, if ( !aClip.IsEmpty() ) { - const Region aOldClip( rSaveDevice.GetClipRegion() ); + const vcl::Region aOldClip( rSaveDevice.GetClipRegion() ); const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) ); const bool bMap = rSaveDevice.IsMapModeEnabled(); @@ -871,7 +871,7 @@ void Window::ImplSaveOverlapBackground() } } -bool Window::ImplRestoreOverlapBackground( Region& rInvRegion ) +bool Window::ImplRestoreOverlapBackground( vcl::Region& rInvRegion ) { if ( mpWindowImpl->mpOverlapData->mpSaveBackDev ) { @@ -956,7 +956,7 @@ void Window::ImplInvalidateAllOverlapBackgrounds() if ( !aRect1.IsEmpty() ) { if ( !pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn ) - pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn = new Region( aRect2 ); + pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn = new vcl::Region( aRect2 ); pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn->Exclude( aRect1 ); if ( pWindow->mpWindowImpl->mpOverlapData->mpSaveBackRgn->IsEmpty() ) pWindow->ImplDeleteOverlapBackground(); diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index de43ab797673..41bcaa7ce72f 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -604,15 +604,15 @@ void ImplPopupFloatWin::DrawBorder() Point aPt; Rectangle aRect( aPt, GetOutputSizePixel() ); - Region oldClipRgn( GetClipRegion( ) ); - Region aClipRgn( aRect ); + vcl::Region oldClipRgn( GetClipRegion( ) ); + vcl::Region aClipRgn( aRect ); Rectangle aItemClipRect( ImplGetItemEdgeClipRect() ); if( !aItemClipRect.IsEmpty() ) { aItemClipRect.SetPos( AbsoluteScreenToOutputPixel( aItemClipRect.TopLeft() ) ); // draw the excluded border part with the background color of a toolbox - SetClipRegion( Region( aItemClipRect ) ); + SetClipRegion( vcl::Region( aItemClipRect ) ); SetLineColor( GetSettings().GetStyleSettings().GetFaceColor() ); DrawRect( aRect ); diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index dab3dec3ff54..7e93fe1c799e 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -124,7 +124,7 @@ long MenuFloatingWindow::ImplGetStartY() const return -nY; } -Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const +vcl::Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const { Size aOutSz = GetOutputSizePixel(); Point aPos; @@ -135,7 +135,7 @@ Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const if ( pMenu && pMenu->pLogo && !bIncludeLogo ) aRect.Left() += pMenu->pLogo->aBitmap.GetSizePixel().Width(); - Region aRegion(aRect); + vcl::Region aRegion(aRect); if ( pMenu && pMenu->pLogo && bIncludeLogo && nScrollerHeight ) aRegion.Union( Rectangle( Point(), Size( pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) ); diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx index 62731efd2ae1..5e1b3437584d 100644 --- a/vcl/source/window/menufloatingwindow.hxx +++ b/vcl/source/window/menufloatingwindow.hxx @@ -68,7 +68,7 @@ private: void InitMenuClipRegion(); protected: - Region ImplCalcClipRegion( bool bIncludeLogo = true ) const; + vcl::Region ImplCalcClipRegion( bool bIncludeLogo = true ) const; void ImplDrawScroller( bool bUp ); using Window::ImplScroll; void ImplScroll( const Point& rMousePos ); diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 07f04e996093..ce10abae4ae3 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -44,10 +44,10 @@ class PaintHelper { private: vcl::Window* m_pWindow; - Region* m_pChildRegion; + vcl::Region* m_pChildRegion; Rectangle m_aSelectionRect; Rectangle m_aPaintRect; - Region m_aPaintRegion; + vcl::Region m_aPaintRegion; sal_uInt16 m_nPaintFlags; bool m_bPop; bool m_bRestoreCursor; @@ -77,11 +77,11 @@ public: { return m_nPaintFlags; } - Region& GetPaintRegion() + vcl::Region& GetPaintRegion() { return m_aPaintRegion; } - void DoPaint(const Region* pRegion); + void DoPaint(const vcl::Region* pRegion); ~PaintHelper(); }; @@ -94,10 +94,10 @@ PaintHelper::PaintHelper(vcl::Window *pWindow, sal_uInt16 nPaintFlags) { } -void PaintHelper::DoPaint(const Region* pRegion) +void PaintHelper::DoPaint(const vcl::Region* pRegion) { WindowImpl* pWindowImpl = m_pWindow->ImplGetWindowImpl(); - Region* pWinChildClipRegion = m_pWindow->ImplGetWinChildClipRegion(); + vcl::Region* pWinChildClipRegion = m_pWindow->ImplGetWinChildClipRegion(); if ( pWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALL ) pWindowImpl->maInvalidateRegion = *pWinChildClipRegion; else @@ -114,7 +114,7 @@ void PaintHelper::DoPaint(const Region* pRegion) pWindowImpl->maInvalidateRegion.Union( *pWindowImpl->mpWinData->mpTrackRect ); if ( pWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALLCHILDREN ) - m_pChildRegion = new Region( pWindowImpl->maInvalidateRegion ); + m_pChildRegion = new vcl::Region( pWindowImpl->maInvalidateRegion ); pWindowImpl->maInvalidateRegion.Intersect( *pWinChildClipRegion ); } pWindowImpl->mnPaintFlags = 0; @@ -138,7 +138,7 @@ void Window::PushPaintHelper(PaintHelper *pHelper) mpWindowImpl->mbInPaint = true; // restore Paint-Region - Region &rPaintRegion = pHelper->GetPaintRegion(); + vcl::Region &rPaintRegion = pHelper->GetPaintRegion(); rPaintRegion = mpWindowImpl->maInvalidateRegion; Rectangle aPaintRect = rPaintRegion.GetBoundRect(); @@ -157,7 +157,7 @@ void Window::PushPaintHelper(PaintHelper *pHelper) { if ( IsClipRegion() ) { - Region aOldRegion = GetClipRegion(); + vcl::Region aOldRegion = GetClipRegion(); SetClipRegion(); Erase(); SetClipRegion( aOldRegion ); @@ -223,7 +223,7 @@ PaintHelper::~PaintHelper() namespace vcl { -void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) +void Window::ImplCallPaint( const vcl::Region* pRegion, sal_uInt16 nPaintFlags ) { // call PrePaint. PrePaint may add to the invalidate region as well as // other parameters used below. @@ -324,7 +324,7 @@ IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl) return 0; } -void Window::ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) +void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFlags ) { // set PAINTCHILDREN for all parent windows till the first OverlapWindow if ( !ImplIsOverlapWindow() ) @@ -365,7 +365,7 @@ void Window::ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags pParent = pParent->ImplGetParent(); if( pParent ) { - Region *pChildRegion; + vcl::Region *pChildRegion; if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALL ) // invalidate the whole child window region in the parent pChildRegion = ImplGetWinChildClipRegion(); @@ -381,9 +381,9 @@ void Window::ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ImplPostPaint(); } -void Window::ImplInvalidateOverlapFrameRegion( const Region& rRegion ) +void Window::ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion ) { - Region aRegion = rRegion; + vcl::Region aRegion = rRegion; ImplClipBoundaries( aRegion, true, true ); if ( !aRegion.IsEmpty() ) @@ -400,7 +400,7 @@ void Window::ImplInvalidateOverlapFrameRegion( const Region& rRegion ) } } -void Window::ImplInvalidateParentFrameRegion( Region& rRegion ) +void Window::ImplInvalidateParentFrameRegion( vcl::Region& rRegion ) { if ( mpWindowImpl->mbOverlapWin ) mpWindowImpl->mpFrameWindow->ImplInvalidateOverlapFrameRegion( rRegion ); @@ -411,7 +411,7 @@ void Window::ImplInvalidateParentFrameRegion( Region& rRegion ) } } -void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) +void Window::ImplInvalidate( const vcl::Region* pRegion, sal_uInt16 nFlags ) { // reset background storage @@ -459,7 +459,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) else { Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); if ( pRegion ) { // --- RTL --- remirror region before intersecting it @@ -467,7 +467,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) { const OutputDevice *pOutDev = GetOutDev(); - Region aRgn( *pRegion ); + vcl::Region aRgn( *pRegion ); pOutDev->ReMirror( aRgn ); aRegion.Intersect( aRgn ); } @@ -503,7 +503,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, { if ( (mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALL)) == IMPL_PAINT_PAINT ) { - Region aTempRegion = mpWindowImpl->maInvalidateRegion; + vcl::Region aTempRegion = mpWindowImpl->maInvalidateRegion; aTempRegion.Intersect( rRect ); aTempRegion.Move( nHorzScroll, nVertScroll ); mpWindowImpl->maInvalidateRegion.Union( aTempRegion ); @@ -529,7 +529,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, // Paint-Region should be shifted, as drawn by the parents if ( !ImplIsOverlapWindow() ) { - Region aPaintAllRegion; + vcl::Region aPaintAllRegion; vcl::Window* pPaintAllWindow = this; do { @@ -557,7 +557,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, } } -void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) +void Window::ImplValidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFlags ) { if ( !pRegion ) mpWindowImpl->maInvalidateRegion.SetEmpty(); @@ -566,7 +566,7 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) // when all child windows have to be drawn we need to invalidate them before doing so if ( (mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALLCHILDREN) && mpWindowImpl->mpFirstChild ) { - Region aChildRegion = mpWindowImpl->maInvalidateRegion; + vcl::Region aChildRegion = mpWindowImpl->maInvalidateRegion; if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALL ) { Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); @@ -599,7 +599,7 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) } } -void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) +void Window::ImplValidate( const vcl::Region* pRegion, sal_uInt16 nFlags ) { // assemble region bool bValidateAll = !pRegion; @@ -618,7 +618,7 @@ void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) else { Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); if ( pRegion ) aRegion.Intersect( *pRegion ); ImplClipBoundaries( aRegion, true, true ); @@ -647,7 +647,7 @@ void Window::ImplUpdateAll( bool bOverlapWindows ) if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); - Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) bFlush = true; @@ -701,7 +701,7 @@ void Window::SetWindowRegionPixel() mpWindowImpl->mpBorderWindow->SetWindowRegionPixel(); else if( mpWindowImpl->mbFrame ) { - mpWindowImpl->maWinRegion = Region(true); + mpWindowImpl->maWinRegion = vcl::Region(true); mpWindowImpl->mbWinRegion = false; mpWindowImpl->mpFrame->ResetClipRegion(); } @@ -709,7 +709,7 @@ void Window::SetWindowRegionPixel() { if ( mpWindowImpl->mbWinRegion ) { - mpWindowImpl->maWinRegion = Region(true); + mpWindowImpl->maWinRegion = vcl::Region(true); mpWindowImpl->mbWinRegion = false; ImplSetClipFlag(); @@ -721,14 +721,14 @@ void Window::SetWindowRegionPixel() if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) ImplInvalidateAllOverlapBackgrounds(); Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); ImplInvalidateParentFrameRegion( aRegion ); } } } } -void Window::SetWindowRegionPixel( const Region& rRegion ) +void Window::SetWindowRegionPixel( const vcl::Region& rRegion ) { if ( mpWindowImpl->mpBorderWindow ) @@ -788,7 +788,7 @@ void Window::SetWindowRegionPixel( const Region& rRegion ) { if ( mpWindowImpl->mbWinRegion ) { - mpWindowImpl->maWinRegion = Region(true); + mpWindowImpl->maWinRegion = vcl::Region(true); mpWindowImpl->mbWinRegion = false; ImplSetClipFlag(); } @@ -808,13 +808,13 @@ void Window::SetWindowRegionPixel( const Region& rRegion ) if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) ImplInvalidateAllOverlapBackgrounds(); Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); ImplInvalidateParentFrameRegion( aRegion ); } } } -const Region& Window::GetWindowRegionPixel() const +const vcl::Region& Window::GetWindowRegionPixel() const { if ( mpWindowImpl->mpBorderWindow ) @@ -832,18 +832,18 @@ bool Window::IsWindowRegionPixel() const return mpWindowImpl->mbWinRegion; } -Region Window::GetPaintRegion() const +vcl::Region Window::GetPaintRegion() const { if ( mpWindowImpl->mpPaintRegion ) { - Region aRegion = *mpWindowImpl->mpPaintRegion; + vcl::Region aRegion = *mpWindowImpl->mpPaintRegion; aRegion.Move( -mnOutOffX, -mnOutOffY ); return PixelToLogic( aRegion ); } else { - Region aPaintRegion(true); + vcl::Region aPaintRegion(true); return aPaintRegion; } } @@ -867,12 +867,12 @@ void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags ) Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect ); if ( !aRect.IsEmpty() ) { - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); ImplInvalidate( &aRegion, nFlags ); } } -void Window::Invalidate( const Region& rRegion, sal_uInt16 nFlags ) +void Window::Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags ) { if ( !IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight ) @@ -882,7 +882,7 @@ void Window::Invalidate( const Region& rRegion, sal_uInt16 nFlags ) ImplInvalidate( NULL, nFlags ); else { - Region aRegion = ImplPixelToDevicePixel( LogicToPixel( rRegion ) ); + vcl::Region aRegion = ImplPixelToDevicePixel( LogicToPixel( rRegion ) ); if ( !aRegion.IsEmpty() ) ImplInvalidate( &aRegion, nFlags ); } @@ -940,7 +940,7 @@ void Window::Update() if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); - Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) bFlush = true; @@ -1017,7 +1017,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP // preserve graphicsstate Push(); - Region aClipRegion( GetClipRegion() ); + vcl::Region aClipRegion( GetClipRegion() ); SetClipRegion(); GDIMetaFile* pOldMtf = GetConnectMetaFile(); @@ -1214,7 +1214,7 @@ void Window::ImplScroll( const Rectangle& rRect, nFlags |= SCROLL_CHILDREN; } - Region aInvalidateRegion; + vcl::Region aInvalidateRegion; bool bScrollChildren = (nFlags & SCROLL_CHILDREN) != 0; bool bErase = (nFlags & SCROLL_NOERASE) == 0; @@ -1255,7 +1255,7 @@ void Window::ImplScroll( const Rectangle& rRect, { Rectangle aDestRect( aRectMirror ); aDestRect.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll ); - Region aWinInvalidateRegion( aRectMirror ); + vcl::Region aWinInvalidateRegion( aRectMirror ); aWinInvalidateRegion.Exclude( aDestRect ); aInvalidateRegion.Union( aWinInvalidateRegion ); @@ -1263,7 +1263,7 @@ void Window::ImplScroll( const Rectangle& rRect, } Point aPoint( mnOutOffX, mnOutOffY ); - Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); if ( nFlags & SCROLL_CLIP ) aRegion.Intersect( rRect ); if ( mpWindowImpl->mbWinRegion ) diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx index d9fb863adfcc..ad533cf31601 100644 --- a/vcl/source/window/stacking.cxx +++ b/vcl/source/window/stacking.cxx @@ -48,7 +48,7 @@ struct ImplCalcToTopData { ImplCalcToTopData* mpNext; vcl::Window* mpWindow; - Region* mpInvalidateRegion; + vcl::Region* mpInvalidateRegion; }; namespace vcl { @@ -219,9 +219,9 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData ) { // calculate region, where the window overlaps with other windows Point aPoint( mnOutOffX, mnOutOffY ); - Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); - Region aInvalidateRegion; + vcl::Region aInvalidateRegion; ImplCalcOverlapRegionOverlaps( aRegion, aInvalidateRegion ); if ( !aInvalidateRegion.IsEmpty() ) @@ -230,7 +230,7 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData ) pPrevData->mpNext = pData; pData->mpNext = NULL; pData->mpWindow = this; - pData->mpInvalidateRegion = new Region( aInvalidateRegion ); + pData->mpInvalidateRegion = new vcl::Region( aInvalidateRegion ); } } } diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 9f780e909b0e..545b0a6e0bb3 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -377,7 +377,7 @@ void StatusBar::ImplDrawItem( bool bOffScreen, sal_uInt16 nPos, bool bDrawText, mpImplData->mpVirDev->SetOutputSizePixel( aTextRectSize ); else { - Region aRegion( aTextRect ); + vcl::Region aRegion( aTextRect ); SetClipRegion( aRegion ); } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index b8ac59a5bad7..d6245bf763f1 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -453,7 +453,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp } -bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & ) +bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const vcl::Region & ) { // use NWF Point aPt; @@ -464,7 +464,7 @@ bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & ) aCtrlRegion, nState, ImplControlValue(), OUString() ); } -void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegion ) +void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const vcl::Region &rRegion ) { // just invalidate to trigger paint of the parent @@ -477,7 +477,7 @@ void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegi pThis->mpData->mbIsPaintLocked = bOldPaintLock; } -void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, bool bIsInPopupMode ) +void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const vcl::Region &rRegion, bool bIsInPopupMode ) { // draw a constant color if( !bIsInPopupMode ) @@ -499,7 +499,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( pThis ); bool bIsInPopupMode = pThis->ImplIsInPopupMode(); - Region aPaintRegion( rRect ); + vcl::Region aPaintRegion( rRect ); // make sure we do not invalidate/erase too much if( pThis->IsInPaint() ) @@ -3031,7 +3031,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, bClip = true; Rectangle aTempRect( pItem->maRect.Left()+1, pItem->maRect.Top()+1, pItem->maRect.Right()-1, pItem->maRect.Bottom()-1 ); - Region aTempRegion( aTempRect ); + vcl::Region aTempRegion( aTempRect ); SetClipRegion( aTempRegion ); } else diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index e04def3b9e39..9fa514680d8f 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -573,8 +573,8 @@ Window::~Window() WindowImpl::WindowImpl( WindowType nType ) { maZoom = Fraction( 1, 1 ); - maWinRegion = Region(true); - maWinClipRegion = Region(true); + maWinRegion = vcl::Region(true); + maWinClipRegion = vcl::Region(true); mpWinData = NULL; // Extra Window Data, that we dont need for all windows mpOverlapData = NULL; // Overlap Data mpFrameData = NULL; // Frame Data @@ -1499,8 +1499,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, long nOldOutOffY = mnOutOffY; long nOldOutWidth = mnOutWidth; long nOldOutHeight = mnOutHeight; - Region* pOverlapRegion = NULL; - Region* pOldRegion = NULL; + vcl::Region* pOverlapRegion = NULL; + vcl::Region* pOldRegion = NULL; if ( IsReallyVisible() ) { @@ -1509,7 +1509,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Rectangle aOldWinRect( Point( nOldOutOffX, nOldOutOffY ), Size( nOldOutWidth, nOldOutHeight ) ); - pOldRegion = new Region( aOldWinRect ); + pOldRegion = new vcl::Region( aOldWinRect ); if ( mpWindowImpl->mbWinRegion ) pOldRegion->Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); @@ -1594,7 +1594,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, { if ( bCopyBits && !pOverlapRegion ) { - pOverlapRegion = new Region(); + pOverlapRegion = new vcl::Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), *pOverlapRegion, false, true, true ); @@ -1612,7 +1612,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, { if ( bCopyBits && !pOverlapRegion ) { - pOverlapRegion = new Region(); + pOverlapRegion = new vcl::Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), *pOverlapRegion, false, true, true ); @@ -1704,7 +1704,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( bCopyBits && bParentPaint && !HasPaintEvent() ) { Point aPoint( mnOutOffX, mnOutOffY ); - Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); @@ -1756,7 +1756,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, else { Point aPoint( mnOutOffX, mnOutOffY ); - Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); aRegion.Exclude( *pOldRegion ); if ( mpWindowImpl->mbWinRegion ) @@ -1771,7 +1771,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( bNewPos || (mnOutWidth < nOldOutWidth) || (mnOutHeight < nOldOutHeight) ) { - Region aRegion( *pOldRegion ); + vcl::Region aRegion( *pOldRegion ); if ( !mpWindowImpl->mbPaintTransparent ) ImplExcludeWindowRegion( aRegion ); ImplClipBoundaries( aRegion, false, true ); @@ -2263,7 +2263,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) if ( mpWindowImpl->mbReallyVisible ) { - Region aInvRegion; + vcl::Region aInvRegion; bool bSaveBack = false; if ( ImplIsOverlapWindow() && !mpWindowImpl->mbFrame ) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 0067e5694de7..48faf1f2f8f7 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -270,7 +270,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) if ( nFlags & SHOWTRACK_CLIP ) { Point aPoint( mnOutOffX, mnOutOffY ); - Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplClipBoundaries( aRegion, false, false ); pOutDev->SelectClipRegion( aRegion, pGraphics ); @@ -334,7 +334,7 @@ void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags ) if ( nFlags & SHOWTRACK_CLIP ) { Point aPoint( mnOutOffX, mnOutOffY ); - Region aRegion( Rectangle( aPoint, + vcl::Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplClipBoundaries( aRegion, false, false ); pOutDev->SelectClipRegion( aRegion, pGraphics ); diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 50ca77c375e5..cb2bd92a250b 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1517,7 +1517,7 @@ static void ImplHandlePaint( vcl::Window* pWindow, const Rectangle& rBoundRect, pWindow->ImplGetWindowImpl()->mnPaintFlags |= IMPL_PAINT_CHECKRTL; // trigger paint for all windows that live in the new paint region - Region aRegion( rBoundRect ); + vcl::Region aRegion( rBoundRect ); pWindow->ImplInvalidateOverlapFrameRegion( aRegion ); if( bImmediateUpdate ) { |