diff options
Diffstat (limited to 'vcl/source')
42 files changed, 284 insertions, 280 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 9962c3213578..5d0bb1db13b4 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -561,8 +561,8 @@ void Edit::ImplRepaint(bool bLayout) // save graphics state Push(); // first calculate higlighted and non highlighted clip regions - Region aHiglightClipRegion; - Region aNormalClipRegion; + vcl::Region aHiglightClipRegion; + vcl::Region aNormalClipRegion; Selection aTmpSel( maSelection ); aTmpSel.Justify(); // selection is highlighted @@ -619,7 +619,7 @@ void Edit::ImplRepaint(bool bLayout) { for( int n = 0; n < 2; n++ ) { - Region aRegion; + vcl::Region aRegion; if( n == 0 ) { SetTextColor( aNormalTextColor ); @@ -639,7 +639,7 @@ void Edit::ImplRepaint(bool bLayout) for( i = 0; i < mpIMEInfos->nLen; ) { sal_uInt16 nAttr = mpIMEInfos->pAttribs[i]; - Region aClip; + vcl::Region aClip; int nIndex = i; while( nIndex < mpIMEInfos->nLen && mpIMEInfos->pAttribs[nIndex] == nAttr) // #112631# check nIndex before using it { @@ -1029,7 +1029,7 @@ void Edit::ImplPaintBorder( long nXStart, long nXEnd ) if( pBorder ) { // set proper clipping region to not overdraw the whole control - Region aClipRgn = GetPaintRegion(); + vcl::Region aClipRgn = GetPaintRegion(); if( !aClipRgn.IsNull() ) { // transform clipping region to border window's coordinate system @@ -1055,7 +1055,7 @@ void Edit::ImplPaintBorder( long nXStart, long nXEnd ) aClipRgn.Move( aBorderOffs.X(), aBorderOffs.Y() ); } - Region oldRgn( pBorder->GetClipRegion() ); + vcl::Region oldRgn( pBorder->GetClipRegion() ); pBorder->SetClipRegion( aClipRgn ); pBorder->Paint( Rectangle() ); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index c11bb36654ba..d9ee7576306b 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -1270,8 +1270,8 @@ bool ScrollBar::PreNotify( NotifyEvent& rNEvt ) Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); if( pRect != pLastRect || pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow() ) { - Region aRgn( GetActiveClipRegion() ); - Region aClipRegion; + vcl::Region aRgn( GetActiveClipRegion() ); + vcl::Region aClipRegion; if ( pRect ) aClipRegion.Union( *pRect ); diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index 00cf7108c981..0ebdc37dc66e 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -193,7 +193,7 @@ void Slider::ImplUpdateRects( bool bUpdate ) Invalidate(); else { - Region aInvalidRegion( aOldThumbRect ); + vcl::Region aInvalidRegion( aOldThumbRect ); aInvalidRegion.Union( maThumbRect ); if( !IsBackground() && GetParent() ) diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index f760aaf669e5..b7d9de824902 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -457,16 +457,16 @@ bool SpinButton::PreNotify( NotifyEvent& rNEvt ) Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); if( pRect != pLastRect || (pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow()) ) { - Region aRgn( GetActiveClipRegion() ); + vcl::Region aRgn( GetActiveClipRegion() ); if( pLastRect ) { - SetClipRegion(Region(*pLastRect)); + SetClipRegion(vcl::Region(*pLastRect)); Paint( *pLastRect ); SetClipRegion( aRgn ); } if( pRect ) { - SetClipRegion(Region(*pRect)); + SetClipRegion(vcl::Region(*pRect)); Paint( *pRect ); SetClipRegion( aRgn ); } diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index e71cfbb60406..a6c558317eea 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -98,8 +98,8 @@ bool ImplDrawNativeSpinfield( vcl::Window *pWin, const SpinbuttonValue& rSpinbut // convert from screen space to borderwin space aClipRect.SetPos( pBorder->ScreenToOutputPixel(pWin->OutputToScreenPixel(aClipRect.TopLeft())) ); - Region oldRgn( pBorder->GetClipRegion() ); - pBorder->SetClipRegion( Region( aClipRect ) ); + vcl::Region oldRgn( pBorder->GetClipRegion() ); + pBorder->SetClipRegion( vcl::Region( aClipRect ) ); Point aPt; Size aSize( pBorder->GetOutputSizePixel() ); // the size of the border window, i.e., the whole control @@ -116,7 +116,7 @@ bool ImplDrawNativeSpinfield( vcl::Window *pWin, const SpinbuttonValue& rSpinbut bNativeOK = pBorder->DrawNativeControl( CTRL_SPINBOX, PART_ENTIRE_CONTROL, aRgn, CTRL_STATE_ENABLED, rSpinbuttonValue, OUString() ); - pBorder->SetClipRegion(Region(oldRgn)); + pBorder->SetClipRegion(vcl::Region(oldRgn)); } } return bNativeOK; @@ -879,16 +879,16 @@ bool SpinField::PreNotify( NotifyEvent& rNEvt ) else { // paint directly - Region aRgn( GetActiveClipRegion() ); + vcl::Region aRgn( GetActiveClipRegion() ); if( pLastRect ) { - SetClipRegion(Region(*pLastRect)); + SetClipRegion(vcl::Region(*pLastRect)); Paint( *pLastRect ); SetClipRegion( aRgn ); } if( pRect ) { - SetClipRegion(Region(*pRect)); + SetClipRegion(vcl::Region(*pRect)); Paint( *pRect ); SetClipRegion( aRgn ); } diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 4e377cb103ee..f0aa4dbad2fb 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -1102,7 +1102,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED; - Region aClipRgn( GetActiveClipRegion() ); + vcl::Region aClipRgn( GetActiveClipRegion() ); aClipRgn.Intersect( aRect ); if( !rRect.IsEmpty() ) aClipRgn.Intersect( rRect ); @@ -1197,7 +1197,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) ImplTabItem* pItem = &mpTabCtrlData->maItemList[idx]; if ( pItem != pCurItem ) { - Region aClipRgn( GetActiveClipRegion() ); + vcl::Region aClipRgn( GetActiveClipRegion() ); aClipRgn.Intersect( pItem->maRect ); if( !rRect.IsEmpty() ) aClipRgn.Intersect( rRect ); @@ -1213,7 +1213,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) if ( pCurItem ) { - Region aClipRgn( GetActiveClipRegion() ); + vcl::Region aClipRgn( GetActiveClipRegion() ); aClipRgn.Intersect( pCurItem->maRect ); if( !rRect.IsEmpty() ) aClipRgn.Intersect( rRect ); @@ -1543,7 +1543,7 @@ bool TabControl::PreNotify( NotifyEvent& rNEvt ) Rectangle* pLastRect = ImplFindPartRect( GetLastPointerPosPixel() ); if( pRect != pLastRect || (pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow()) ) { - Region aClipRgn; + vcl::Region aClipRgn; if( pLastRect ) { // allow for slightly bigger tabitems diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 19f9bc9db4ba..e0f8d5b31231 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -2047,7 +2047,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan { sal_uInt16 nL; - // 1) Region before Selection + // 1) vcl::Region before Selection if ( aTextStart < *pSelStart ) { nL = pSelStart->GetIndex() - nTmpIndex; @@ -2057,7 +2057,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan nTmpIndex = nTmpIndex + nL; } - // 2) Region with Selection + // 2) vcl::Region with Selection nL = nEnd-nTmpIndex; if ( aTextEnd > *pSelEnd ) nL = pSelEnd->GetIndex() - nTmpIndex; @@ -2073,7 +2073,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan nTmpIndex = nTmpIndex + nL; } - // 3) Region after Selection + // 3) vcl::Region after Selection if ( nTmpIndex < nEnd ) { nL = nEnd-nTmpIndex; diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 2d6a29b43455..33219b626f99 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -409,10 +409,10 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr } break; case 0x18: case 0x38: { // circle - Region ClipMerk=rOut.GetClipRegion(); + vcl::Region ClipMerk=rOut.GetClipRegion(); double a; - rOut.SetClipRegion(Region(Rectangle(x1,y1,x2,y2))); + rOut.SetClipRegion(vcl::Region(Rectangle(x1,y1,x2,y2))); cx=(x1+x2) /2; cy=(y1+y2) /2; dx=x2-x1+1; @@ -526,40 +526,40 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr b0=Int1; switch (F.FBFarbe & 0x38) { case 0x08: { // vertical - Region ClipMerk=rOut.GetClipRegion(); + vcl::Region ClipMerk=rOut.GetClipRegion(); i0=y1; i=y1; while (i<=y2) { b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1)); if (b!=b0) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); - rOut.SetClipRegion(Region(Rectangle(x1,i0,x2,i-1))); + rOut.SetClipRegion(vcl::Region(Rectangle(x1,i0,x2,i-1))); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); i0=i; b0=b; } i++; } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); - rOut.SetClipRegion(Region(Rectangle(x1,i0,x2,y2))); + rOut.SetClipRegion(vcl::Region(Rectangle(x1,i0,x2,y2))); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); rOut.SetClipRegion(ClipMerk); } break; case 0x28: { // horizontal - Region ClipMerk=rOut.GetClipRegion(); + vcl::Region ClipMerk=rOut.GetClipRegion(); i0=x1; i=x1; while (i<=x2) { b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1)); if (b!=b0) { SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut); - rOut.SetClipRegion(Region(Rectangle(i0,y1,i-1,y2))); + rOut.SetClipRegion(vcl::Region(Rectangle(i0,y1,i-1,y2))); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); i0=i; b0=b; } i++; } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut); - rOut.SetClipRegion(Region(Rectangle(i0,y1,x2,y2))); + rOut.SetClipRegion(vcl::Region(Rectangle(i0,y1,x2,y2))); rOut.DrawEllipse(Rectangle(x1,y1,x2,y2)); rOut.SetClipRegion(ClipMerk); } break; diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index a4b0b67ebd81..03ac25e6be2e 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -1773,7 +1773,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, aDstFillColor = aSrcFillColor = Color( COL_WHITE ); CreateSelectDeleteBrush( aDstFillColor ); - aDstClipRegion = aSrcClipRegion = Region(); + aDstClipRegion = aSrcClipRegion = vcl::Region(); bDstIsClipping = bSrcIsClipping = false; vcl::Font aFont; diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx index a4ce97ace9ca..7647a2b5ccb5 100644 --- a/vcl/source/filter/wmf/wmfwr.hxx +++ b/vcl/source/filter/wmf/wmfwr.hxx @@ -39,7 +39,7 @@ struct WMFWriterAttrStackMember RasterOp eRasterOp; vcl::Font aFont; MapMode aMapMode; - Region aClipRegion; + vcl::Region aClipRegion; PushFlags nFlags; }; @@ -76,7 +76,7 @@ private: vcl::Font aSrcFont; MapMode aSrcMapMode; bool bSrcIsClipping; - Region aSrcClipRegion; + vcl::Region aSrcClipRegion; WMFWriterAttrStackMember * pAttrStack; sal_uInt32 eSrcHorTextAlign; @@ -93,7 +93,7 @@ private: sal_uInt32 eDstHorTextAlign; bool bDstIsClipping; // ???: not taken into account at the moment - Region aDstClipRegion; // ???: not taken into account at the moment + vcl::Region aDstClipRegion; // ???: not taken into account at the moment bool bHandleAllocated[MAXOBJECTHANDLES]; // which handles have been assigned sal_uInt16 nDstPenHandle,nDstFontHandle,nDstBrushHandle; // which handles are owned by // Selected-Objects diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 24fd842036a2..5f6477a00b82 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -1361,9 +1361,9 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const return aNewBmp; } -Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const +vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const { - Region aRegion; + vcl::Region aRegion; Rectangle aRect( rRect ); BitmapReadAccess* pReadAcc = ( (Bitmap*) this )->AcquireReadAccess(); diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 1da9c12da22e..8ee40c3197d0 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -1005,7 +1005,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_CLIPREGION_ACTION ): { - Region aRegion; + vcl::Region aRegion; sal_Int16 nRegType; sal_Int16 bIntersect; bool bClip = false; @@ -1023,7 +1023,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) Rectangle aRegRect; ImplReadRect( rIStm, aRegRect ); - aRegion = Region( aRegRect ); + aRegion = vcl::Region( aRegRect ); bClip = true; } break; @@ -1031,7 +1031,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( 2 ): { ImplReadPoly( rIStm, aActionPoly ); - aRegion = Region( aActionPoly ); + aRegion = vcl::Region( aActionPoly ); bClip = true; } break; @@ -1049,7 +1049,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) aPolyPoly.Insert( aActionPoly ); } - aRegion = Region( aPolyPoly ); + aRegion = vcl::Region( aPolyPoly ); bClip = true; } break; @@ -1937,7 +1937,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, case( META_CLIPREGION_ACTION ): { const MetaClipRegionAction* pAct = static_cast<const MetaClipRegionAction*>(pAction); - const Region& rRegion = pAct->GetRegion(); + const vcl::Region& rRegion = pAct->GetRegion(); Rectangle aClipRect; rOStm.WriteInt16( GDI_CLIPREGION_ACTION ); diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index a0afe289a93f..97cea08278c3 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -297,7 +297,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) if(pA->IsClipping()) { - const Region& rRegion = pA->GetRegion(); + const vcl::Region& rRegion = pA->GetRegion(); const basegfx::B2DPolyPolygon aNewClip(rRegion.GetAsB2DPolyPolygon()); aClips.back() = aNewClip; @@ -333,7 +333,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case META_ISECTREGIONCLIPREGION_ACTION : { const MetaISectRegionClipRegionAction* pA = static_cast< const MetaISectRegionClipRegionAction* >(pAction); - const Region& rRegion = pA->GetRegion(); + const vcl::Region& rRegion = pA->GetRegion(); if(!rRegion.IsEmpty() && aClips.size() && aClips.back().count()) { diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index ff71ff3212c9..b631331bad5f 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -531,7 +531,7 @@ void GDIMetaFile::ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct, void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos, const Size& rSize, size_t nPos ) { - Region aDrawClipRegion; + vcl::Region aDrawClipRegion; MapMode aDrawMap( GetPrefMapMode() ); Size aDestSize( pOut->LogicToPixel( rSize ) ); @@ -843,7 +843,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect ) else if( nType == META_CLIPREGION_ACTION ) { MetaClipRegionAction* pOldAct = static_cast<MetaClipRegionAction*>(pAct); - Region aNewReg( aCurRect ); + vcl::Region aNewReg( aCurRect ); if( pOldAct->IsClipping() ) aNewReg.Intersect( pOldAct->GetRegion() ); MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, true ); @@ -1282,7 +1282,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) MetaClipRegionAction* pAct = static_cast<MetaClipRegionAction*>(pAction); if( pAct->IsClipping() && pAct->GetRegion().HasPolyPolygonOrB2DPolyPolygon() ) - aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), true ) ); + aMtf.AddAction( new MetaClipRegionAction( vcl::Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), true ) ); else { pAction->Duplicate(); @@ -1294,7 +1294,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( META_ISECTRECTCLIPREGION_ACTION ): { MetaISectRectClipRegionAction* pAct = static_cast<MetaISectRectClipRegionAction*>(pAction); - aMtf.AddAction( new MetaISectRegionClipRegionAction(Region( + aMtf.AddAction( new MetaISectRegionClipRegionAction(vcl::Region( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos )) ) ); } @@ -1303,10 +1303,10 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( META_ISECTREGIONCLIPREGION_ACTION ): { MetaISectRegionClipRegionAction* pAct = static_cast<MetaISectRegionClipRegionAction*>(pAction); - const Region& rRegion = pAct->GetRegion(); + const vcl::Region& rRegion = pAct->GetRegion(); if( rRegion.HasPolyPolygonOrB2DPolyPolygon() ) - aMtf.AddAction( new MetaISectRegionClipRegionAction( Region( ImplGetRotatedPolyPolygon( rRegion.GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ) ) ); + aMtf.AddAction( new MetaISectRegionClipRegionAction( vcl::Region( ImplGetRotatedPolyPolygon( rRegion.GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ) ) ); else { pAction->Duplicate(); @@ -2608,7 +2608,7 @@ sal_uLong GDIMetaFile::GetChecksum() const case META_CLIPREGION_ACTION : { MetaClipRegionAction& rAct = static_cast<MetaClipRegionAction&>(*pAction); - const Region& rRegion = rAct.GetRegion(); + const vcl::Region& rRegion = rAct.GetRegion(); if(rRegion.HasPolyPolygonOrB2DPolyPolygon()) { diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx index bf36ae962c1a..293b148e7230 100644 --- a/vcl/source/gdi/impanmvw.cxx +++ b/vcl/source/gdi/impanmvw.cxx @@ -155,7 +155,7 @@ void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, void ImplAnimView::ImplDrawToPos( sal_uLong nPos ) { VirtualDevice aVDev; - boost::scoped_ptr<Region> pOldClip(!maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL); + boost::scoped_ptr<vcl::Region> pOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL); aVDev.SetOutputSizePixel( maSzPix, false ); nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL ); @@ -266,7 +266,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) if( !pVDev ) { - boost::scoped_ptr<Region> pOldClip(!maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL); + boost::scoped_ptr<vcl::Region> pOldClip(!maClip.IsNull() ? new vcl::Region( mpOut->GetClipRegion() ) : NULL); if( pOldClip ) mpOut->SetClipRegion( maClip ); diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx index 2cb0aecf264a..82e61e3a6964 100644 --- a/vcl/source/gdi/impanmvw.hxx +++ b/vcl/source/gdi/impanmvw.hxx @@ -42,7 +42,7 @@ private: Size maDispSz; Size maRestSz; MapMode maMap; - Region maClip; + vcl::Region maClip; VirtualDevice* mpBackground; VirtualDevice* mpRestore; sal_uLong mnActPos; diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index b1f2f5aac21d..a5c5cf61f400 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -2440,7 +2440,7 @@ MetaClipRegionAction::MetaClipRegionAction() : MetaClipRegionAction::~MetaClipRegionAction() {} -MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, bool bClip ) : +MetaClipRegionAction::MetaClipRegionAction( const vcl::Region& rRegion, bool bClip ) : MetaAction ( META_CLIPREGION_ACTION ), maRegion ( rRegion ), mbClip ( bClip ) @@ -2552,7 +2552,7 @@ MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction() : MetaISectRegionClipRegionAction::~MetaISectRegionClipRegionAction() {} -MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( const Region& rRegion ) : +MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( const vcl::Region& rRegion ) : MetaAction ( META_ISECTREGIONCLIPREGION_ACTION ), maRegion ( rRegion ) { diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 2d0a4d0cf551..686ebd4b1eab 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -879,7 +879,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa m_rOuterFace.SetClipRegion( basegfx::B2DPolyPolygon() ); else { - Region aReg( pA->GetRegion() ); + vcl::Region aReg( pA->GetRegion() ); m_rOuterFace.SetClipRegion( aReg.GetAsB2DPolyPolygon() ); } } @@ -898,7 +898,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa case( META_ISECTREGIONCLIPREGION_ACTION ): { const MetaISectRegionClipRegionAction* pA = static_cast<const MetaISectRegionClipRegionAction*>(pAction); - Region aReg( pA->GetRegion() ); + vcl::Region aReg( pA->GetRegion() ); m_rOuterFace.IntersectClipRegion( aReg.GetAsB2DPolyPolygon() ); } break; diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index a901a312564b..3951e5720da3 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -288,7 +288,7 @@ void Printer::EmulateDrawTransparent ( const PolyPolygon& rPolyPoly, } Push( PUSH_CLIPREGION | PUSH_LINECOLOR ); - IntersectClipRegion(Region(rPolyPoly)); + IntersectClipRegion(vcl::Region(rPolyPoly)); SetLineColor( GetFillColor() ); const bool bOldMap = mbMap; EnableMapMode( false ); @@ -868,7 +868,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor, pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight ); // walk through all rectangles of mask - const Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel()))); + const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel()))); RectangleVector aRectangles; aWorkRgn.GetRegionRectangles(aRectangles); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index b87425f2934c..90969a3f1669 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1013,7 +1013,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) ); // clip to page rect - o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), true ) ); + o_rMtf.AddAction( new MetaClipRegionAction( vcl::Region( i_rClipRect ), true ) ); // append the subpage io_rSubPage.WindStart(); diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 6e9d528ba5ef..cf011f1c37f6 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -221,7 +221,9 @@ namespace } } // end of anonymous namespace -bool Region::IsEmpty() const +namespace vcl { + +bool vcl::Region::IsEmpty() const { return !mbIsNull && !mpB2DPolyPolygon.get() && !mpPolyPolygon.get() && !mpRegionBand.get(); } @@ -275,7 +277,7 @@ RegionBand* ImplCreateRegionBandFromPolyPolygon(const PolyPolygon& rPolyPolygon) return pRetval; } -PolyPolygon Region::ImplCreatePolyPolygonFromRegionBand() const +PolyPolygon vcl::Region::ImplCreatePolyPolygonFromRegionBand() const { PolyPolygon aRetval; @@ -297,7 +299,7 @@ PolyPolygon Region::ImplCreatePolyPolygonFromRegionBand() const return aRetval; } -basegfx::B2DPolyPolygon Region::ImplCreateB2DPolyPolygonFromRegionBand() const +basegfx::B2DPolyPolygon vcl::Region::ImplCreateB2DPolyPolygonFromRegionBand() const { PolyPolygon aPoly(ImplCreatePolyPolygonFromRegionBand()); @@ -360,7 +362,7 @@ Region::Region(const basegfx::B2DPolyPolygon& rPolyPoly) } } -Region::Region(const Region& rRegion) +Region::Region(const vcl::Region& rRegion) : mpB2DPolyPolygon(rRegion.mpB2DPolyPolygon), mpPolyPolygon(rRegion.mpPolyPolygon), mpRegionBand(rRegion.mpRegionBand), @@ -372,7 +374,7 @@ Region::~Region() { } -void Region::ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly ) +void vcl::Region::ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly ) { const sal_uInt16 nPolyCount = rPolyPoly.Count(); @@ -398,7 +400,7 @@ void Region::ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly ) } } -void Region::ImplCreatePolyPolyRegion( const basegfx::B2DPolyPolygon& rPolyPoly ) +void vcl::Region::ImplCreatePolyPolyRegion( const basegfx::B2DPolyPolygon& rPolyPoly ) { if(rPolyPoly.count() && !rPolyPoly.getB2DRange().isEmpty()) { @@ -407,7 +409,7 @@ void Region::ImplCreatePolyPolyRegion( const basegfx::B2DPolyPolygon& rPolyPoly } } -void Region::Move( long nHorzMove, long nVertMove ) +void vcl::Region::Move( long nHorzMove, long nVertMove ) { if(IsNull() || IsEmpty()) { @@ -454,7 +456,7 @@ void Region::Move( long nHorzMove, long nVertMove ) } } -void Region::Scale( double fScaleX, double fScaleY ) +void vcl::Region::Scale( double fScaleX, double fScaleY ) { if(IsNull() || IsEmpty()) { @@ -501,7 +503,7 @@ void Region::Scale( double fScaleX, double fScaleY ) } } -bool Region::Union( const Rectangle& rRect ) +bool vcl::Region::Union( const Rectangle& rRect ) { if(rRect.IsEmpty()) { @@ -542,7 +544,7 @@ bool Region::Union( const Rectangle& rRect ) basegfx::tools::solvePolygonOperationOr( aThisPolyPoly, basegfx::B2DPolyPolygon(aRectPoly))); - *this = Region(aClip); + *this = vcl::Region(aClip); } return true; @@ -583,7 +585,7 @@ bool Region::Union( const Rectangle& rRect ) return true; } -bool Region::Intersect( const Rectangle& rRect ) +bool vcl::Region::Intersect( const Rectangle& rRect ) { if ( rRect.IsEmpty() ) { @@ -676,7 +678,7 @@ bool Region::Intersect( const Rectangle& rRect ) return true; } -bool Region::Exclude( const Rectangle& rRect ) +bool vcl::Region::Exclude( const Rectangle& rRect ) { if ( rRect.IsEmpty() ) { @@ -718,7 +720,7 @@ bool Region::Exclude( const Rectangle& rRect ) const basegfx::B2DPolyPolygon aOtherPolyPoly(aRectPoly); const basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff(aThisPolyPoly, aOtherPolyPoly); - *this = Region(aClip); + *this = vcl::Region(aClip); return true; } @@ -757,7 +759,7 @@ bool Region::Exclude( const Rectangle& rRect ) return true; } -bool Region::XOr( const Rectangle& rRect ) +bool vcl::Region::XOr( const Rectangle& rRect ) { if ( rRect.IsEmpty() ) { @@ -801,7 +803,7 @@ bool Region::XOr( const Rectangle& rRect ) const basegfx::B2DPolyPolygon aOtherPolyPoly(aRectPoly); const basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor(aThisPolyPoly, aOtherPolyPoly); - *this = Region(aClip); + *this = vcl::Region(aClip); return true; } @@ -842,7 +844,7 @@ bool Region::XOr( const Rectangle& rRect ) return true; } -bool Region::Union( const Region& rRegion ) +bool vcl::Region::Union( const vcl::Region& rRegion ) { if(rRegion.IsEmpty()) { @@ -853,7 +855,7 @@ bool Region::Union( const Region& rRegion ) if(rRegion.IsNull()) { // extending with null region -> null region - *this = Region(true); + *this = vcl::Region(true); return true; } @@ -891,7 +893,7 @@ bool Region::Union( const Region& rRegion ) // use logical OR operation basegfx::B2DPolyPolygon aClip(basegfx::tools::solvePolygonOperationOr(aThisPolyPoly, aOtherPolyPoly)); - *this = Region( aClip ); + *this = vcl::Region( aClip ); return true; } @@ -930,7 +932,7 @@ bool Region::Union( const Region& rRegion ) return true; } -bool Region::Intersect( const Region& rRegion ) +bool vcl::Region::Intersect( const vcl::Region& rRegion ) { // same instance data? -> nothing to do! if(getB2DPolyPolygon() && getB2DPolyPolygon() == rRegion.getB2DPolyPolygon()) @@ -1001,7 +1003,7 @@ bool Region::Intersect( const Region& rRegion ) aThisPolyPoly, true, false)); - *this = Region( aClip ); + *this = vcl::Region( aClip ); return true; } @@ -1027,7 +1029,7 @@ bool Region::Intersect( const Region& rRegion ) if(pCurrent->getRectangleCount() + 2 < pSource->getRectangleCount()) { // when we have less rectangles, turn around the call - Region aTempRegion = rRegion; + vcl::Region aTempRegion = rRegion; aTempRegion.Intersect( *this ); *this = aTempRegion; } @@ -1052,7 +1054,7 @@ bool Region::Intersect( const Region& rRegion ) return true; } -bool Region::Exclude( const Region& rRegion ) +bool vcl::Region::Exclude( const vcl::Region& rRegion ) { if ( rRegion.IsEmpty() ) { @@ -1099,7 +1101,7 @@ bool Region::Exclude( const Region& rRegion ) aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly ); basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationDiff( aThisPolyPoly, aOtherPolyPoly ); - *this = Region( aClip ); + *this = vcl::Region( aClip ); return true; } @@ -1137,7 +1139,7 @@ bool Region::Exclude( const Region& rRegion ) return true; } -bool Region::XOr( const Region& rRegion ) +bool vcl::Region::XOr( const vcl::Region& rRegion ) { if ( rRegion.IsEmpty() ) { @@ -1187,7 +1189,7 @@ bool Region::XOr( const Region& rRegion ) aOtherPolyPoly = basegfx::tools::prepareForPolygonOperation( aOtherPolyPoly ); basegfx::B2DPolyPolygon aClip = basegfx::tools::solvePolygonOperationXor( aThisPolyPoly, aOtherPolyPoly ); - *this = Region( aClip ); + *this = vcl::Region( aClip ); return true; } @@ -1227,7 +1229,7 @@ bool Region::XOr( const Region& rRegion ) return true; } -Rectangle Region::GetBoundRect() const +Rectangle vcl::Region::GetBoundRect() const { if(IsEmpty()) { @@ -1274,7 +1276,7 @@ Rectangle Region::GetBoundRect() const return Rectangle(); } -const PolyPolygon Region::GetAsPolyPolygon() const +const PolyPolygon vcl::Region::GetAsPolyPolygon() const { if(getPolyPolygon()) { @@ -1285,7 +1287,7 @@ const PolyPolygon Region::GetAsPolyPolygon() const { // the polygon needs to be converted, buffer the down converion const PolyPolygon aPolyPolgon(*getB2DPolyPolygon()); - const_cast< Region* >(this)->mpPolyPolygon.reset(new PolyPolygon(aPolyPolgon)); + const_cast< vcl::Region* >(this)->mpPolyPolygon.reset(new PolyPolygon(aPolyPolgon)); return *getPolyPolygon(); } @@ -1294,7 +1296,7 @@ const PolyPolygon Region::GetAsPolyPolygon() const { // the BandRegion needs to be converted, buffer the converion const PolyPolygon aPolyPolgon(ImplCreatePolyPolygonFromRegionBand()); - const_cast< Region* >(this)->mpPolyPolygon.reset(new PolyPolygon(aPolyPolgon)); + const_cast< vcl::Region* >(this)->mpPolyPolygon.reset(new PolyPolygon(aPolyPolgon)); return *getPolyPolygon(); } @@ -1302,7 +1304,7 @@ const PolyPolygon Region::GetAsPolyPolygon() const return PolyPolygon(); } -const basegfx::B2DPolyPolygon Region::GetAsB2DPolyPolygon() const +const basegfx::B2DPolyPolygon vcl::Region::GetAsB2DPolyPolygon() const { if(getB2DPolyPolygon()) { @@ -1313,7 +1315,7 @@ const basegfx::B2DPolyPolygon Region::GetAsB2DPolyPolygon() const { // the polygon needs to be converted, buffer the up conversion. This will be preferred from now. const basegfx::B2DPolyPolygon aB2DPolyPolygon(getPolyPolygon()->getB2DPolyPolygon()); - const_cast< Region* >(this)->mpB2DPolyPolygon.reset(new basegfx::B2DPolyPolygon(aB2DPolyPolygon)); + const_cast< vcl::Region* >(this)->mpB2DPolyPolygon.reset(new basegfx::B2DPolyPolygon(aB2DPolyPolygon)); return *getB2DPolyPolygon(); } @@ -1322,7 +1324,7 @@ const basegfx::B2DPolyPolygon Region::GetAsB2DPolyPolygon() const { // the BandRegion needs to be converted, buffer the converion const basegfx::B2DPolyPolygon aB2DPolyPolygon(ImplCreateB2DPolyPolygonFromRegionBand()); - const_cast< Region* >(this)->mpB2DPolyPolygon.reset(new basegfx::B2DPolyPolygon(aB2DPolyPolygon)); + const_cast< vcl::Region* >(this)->mpB2DPolyPolygon.reset(new basegfx::B2DPolyPolygon(aB2DPolyPolygon)); return *getB2DPolyPolygon(); } @@ -1330,26 +1332,26 @@ const basegfx::B2DPolyPolygon Region::GetAsB2DPolyPolygon() const return basegfx::B2DPolyPolygon(); } -const RegionBand* Region::GetAsRegionBand() const +const RegionBand* vcl::Region::GetAsRegionBand() const { if(!getRegionBand()) { if(getB2DPolyPolygon()) { // convert B2DPolyPolygon to RegionBand, buffer it and return it - const_cast< Region* >(this)->mpRegionBand.reset(ImplCreateRegionBandFromPolyPolygon(PolyPolygon(*getB2DPolyPolygon()))); + const_cast< vcl::Region* >(this)->mpRegionBand.reset(ImplCreateRegionBandFromPolyPolygon(PolyPolygon(*getB2DPolyPolygon()))); } else if(getPolyPolygon()) { // convert B2DPolyPolygon to RegionBand, buffer it and return it - const_cast< Region* >(this)->mpRegionBand.reset(ImplCreateRegionBandFromPolyPolygon(*getPolyPolygon())); + const_cast< vcl::Region* >(this)->mpRegionBand.reset(ImplCreateRegionBandFromPolyPolygon(*getPolyPolygon())); } } return getRegionBand(); } -bool Region::IsInside( const Point& rPoint ) const +bool vcl::Region::IsInside( const Point& rPoint ) const { if(IsEmpty()) { @@ -1380,7 +1382,7 @@ bool Region::IsInside( const Point& rPoint ) const return false; } -bool Region::IsInside( const Rectangle& rRect ) const +bool vcl::Region::IsInside( const Rectangle& rRect ) const { if(IsEmpty()) { @@ -1401,14 +1403,14 @@ bool Region::IsInside( const Rectangle& rRect ) const } // create region from rectangle and intersect own region - Region aRegion(rRect); + vcl::Region aRegion(rRect); aRegion.Exclude(*this); // rectangle is inside if exclusion is empty return aRegion.IsEmpty(); } -bool Region::IsOver( const Rectangle& rRect ) const +bool vcl::Region::IsOver( const Rectangle& rRect ) const { if(IsEmpty()) { @@ -1425,14 +1427,14 @@ bool Region::IsOver( const Rectangle& rRect ) const // Can we optimize this ??? - is used in StarDraw for brushes pointers // Why we have no IsOver for Regions ??? // create region from rectangle and intersect own region - Region aRegion(rRect); + vcl::Region aRegion(rRect); aRegion.Intersect( *this ); // rectangle is over if include is not empty return !aRegion.IsEmpty(); } -void Region::SetNull() +void vcl::Region::SetNull() { // reset all content mpB2DPolyPolygon.reset(); @@ -1441,7 +1443,7 @@ void Region::SetNull() mbIsNull = true; } -void Region::SetEmpty() +void vcl::Region::SetEmpty() { // reset all content mpB2DPolyPolygon.reset(); @@ -1450,7 +1452,7 @@ void Region::SetEmpty() mbIsNull = false; } -Region& Region::operator=( const Region& rRegion ) +Region& vcl::Region::operator=( const vcl::Region& rRegion ) { // reset all content mpB2DPolyPolygon = rRegion.mpB2DPolyPolygon; @@ -1461,7 +1463,7 @@ Region& Region::operator=( const Region& rRegion ) return *this; } -Region& Region::operator=( const Rectangle& rRect ) +Region& vcl::Region::operator=( const Rectangle& rRect ) { mpB2DPolyPolygon.reset(); mpPolyPolygon.reset(); @@ -1471,7 +1473,7 @@ Region& Region::operator=( const Rectangle& rRect ) return *this; } -bool Region::operator==( const Region& rRegion ) const +bool vcl::Region::operator==( const vcl::Region& rRegion ) const { if(IsNull() && rRegion.IsNull()) { @@ -1517,8 +1519,8 @@ bool Region::operator==( const Region& rRegion ) const { // one of both has a B2DPolyPolygon based region, ensure both have it // by evtl. conversion - const_cast< Region* >(this)->GetAsB2DPolyPolygon(); - const_cast< Region& >(rRegion).GetAsB2DPolyPolygon(); + const_cast< vcl::Region* >(this)->GetAsB2DPolyPolygon(); + const_cast< vcl::Region& >(rRegion).GetAsB2DPolyPolygon(); return *rRegion.getB2DPolyPolygon() == *getB2DPolyPolygon(); } @@ -1527,8 +1529,8 @@ bool Region::operator==( const Region& rRegion ) const { // one of both has a B2DPolyPolygon based region, ensure both have it // by evtl. conversion - const_cast< Region* >(this)->GetAsPolyPolygon(); - const_cast< Region& >(rRegion).GetAsPolyPolygon(); + const_cast< vcl::Region* >(this)->GetAsPolyPolygon(); + const_cast< vcl::Region& >(rRegion).GetAsPolyPolygon(); return *rRegion.getPolyPolygon() == *getPolyPolygon(); } @@ -1545,7 +1547,7 @@ bool Region::operator==( const Region& rRegion ) const return false; } -SvStream& ReadRegion(SvStream& rIStrm, Region& rRegion) +SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion) { VersionCompat aCompat(rIStrm, STREAM_READ); sal_uInt16 nVersion(0); @@ -1604,7 +1606,7 @@ SvStream& ReadRegion(SvStream& rIStrm, Region& rRegion) return rIStrm; } -SvStream& WriteRegion( SvStream& rOStrm, const Region& rRegion ) +SvStream& WriteRegion( SvStream& rOStrm, const vcl::Region& rRegion ) { const sal_uInt16 nVersion(2); VersionCompat aCompat(rOStrm, STREAM_WRITE, nVersion); @@ -1676,7 +1678,7 @@ SvStream& WriteRegion( SvStream& rOStrm, const Region& rRegion ) return rOStrm; } -void Region::GetRegionRectangles(RectangleVector& rTarget) const +void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const { // clear returnvalues rTarget.clear(); @@ -1744,9 +1746,9 @@ static inline bool ImplPolygonRectTest( const Polygon& rPoly, Rectangle* pRectOu return bIsRect; } -Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly ) +vcl::Region vcl::Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly ) { - //return Region( rPolyPoly ); + //return vcl::Region( rPolyPoly ); // check if it's worth extracting the XOr'ing the Rectangles // empiricism shows that break even between XOr'ing rectangles separately @@ -1770,10 +1772,10 @@ Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly ) if( nPolygonPolygons > nPolygonRects ) { - return Region( rPolyPoly ); + return vcl::Region( rPolyPoly ); } - Region aResult; + vcl::Region aResult; Rectangle aRect; for( sal_uInt16 i = 0; i < nPolygons; i++ ) @@ -1786,11 +1788,13 @@ Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly ) } else { - aResult.XOr( Region(rPoly) ); + aResult.XOr( vcl::Region(rPoly) ); } } return aResult; } +} /* namespace vcl */ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 1d9430fc7c2b..a331f0b6fd7c 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -238,13 +238,13 @@ bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint * return false; } -void SalGraphics::mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack ) const +void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice *pOutDev, bool bBack ) const { if( rRgn.HasPolyPolygonOrB2DPolyPolygon() ) { const basegfx::B2DPolyPolygon aPolyPoly(mirror(rRgn.GetAsB2DPolyPolygon(), pOutDev, bBack)); - rRgn = Region(aPolyPoly); + rRgn = vcl::Region(aPolyPoly); } else { @@ -368,11 +368,11 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP return aRet; } -bool SalGraphics::SetClipRegion( const Region& i_rClip, const OutputDevice *pOutDev ) +bool SalGraphics::SetClipRegion( const vcl::Region& i_rClip, const OutputDevice *pOutDev ) { if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { - Region aMirror( i_rClip ); + vcl::Region aMirror( i_rClip ); mirror( aMirror, pOutDev ); return setClipRegion( aMirror ); } diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx index f19a084fe483..fbd26785b4b2 100644 --- a/vcl/source/outdev/clipping.cxx +++ b/vcl/source/outdev/clipping.cxx @@ -31,7 +31,7 @@ #include <numeric> -Region OutputDevice::GetClipRegion() const +vcl::Region OutputDevice::GetClipRegion() const { return PixelToLogic( maRegion ); @@ -41,7 +41,7 @@ void OutputDevice::SetClipRegion() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( Region(), false ) ); + mpMetaFile->AddAction( new MetaClipRegionAction( vcl::Region(), false ) ); SetDeviceClipRegion( NULL ); @@ -49,7 +49,7 @@ void OutputDevice::SetClipRegion() mpAlphaVDev->SetClipRegion(); } -void OutputDevice::SetClipRegion( const Region& rRegion ) +void OutputDevice::SetClipRegion( const vcl::Region& rRegion ) { if ( mpMetaFile ) @@ -61,7 +61,7 @@ void OutputDevice::SetClipRegion( const Region& rRegion ) } else { - Region aRegion = LogicToPixel( rRegion ); + vcl::Region aRegion = LogicToPixel( rRegion ); SetDeviceClipRegion( &aRegion ); } @@ -69,7 +69,7 @@ void OutputDevice::SetClipRegion( const Region& rRegion ) mpAlphaVDev->SetClipRegion( rRegion ); } -bool OutputDevice::SelectClipRegion( const Region& rRegion, SalGraphics* pGraphics ) +bool OutputDevice::SelectClipRegion( const vcl::Region& rRegion, SalGraphics* pGraphics ) { DBG_TESTSOLARMUTEX(); @@ -118,7 +118,7 @@ void OutputDevice::IntersectClipRegion( const Rectangle& rRect ) mpAlphaVDev->IntersectClipRegion( rRect ); } -void OutputDevice::IntersectClipRegion( const Region& rRegion ) +void OutputDevice::IntersectClipRegion( const vcl::Region& rRegion ) { if(!rRegion.IsNull()) @@ -126,7 +126,7 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion ) if ( mpMetaFile ) mpMetaFile->AddAction( new MetaISectRegionClipRegionAction( rRegion ) ); - Region aRegion = LogicToPixel( rRegion ); + vcl::Region aRegion = LogicToPixel( rRegion ); maRegion.Intersect( aRegion ); mbClipRegion = true; mbInitClipRegion = true; @@ -149,7 +149,7 @@ void OutputDevice::InitClipRegion() mbOutputClipped = false; // #102532# Respect output offset also for clip region - Region aRegion( ImplPixelToDevicePixel( maRegion ) ); + vcl::Region aRegion( ImplPixelToDevicePixel( maRegion ) ); const bool bClipDeviceBounds( ! GetPDFWriter() && GetOutDevType() != OUTDEV_PRINTER ); if( bClipDeviceBounds ) @@ -190,7 +190,7 @@ void OutputDevice::InitClipRegion() mbInitClipRegion = false; } -Region OutputDevice::GetActiveClipRegion() const +vcl::Region OutputDevice::GetActiveClipRegion() const { return GetClipRegion(); } @@ -201,7 +201,7 @@ void OutputDevice::ClipToPaintRegion(Rectangle& /*rDstRect*/) // on in other clipping functions } -void OutputDevice::SetDeviceClipRegion( const Region* pRegion ) +void OutputDevice::SetDeviceClipRegion( const vcl::Region* pRegion ) { DBG_TESTSOLARMUTEX(); @@ -209,7 +209,7 @@ void OutputDevice::SetDeviceClipRegion( const Region* pRegion ) { if ( mbClipRegion ) { - maRegion = Region(true); + maRegion = vcl::Region(true); mbClipRegion = false; mbInitClipRegion = true; } diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 1f2a26c74b36..50a679c56ce2 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -85,7 +85,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) ); Push( PUSH_CLIPREGION ); - IntersectClipRegion(Region(rPolyPoly)); + IntersectClipRegion(vcl::Region(rPolyPoly)); DrawGradient( aBoundRect, rGradient ); Pop(); diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 5c2f181abebf..2a6ceb7d51a4 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -648,12 +648,12 @@ Rectangle OutputDevice::ImplDevicePixelToLogic( const Rectangle& rPixelRect ) co maThresRes.mnThresPixToLogY )-maMapRes.mnMapOfsY ); } -Region OutputDevice::ImplPixelToDevicePixel( const Region& rRegion ) const +vcl::Region OutputDevice::ImplPixelToDevicePixel( const vcl::Region& rRegion ) const { if ( !mnOutOffX && !mnOutOffY ) return rRegion; - Region aRegion( rRegion ); + vcl::Region aRegion( rRegion ); aRegion.Move( mnOutOffX+mnOutOffOrigX, mnOutOffY+mnOutOffOrigY ); return aRegion; } @@ -1070,7 +1070,7 @@ basegfx::B2DPolyPolygon OutputDevice::LogicToPixel( const basegfx::B2DPolyPolygo return aTransformedPoly; } -Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const +vcl::Region OutputDevice::LogicToPixel( const vcl::Region& rLogicRegion ) const { if(!mbMap || rLogicRegion.IsNull() || rLogicRegion.IsEmpty()) @@ -1078,15 +1078,15 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const return rLogicRegion; } - Region aRegion; + vcl::Region aRegion; if(rLogicRegion.getB2DPolyPolygon()) { - aRegion = Region(LogicToPixel(*rLogicRegion.getB2DPolyPolygon())); + aRegion = vcl::Region(LogicToPixel(*rLogicRegion.getB2DPolyPolygon())); } else if(rLogicRegion.getPolyPolygon()) { - aRegion = Region(LogicToPixel(*rLogicRegion.getPolyPolygon())); + aRegion = vcl::Region(LogicToPixel(*rLogicRegion.getPolyPolygon())); } else if(rLogicRegion.getRegionBand()) { @@ -1240,7 +1240,7 @@ basegfx::B2DPolygon OutputDevice::LogicToPixel( const basegfx::B2DPolygon& rLogi return aTransformedPoly; } -Region OutputDevice::LogicToPixel( const Region& rLogicRegion, const MapMode& rMapMode ) const +vcl::Region OutputDevice::LogicToPixel( const vcl::Region& rLogicRegion, const MapMode& rMapMode ) const { if(rMapMode.IsDefault() || rLogicRegion.IsNull() || rLogicRegion.IsEmpty()) @@ -1248,15 +1248,15 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion, const MapMode& rM return rLogicRegion; } - Region aRegion; + vcl::Region aRegion; if(rLogicRegion.getB2DPolyPolygon()) { - aRegion = Region(LogicToPixel(*rLogicRegion.getB2DPolyPolygon(), rMapMode)); + aRegion = vcl::Region(LogicToPixel(*rLogicRegion.getB2DPolyPolygon(), rMapMode)); } else if(rLogicRegion.getPolyPolygon()) { - aRegion = Region(LogicToPixel(*rLogicRegion.getPolyPolygon(), rMapMode)); + aRegion = vcl::Region(LogicToPixel(*rLogicRegion.getPolyPolygon(), rMapMode)); } else if(rLogicRegion.getRegionBand()) { @@ -1375,7 +1375,7 @@ basegfx::B2DPolyPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolyPolygo return aTransformedPoly; } -Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const +vcl::Region OutputDevice::PixelToLogic( const vcl::Region& rDeviceRegion ) const { if(!mbMap || rDeviceRegion.IsNull() || rDeviceRegion.IsEmpty()) @@ -1383,15 +1383,15 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const return rDeviceRegion; } - Region aRegion; + vcl::Region aRegion; if(rDeviceRegion.getB2DPolyPolygon()) { - aRegion = Region(PixelToLogic(*rDeviceRegion.getB2DPolyPolygon())); + aRegion = vcl::Region(PixelToLogic(*rDeviceRegion.getB2DPolyPolygon())); } else if(rDeviceRegion.getPolyPolygon()) { - aRegion = Region(PixelToLogic(*rDeviceRegion.getPolyPolygon())); + aRegion = vcl::Region(PixelToLogic(*rDeviceRegion.getPolyPolygon())); } else if(rDeviceRegion.getRegionBand()) { @@ -1549,7 +1549,7 @@ basegfx::B2DPolyPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolyPolygo return aTransformedPoly; } -Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, const MapMode& rMapMode ) const +vcl::Region OutputDevice::PixelToLogic( const vcl::Region& rDeviceRegion, const MapMode& rMapMode ) const { if(rMapMode.IsDefault() || rDeviceRegion.IsNull() || rDeviceRegion.IsEmpty()) @@ -1557,15 +1557,15 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, const MapMode& r return rDeviceRegion; } - Region aRegion; + vcl::Region aRegion; if(rDeviceRegion.getB2DPolyPolygon()) { - aRegion = Region(PixelToLogic(*rDeviceRegion.getB2DPolyPolygon(), rMapMode)); + aRegion = vcl::Region(PixelToLogic(*rDeviceRegion.getB2DPolyPolygon(), rMapMode)); } else if(rDeviceRegion.getPolyPolygon()) { - aRegion = Region(PixelToLogic(*rDeviceRegion.getPolyPolygon(), rMapMode)); + aRegion = vcl::Region(PixelToLogic(*rDeviceRegion.getPolyPolygon(), rMapMode)); } else if(rDeviceRegion.getRegionBand()) { diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index b7edeb11ab05..157769967a56 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -294,9 +294,9 @@ bool OutputDevice::DrawNativeControl( ControlType nType, boost::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); - Region aTestRegion( GetActiveClipRegion() ); + vcl::Region aTestRegion( GetActiveClipRegion() ); aTestRegion.Intersect( rControlRegion ); - if (aTestRegion == Region(rControlRegion)) + if (aTestRegion == vcl::Region(rControlRegion)) nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this ); diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index a5a19798a1da..cd43b519e595 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -467,7 +467,7 @@ void OutputDevice::ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const } void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize, - const OutputDevice& rOutDev, const Region& rRegion ) + const OutputDevice& rOutDev, const vcl::Region& rRegion ) { GDIMetaFile* pOldMetaFile = mpMetaFile; @@ -813,11 +813,11 @@ void OutputDevice::ReMirror( Rectangle &rRect ) const rRect.Right() = rRect.Left() + nWidth; } -void OutputDevice::ReMirror( Region &rRegion ) const +void OutputDevice::ReMirror( vcl::Region &rRegion ) const { RectangleVector aRectangles; rRegion.GetRegionRectangles(aRectangles); - Region aMirroredRegion; + vcl::Region aMirroredRegion; for(RectangleVector::iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter) { diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 809408a1411d..d53bbf8664e7 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -130,7 +130,7 @@ void OutputDevice::Push( PushFlags nFlags ) if ( nFlags & PUSH_CLIPREGION ) { if ( mbClipRegion ) - pState->mpClipRegion = new Region( maRegion ); + pState->mpClipRegion = new vcl::Region( maRegion ); else pState->mpClipRegion = NULL; } diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 93de76c4ef84..2c0c028ea5ee 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -862,7 +862,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr, mpMetaFile->AddAction( new MetaTextAction( rStartPt, rStr, nIndex, nLen ) ); if( pVector ) { - Region aClip( GetClipRegion() ); + vcl::Region aClip( GetClipRegion() ); if( meOutDevType == OUTDEV_WINDOW ) aClip.Intersect( Rectangle( Point(), GetOutputSize() ) ); if( mpOutDevData && mpOutDevData->mpRecordLayout ) diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 2b94fb6dc5e3..512ca332a972 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -192,7 +192,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight ); // walk through all rectangles of mask - const Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel()))); + const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel()))); RectangleVector aRectangles; aWorkRgn.GetRegionRectangles(aRectangles); 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 ) { |