[Libreoffice-commits] core.git: canvas/source chart2/source cui/source dbaccess/source extensions/source reportdesign/source sc/source sd/source svtools/source svx/source sw/source vcl/inc vcl/source
Michael Stahl
mstahl at redhat.com
Wed Mar 13 14:31:59 PDT 2013
canvas/source/vcl/spritecanvashelper.cxx | 2 +-
chart2/source/controller/dialogs/DataBrowser.cxx | 2 +-
cui/source/dialogs/about.cxx | 2 +-
cui/source/options/connpooloptions.cxx | 2 +-
dbaccess/source/ui/control/RelationControl.cxx | 4 +++-
dbaccess/source/ui/control/TableGrantCtrl.cxx | 4 +++-
dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 2 +-
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 2 +-
dbaccess/source/ui/tabledesign/TEditControl.cxx | 2 +-
extensions/source/scanner/grid.cxx | 2 +-
reportdesign/source/ui/dlg/GroupsSorting.cxx | 2 +-
sc/source/ui/view/gridwin.cxx | 2 +-
sc/source/ui/view/gridwin4.cxx | 6 +++---
sc/source/ui/view/olinewin.cxx | 4 ++--
sc/source/ui/view/printfun.cxx | 5 +++--
sd/source/ui/docshell/docshel2.cxx | 2 +-
sd/source/ui/view/DocumentRenderer.cxx | 3 ++-
sd/source/ui/view/clview.cxx | 2 +-
svtools/source/brwbox/editbrowsebox.cxx | 2 +-
svtools/source/contnr/imivctl1.cxx | 8 ++++----
svtools/source/graphic/grfmgr.cxx | 4 ++--
svtools/source/toolpanel/paneltabbar.cxx | 7 +++++--
svx/source/dialog/framelink.cxx | 4 ++--
svx/source/gallery2/galobj.cxx | 4 +++-
svx/source/svdraw/svdibrow.cxx | 2 +-
sw/source/core/doc/notxtfrm.cxx | 2 +-
sw/source/core/layout/paintfrm.cxx | 4 ++--
sw/source/ui/envelp/labfmt.cxx | 2 +-
vcl/inc/vcl/region.hxx | 12 ++++++------
vcl/source/control/spinbtn.cxx | 4 ++--
vcl/source/control/spinfld.cxx | 6 +++---
vcl/source/filter/sgvmain.cxx | 8 ++++----
vcl/source/gdi/gdimtf.cxx | 4 +++-
vcl/source/gdi/outdev4.cxx | 2 +-
vcl/source/gdi/outdev6.cxx | 2 +-
vcl/source/gdi/outdevnative.cxx | 2 +-
vcl/source/gdi/region.cxx | 4 ++--
vcl/source/window/menu.cxx | 2 +-
38 files changed, 74 insertions(+), 61 deletions(-)
New commits:
commit 38d3e115c159f19f22de73ece1abe609d75a041e
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Mar 13 22:28:52 2013 +0100
vcl: make Region ctors explicit to prevent overloading desasters
Change-Id: Id36d125b4940418833bec31a4710d6cd545629e0
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index d9a77f2..c627950 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -88,7 +88,7 @@ namespace vclcanvas
// wouldn't save much render time, and b) will clutter
// scrolled sprite content outside this area)
rOutDev.EnableMapMode( sal_False );
- rOutDev.SetClipRegion( rRequestedArea );
+ rOutDev.SetClipRegion(Region(rRequestedArea));
// repaint affected sprite directly to output device (at
// the actual screen output position)
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 26eab78..a291c55 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -1007,7 +1007,7 @@ void DataBrowser::PaintCell(
// clipping
if( aPos.X() < rRect.Right() || aPos.X() + TxtSize.Width() > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + TxtSize.Height() > rRect.Bottom())
- rDev.SetClipRegion( rRect );
+ rDev.SetClipRegion(Region(rRect));
// allow for a disabled control ...
sal_Bool bEnabled = IsEnabled();
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 9c247d3..e904d0f 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -429,7 +429,7 @@ void AboutDialog::MoveControl(Control& rControl, sal_Int32 X, sal_Int32 Y)
void AboutDialog::Paint( const Rectangle& rRect )
{
- SetClipRegion( rRect );
+ SetClipRegion(Region(rRect));
Point aPos ( rRect.GetWidth() - aBackgroundBitmap.GetSizePixel().Width(), rRect.GetHeight() - aBackgroundBitmap.GetSizePixel().Height() );
DrawBitmapEx( aPos, aBackgroundBitmap );
}
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index 381a8f4..0745f8f 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -294,7 +294,7 @@ namespace offapp
if (m_aSeekRow != m_aSettings.end())
{
- rDev.SetClipRegion(rRect);
+ rDev.SetClipRegion(Region(rRect));
sal_uInt16 nStyle = TEXT_DRAW_CLIP;
if (!IsEnabled())
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 5a810f5..f1ce93f 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -370,7 +370,9 @@ namespace dbaui
if( aPos.X() < rRect.Right() || aPos.X() + aTextSize.Width() > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + aTextSize.Height() > rRect.Bottom() )
- rDev.SetClipRegion( rRect );
+ {
+ rDev.SetClipRegion(Region(rRect));
+ }
rDev.DrawText( aPos, aText );
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index f9e8bc0..5a27288 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -435,7 +435,9 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect,
if( aPos.X() < rRect.Right() || aPos.X() + nWidth > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + nHeight > rRect.Bottom() )
- rDev.SetClipRegion( rRect );
+ {
+ rDev.SetClipRegion(Region(rRect));
+ }
rDev.DrawText( aPos, aText );
}
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index c8da8ae..4bb7178 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -155,7 +155,7 @@ DBG_NAME(IndexFieldsControl)
// clipping
if (aPos.X() < _rRect.Right() || aPos.X() + TxtSize.Width() > _rRect.Right() ||
aPos.Y() < _rRect.Top() || aPos.Y() + TxtSize.Height() > _rRect.Bottom())
- _rDev.SetClipRegion( _rRect );
+ _rDev.SetClipRegion(Region(_rRect));
// allow for a disabled control ...
sal_Bool bEnabled = IsEnabled();
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index ff4e780..249fd03 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1245,7 +1245,7 @@ sal_Bool OSelectionBrowseBox::SeekRow(long nRow)
void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- rDev.SetClipRegion( rRect );
+ rDev.SetClipRegion(Region(rRect));
OTableFieldDescRef pEntry = NULL;
sal_uInt16 nPos = GetColumnPos(nColumnId);
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 554442c..3734961 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -376,7 +376,7 @@ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
const String aText( GetCellText( m_nCurrentPos, nColumnId ));
rDev.Push( PUSH_CLIPREGION );
- rDev.SetClipRegion( rRect );
+ rDev.SetClipRegion(Region(rRect));
rDev.DrawText( rRect, aText, TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER );
rDev.Pop();
}
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx
index 2b4c182..93366b9 100644
--- a/extensions/source/scanner/grid.cxx
+++ b/extensions/source/scanner/grid.cxx
@@ -387,7 +387,7 @@ void GridWindow::drawNew()
{
if( m_nValues && m_pXValues && m_pNewYValues )
{
- SetClipRegion( m_aGridArea );
+ SetClipRegion(Region(m_aGridArea));
SetLineColor( Color( COL_YELLOW ) );
for( int i = 0; i < m_nValues-1; i++ )
{
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 227227b..d8b950f 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -573,7 +573,7 @@ void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rR
if( aPos.X() < rRect.Right() || aPos.X() + aTextSize.Width() > rRect.Right() ||
aPos.Y() < rRect.Top() || aPos.Y() + aTextSize.Height() > rRect.Bottom() )
- rDev.SetClipRegion( rRect );
+ rDev.SetClipRegion(Region(rRect));
rDev.DrawText( aPos, aText );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1ce833a..0434b1e 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 1103e5c..767dfd2 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 ef85b7d..aa2efe2 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 4aaa6ef..6244940 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
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index 057749c..f611e84 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -264,7 +264,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe
pView->SetActiveLayer( pFrameView->GetActiveLayer() );
}
- pView->CompleteRedraw( &aVDev, Rectangle( aNullPt, aSize ) );
+ pView->CompleteRedraw( &aVDev, Region(Rectangle(aNullPt, aSize)) );
// IsRedrawReady() always gives sal_True while ( !pView->IsRedrawReady() ) {}
delete pView;
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 59b1f0b..83fda37 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -327,7 +327,8 @@ namespace {
if (pView!=NULL && bPrintMarkedOnly)
pView->DrawMarkedObj(rPrinter);
else
- rPrintView.CompleteRedraw(&rPrinter, Rectangle(Point(0,0), rPage.GetSize()));
+ rPrintView.CompleteRedraw(&rPrinter,
+ Region(Rectangle(Point(0,0), rPage.GetSize())));
rPrinter.SetMapMode(aOriginalMapMode);
diff --git a/sd/source/ui/view/clview.cxx b/sd/source/ui/view/clview.cxx
index 69247b1..a5cac3e 100644
--- a/sd/source/ui/view/clview.cxx
+++ b/sd/source/ui/view/clview.cxx
@@ -64,7 +64,7 @@ void ClientView::InvalidateOneWin(::Window& rWin)
void ClientView::InvalidateOneWin(::Window& rWin, const Rectangle& rRect)
{
- CompleteRedraw(&rWin, rRect);
+ CompleteRedraw(&rWin, Region(rRect));
}
void ClientView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector )
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 444fc98..36930e7 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -363,7 +363,7 @@ namespace svt
Point aPos( rRect.TopLeft() );
if ( ( aImageSize.Width() > rRect.GetWidth() ) || ( aImageSize.Height() > rRect.GetHeight() ) )
- rDev.SetClipRegion(rRect);
+ rDev.SetClipRegion(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 b84ab9ed..0c9e425 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -690,7 +690,7 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() )
{
- Rectangle aOutputArea( GetOutputRect() );
+ Region const aOutputArea( GetOutputRect() );
bResetClipRegion = sal_True;
pView->SetClipRegion( aOutputArea );
}
@@ -740,7 +740,7 @@ void SvxIconChoiceCtrl_Impl::RepaintEntries( sal_uInt16 nEntryFlagsMask )
if( !pView->IsClipRegion() )
{
bResetClipRegion = sal_True;
- pView->SetClipRegion( aOutRect );
+ pView->SetClipRegion(Region(aOutRect));
}
for( size_t nCur = 0; nCur < nCount; nCur++ )
{
@@ -1832,7 +1832,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
Rectangle aOutputArea( GetOutputRect() );
if( aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect) )
{
- pView->SetClipRegion( aOutputArea );
+ pView->SetClipRegion(Region(aOutputArea));
bResetClipRegion = sal_True;
}
}
@@ -2764,7 +2764,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, bool bAdd,
if( !pView->IsClipRegion() )
{
bResetClipRegion = sal_True;
- pView->SetClipRegion( GetOutputRect() );
+ pView->SetClipRegion(Region(GetOutputRect()));
}
for( size_t nPos = 0; nPos < nCount; nPos++ )
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 438c2df..52f8b52 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -554,7 +554,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
}
else
{
- pOut->IntersectClipRegion( aClipPolyPoly );
+ pOut->IntersectClipRegion(Region(aClipPolyPoly));
}
}
}
@@ -693,7 +693,7 @@ sal_Bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, co
if( bRectClip )
pOut->IntersectClipRegion( aClipPolyPoly.GetBoundRect() );
else
- pOut->IntersectClipRegion( aClipPolyPoly );
+ pOut->IntersectClipRegion(Region(aClipPolyPoly));
}
}
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index f7922a3..34ef115 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -471,7 +471,10 @@ namespace svt
:m_rDevice( i_rImpl.m_rTabBar )
{
m_rDevice.Push( PUSH_CLIPREGION );
- m_rDevice.SetClipRegion( i_rImpl.m_aNormalizer.getTransformed( i_rImpl.m_aGeometry.getItemsRect(), i_rImpl.m_eTabAlignment ) );
+ m_rDevice.SetClipRegion(Region(
+ i_rImpl.m_aNormalizer.getTransformed(
+ i_rImpl.m_aGeometry.getItemsRect(),
+ i_rImpl.m_eTabAlignment )));
}
~ClipItemRegion()
@@ -1042,7 +1045,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( aNormalizedPaintArea );
+ m_pImpl->m_aRenderDevice.SetClipRegion(Region(aNormalizedPaintArea));
m_pImpl->m_pRenderer->renderBackground();
m_pImpl->m_aRenderDevice.Pop();
m_pImpl->CopyFromRenderDevice( aNormalizedPaintArea );
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index d1d49ae..43811e3 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -715,7 +715,7 @@ inline Polygon lclCreatePolygon( const PointVec& rPoints )
}
/** Returns a polygon constructed from the five passed points. */
-Polygon lclCreatePolygon( const Point& rP1, const Point& rP2, const Point& rP3, const Point& rP4, const Point& rP5 )
+Region lclCreatePolygon( const Point& rP1, const Point& rP2, const Point& rP3, const Point& rP4, const Point& rP5 )
{
PointVec aPoints;
aPoints.reserve( 5 );
@@ -724,7 +724,7 @@ Polygon lclCreatePolygon( const Point& rP1, const Point& rP2, const Point& rP3,
aPoints.push_back( rP3 );
aPoints.push_back( rP4 );
aPoints.push_back( rP5 );
- return lclCreatePolygon( aPoints );
+ return Region(lclCreatePolygon(aPoints));
}
/** Sets the color of the passed frame style to the output device.
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 5397559..686c41f 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -568,7 +568,9 @@ sal_Bool SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& r
pOut->Push();
pOut->SetMapMode( aMap );
aView.ShowSdrPage( const_cast< FmFormPage* >( pPage ));
- aView.CompleteRedraw( pOut, Rectangle( pOut->PixelToLogic( Point() ), pOut->GetOutputSize() ) );
+ aView.CompleteRedraw( pOut,
+ Region(Rectangle(pOut->PixelToLogic(Point()),
+ pOut->GetOutputSize())));
pOut->Pop();
bRet = sal_True;
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 6337a4f..5ee5d0b 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -363,7 +363,7 @@ void _SdrItemBrowserControl::PaintField(OutputDevice& rDev, const Rectangle& rRe
rDev.DrawText(rRect.TopLeft(),pEntry->aName);
}
} else {
- rDev.SetClipRegion(aR);
+ rDev.SetClipRegion(Region(aR));
rDev.DrawText(aR.TopLeft(),GetCellText(nAktPaintRow,nColumnId));
rDev.SetClipRegion();
}
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index f0b041f..0593535 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -279,7 +279,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
FindFlyFrm()->GetContour( aPoly, sal_True )
)
{
- pOut->SetClipRegion( aPoly );
+ pOut->SetClipRegion(Region(aPoly));
bClip = false;
}
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index a23f3f6..a261fb4 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2370,7 +2370,7 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
Size aSize( rRect.SSize() );
// Hack! Necessary, because the layout is not pixel aligned!
aSize.Width() += nPixelSzW; aSize.Height() += nPixelSzH;
- rDev.SetClipRegion( Rectangle( rRect.Pos(), aSize ) );
+ rDev.SetClipRegion(Region(Rectangle(rRect.Pos(), aSize)));
// The following stuff if necessary to have the new table borders fit
// into a ::SwAlignRect adjusted world.
@@ -4010,7 +4010,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
ViewShell *pSh = getRootFrm()->GetCurrShell();
if ( !pOut->GetConnectMetaFile() || !pSh || !pSh->GetWin() )
{
- pOut->SetClipRegion( aPoly );
+ pOut->SetClipRegion(Region(aPoly));
}
for ( sal_uInt16 i = 0; i < aRegion.size(); ++i )
PaintBackground( aRegion[i], pPage, rAttrs, sal_False, sal_True );
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 23a4453..bab1b18 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -158,7 +158,7 @@ void SwLabPreview::Paint(const Rectangle &)
DrawLine(Point(lX0, lY0 + lOutlineH - 1), Point(lX0 + lOutlineW - 1, lY0 + lOutlineH - 1)); // Down
// Labels
- SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
+ SetClipRegion(Region(Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH))));
SetFillColor( COL_LIGHTGRAYBLUE );
for (sal_uInt16 nRow = 0; nRow < Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++)
for (sal_uInt16 nCol = 0; nCol < Min((sal_uInt16) 2, (sal_uInt16) aItem.nCols); nCol++)
diff --git a/vcl/inc/vcl/region.hxx b/vcl/inc/vcl/region.hxx
index acc69d8..9a5ed68 100644
--- a/vcl/inc/vcl/region.hxx
+++ b/vcl/inc/vcl/region.hxx
@@ -79,12 +79,12 @@ public: // public within vcl
#endif
public:
- Region();
- Region( RegionType eType );
- Region( const Rectangle& rRect );
- Region( const Polygon& rPolygon );
- Region( const PolyPolygon& rPolyPoly );
- Region( const basegfx::B2DPolyPolygon& );
+ explicit Region();
+ explicit Region( RegionType eType );
+ explicit Region( const Rectangle& rRect );
+ explicit Region( const Polygon& rPolygon );
+ explicit Region( const PolyPolygon& rPolyPoly );
+ explicit Region( const basegfx::B2DPolyPolygon& );
Region( const Region& rRegion );
~Region();
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 20aac8e..897c042 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -505,13 +505,13 @@ long SpinButton::PreNotify( NotifyEvent& rNEvt )
Region aRgn( GetActiveClipRegion() );
if( pLastRect )
{
- SetClipRegion( *pLastRect );
+ SetClipRegion(Region(*pLastRect));
Paint( *pLastRect );
SetClipRegion( aRgn );
}
if( pRect )
{
- SetClipRegion( *pRect );
+ SetClipRegion(Region(*pRect));
Paint( *pRect );
SetClipRegion( aRgn );
}
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 604c386..d50c521 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -117,7 +117,7 @@ sal_Bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbutt
bNativeOK = pBorder->DrawNativeControl( CTRL_SPINBOX, PART_ENTIRE_CONTROL, aRgn, CTRL_STATE_ENABLED,
rSpinbuttonValue, rtl::OUString() );
- pBorder->SetClipRegion( oldRgn );
+ pBorder->SetClipRegion(Region(oldRgn));
}
}
return bNativeOK;
@@ -925,13 +925,13 @@ long SpinField::PreNotify( NotifyEvent& rNEvt )
Region aRgn( GetActiveClipRegion() );
if( pLastRect )
{
- SetClipRegion( *pLastRect );
+ SetClipRegion(Region(*pLastRect));
Paint( *pLastRect );
SetClipRegion( aRgn );
}
if( pRect )
{
- SetClipRegion( *pRect );
+ SetClipRegion(Region(*pRect));
Paint( *pRect );
SetClipRegion( aRgn );
}
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index aea90fb..a299524 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -585,14 +585,14 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
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(Rectangle(x1,i0,x2,i-1));
+ rOut.SetClipRegion(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(Rectangle(x1,i0,x2,y2));
+ rOut.SetClipRegion(Region(Rectangle(x1,i0,x2,y2)));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
rOut.SetClipRegion(ClipMerk);
} break;
@@ -604,14 +604,14 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
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(Rectangle(i0,y1,i-1,y2));
+ rOut.SetClipRegion(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(Rectangle(i0,y1,x2,y2));
+ rOut.SetClipRegion(Region(Rectangle(i0,y1,x2,y2)));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
rOut.SetClipRegion(ClipMerk);
} break;
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index a561d64..e2d4c1d 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1403,7 +1403,9 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_ISECTRECTCLIPREGION_ACTION ):
{
MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
- aMtf.AddAction( new MetaISectRegionClipRegionAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
+ aMtf.AddAction( new MetaISectRegionClipRegionAction(Region(
+ ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor,
+ aRotOffset, fSin, fCos )) ) );
}
break;
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 390220d..f487e80 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -800,7 +800,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( OUTDEV_PRINTER == meOutDevType )
{
Push( PUSH_CLIPREGION );
- IntersectClipRegion( rPolyPoly );
+ IntersectClipRegion(Region(rPolyPoly));
DrawGradient( aRect, rGradient );
Pop();
}
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 821d9ce..685f33e 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -348,7 +348,7 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
}
Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
- IntersectClipRegion( rPolyPoly );
+ IntersectClipRegion(Region(rPolyPoly));
SetLineColor( GetFillColor() );
const sal_Bool bOldMap = mbMap;
EnableMapMode( sal_False );
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index 5a35e31..449af1b 100644
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -295,7 +295,7 @@ sal_Bool OutputDevice::DrawNativeControl( ControlType nType,
Region aTestRegion( GetActiveClipRegion() );
aTestRegion.Intersect( rControlRegion );
- if( aTestRegion == rControlRegion )
+ if (aTestRegion == Region(rControlRegion))
nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed
sal_Bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index f12b3c0..b46972a 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -2322,7 +2322,7 @@ sal_Bool Region::IsInside( const Rectangle& rRect ) const
return sal_False;
// create region from rectangle and intersect own region
- Region aRegion = rRect;
+ Region aRegion(rRect);
aRegion.Exclude( *this );
// rectangle is inside if exclusion is empty
@@ -2341,7 +2341,7 @@ sal_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;
+ Region aRegion(rRect);
aRegion.Intersect( *this );
// rectangle is over if include is not empty
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 1b28644..c8e02ad 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -4038,7 +4038,7 @@ Region MenuFloatingWindow::ImplCalcClipRegion( sal_Bool bIncludeLogo ) const
if ( pMenu && pMenu->pLogo && !bIncludeLogo )
aRect.Left() += pMenu->pLogo->aBitmap.GetSizePixel().Width();
- Region aRegion = aRect;
+ Region aRegion(aRect);
if ( pMenu && pMenu->pLogo && bIncludeLogo && nScrollerHeight )
aRegion.Union( Rectangle( Point(), Size( pMenu->pLogo->aBitmap.GetSizePixel().Width(), aOutSz.Height() ) ) );
More information about the Libreoffice-commits
mailing list