summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 12:48:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 15:14:05 +0100
commit413c7b426543e71f4865c858b5b4ca62b48573d3 (patch)
treece0c71f47ffab017ba13b50263e06e36556fc5e0
parent1d180f48bc61444c610c35083e35745d38c6cce2 (diff)
Revert "loplugin:changetoolsgen in dbaccess..desktop" and reapply plugin
because I (a) forgot to insert parentheses which changes the meaning of some expressions and (b) I now use the AdjustFoo calls when changing unary operations, which reads much better This reverts commit a9ca38bdf7ff9d15529b5903e640987fc14c0fa7. Change-Id: I662ef2f1100a06a68decb2c71975fbc61aeaa47d Reviewed-on: https://gerrit.libreoffice.org/49847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx2
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx2
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx4
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx12
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx16
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableConnection.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx16
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx16
-rw-r--r--desktop/source/splash/splash.cxx4
16 files changed, 58 insertions, 58 deletions
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index c982d421ba98..297c952ede08 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -221,7 +221,7 @@ void UnoDataBrowserView::resizeDocumentView(tools::Rectangle& _rPlayground)
Point aStatusPos( aPlaygroundPos.X() + 2, aTreeViewPos.Y() + aTreeViewSize.Height() - aStatusSize.Height() );
m_pStatus->SetPosSizePixel( aStatusPos, aStatusSize );
- aTreeViewSize.setHeight( aTreeViewSize.Height() - aStatusSize.Height() );
+ aTreeViewSize.AdjustHeight( -(aStatusSize.Height()) );
}
// set the size of treelistbox
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index 73b102c0eaa6..8f0586ec69fa 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -96,7 +96,7 @@ namespace dbaui
// position the separator
const Size aSeparatorSize( aPlayground.GetWidth(), 2 );
m_aSeparator->SetPosSizePixel( aPlayground.TopLeft(), aSeparatorSize );
- aPlayground.SetTop( aPlayground.Top() + aSeparatorSize.Height() + 1 );
+ aPlayground.AdjustTop(aSeparatorSize.Height() + 1 );
// position the controls of the document's view
resizeDocumentView( aPlayground );
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index cf20acabfa4f..f2ffb3947489 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -600,8 +600,8 @@ void SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMouseP
if (HEADERBAR_ITEM_NOTFOUND != nId)
{
tools::Rectangle aColRect = GetItemRect(nId);
- aColRect.SetLeft( aColRect.Left() + nId ? 3 : 0 ); // the handle col (nId == 0) does not have a left margin for resizing
- aColRect.SetRight( aColRect.Right() - 3 );
+ aColRect.AdjustLeft(nId ? 3 : 0 ); // the handle col (nId == 0) does not have a left margin for resizing
+ aColRect.AdjustRight( -3 );
bResizingCol = !aColRect.IsInside(_rMousePos);
}
if (!bResizingCol)
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 4870cd10ce7d..937a7792b756 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1003,16 +1003,16 @@ void OFieldDescControl::SetPosSize( VclPtr<Control> const & rControl, long nRow,
{
case 0:
default:
- aSize.Width() = CONTROL_WIDTH_1;
+ aSize.setWidth( CONTROL_WIDTH_1 );
break;
case 1:
- aSize.Width() = CONTROL_WIDTH_2;
+ aSize.setWidth( CONTROL_WIDTH_2 );
break;
case 3:
- aSize.Width() = CONTROL_WIDTH_3;
+ aSize.setWidth( CONTROL_WIDTH_3 );
break;
case 4:
- aSize.Width() = CONTROL_WIDTH_4;
+ aSize.setWidth( CONTROL_WIDTH_4 );
break;
}
}
@@ -1034,7 +1034,7 @@ void OFieldDescControl::SetPosSize( VclPtr<Control> const & rControl, long nRow,
aPosition.setX( aOwnSize.Width() - aSize.Width() );
}
else
- aPosition.X() = CONTROL_WIDTH_1 + CONTROL_SPACING_X;
+ aPosition.setX( CONTROL_WIDTH_1 + CONTROL_SPACING_X );
break;
default:
aPosition.setX( 0 );
@@ -1044,7 +1044,7 @@ void OFieldDescControl::SetPosSize( VclPtr<Control> const & rControl, long nRow,
aSize = rControl->GetSizePixel( );
const sal_Int32 nControl_Spacing_y = LogicToPixel(Size(0, CONTROL_SPACING_Y), MapMode(MapUnit::MapAppFont)).Height();
- aPosition.setY( aPosition.Y() + ((nRow+1)*nControl_Spacing_y) +
+ aPosition.AdjustY(((nRow+1)*nControl_Spacing_y) +
(nRow*nControlHeight) );
// Display Control
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index c8cc274a7aef..d2fa05ff41a0 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -276,7 +276,7 @@ namespace dbaui
const long _nIndentAppFont )
{
Point aReference = _rReference.GetPosPixel();
- aReference.setY( aReference.Y() + _rReference.GetSizePixel().Height() );
+ aReference.AdjustY(_rReference.GetSizePixel().Height() );
const vcl::Window* pConverter = _rControl.GetParent();
Size aOffset = pConverter->LogicToPixel(Size(_nIndentAppFont, 3), MapMode(MapUnit::MapAppFont));
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index ea8ff0306ba2..1dfa36a4cea4 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -116,7 +116,7 @@ namespace dbaui
void IndexFieldsControl::PaintCell( OutputDevice& _rDev, const tools::Rectangle& _rRect, sal_uInt16 _nColumnId ) const
{
Point aPos(_rRect.TopLeft());
- aPos.setX( aPos.X() + 1 );
+ aPos.AdjustX(1 );
OUString aText = GetRowCellText(m_aSeekRow,_nColumnId);
Size TxtSize(GetDataWindow().GetTextWidth(aText), GetDataWindow().GetTextHeight());
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 73c8dfd8633d..469102a47886 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -498,7 +498,7 @@ void OSQLMessageBox::impl_positionControls()
// also, if it's not as high as the image ...
if ( aPrimaryRect.GetHeight() < m_aInfoImage->GetSizePixel().Height() )
{ // ... make it fit the image height
- aPrimaryRect.SetBottom( aPrimaryRect.Bottom() + aInfoRect.GetHeight() - aPrimaryRect.GetHeight() );
+ aPrimaryRect.AdjustBottom(aInfoRect.GetHeight() - aPrimaryRect.GetHeight() );
// and center it vertically
m_aTitle->SetStyle( m_aTitle->GetStyle() | WB_VCENTER );
}
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 8e8569db5e39..158b6c88beea 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -85,16 +85,16 @@ namespace
if ( _pEntry )
{
const long nRowHeight = pListBox->GetEntryHeight();
- _rNewConPos.setY( _rNewConPos.Y() + pListBox->GetPosPixel().Y() );
+ _rNewConPos.AdjustY(pListBox->GetPosPixel().Y() );
long nEntryPos = pListBox->GetEntryPosition( _pEntry ).Y();
if( nEntryPos >= 0 )
{
- _rNewConPos.setY( _rNewConPos.Y() + nEntryPos );
- _rNewConPos.Y() += static_cast<long>( 0.5 * nRowHeight );
+ _rNewConPos.AdjustY(nEntryPos );
+ _rNewConPos.AdjustY(static_cast<long>( 0.5 * nRowHeight ) );
}
else
- _rNewConPos.setY( _rNewConPos.Y() - static_cast<long>( 0.5 * nRowHeight ) );
+ _rNewConPos.AdjustY( -static_cast<long>( 0.5 * nRowHeight ) );
long nListBoxBottom = _pWin->GetPosPixel().Y()
+ pListBox->GetPosPixel().Y()
@@ -103,9 +103,9 @@ namespace
_rNewConPos.setY( nListBoxBottom + 2 );
}
else
- _rNewConPos.setY( _rNewConPos.Y() + static_cast<sal_Int32>(pListBox->GetPosPixel().Y()*0.5) );
+ _rNewConPos.AdjustY(static_cast<sal_Int32>(pListBox->GetPosPixel().Y()*0.5) );
- _rNewDescrPos.Y() = _rNewConPos.Y();
+ _rNewDescrPos.setY( _rNewConPos.Y() );
}
}
@@ -182,8 +182,8 @@ tools::Rectangle OConnectionLine::GetBoundingRect()
// line proceeds in z-Form
if( pSourceWin == pDestWin || std::abs(m_aSourceConnPos.X() - m_aDestConnPos.X()) > std::abs(m_aSourceDescrLinePos.X() - m_aDestDescrLinePos.X()) )
{
- aTopLeft.setX( aTopLeft.X() - DESCRIPT_LINE_WIDTH );
- aBottomRight.X() += DESCRIPT_LINE_WIDTH;
+ aTopLeft.AdjustX( -DESCRIPT_LINE_WIDTH );
+ aBottomRight.AdjustX(DESCRIPT_LINE_WIDTH );
}
aBoundingRect = tools::Rectangle( aTopLeft-Point(2,17), aBottomRight+Point(2,2) );
@@ -195,14 +195,14 @@ void calcPointX1(const OTableWindow* _pWin,Point& _rNewConPos,Point& _rNewDescrP
{
_rNewConPos.setX( _pWin->GetPosPixel().X() + _pWin->GetSizePixel().Width() );
_rNewDescrPos.setX( _rNewConPos.X() );
- _rNewConPos.setX( _rNewConPos.X() + DESCRIPT_LINE_WIDTH );
+ _rNewConPos.AdjustX(DESCRIPT_LINE_WIDTH );
}
void calcPointX2(const OTableWindow* _pWin,Point& _rNewConPos,Point& _rNewDescrPos)
{
_rNewConPos.setX( _pWin->GetPosPixel().X() );
_rNewDescrPos.setX( _rNewConPos.X() );
- _rNewConPos.setX( _rNewConPos.X() - DESCRIPT_LINE_WIDTH );
+ _rNewConPos.AdjustX( -DESCRIPT_LINE_WIDTH );
}
bool OConnectionLine::RecalcLine()
@@ -337,7 +337,7 @@ Point OConnectionLine::getMidPoint() const
{
Point aDest = m_aDestConnPos - m_aSourceConnPos;
aDest.setX( aDest.X() / 2 );
- aDest.Y() /= 2;
+ aDest.setY( aDest.Y() / 2 );
return m_aSourceConnPos + aDest;
}
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index b71b77b931c2..06eace51be38 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -192,8 +192,8 @@ void OJoinController::SaveTabWinPosSize(OTableWindow const * pTabWin, long nOffs
// set Position & Size of data anew (with current window parameters)
Point aPos = pTabWin->GetPosPixel();
- aPos.setX( aPos.X() + nOffsetX );
- aPos.Y() += nOffsetY;
+ aPos.AdjustX(nOffsetX );
+ aPos.AdjustY(nOffsetY );
pData->SetPosition(aPos);
pData->SetSize(pTabWin->GetSizePixel());
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index db24e13de26e..1437d3deb64c 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -527,8 +527,8 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
while( !bEnd )
{
// Set new position to start of line
- aNewPos.X() = TABWIN_SPACING_X;
- aNewPos.Y() = (nRow+1) * TABWIN_SPACING_Y;
+ aNewPos.setX( TABWIN_SPACING_X );
+ aNewPos.setY( (nRow+1) * TABWIN_SPACING_Y );
// determine rectangle for the corresponding line
tools::Rectangle aRowRect( Point(0,0), aOutSize );
@@ -550,14 +550,14 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
{
// TabWin is in the line
if( aOtherTabWinRect.Right()>aNewPos.X() )
- aNewPos.X() = aOtherTabWinRect.Right() + TABWIN_SPACING_X;
+ aNewPos.setX( aOtherTabWinRect.Right() + TABWIN_SPACING_X );
}
}
// Is there space left in this line?
if( (aNewPos.X()+TABWIN_WIDTH_STD)<aRowRect.Right() )
{
- aNewPos.Y() = aRowRect.Top() + TABWIN_SPACING_Y;
+ aNewPos.setY( aRowRect.Top() + TABWIN_SPACING_Y );
bEnd = true;
}
else
@@ -581,8 +581,8 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
// check if the new position in inside the scrollbars ranges
Point aBottom(aNewPos);
- aBottom.setX( aBottom.X() + aNewSize.Width() );
- aBottom.Y() += aNewSize.Height();
+ aBottom.AdjustX(aNewSize.Width() );
+ aBottom.AdjustY(aNewSize.Height() );
if(!GetHScrollBar().GetRange().IsInside(aBottom.X()))
GetHScrollBar().SetRange( Range(0, aBottom.X()) );
@@ -708,8 +708,8 @@ bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars
aPos = pTabWin->GetPosPixel();
if( bHoriz )
- aPos.setX( aPos.X() - nDelta );
- else aPos.setY( aPos.Y() - nDelta );
+ aPos.AdjustX( -nDelta );
+ else aPos.AdjustY( -nDelta );
pTabWin->SetPosPixel( aPos );
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 8887e8d1ae63..5351959eceb8 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1231,7 +1231,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const tools::Rectangle&
void OSelectionBrowseBox::PaintStatusCell(OutputDevice& rDev, const tools::Rectangle& rRect) const
{
tools::Rectangle aRect(rRect);
- aRect.TopLeft().setY( aRect.TopLeft().Y() - 2 );
+ aRect.TopLeft().AdjustY( -2 );
OUString aLabel(DBA_RES(STR_QUERY_HANDLETEXT));
// from BROW_CRIT2_ROW onwards all rows are shown "or"
@@ -1896,8 +1896,8 @@ Size OSelectionBrowseBox::CalcOptimalSize( const Size& _rAvailable )
{
Size aReturn( _rAvailable.Width(), GetTitleHeight() );
- aReturn.setHeight( aReturn.Height() + ( m_nVisibleCount ? m_nVisibleCount : 15 ) * GetDataRowHeight() );
- aReturn.Height() += 40; // just some space
+ aReturn.AdjustHeight(( m_nVisibleCount ? m_nVisibleCount : 15 ) * GetDataRowHeight() );
+ aReturn.AdjustHeight(40 ); // just some space
return aReturn;
}
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index 17724bf13ea4..c7fe03a81d09 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.cxx
@@ -158,8 +158,8 @@ namespace dbaui
void OTableConnection::InvalidateConnection()
{
tools::Rectangle rcBounding = GetBoundingRect();
- rcBounding.SetBottom( rcBounding.Bottom() + 1 );
- rcBounding.Right() += 1;
+ rcBounding.AdjustBottom(1 );
+ rcBounding.AdjustRight(1 );
// I believe Invalidate and Draw(Rectangle) do not behave consistent: in any case it
// could explain, why without the fake here when deleting a connection a dash remains at the lower end:
// Invalidate records obviously one pixel line less as Draw.
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index d6752877f62d..2267047e1378 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -167,9 +167,9 @@ void OTableWindow::SetSizePixel( const Size& rNewSize )
{
Size aOutSize(rNewSize);
if( aOutSize.Width() < TABWIN_WIDTH_MIN )
- aOutSize.Width() = TABWIN_WIDTH_MIN;
+ aOutSize.setWidth( TABWIN_WIDTH_MIN );
if( aOutSize.Height() < TABWIN_HEIGHT_MIN )
- aOutSize.Height() = TABWIN_HEIGHT_MIN;
+ aOutSize.setHeight( TABWIN_HEIGHT_MIN );
GetData()->SetSize( aOutSize );
Window::SetSizePixel( aOutSize );
@@ -617,19 +617,19 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt)
{
case KEY_DOWN:
bHandled = true;
- aStartPoint.setY( aStartPoint.Y() + m_nMoveIncrement );
+ aStartPoint.AdjustY(m_nMoveIncrement );
break;
case KEY_UP:
bHandled = true;
- aStartPoint.setY( aStartPoint.Y() + -m_nMoveIncrement );
+ aStartPoint.AdjustY(-m_nMoveIncrement );
break;
case KEY_LEFT:
bHandled = true;
- aStartPoint.setX( aStartPoint.X() + -m_nMoveIncrement );
+ aStartPoint.AdjustX(-m_nMoveIncrement );
break;
case KEY_RIGHT:
bHandled = true;
- aStartPoint.setX( aStartPoint.X() + m_nMoveIncrement );
+ aStartPoint.AdjustX(m_nMoveIncrement );
break;
}
if ( bHandled )
@@ -644,9 +644,9 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt)
&& ((ptOld.Y() + aNewSize.Height()) <= aSize.Height()) )
{
if ( aNewSize.Width() < TABWIN_WIDTH_MIN )
- aNewSize.Width() = TABWIN_WIDTH_MIN;
+ aNewSize.setWidth( TABWIN_WIDTH_MIN );
if ( aNewSize.Height() < TABWIN_HEIGHT_MIN )
- aNewSize.Height() = TABWIN_HEIGHT_MIN;
+ aNewSize.setHeight( TABWIN_HEIGHT_MIN );
Size szOld = GetSizePixel();
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index 31573c33d181..5a6939a88d7e 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
@@ -133,7 +133,7 @@ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt )
Size aSize(GetTextWidth(GetText()) + 20,
m_pTabWin->GetSizePixel().Height() - m_pTabWin->GetListBox()->GetSizePixel().Height());
- aSize.setHeight( aSize.Height() + (m_pTabWin->GetListBox()->GetEntryCount() + 2) * m_pTabWin->GetListBox()->GetEntryHeight() );
+ aSize.AdjustHeight((m_pTabWin->GetListBox()->GetEntryCount() + 2) * m_pTabWin->GetListBox()->GetEntryHeight() );
if(m_pTabWin->GetSizePixel() != aSize)
{
m_pTabWin->SetSizePixel(aSize);
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index d439aa40308f..256ed0234fca 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -298,9 +298,9 @@ void ExtensionBox_Impl::CalcActiveHeight( const long nPos )
// calc description height
Size aSize = GetOutputSizePixel();
if ( m_bHasScrollBar )
- aSize.setWidth( aSize.Width() - m_pScrollBar->GetSizePixel().Width() );
+ aSize.AdjustWidth( -(m_pScrollBar->GetSizePixel().Width()) );
- aSize.Width() -= ICON_OFFSET;
+ aSize.AdjustWidth( -(ICON_OFFSET) );
aSize.setHeight( 10000 );
OUString aText( m_vEntries[ nPos ]->m_sErrorText );
@@ -328,7 +328,7 @@ tools::Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const
Size aSize( GetOutputSizePixel() );
if ( m_bHasScrollBar )
- aSize.setWidth( aSize.Width() - m_pScrollBar->GetSizePixel().Width() );
+ aSize.AdjustWidth( -(m_pScrollBar->GetSizePixel().Width()) );
if ( m_vEntries[ nPos ]->m_bActive )
aSize.setHeight( m_nActiveHeight );
@@ -337,7 +337,7 @@ tools::Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const
Point aPos( 0, -m_nTopIndex + nPos * m_nStdHeight );
if ( m_bHasActive && ( nPos < m_nActive ) )
- aPos.setY( aPos.Y() + m_nActiveHeight - m_nStdHeight );
+ aPos.AdjustY(m_nActiveHeight - m_nStdHeight );
return tools::Rectangle( aPos, aSize );
}
@@ -527,7 +527,7 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools:
else
sDescription = rEntry->m_sDescription;
- aPos.setY( aPos.Y() + aTextHeight );
+ aPos.AdjustY(aTextHeight );
if (rEntry->m_bActive)
{
long nExtraHeight = 0;
@@ -684,7 +684,7 @@ void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::R
Size aSize(GetOutputSizePixel());
if ( m_bHasScrollBar )
- aSize.setWidth( aSize.Width() - m_pScrollBar->GetSizePixel().Width() );
+ aSize.AdjustWidth( -(m_pScrollBar->GetSizePixel().Width()) );
const ::osl::MutexGuard aGuard( m_entriesMutex );
@@ -694,7 +694,7 @@ void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::R
aSize.setHeight( (*iIndex)->m_bActive ? m_nActiveHeight : m_nStdHeight );
tools::Rectangle aEntryRect( aStart, aSize );
DrawRow(rRenderContext, aEntryRect, *iIndex);
- aStart.setY( aStart.Y() + aSize.Height() );
+ aStart.AdjustY(aSize.Height() );
}
}
@@ -1168,7 +1168,7 @@ void ExtensionBox_Impl::DoScroll( long nDelta )
Point aNewSBPt( m_pScrollBar->GetPosPixel() );
tools::Rectangle aScrRect( Point(), GetOutputSizePixel() );
- aScrRect.SetRight( aScrRect.Right() - m_pScrollBar->GetSizePixel().Width() );
+ aScrRect.AdjustRight( -(m_pScrollBar->GetSizePixel().Width()) );
Scroll( 0, -nDelta, aScrRect );
m_pScrollBar->SetPosPixel( aNewSBPt );
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 3045415a9e42..5856410ec9d8 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -594,8 +594,8 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools::
aNativeControlRegion, aNativeContentRegion))
{
long nProgressHeight = aNativeControlRegion.GetHeight();
- aDrawRect.SetTop( aDrawRect.Top() - (nProgressHeight - pSpl->_barheight)/2 );
- aDrawRect.Bottom() += (nProgressHeight - pSpl->_barheight)/2;
+ aDrawRect.AdjustTop( -((nProgressHeight - pSpl->_barheight)/2) );
+ aDrawRect.AdjustBottom((nProgressHeight - pSpl->_barheight)/2 );
}
if (rRenderContext.DrawNativeControl(ControlType::IntroProgress, ControlPart::Entire, aDrawRect,