diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 12:18:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 19:52:06 +0100 |
commit | 6d9d8a723f7d92057f26c884ced975f13fc90d8f (patch) | |
tree | b6790dd0b633c6e1cf8859fc59a49b20fb242865 /extensions | |
parent | 1a839524d46cc6cf5924db7f9dcd6847f050ec0f (diff) |
Revert "loplugin:changetoolsgen in editeng..extensions" 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 2096aac8b958db66b3ddce16b06dca87edc8ba0a.
Change-Id: I4b5941c4119b95aaefb9180a0ca95a1dbb4ec317
Reviewed-on: https://gerrit.libreoffice.org/49844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/propctrlr/browserline.cxx | 8 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 8 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserpage.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 4 | ||||
-rw-r--r-- | extensions/source/scanner/grid.cxx | 8 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 12 | ||||
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 4 |
7 files changed, 24 insertions, 24 deletions
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 65e4396bcbfa..0aeaadeaf707 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -210,8 +210,8 @@ namespace pcr if ( m_bIndentTitle ) { Size aIndent( m_pTheParent->LogicToPixel(Size(8, 0), MapMode(MapUnit::MapAppFont)) ); - aTitlePos.setX( aTitlePos.X() + aIndent.Width() ); - aTitleSize.setWidth( aTitleSize.Width() - aIndent.Width() ); + aTitlePos.AdjustX(aIndent.Width() ); + aTitleSize.AdjustWidth( -(aIndent.Width()) ); } m_aFtTitle->SetPosSizePixel( aTitlePos, aTitleSize ); } @@ -225,7 +225,7 @@ namespace pcr Size aControlSize( m_aOutputSize.Width() - 4 - m_nNameWidth - nBrowseButtonSize - 4, m_pControlWindow->GetSizePixel().Height() ); if ( m_pAdditionalBrowseButton ) - aControlSize.setWidth( aControlSize.Width() - nBrowseButtonSize + 4 ); + aControlSize.AdjustWidth( -(nBrowseButtonSize + 4) ); m_pControlWindow->SetSizePixel( aControlSize ); } @@ -237,7 +237,7 @@ namespace pcr if ( m_pAdditionalBrowseButton ) { - aButtonPos.setX( aButtonPos.X() - nBrowseButtonSize + 4 ); + aButtonPos.AdjustX( -(nBrowseButtonSize + 4) ); m_pAdditionalBrowseButton->SetPosSizePixel( aButtonPos, aButtonSize ); } } diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 091102090dce..98ea5c3e5729 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -426,8 +426,8 @@ namespace pcr tools::Rectangle aLinesArea( aPlayground ); if ( bPositionHelpWindow ) { - aLinesArea.SetBottom( aLinesArea.Bottom() - nHelpWindowHeight ); - aLinesArea.Bottom() -= aHelpWindowDistance.Height(); + aLinesArea.AdjustBottom( -nHelpWindowHeight ); + aLinesArea.AdjustBottom( -(aHelpWindowDistance.Height()) ); } m_aLinesPlayground->SetPosSizePixel( aLinesArea.TopLeft(), aLinesArea.GetSize() ); @@ -447,7 +447,7 @@ namespace pcr Size aVScrollSize( m_aVScroll->GetSizePixel() ); // adjust the playground's width - aLinesArea.SetRight( aLinesArea.Right() - aVScrollSize.Width() ); + aLinesArea.AdjustRight( -(aVScrollSize.Width()) ); m_aLinesPlayground->SetPosSizePixel( aLinesArea.TopLeft(), aLinesArea.GetSize() ); // position the scrollbar @@ -556,7 +556,7 @@ namespace pcr aSize.setHeight( m_nRowHeight ); - aPos.setY( aPos.Y() + _nIndex * m_nRowHeight ); + aPos.AdjustY(_nIndex * m_nRowHeight ); if ( _nIndex < m_aLines.size() ) { diff --git a/extensions/source/propctrlr/browserpage.cxx b/extensions/source/propctrlr/browserpage.cxx index 81caba5b3839..b25527e54e25 100644 --- a/extensions/source/propctrlr/browserpage.cxx +++ b/extensions/source/propctrlr/browserpage.cxx @@ -49,8 +49,8 @@ namespace pcr void OBrowserPage::Resize() { Size aSize( GetOutputSizePixel() ); - aSize.Width() -= LAYOUT_BORDER_LEFT + LAYOUT_BORDER_RIGHT; - aSize.Height() -= LAYOUT_BORDER_TOP + LAYOUT_BORDER_BOTTOM; + aSize.AdjustWidth( -(LAYOUT_BORDER_LEFT + LAYOUT_BORDER_RIGHT) ); + aSize.AdjustHeight( -(LAYOUT_BORDER_TOP + LAYOUT_BORDER_BOTTOM) ); m_aListBox->SetPosSizePixel( Point( LAYOUT_BORDER_LEFT, LAYOUT_BORDER_TOP ), aSize ); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index cbe3735c4982..26d154eb1880 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -368,7 +368,7 @@ namespace pcr if ( impl_textHitTest( rMEvt.GetPosPixel() ) ) m_aMouseButtonDownPos = rMEvt.GetPosPixel(); else - m_aMouseButtonDownPos.setX( m_aMouseButtonDownPos.Y() = -1 ); + m_aMouseButtonDownPos.X() = m_aMouseButtonDownPos.Y() = -1; } @@ -1101,7 +1101,7 @@ namespace pcr aMePos = GetParent()->OutputToScreenPixel( aMePos ); ::Size aSize=GetSizePixel(); ::tools::Rectangle aRect(aMePos,aSize); - aSize.Height() = STD_HEIGHT; + aSize.setHeight( STD_HEIGHT ); m_pFloatingEdit->SetOutputSizePixel(aSize); m_pFloatingEdit->StartPopupMode( aRect, FloatWinPopupFlags::Down ); diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 6cdfba834fd6..89091b8d8df0 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -465,8 +465,8 @@ void GridWindow::drawGrid(vcl::RenderContext& rRenderContext) std::sprintf(pBuf, "%g", fX); OUString aMark(pBuf, strlen(pBuf), osl_getThreadTextEncoding()); Size aTextSize(rRenderContext.GetTextWidth(aMark), rRenderContext.GetTextHeight()); - aPt.setX( aPt.X() - aTextSize.Width() / 2 ); - aPt.Y() += aTextSize.Height() / 2; + aPt.AdjustX( -(aTextSize.Width() / 2) ); + aPt.AdjustY(aTextSize.Height() / 2 ); rRenderContext.DrawText(aPt, aMark); } // draw horizontal lines @@ -478,8 +478,8 @@ void GridWindow::drawGrid(vcl::RenderContext& rRenderContext) std::sprintf(pBuf, "%g", fY); OUString aMark(pBuf, strlen(pBuf), osl_getThreadTextEncoding()); Size aTextSize(rRenderContext.GetTextWidth(aMark), rRenderContext.GetTextHeight()); - aPt.setX( aPt.X() - aTextSize.Width() + 2 ); - aPt.Y() -= aTextSize.Height() / 2; + aPt.AdjustX( -(aTextSize.Width() + 2) ); + aPt.AdjustY( -(aTextSize.Height() / 2) ); rRenderContext.DrawText(aPt, aMark); } diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 06d53fb23522..13553c7b6f76 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -532,14 +532,14 @@ void SaneDlg::InitFields() pField->SetValue( 0 ); break; case 2: - aMaxBottomRight.X() = PREVIEW_WIDTH; - aBottomRight.X() = PREVIEW_WIDTH; + aMaxBottomRight.setX( PREVIEW_WIDTH ); + aBottomRight.setX( PREVIEW_WIDTH ); pField->SetMax( PREVIEW_WIDTH ); pField->SetValue( PREVIEW_WIDTH ); break; case 3: - aMaxBottomRight.Y() = PREVIEW_HEIGHT; - aBottomRight.Y() = PREVIEW_HEIGHT; + aMaxBottomRight.setY( PREVIEW_HEIGHT ); + aBottomRight.setY( PREVIEW_HEIGHT ); pField->SetMax( PREVIEW_HEIGHT ); pField->SetValue( PREVIEW_HEIGHT ); break; @@ -1275,9 +1275,9 @@ Point ScanPreview::GetLogicPos(const Point& rIn) const aConvert.setY( PREVIEW_HEIGHT-1 ); aConvert.setX( aConvert.X() * ( maMaxBottomRight.X() - maMinTopLeft.X() ) ); - aConvert.X() /= PREVIEW_WIDTH; + aConvert.setX( aConvert.X() / ( PREVIEW_WIDTH) ); aConvert.setY( aConvert.Y() * ( maMaxBottomRight.Y() - maMinTopLeft.Y() ) ); - aConvert.Y() /= PREVIEW_HEIGHT; + aConvert.setY( aConvert.Y() / ( PREVIEW_HEIGHT) ); return aConvert; } diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 9f202fb20170..f6d9c1f2c1be 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -836,13 +836,13 @@ void BubbleWindow::Show( bool bVisible, ShowFlags nFlags ) aWindowSize.setHeight( aImgSize.Height() + TIP_HEIGHT + 2 * BUBBLE_BORDER ); Point aPos; - aPos.X() = maTipPos.X() - aWindowSize.Width() + TIP_RIGHT_OFFSET; + aPos.setX( maTipPos.X() - aWindowSize.Width() + TIP_RIGHT_OFFSET ); aPos.setY( maTipPos.Y() ); Point aScreenPos = GetParent()->OutputToAbsoluteScreenPixel( aPos ); if ( aScreenPos.X() < 0 ) { mnTipOffset = aScreenPos.X(); - aPos.setX( aPos.X() - mnTipOffset ); + aPos.AdjustX( -(mnTipOffset) ); } SetPosSizePixel( aPos, aWindowSize ); |