diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 13:01:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 19:50:47 +0100 |
commit | bddd6c77811e0489a5632437116f5eec356cc397 (patch) | |
tree | 761111e37f065d040a6d63ef1098de2afce16eae /basctl/source/basicide/baside2b.cxx | |
parent | eb5563e7e636a9856d4f1cc23d00a21193b9d0cc (diff) |
Revert "loplugin:changetoolsgen in avmedia..basic" 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 1adb1a320a7e9832a41545bde13fd59d27ce7954.
Change-Id: I52924b35008c8e4b44c8a6b6657cc3a1ac513886
Reviewed-on: https://gerrit.libreoffice.org/49848
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/basicide/baside2b.cxx')
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 2e5ec45676bd..3f81bde3bb5a 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -372,8 +372,8 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt ) { aTopLeft = GetEditView()->GetTextEngine()->PaMtoEditCursor( aStartOfWord ).BottomLeft(); aTopLeft = GetEditView()->GetWindowPos( aTopLeft ); - aTopLeft.setX( aTopLeft.X() + 5 ); - aTopLeft.setY( aTopLeft.Y() + 5 ); + aTopLeft.AdjustX(5 ); + aTopLeft.AdjustY(5 ); aTopLeft = OutputToScreenPixel( aTopLeft ); } } @@ -1571,8 +1571,8 @@ WatchWindow::WatchWindow (Layout* pParent) aRemoveWatchButton->SetModeImage(Image(BitmapEx(RID_BMP_REMOVEWATCH))); aRemoveWatchButton->SetQuickHelpText(IDEResId(RID_STR_REMOVEWATCHTIP)); Size aSz( aRemoveWatchButton->GetModeImage().GetSizePixel() ); - aSz.setWidth( aSz.Width() + 6 ); - aSz.setHeight( aSz.Height() + 6 ); + aSz.AdjustWidth(6 ); + aSz.AdjustHeight(6 ); aRemoveWatchButton->SetSizePixel( aSz ); aRemoveWatchButton->Show(); @@ -1656,7 +1656,7 @@ void WatchWindow::Resize() if ( aBoxSz.Height() < 4 ) aBoxSz.setHeight( 0 ); - aBoxSz.setHeight( aBoxSz.Height() - nHeaderBarHeight ); + aBoxSz.AdjustHeight( -nHeaderBarHeight ); aTreeListBox->SetSizePixel( aBoxSz ); aTreeListBox->GetHScroll()->SetPageSize( aTreeListBox->GetHScroll()->GetVisibleSize() ); @@ -1991,8 +1991,8 @@ void ComplexEditorWindow::Resize() { Size aOutSz = GetOutputSizePixel(); Size aSz(aOutSz); - aSz.setWidth( aSz.Width() - 2*DWBORDER ); - aSz.setHeight( aSz.Height() - 2*DWBORDER ); + aSz.AdjustWidth( -(2*DWBORDER) ); + aSz.AdjustHeight( -(2*DWBORDER) ); long nBrkWidth = 20; long nSBWidth = aEWVScrollBar->GetSizePixel().Width(); @@ -2844,12 +2844,12 @@ void CodeCompleteWindow::ResizeAndPositionListBox() if( aVisArea.TopRight().getY() + aPos.getY() + aSize.getHeight() > aBottomPoint.getY() ) {//clipped at the bottom: move it up const long& nParentFontHeight = pParent->GetEditEngine()->GetFont().GetFontHeight(); //parent's font (in the IDE): needed for height - aPos.setY( aPos.Y() - aSize.getHeight() + nParentFontHeight + nCursorPad ); + aPos.AdjustY( -(aSize.getHeight() + nParentFontHeight + nCursorPad) ); } if( aVisArea.TopLeft().getX() + aPos.getX() + aSize.getWidth() > aBottomPoint.getX() ) {//clipped at the right side, move it a bit left - aPos.setX( aPos.X() - aSize.getWidth() + aVisArea.TopLeft().getX() ); + aPos.AdjustX( -(aSize.getWidth() + aVisArea.TopLeft().getX()) ); } //set the position SetPosPixel( aPos ); |