From 38d3e115c159f19f22de73ece1abe609d75a041e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 13 Mar 2013 22:28:52 +0100 Subject: vcl: make Region ctors explicit to prevent overloading desasters Change-Id: Id36d125b4940418833bec31a4710d6cd545629e0 --- 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 +- 5 files changed, 9 insertions(+), 5 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 5a810f5fbd8d..f1ce93fe2091 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 f9e8bc082642..5a27288425a9 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 c8da8ae16ee8..4bb717831cad 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 ff4e7809d458..249fd03165c8 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 554442c19754..3734961ef531 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(); } -- cgit