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 /svtools | |
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 'svtools')
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 4 | ||||
-rw-r--r-- | svtools/source/brwbox/datwin.hxx | 2 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 8 | ||||
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 18 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/headbar.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/tabbar.cxx | 10 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 8 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 4 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 2 | ||||
-rw-r--r-- | svtools/source/toolpanel/paneltabbar.cxx | 4 |
12 files changed, 36 insertions, 36 deletions
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 238cfc3317df..fe822bb3c618 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -821,7 +821,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, } // draw our own content (with clipping) - Region aRegion(Rectangle(aRealPos, aRealSize)); + vcl::Region aRegion(Rectangle(aRealPos, aRealSize)); pDev->SetClipRegion( pDev->PixelToLogic( aRegion ) ); // do we have to paint the background @@ -986,7 +986,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool aFieldSize.Height() = aOverallAreaBRPos.Y() + 1 - aPos.Y(); } - Region aClipToField(Rectangle(aPos, aFieldSize)); + vcl::Region aClipToField(Rectangle(aPos, aFieldSize)); _rOut.SetClipRegion(aClipToField); } pCol->Draw( *this, _rOut, aPos, false ); diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index e9644ffed580..bff17665e392 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -173,7 +173,7 @@ public: void DoOutstandingInvalidations(); void Invalidate( sal_uInt16 nFlags = 0 ) SAL_OVERRIDE; void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE; - void Invalidate( const Region& rRegion, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE + void Invalidate( const vcl::Region& rRegion, sal_uInt16 nFlags = 0 ) SAL_OVERRIDE { Control::Invalidate( rRegion, nFlags ); } protected: diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 73eb1c3ff76b..f9fe560da615 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -361,7 +361,7 @@ namespace svt Point aPos( rRect.TopLeft() ); if ( ( aImageSize.Width() > rRect.GetWidth() ) || ( aImageSize.Height() > rRect.GetHeight() ) ) - rDev.SetClipRegion(Region(rRect)); + rDev.SetClipRegion(vcl::Region(rRect)); if ( aImageSize.Width() < rRect.GetWidth() ) aPos.X() += ( rRect.GetWidth() - aImageSize.Width() ) / 2; diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 6e7b1fcc6ae0..671fc676243a 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -684,7 +684,7 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect ) bool bResetClipRegion = false; if( !pView->IsClipRegion() ) { - Region const aOutputArea( GetOutputRect() ); + vcl::Region const aOutputArea( GetOutputRect() ); bResetClipRegion = true; pView->SetClipRegion( aOutputArea ); } @@ -734,7 +734,7 @@ void SvxIconChoiceCtrl_Impl::RepaintEntries( sal_uInt16 nEntryFlagsMask ) if( !pView->IsClipRegion() ) { bResetClipRegion = true; - pView->SetClipRegion(Region(aOutRect)); + pView->SetClipRegion(vcl::Region(aOutRect)); } for( size_t nCur = 0; nCur < nCount; nCur++ ) { @@ -1813,7 +1813,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P Rectangle aOutputArea( GetOutputRect() ); if( aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect) ) { - pView->SetClipRegion(Region(aOutputArea)); + pView->SetClipRegion(vcl::Region(aOutputArea)); bResetClipRegion = true; } } @@ -2727,7 +2727,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd, if( !pView->IsClipRegion() ) { bResetClipRegion = true; - pView->SetClipRegion(Region(GetOutputRect())); + pView->SetClipRegion(vcl::Region(GetOutputRect())); } for( size_t nPos = 0; nPos < nCount; nPos++ ) diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 26514755de0b..c2fb5bd985d4 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -602,8 +602,8 @@ void SvImpLBox::RecalcFocusRect() long nY = GetEntryLine( pCursor ); Rectangle aRect = pView->GetFocusRect( pCursor, nY ); CalcCellFocusRect( pCursor, aRect ); - Region aOldClip( pView->GetClipRegion()); - Region aClipRegion( GetClipRegionRect() ); + vcl::Region aOldClip( pView->GetClipRegion()); + vcl::Region aClipRegion( GetClipRegionRect() ); pView->SetClipRegion( aClipRegion ); pView->ShowFocus( aRect ); pView->SetClipRegion( aOldClip ); @@ -687,8 +687,8 @@ void SvImpLBox::ShowCursor( bool bShow ) { if( !bShow || !pCursor || !pView->HasFocus() ) { - Region aOldClip( pView->GetClipRegion()); - Region aClipRegion( GetClipRegionRect() ); + vcl::Region aOldClip( pView->GetClipRegion()); + vcl::Region aClipRegion( GetClipRegionRect() ); pView->SetClipRegion( aClipRegion ); pView->HideFocus(); pView->SetClipRegion( aOldClip ); @@ -698,8 +698,8 @@ void SvImpLBox::ShowCursor( bool bShow ) long nY = GetEntryLine( pCursor ); Rectangle aRect = pView->GetFocusRect( pCursor, nY ); CalcCellFocusRect( pCursor, aRect ); - Region aOldClip( pView->GetClipRegion()); - Region aClipRegion( GetClipRegionRect() ); + vcl::Region aOldClip( pView->GetClipRegion()); + vcl::Region aClipRegion( GetClipRegionRect() ); pView->SetClipRegion( aClipRegion ); pView->ShowFocus( aRect ); pView->SetClipRegion( aOldClip ); @@ -936,7 +936,7 @@ void SvImpLBox::Paint( const Rectangle& rRect ) nStartLine--; } - Region aClipRegion( GetClipRegionRect() ); + vcl::Region aClipRegion( GetClipRegionRect() ); // first draw the lines, then clip them! pView->SetClipRegion(); @@ -3399,8 +3399,8 @@ void SvImpLBox::ShowFocusRect( const SvTreeListEntry* pEntry ) { long nY = GetEntryLine( (SvTreeListEntry*)pEntry ); Rectangle aRect = pView->GetFocusRect( (SvTreeListEntry*)pEntry, nY ); - Region aOldClip( pView->GetClipRegion()); - Region aClipRegion( GetClipRegionRect() ); + vcl::Region aOldClip( pView->GetClipRegion()); + vcl::Region aClipRegion( GetClipRegionRect() ); pView->SetClipRegion( aClipRegion ); pView->ShowFocus( aRect ); pView->SetClipRegion( aOldClip ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index faa3367e13ee..c0ed007fc611 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -2890,7 +2890,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT // Did we turn on the scrollbar within PreparePaints? If yes, we have to set // the ClipRegion anew. if( !bHorSBar && pImp->HasHorScrollBar() ) - SetClipRegion( Region(pImp->GetClipRegionRect()) ); + SetClipRegion( vcl::Region(pImp->GetClipRegionRect()) ); Point aEntryPos( GetMapMode().GetOrigin() ); aEntryPos.X() *= -1; // conversion document coordinates @@ -2916,7 +2916,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT if( !bHasClipRegion && nWindowStyle & WB_HSCROLL ) { - SetClipRegion( Region(pImp->GetClipRegionRect()) ); + SetClipRegion( vcl::Region(pImp->GetClipRegionRect()) ); bHasClipRegion = true; } @@ -2959,7 +2959,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT { if( !bHasClipRegion && nX + aSize.Width() >= nMaxRight ) { - SetClipRegion( Region(pImp->GetClipRegionRect()) ); + SetClipRegion( vcl::Region(pImp->GetClipRegionRect()) ); bHasClipRegion = true; } aEntryPos.X() = nX; diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 0e305155723a..b5d56bac97b3 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -646,7 +646,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, // all UserDraw if required if ( nBits & HIB_USERDRAW ) { - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); if ( pRect ) aRegion.Intersect( *pRect ); pDev->SetClipRegion( aRegion ); @@ -1072,7 +1072,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, // check for overflow on some systems if ( aItemRect.Right() > 16000 ) aItemRect.Right() = 16000; - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); pDev->SetClipRegion( aRegion ); ImplDrawItem( pDev, i, false, false, aItemRect, &aRect, nFlags ); pDev->SetClipRegion(); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index cf7fafc6dcb2..7360ccf3b8cd 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -1079,7 +1079,7 @@ public: maFont(rParent.GetFont()) { // #i36013# exclude push buttons from painting area - mrParent.SetClipRegion( Region(mrParent.GetPageArea()) ); + mrParent.SetClipRegion( vcl::Region(mrParent.GetPageArea()) ); } ~TabBarPaintGuard() @@ -2451,7 +2451,7 @@ OString TabBar::GetHelpId( sal_uInt16 nPageId ) const -bool TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) +bool TabBar::StartDrag( const CommandEvent& rCEvt, vcl::Region& rRegion ) { if ( !(mnWinStyle & WB_DRAG) || (rCEvt.GetCommand() != COMMAND_STARTDRAG) ) return false; @@ -2486,7 +2486,7 @@ bool TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion ) } mbInSelect = false; - Region aRegion; + vcl::Region aRegion; // assign region rRegion = aRegion; @@ -2618,7 +2618,7 @@ void TabBar::HideDropPos() nX = pItem->maRect.Left(); // immediately call Paint, as it is not possible during drag and drop Rectangle aRect( nX-1, nY1, nX+3, nY2 ); - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); SetClipRegion( aRegion ); Paint( aRect ); SetClipRegion(); @@ -2629,7 +2629,7 @@ void TabBar::HideDropPos() nX = pItem->maRect.Right(); // immediately call Paint, as it is not possible during drag and drop Rectangle aRect( nX-2, nY1, nX+1, nY2 ); - Region aRegion( aRect ); + vcl::Region aRegion( aRect ); SetClipRegion( aRegion ); Paint( aRect ); SetClipRegion(); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index f7d0fa936015..9bdd65a34705 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -260,7 +260,7 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem, Rectangle aRect ) } if ( (aTxtPos.X()+nTxtWidth) > aRect.Right() ) { - maVirDev.SetClipRegion( Region( aRect ) ); + maVirDev.SetClipRegion( vcl::Region( aRect ) ); maVirDev.DrawText( aTxtPos, pItem->maText ); maVirDev.SetClipRegion(); } @@ -304,7 +304,7 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem, Rectangle aRect ) if ( aImageSize.Width() > aRectSize.Width() || aImageSize.Height() > aRectSize.Height() ) { - maVirDev.SetClipRegion( Region( aRect ) ); + maVirDev.SetClipRegion( vcl::Region( aRect ) ); maVirDev.DrawImage( aPos, pItem->maImage, nImageStyle); maVirDev.SetClipRegion(); } @@ -2113,7 +2113,7 @@ void ValueSet::EndSelection() mbSelection = false; } -bool ValueSet::StartDrag( const CommandEvent& rEvent, Region& rRegion ) +bool ValueSet::StartDrag( const CommandEvent& rEvent, vcl::Region& rRegion ) { if ( rEvent.GetCommand() != COMMAND_STARTDRAG ) return false; @@ -2143,7 +2143,7 @@ bool ValueSet::StartDrag( const CommandEvent& rEvent, Region& rRegion ) Select(); } - Region aRegion; + vcl::Region aRegion; // assign region rRegion = aRegion; diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index ed55e0932e53..08aaf18995a9 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -595,7 +595,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, } else { - pOut->IntersectClipRegion(Region(aClipPolyPoly)); + pOut->IntersectClipRegion(vcl::Region(aClipPolyPoly)); } } } @@ -734,7 +734,7 @@ bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const if( bRectClip ) pOut->IntersectClipRegion( aClipPolyPoly.GetBoundRect() ); else - pOut->IntersectClipRegion(Region(aClipPolyPoly)); + pOut->IntersectClipRegion(vcl::Region(aClipPolyPoly)); } } diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 00c89b36b425..57a1620d5fa7 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -945,7 +945,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, if( pOutputDevice->GetOutDevType() == OUTDEV_WINDOW ) { - const Region aPaintRgn( static_cast<vcl::Window*>( pOutputDevice )->GetPaintRegion() ); + const vcl::Region aPaintRgn( static_cast<vcl::Window*>( pOutputDevice )->GetPaintRegion() ); if( !aPaintRgn.IsNull() ) aOutRect.Intersection( pOutputDevice->LogicToPixel( aPaintRgn.GetBoundRect() ) ); } diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 5a2548a9d1e4..79cf3784dd44 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -473,7 +473,7 @@ namespace svt :m_rDevice( i_rImpl.m_rTabBar ) { m_rDevice.Push( PUSH_CLIPREGION ); - m_rDevice.SetClipRegion(Region( + m_rDevice.SetClipRegion(vcl::Region( i_rImpl.m_aNormalizer.getTransformed( i_rImpl.m_aGeometry.getItemsRect(), i_rImpl.m_eTabAlignment ))); @@ -1047,7 +1047,7 @@ namespace svt // background const Rectangle aNormalizedPaintArea( m_pImpl->m_aNormalizer.getNormalized( i_rRect, m_pImpl->m_eTabAlignment ) ); m_pImpl->m_aRenderDevice.Push( PUSH_CLIPREGION ); - m_pImpl->m_aRenderDevice.SetClipRegion(Region(aNormalizedPaintArea)); + m_pImpl->m_aRenderDevice.SetClipRegion(vcl::Region(aNormalizedPaintArea)); m_pImpl->m_pRenderer->renderBackground(); m_pImpl->m_aRenderDevice.Pop(); m_pImpl->CopyFromRenderDevice( aNormalizedPaintArea ); |