diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-03-13 22:28:52 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-03-13 22:29:46 +0100 |
commit | 38d3e115c159f19f22de73ece1abe609d75a041e (patch) | |
tree | 63ffe74cb9b8fcc52617b616d02cc2504a0d0e11 /sc/source | |
parent | 913f175b321caf7a99957fd7c4dc536f4101ab53 (diff) |
vcl: make Region ctors explicit to prevent overloading desasters
Change-Id: Id36d125b4940418833bec31a4710d6cd545629e0
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/olinewin.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 5 |
4 files changed, 9 insertions, 8 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 1ce833a088d0..0434b1e9660e 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4573,7 +4573,7 @@ void ScGridWindow::UpdateFormulas() PolyPolygon aChangedPoly( aOutputData.GetChangedArea() ); // logic (PixelToLogic) if ( aChangedPoly.Count() ) { - Invalidate( aChangedPoly ); + Invalidate(Region(aChangedPoly)); } CheckNeedsRepaint(); // #i90362# used to be called via Draw() - still needed here diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 1103e5cf68e0..767dfd2ef8dd 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -156,8 +156,8 @@ static void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, } long nClipStartX = bLayoutRTL ? aOuter.Left() + nBWidth : aInner.Left(); long nClipEndX = bLayoutRTL ? aInner.Right() : aOuter.Right() - nBWidth; - pDev->SetClipRegion( Rectangle( nClipStartX, nButtonY + nVer/2, - nClipEndX, nButtonY + nVer/2 + aTextSize.Height() ) ); + pDev->SetClipRegion( Region(Rectangle( nClipStartX, nButtonY + nVer/2, + nClipEndX, nButtonY + nVer/2 + aTextSize.Height())) ); } pDev->DrawText( Point( nTextStart, nButtonY + nVer/2 ), rTitle ); @@ -1252,7 +1252,7 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo& rTabInfo, Out Rectangle aRect = GetListValButtonRect( aListValPos ); aComboButton.SetPosPixel( aRect.TopLeft() ); aComboButton.SetSizePixel( aRect.GetSize() ); - pContentDev->SetClipRegion( aRect ); + pContentDev->SetClipRegion(Region(aRect)); aComboButton.Draw( false, false ); pContentDev->SetClipRegion(); // always called from Draw() without clip region aComboButton.SetPosPixel( aOldPos ); // restore old state diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx index ef85b7d44bf6..aa2efe27b841 100644 --- a/sc/source/ui/view/olinewin.cxx +++ b/sc/source/ui/view/olinewin.cxx @@ -512,9 +512,9 @@ void ScOutlineWindow::DataChanged( const DataChangedEvent& rDCEvt ) void ScOutlineWindow::SetEntryAreaClipRegion() { - SetClipRegion( Rectangle( + SetClipRegion( Region(Rectangle( GetPoint( 0, mnMainFirstPos ), - GetPoint( GetOutputSizeLevel() - 1, mnMainLastPos ) ) ); + GetPoint( GetOutputSizeLevel() - 1, mnMainLastPos )))); } void ScOutlineWindow::DrawLineRel( diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 4aaa6efa0013..6244940d2f26 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1596,7 +1596,8 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if( aTableParam.bCellContent ) aOutputData.DrawBackground(); - pDev->SetClipRegion( Rectangle( aPos, Size( aOutputData.GetScrW(), aOutputData.GetScrH() ) ) ); + pDev->SetClipRegion(Region(Rectangle( + aPos, Size(aOutputData.GetScrW(), aOutputData.GetScrH())))); pDev->SetClipRegion(); if( aTableParam.bCellContent ) @@ -1773,7 +1774,7 @@ void ScPrintFunc::PrintHF( long nPageNo, sal_Bool bHeader, long nStartY, // Clipping fuer Text - pDev->SetClipRegion( Rectangle( aStart, aPaperSize ) ); + pDev->SetClipRegion(Region(Rectangle(aStart, aPaperSize))); // links |