summaryrefslogtreecommitdiff
path: root/sfx2/source/view
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 09:20:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-16 13:24:23 +0100
commit3987c2b0e8477152e4f85ce7fa1b70eb38e171f7 (patch)
treeb6973e97085fcb0a7457828763faddbfc703b2a8 /sfx2/source/view
parent4beed2ba7335fdb211aca7f70a144ffecf90a781 (diff)
Revert "loplugin:changetoolsgen in sfx2" 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 c82802a9ee3514d0b98fbb3783abbc17ec02c3b6. Change-Id: I44a5316ebd3d0bde6bd75ad24e9a4406cd8e8db0 Reviewed-on: https://gerrit.libreoffice.org/49836 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/view')
-rw-r--r--sfx2/source/view/classificationcontroller.cxx2
-rw-r--r--sfx2/source/view/frame.cxx4
-rw-r--r--sfx2/source/view/viewfrm.cxx16
-rw-r--r--sfx2/source/view/viewsh.cxx4
4 files changed, 13 insertions, 13 deletions
diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx
index f584f366c9b2..7388da69d427 100644
--- a/sfx2/source/view/classificationcontroller.cxx
+++ b/sfx2/source/view/classificationcontroller.cxx
@@ -258,7 +258,7 @@ ClassificationControl::ClassificationControl(vcl::Window* pParent)
Size aTextSize(m_pLabel->GetTextWidth(aText), m_pLabel->GetTextHeight());
// Padding.
- aTextSize.setWidth( aTextSize.Width() + 12 );
+ aTextSize.AdjustWidth(12 );
m_pLabel->SetText(aText);
m_pLabel->SetSizePixel(aTextSize);
m_pLabel->Show();
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 1b7bc574641b..82facc714be5 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -582,13 +582,13 @@ void SfxFrame::SetToolSpaceBorderPixel_Impl( const SvBorder& rBorder )
Size aSize( GetWindow().GetOutputSizePixel() );
long nDeltaX = rBorder.Left() + rBorder.Right();
if ( aSize.Width() > nDeltaX )
- aSize.setWidth( aSize.Width() - nDeltaX );
+ aSize.AdjustWidth( -nDeltaX );
else
aSize.setWidth( 0 );
long nDeltaY = rBorder.Top() + rBorder.Bottom();
if ( aSize.Height() > nDeltaY )
- aSize.setHeight( aSize.Height() - nDeltaY );
+ aSize.AdjustHeight( -nDeltaY );
else
aSize.setHeight( 0 );
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index d24bb5b7b623..ea7e02d26475 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1160,8 +1160,8 @@ void SfxViewFrame::SetBorderPixelImpl
Size aSize = pVSh->GetWindow()->GetOutputSizePixel();
if ( aSize.Width() && aSize.Height() )
{
- aSize.setWidth( aSize.Width() + rBorder.Left() + rBorder.Right() );
- aSize.setHeight( aSize.Height() + rBorder.Top() + rBorder.Bottom() );
+ aSize.AdjustWidth(rBorder.Left() + rBorder.Right() );
+ aSize.AdjustHeight(rBorder.Top() + rBorder.Bottom() );
Size aOldSize = GetWindow().GetOutputSizePixel();
GetWindow().SetOutputSizePixel( aSize );
@@ -1169,8 +1169,8 @@ void SfxViewFrame::SetBorderPixelImpl
while ( pParent->GetParent() )
pParent = pParent->GetParent();
Size aOuterSize = pParent->GetOutputSizePixel();
- aOuterSize.setWidth( aOuterSize.Width() + ( aSize.Width() - aOldSize.Width() ) );
- aOuterSize.setHeight( aOuterSize.Height() + ( aSize.Height() - aOldSize.Height() ) );
+ aOuterSize.AdjustWidth( aSize.Width() - aOldSize.Width() );
+ aOuterSize.AdjustHeight( aSize.Height() - aOldSize.Height() );
pParent->SetOutputSizePixel( aOuterSize );
}
}
@@ -1178,10 +1178,10 @@ void SfxViewFrame::SetBorderPixelImpl
{
Point aPoint;
tools::Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() );
- aEditArea.SetLeft( aEditArea.Left() + rBorder.Left() );
- aEditArea.SetRight( aEditArea.Right() - rBorder.Right() );
- aEditArea.SetTop( aEditArea.Top() + rBorder.Top() );
- aEditArea.SetBottom( aEditArea.Bottom() - rBorder.Bottom() );
+ aEditArea.AdjustLeft(rBorder.Left() );
+ aEditArea.AdjustRight( -(rBorder.Right()) );
+ aEditArea.AdjustTop(rBorder.Top() );
+ aEditArea.AdjustBottom( -(rBorder.Bottom()) );
pVSh->GetWindow()->SetPosSizePixel( aEditArea.TopLeft(), aEditArea.GetSize() );
}
}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 30f90c4e26c8..d7962e72be16 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1707,9 +1707,9 @@ void SfxViewShell::SetMargin( const Size& rSize )
// the default margin was verified using www.apple.com !!
Size aMargin = rSize;
if ( aMargin.Width() == -1 )
- aMargin.Width() = DEFAULT_MARGIN_WIDTH;
+ aMargin.setWidth( DEFAULT_MARGIN_WIDTH );
if ( aMargin.Height() == -1 )
- aMargin.Height() = DEFAULT_MARGIN_HEIGHT;
+ aMargin.setHeight( DEFAULT_MARGIN_HEIGHT );
if ( aMargin != pImpl->aMargin )
{