diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-12 16:48:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-13 07:38:03 +0100 |
commit | 1adb1a320a7e9832a41545bde13fd59d27ce7954 (patch) | |
tree | 1a36f83ce9ab9fee7f904d8ce210a2ee96f5ab76 /basctl/source/dlged | |
parent | 5ea3a708c7d6a8088e438e021a07e5a6508daa74 (diff) |
loplugin:changetoolsgen in avmedia..basic
Change-Id: I4e355ae27b9fad1cc6e8f8f408dbd9e93d7256d7
Reviewed-on: https://gerrit.libreoffice.org/49603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/dlged')
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 36 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 24 | ||||
-rw-r--r-- | basctl/source/dlged/propbrw.cxx | 8 |
3 files changed, 34 insertions, 34 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 4aa1315223df..397a1bc69f75 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -493,25 +493,25 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle // align with grid Size aGridSize_(long(pDlgEdView->GetSnapGridWidthX()), long(pDlgEdView->GetSnapGridWidthY())); - aSize.Width() -= aSize.Width() % aGridSize_.Width(); - aSize.Height() -= aSize.Height() % aGridSize_.Height(); + aSize.setWidth( aSize.Width() - aSize.Width() % aGridSize_.Width() ); + aSize.setHeight( aSize.Height() - aSize.Height() % aGridSize_.Height() ); Point aPos; Size aOutSize = rRenderContext.GetOutputSize(); - aPos.X() = (aOutSize.Width()>>1) - (aSize.Width()>>1); - aPos.Y() = (aOutSize.Height()>>1) - (aSize.Height()>>1); + aPos.setX( (aOutSize.Width()>>1) - (aSize.Width()>>1) ); + aPos.setY( (aOutSize.Height()>>1) - (aSize.Height()>>1) ); // align with grid - aPos.X() -= aPos.X() % aGridSize_.Width(); - aPos.Y() -= aPos.Y() % aGridSize_.Height(); + aPos.setX( aPos.X() - aPos.X() % aGridSize_.Width() ); + aPos.setY( aPos.Y() - aPos.Y() % aGridSize_.Height() ); // don't put in the corner Point aMinPos = rRenderContext.PixelToLogic( Point( 30, 20 ) ); if( (aPos.X() < aMinPos.X()) || (aPos.Y() < aMinPos.Y()) ) { aPos = aMinPos; - aPos.X() -= aPos.X() % aGridSize_.Width(); - aPos.Y() -= aPos.Y() % aGridSize_.Height(); + aPos.setX( aPos.X() - aPos.X() % aGridSize_.Width() ); + aPos.setY( aPos.Y() - aPos.Y() % aGridSize_.Height() ); } // set dialog position and size @@ -617,8 +617,8 @@ void DlgEditor::CreateDefaultObject() // set position and size Size aSize = rWindow.PixelToLogic( Size( 96, 24 ) ); Point aPoint = pDlgEdForm->GetSnapRect().Center(); - aPoint.X() -= aSize.Width() / 2; - aPoint.Y() -= aSize.Height() / 2; + aPoint.setX( aPoint.X() - aSize.Width() / 2 ); + aPoint.setY( aPoint.Y() - aSize.Height() / 2 ); pDlgEdObj->SetSnapRect( tools::Rectangle( aPoint, aSize ) ); // set default property values @@ -1156,8 +1156,8 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor pPrinter->SetFont( aFont ); Size aPaperSz = pPrinter->GetOutputSize(); - aPaperSz.Width() -= (Print::nLeftMargin + Print::nRightMargin); - aPaperSz.Height() -= (Print::nTopMargin + Print::nBottomMargin); + aPaperSz.setWidth( aPaperSz.Width() - (Print::nLeftMargin + Print::nRightMargin) ); + aPaperSz.setHeight( aPaperSz.Height() - (Print::nTopMargin + Print::nBottomMargin) ); lcl_PrintHeader( pPrinter, rTitle ); @@ -1173,21 +1173,21 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor Size aOutputSz; if( nBmpSzHeight * nScaleX <= nPaperSzHeight ) { - aOutputSz.Width() = static_cast<long>(nBmpSzWidth * nScaleX); - aOutputSz.Height() = static_cast<long>(nBmpSzHeight * nScaleX); + aOutputSz.setWidth( static_cast<long>(nBmpSzWidth * nScaleX) ); + aOutputSz.setHeight( static_cast<long>(nBmpSzHeight * nScaleX) ); } else { - aOutputSz.Width() = static_cast<long>(nBmpSzWidth * nScaleY); - aOutputSz.Height() = static_cast<long>(nBmpSzHeight * nScaleY); + aOutputSz.setWidth( static_cast<long>(nBmpSzWidth * nScaleY) ); + aOutputSz.setHeight( static_cast<long>(nBmpSzHeight * nScaleY) ); } Point aPosOffs( (aPaperSz.Width() / 2) - (aOutputSz.Width() / 2), (aPaperSz.Height()/ 2) - (aOutputSz.Height() / 2)); - aPosOffs.X() += Print::nLeftMargin; - aPosOffs.Y() += Print::nTopMargin; + aPosOffs.setX( aPosOffs.X() + Print::nLeftMargin ); + aPosOffs.setY( aPosOffs.Y() + Print::nTopMargin ); pPrinter->DrawBitmap( aPosOffs, aOutputSz, aDlg ); diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 1bdd8718d78b..d14f49fcdc9f 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -140,8 +140,8 @@ bool DlgEdObj::TransformSdrToControlCoordinates( aFormPos = pDevice->LogicToPixel( aFormPos, MapMode( MapUnit::Map100thMM ) ); // subtract form position - aPos.Width() -= aFormPos.Width(); - aPos.Height() -= aFormPos.Height(); + aPos.setWidth( aPos.Width() - aFormPos.Width() ); + aPos.setHeight( aPos.Height() - aFormPos.Height() ); // take window borders into account Reference< beans::XPropertySet > xPSetForm( pForm->GetUnoControlModel(), UNO_QUERY ); @@ -153,8 +153,8 @@ bool DlgEdObj::TransformSdrToControlCoordinates( if( bDecoration ) { awt::DeviceInfo aDeviceInfo = pForm->getDeviceInfo(); - aPos.Width() -= aDeviceInfo.LeftInset; - aPos.Height() -= aDeviceInfo.TopInset; + aPos.setWidth( aPos.Width() - aDeviceInfo.LeftInset ); + aPos.setHeight( aPos.Height() - aDeviceInfo.TopInset ); } // convert pixel to logic units @@ -201,8 +201,8 @@ bool DlgEdObj::TransformSdrToFormCoordinates( if( bDecoration ) { awt::DeviceInfo aDeviceInfo = pForm->getDeviceInfo(); - aSize.Width() -= aDeviceInfo.LeftInset + aDeviceInfo.RightInset; - aSize.Height() -= aDeviceInfo.TopInset + aDeviceInfo.BottomInset; + aSize.setWidth( aSize.Width() - aDeviceInfo.LeftInset + aDeviceInfo.RightInset ); + aSize.setHeight( aSize.Height() - aDeviceInfo.TopInset + aDeviceInfo.BottomInset ); } // convert pixel to logic units aPos = pDevice->PixelToLogic(aPos, MapMode(MapUnit::MapAppFont)); @@ -251,8 +251,8 @@ bool DlgEdObj::TransformControlToSdrCoordinates( aFormPos = pDevice->LogicToPixel(aFormPos, MapMode(MapUnit::MapAppFont)); // add form position - aPos.Width() += aFormPos.Width(); - aPos.Height() += aFormPos.Height(); + aPos.setWidth( aPos.Width() + aFormPos.Width() ); + aPos.setHeight( aPos.Height() + aFormPos.Height() ); // take window borders into account bool bDecoration = true; @@ -260,8 +260,8 @@ bool DlgEdObj::TransformControlToSdrCoordinates( if( bDecoration ) { awt::DeviceInfo aDeviceInfo = pForm->getDeviceInfo(); - aPos.Width() += aDeviceInfo.LeftInset; - aPos.Height() += aDeviceInfo.TopInset; + aPos.setWidth( aPos.Width() + aDeviceInfo.LeftInset ); + aPos.setHeight( aPos.Height() + aDeviceInfo.TopInset ); } // convert pixel to 100th_mm @@ -309,8 +309,8 @@ bool DlgEdObj::TransformFormToSdrCoordinates( if( bDecoration ) { awt::DeviceInfo aDeviceInfo = pForm->getDeviceInfo(); - aSize.Width() += aDeviceInfo.LeftInset + aDeviceInfo.RightInset; - aSize.Height() += aDeviceInfo.TopInset + aDeviceInfo.BottomInset; + aSize.setWidth( aSize.Width() + aDeviceInfo.LeftInset + aDeviceInfo.RightInset ); + aSize.setHeight( aSize.Height() + aDeviceInfo.TopInset + aDeviceInfo.BottomInset ); } // convert pixel to 100th_mm diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index 8c42ca2ec0c7..963674da5f7f 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -156,8 +156,8 @@ void PropBrw::ImplReCreateController() Point aPropWinPos = Point( WIN_BORDER, WIN_BORDER ); Size aPropWinSize(STD_WIN_SIZE_X,STD_WIN_SIZE_Y); - aPropWinSize.Width() -= (2*WIN_BORDER); - aPropWinSize.Height() -= (2*WIN_BORDER); + aPropWinSize.setWidth( aPropWinSize.Width() - (2*WIN_BORDER) ); + aPropWinSize.setHeight( aPropWinSize.Height() - (2*WIN_BORDER) ); if ( m_xBrowserComponentWindow.is() ) { @@ -426,8 +426,8 @@ void PropBrw::Resize() // adjust size Size aSize_ = GetOutputSizePixel(); Size aPropWinSize( aSize_ ); - aPropWinSize.Width() -= (2*WIN_BORDER); - aPropWinSize.Height() -= (2*WIN_BORDER); + aPropWinSize.setWidth( aPropWinSize.Width() - (2*WIN_BORDER) ); + aPropWinSize.setHeight( aPropWinSize.Height() - (2*WIN_BORDER) ); if (m_xBrowserComponentWindow.is()) { |