summaryrefslogtreecommitdiff
path: root/desktop
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 /desktop
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>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx16
-rw-r--r--desktop/source/splash/splash.cxx4
2 files changed, 10 insertions, 10 deletions
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,