[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source filter/source forms/source formula/source fpicker/source framework/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Feb 16 14:14:18 UTC 2018
dbaccess/source/ui/browser/brwview.cxx | 2 -
dbaccess/source/ui/browser/dataview.cxx | 2 -
dbaccess/source/ui/browser/sbagrid.cxx | 4 +-
dbaccess/source/ui/control/FieldDescControl.cxx | 12 ++++----
dbaccess/source/ui/dlg/adminpages.cxx | 2 -
dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 2 -
dbaccess/source/ui/dlg/sqlmessage.cxx | 2 -
dbaccess/source/ui/querydesign/ConnectionLine.cxx | 22 ++++++++--------
dbaccess/source/ui/querydesign/JoinController.cxx | 4 +-
dbaccess/source/ui/querydesign/JoinTableView.cxx | 16 +++++------
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 6 ++--
dbaccess/source/ui/querydesign/TableConnection.cxx | 4 +-
dbaccess/source/ui/querydesign/TableWindow.cxx | 16 +++++------
dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 2 -
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 16 +++++------
desktop/source/splash/splash.cxx | 4 +-
filter/source/flash/swfwriter1.cxx | 4 +-
filter/source/graphicfilter/eps/eps.cxx | 6 ++--
filter/source/graphicfilter/ios2met/ios2met.cxx | 4 +-
filter/source/msfilter/escherex.cxx | 4 +-
filter/source/msfilter/eschesdo.cxx | 12 ++++----
filter/source/msfilter/msdffimp.cxx | 16 +++++------
filter/source/msfilter/svdfppt.cxx | 14 +++++-----
filter/source/svg/svgwriter.cxx | 11 +++-----
forms/source/richtext/richtextimplcontrol.cxx | 12 ++++----
forms/source/solar/control/navtoolbar.cxx | 2 -
formula/source/ui/dlg/structpg.cxx | 2 -
fpicker/source/office/PlacesListBox.cxx | 2 -
fpicker/source/office/RemoteFilesDialog.cxx | 2 -
fpicker/source/office/iodlg.cxx | 2 -
framework/source/layoutmanager/layoutmanager.cxx | 2 -
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 8 ++---
32 files changed, 109 insertions(+), 110 deletions(-)
New commits:
commit 413c7b426543e71f4865c858b5b4ca62b48573d3
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Feb 16 12:48:27 2018 +0200
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 at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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,
commit 1d180f48bc61444c610c35083e35745d38c6cce2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Feb 16 11:56:18 2018 +0200
Revert "loplugin:changetoolsgen in filter..framework" 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 bf8a6cacd06d7c1961b5db8cc79ee4bbdb342e43.
Change-Id: I4b5a9bf0c38ee1b57af91e6b7f184f1e8807f6f7
Reviewed-on: https://gerrit.libreoffice.org/49843
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 4b627d50e4bc..90464d195b25 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -550,11 +550,11 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
switch( aOldFont.GetAlignment() )
{
case ALIGN_TOP:
- aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
+ aBaseLinePos.AdjustY(aMetric.GetAscent() );
break;
case ALIGN_BOTTOM:
- aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
+ aBaseLinePos.AdjustY( -(aMetric.GetDescent()) );
break;
default:
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 20497d5c71a6..4a47345a14b5 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -1140,7 +1140,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
MapMode aMapMode( aSubstitute.GetPrefMapMode() );
Size aOutSize( OutputDevice::LogicToLogic( aSize, rVDev.GetMapMode(), aMapMode ) );
Point aOrigin( OutputDevice::LogicToLogic( aPoint, rVDev.GetMapMode(), aMapMode ) );
- aOrigin.setY( aOrigin.Y() + aOutSize.Height() );
+ aOrigin.AdjustY(aOutSize.Height() );
aMapMode.SetOrigin( aOrigin );
aMapMode.SetScaleX( Fraction(aOutSize.Width() / ( nBoundingBox[ 2 ] - nBoundingBox[ 0 ] )) );
aMapMode.SetScaleY( Fraction(aOutSize.Height() / ( nBoundingBox[ 3 ] - nBoundingBox[ 1 ] )) );
@@ -2083,9 +2083,9 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint )
if ( eTextAlign != ALIGN_BASELINE )
{ // PostScript does not know about FontAlignment
if ( eTextAlign == ALIGN_TOP ) // -> so I assume that
- aPoint.setY( aPoint.Y() + ( aSize.Height() * 4 / 5 ) ); // the area under the baseline
+ aPoint.AdjustY( aSize.Height() * 4 / 5 ); // the area under the baseline
else if ( eTextAlign == ALIGN_BOTTOM ) // is about 20% of the font size
- aPoint.setY( aPoint.Y() - ( aSize.Height() / 5 ) );
+ aPoint.AdjustY( -( aSize.Height() / 5 ) );
}
ImplMoveTo( aPoint );
if ( nRotation )
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 3cd9cdbeddbc..7a1255ba2d98 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -894,8 +894,8 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
tools::Polygon aPolygon(nPolySize);
for (i=0; i<nPolySize; i++) {
sal_Int8 nsignedbyte;
- pOS2MET->ReadSChar( nsignedbyte ); aP0.setX( aP0.X() + static_cast<sal_Int32>(nsignedbyte) );
- pOS2MET->ReadSChar( nsignedbyte ); aP0.setY( aP0.Y() - static_cast<sal_Int32>(nsignedbyte) );
+ pOS2MET->ReadSChar( nsignedbyte ); aP0.X()+=static_cast<sal_Int32>(nsignedbyte);
+ pOS2MET->ReadSChar( nsignedbyte ); aP0.Y()-=static_cast<sal_Int32>(nsignedbyte);
aCalcBndRect.Union(tools::Rectangle(aP0,Size(1,1)));
aPolygon.SetPoint(aP0,i);
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index b710b53af3e2..8d4b055f6a24 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2020,8 +2020,8 @@ bool EscherPropertyContainer::CreatePolygonProperties(
for (sal_uInt16 i = 0; i < nPoints; ++i) // write points from polygon to buffer
{
Point aPoint = aPolygon[ i ];
- aPoint.setX( aPoint.X() - rGeoRect.X );
- aPoint.setY( aPoint.Y() - rGeoRect.Y );
+ aPoint.AdjustX( -(rGeoRect.X) );
+ aPoint.AdjustY( -(rGeoRect.Y) );
*pPtr++ = static_cast<sal_uInt8>( aPoint.X() );
*pPtr++ = static_cast<sal_uInt8>( aPoint.X() >> 8 );
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 30288d914e4c..1fb1f5a91472 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -88,9 +88,9 @@ Size ImplEESdrWriter::ImplMapSize( const Size& rSize )
Size aRetSize( OutputDevice::LogicToLogic( rSize, maMapModeSrc, maMapModeDest ) );
if ( !aRetSize.Width() )
- aRetSize.setWidth( ++aRetSize.Width() );
+ aRetSize.AdjustWidth( 1 );
if ( !aRetSize.Height() )
- aRetSize.setHeight( ++aRetSize.Height() );
+ aRetSize.AdjustHeight( 1 );
return aRetSize;
}
@@ -378,10 +378,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
const tools::Rectangle& rRect = aRect100thmm;
aCenter.setX( rRect.Left() + ( rRect.GetWidth() / 2 ) );
aCenter.setY( rRect.Top() + ( rRect.GetHeight() / 2 ) );
- aStart.setX( aStart.X() + aCenter.X() );
- aStart.setY( aStart.Y() + aCenter.Y() );
- aEnd.setX( aEnd.X() + aCenter.X() );
- aEnd.setY( aEnd.Y() + aCenter.Y() );
+ aStart.AdjustX(aCenter.X() );
+ aStart.AdjustY(aCenter.Y() );
+ aEnd.AdjustX(aCenter.X() );
+ aEnd.AdjustY(aCenter.Y() );
tools::Polygon aPolygon( rRect, aStart, aEnd, ePolyKind );
if( rObj.GetAngle() )
{
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index dbe93bf2a624..1f112475f331 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3108,8 +3108,8 @@ void SvxMSDffManager::Scale( sal_Int32& rVal ) const
void SvxMSDffManager::Scale( Point& rPos ) const
{
- rPos.setX( rPos.X() + nMapXOfs );
- rPos.setY( rPos.Y() + nMapYOfs );
+ rPos.AdjustX(nMapXOfs );
+ rPos.AdjustY(nMapYOfs );
if ( bNeedMap )
{
rPos.setX( BigMulDiv( rPos.X(), nMapMul, nMapDiv ) );
@@ -4624,8 +4624,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
Point aP( aObjData.aBoundRect.Center() );
Size aS( aObjData.aBoundRect.GetSize() );
- aP.setX( aP.X() - aS.Width() / 2 );
- aP.setY( aP.Y() - aS.Height() / 2 );
+ aP.AdjustX( -(aS.Width() / 2) );
+ aP.AdjustY( -(aS.Height() / 2) );
tools::Rectangle aLogicRect( aP, aS );
fYOfs = fXOfs = 0.0;
@@ -5246,8 +5246,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
// the vertical paragraph indents are part of the BoundRect,
// here we 'remove' them by calculating
tools::Rectangle aNewRect(rTextRect);
- aNewRect.SetBottom( aNewRect.Bottom() - nTextTop + nTextBottom );
- aNewRect.SetRight( aNewRect.Right() - nTextLeft + nTextRight );
+ aNewRect.AdjustBottom( -(nTextTop + nTextBottom) );
+ aNewRect.AdjustRight( -(nTextLeft + nTextRight) );
// Only if it's a simple textbox may Writer replace
// the object with a frame, otherwise
@@ -5379,8 +5379,8 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.GetWidth() : rTextRect.GetHeight();
nMinWH /= 2;
Point aPivot(rTextRect.TopLeft());
- aPivot.setX( aPivot.X() + nMinWH );
- aPivot.setY( aPivot.Y() + nMinWH );
+ aPivot.AdjustX(nMinWH );
+ aPivot.AdjustY(nMinWH );
double a = nTextRotationAngle * nPi180;
pTextObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a));
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index b8e4da7c50ea..28401d7cc4e6 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1143,8 +1143,8 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( eTVA == SDRTEXTVERTADJUST_BLOCK )
{
Size aTextSize( pText->GetTextSize() );
- aTextSize.setWidth( aTextSize.Width() + nTextLeft + nTextRight );
- aTextSize.setHeight( aTextSize.Height() + nTextTop + nTextBottom );
+ aTextSize.AdjustWidth(nTextLeft + nTextRight );
+ aTextSize.AdjustHeight(nTextTop + nTextBottom );
if ( rTextRect.GetHeight() < aTextSize.Height() )
pTObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
}
@@ -1154,8 +1154,8 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( eTHA == SDRTEXTHORZADJUST_BLOCK )
{
Size aTextSize( pText->GetTextSize() );
- aTextSize.setWidth( aTextSize.Width() + nTextLeft + nTextRight );
- aTextSize.setHeight( aTextSize.Height() + nTextTop + nTextBottom );
+ aTextSize.AdjustWidth(nTextLeft + nTextRight );
+ aTextSize.AdjustHeight(nTextTop + nTextBottom );
if ( rTextRect.GetWidth() < aTextSize.Width() )
pTObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_CENTER ) );
}
@@ -2503,8 +2503,8 @@ Size SdrPowerPointImport::GetPageSize() const
aRet.setWidth( BigMulDiv( aRet.Width(), nInchMul, nInchDiv ) );
aRet.setHeight( BigMulDiv( aRet.Height(), nInchMul, nInchDiv ) );
}
- aRet.setWidth( aRet.Width() + 5 ); aRet.setWidth( aRet.Width() / 10 ); aRet.setWidth( aRet.Width() * 10 );
- aRet.setHeight( aRet.Height() + 5 ); aRet.setHeight( aRet.Height() / 10 ); aRet.setHeight( aRet.Height() * 10 );
+ aRet.AdjustWidth(5 ); aRet.setWidth( aRet.Width() / 10 ); aRet.setWidth( aRet.Width() * 10 );
+ aRet.AdjustHeight(5 ); aRet.setHeight( aRet.Height() / 10 ); aRet.setHeight( aRet.Height() * 10 );
if ( bInch )
{
aRet.setWidth( BigMulDiv( aRet.Width(), nInchDiv, nInchMul ) );
@@ -5671,7 +5671,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T
if ( aSize.Width() && aSize.Height() )
{
if ( aSize.Width () > 64 )
- aSize.Width () = 64;
+ aSize.setWidth( 64 );
if ( aSize.Height() > 64 )
aSize.setHeight( 64 );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index bd3a50df0cc0..a080e1c6a1f6 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1612,9 +1612,9 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
const vcl::Font& rFont = mpVDev->GetFont();
if( rFont.GetAlignment() == ALIGN_TOP )
- aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
+ aBaseLinePos.AdjustY(aMetric.GetAscent() );
else if( rFont.GetAlignment() == ALIGN_BOTTOM )
- aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
+ aBaseLinePos.AdjustY( -(aMetric.GetDescent()) );
implMap( rPos, aPos );
@@ -2250,8 +2250,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo
// Setting x value of a gradient vector to rotation center to
// place a gradient vector in a target polygon.
// This would help editing it in SVG editors like inkscape.
- aPoly[ 0 ].setX( aCenter.X() );
- aPoly[ 1 ].setX( aCenter.X() );
+ aPoly[ 0 ].X() = aPoly[ 1 ].X() = aCenter.X();
aPoly[ 0 ].setY( aRect.Top() );
aPoly[ 1 ].setY( aRect.Bottom() );
aPoly.Rotate( aCenter, nAngle );
@@ -2543,9 +2542,9 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
const vcl::Font& rFont = mpVDev->GetFont();
if( rFont.GetAlignment() == ALIGN_TOP )
- aBaseLinePos.setY( aBaseLinePos.Y() + aMetric.GetAscent() );
+ aBaseLinePos.AdjustY(aMetric.GetAscent() );
else if( rFont.GetAlignment() == ALIGN_BOTTOM )
- aBaseLinePos.setY( aBaseLinePos.Y() - aMetric.GetDescent() );
+ aBaseLinePos.AdjustY( -(aMetric.GetDescent()) );
ImplMap( rPos, aPos );
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 003e11b03145..ed3cce56bc2c 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -545,10 +545,10 @@ namespace frm
{
void lcl_inflate( tools::Rectangle& _rRect, long _nInflateX, long _nInflateY )
{
- _rRect.SetLeft( _rRect.Left() - _nInflateX );
- _rRect.SetRight( _rRect.Right() + _nInflateX );
- _rRect.SetTop( _rRect.Top() - _nInflateY );
- _rRect.SetBottom( _rRect.Bottom() + _nInflateY );
+ _rRect.AdjustLeft( -_nInflateX );
+ _rRect.AdjustRight(_nInflateX );
+ _rRect.AdjustTop( -_nInflateY );
+ _rRect.AdjustBottom(_nInflateY );
}
}
@@ -594,8 +594,8 @@ namespace frm
tools::Rectangle aPlayground( aPos, aSize );
Size aOnePixel( _pDev->PixelToLogic( Size( 1, 1 ) ) );
- aPlayground.SetRight( aPlayground.Right() - aOnePixel.Width() );
- aPlayground.SetBottom( aPlayground.Bottom() - aOnePixel.Height() );
+ aPlayground.AdjustRight( -(aOnePixel.Width()) );
+ aPlayground.AdjustBottom( -(aOnePixel.Height()) );
// background
_pDev->SetLineColor();
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index dc8de707c0c4..f80952e44162 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -634,7 +634,7 @@ namespace frm
}
Size aSize( _pItemWindow->GetTextWidth( sItemText ), /* _pItemWindow->GetSizePixel( ).Height() */ _pItemWindow->GetTextHeight() + 4 );
- aSize.setWidth( aSize.Width() + 6 );
+ aSize.AdjustWidth(6 );
_pItemWindow->SetSizePixel( aSize );
m_pToolbar->SetItemWindow( _nItemId, _pItemWindow );
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index a40ba94a5df6..8f42601f5c53 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -37,7 +37,7 @@ StructListBox::StructListBox(vcl::Window* pParent, WinBits nBits ):
vcl::Font aFont( GetFont() );
Size aSize = aFont.GetFontSize();
- aSize.setHeight( aSize.Height() - 2 );
+ aSize.Height() -= 2;
aFont.SetFontSize( aSize );
SetFont( aFont );
}
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index b4ea90e3bdd4..8a7156c1019b 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -160,7 +160,7 @@ void PlacesListBox::SetSizePixel( const Size& rNewSize )
{
Control::SetSizePixel( rNewSize );
Size aListSize( rNewSize );
- aListSize.setHeight( aListSize.Height() - 26 + 18 );
+ aListSize.AdjustHeight( -(26 + 18) );
mpImpl->SetSizePixel( aListSize );
sal_Int32 nBtnY = rNewSize.Height() - 26;
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index 971f409b563e..d70723eb7634 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -1033,7 +1033,7 @@ IMPL_LINK_NOARG( RemoteFilesDialog, SplitHdl, Splitter*, void )
sal_Int32 nNewX = nSplitPos + m_pSplitter->GetSizePixel().Width();
fileViewPos.setX( nNewX );
Size fileViewSize = m_pFileView->GetSizePixel();
- fileViewSize.setWidth( fileViewSize.Width() - ( nNewX - nOldX ) );
+ fileViewSize.AdjustWidth( -( nNewX - nOldX ) );
m_pFileView->SetPosSizePixel( fileViewPos, fileViewSize );
m_pSplitter->SetPosPixel( Point( placeSize.Width(), m_pSplitter->GetPosPixel().Y() ) );
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 647879d9c5eb..f8b5e1dd5d7f 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2755,7 +2755,7 @@ IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl, Splitter*, void )
sal_Int32 nNewX = nSplitPos + _pSplitter->GetSizePixel().Width();
fileViewPos.setX( nNewX );
Size fileViewSize = _pFileView->GetSizePixel();
- fileViewSize.setWidth( fileViewSize.Width() - ( nNewX - nOldX ) );
+ fileViewSize.AdjustWidth( -( nNewX - nOldX ) );
_pFileView->SetPosSizePixel( fileViewPos, fileViewSize );
_pSplitter->SetPosPixel( Point( placeSize.Width(), _pSplitter->GetPosPixel().Y() ) );
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index fcccda24afb7..f03b50500827 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2336,7 +2336,7 @@ bool LayoutManager::implts_doLayout( bool bForceRequestBorderSpace, bool bOuterR
// don't contain the status bar!
aStatusBarSize = implts_getStatusBarSize();
aContainerSize = implts_getContainerWindowOutputSize();
- aContainerSize.setHeight( aContainerSize.Height() - aStatusBarSize.Height() );
+ aContainerSize.AdjustHeight( -(aStatusBarSize.Height()) );
if ( m_xToolbarManager.is() )
m_xToolbarManager->doLayout(aContainerSize);
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 9243f6e6fe6c..c261e2bc23ae 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -2576,10 +2576,10 @@ void ToolbarLayoutManager::implts_setLayoutInProgress( bool bInProgress )
{
::tools::Rectangle aRect( rRect );
- aRect.SetLeft( aRect.Left() - nHotZoneOffset );
- aRect.SetTop( aRect.Top() - nHotZoneOffset );
- aRect.SetRight( aRect.Right() + nHotZoneOffset );
- aRect.SetBottom( aRect.Bottom() + nHotZoneOffset );
+ aRect.AdjustLeft( -nHotZoneOffset );
+ aRect.AdjustTop( -nHotZoneOffset );
+ aRect.AdjustRight(nHotZoneOffset );
+ aRect.AdjustBottom(nHotZoneOffset );
return aRect;
}
More information about the Libreoffice-commits
mailing list