compilerplugins/clang/changetoolsgen.cxx | 4 include/svx/svdtrans.hxx | 2 svx/source/accessibility/ChildrenManagerImpl.cxx | 8 svx/source/accessibility/charmapacc.cxx | 2 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 4 svx/source/customshapes/EnhancedCustomShape2d.cxx | 36 - svx/source/customshapes/EnhancedCustomShape3d.cxx | 16 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 10 svx/source/dialog/ClassificationEditView.cxx | 4 svx/source/dialog/_contdlg.cxx | 14 svx/source/dialog/charmap.cxx | 34 - svx/source/dialog/connctrl.cxx | 16 svx/source/dialog/contwnd.cxx | 4 svx/source/dialog/dlgctl3d.cxx | 20 - svx/source/dialog/dlgctrl.cxx | 32 - svx/source/dialog/docrecovery.cxx | 4 svx/source/dialog/fntctrl.cxx | 6 svx/source/dialog/framelinkarray.cxx | 8 svx/source/dialog/graphctl.cxx | 12 svx/source/dialog/hdft.cxx | 4 svx/source/dialog/imapwnd.cxx | 4 svx/source/dialog/measctrl.cxx | 4 svx/source/dialog/pagectrl.cxx | 58 +- svx/source/dialog/paraprev.cxx | 42 +- svx/source/dialog/rulritem.cxx | 8 svx/source/dialog/searchcharmap.cxx | 14 svx/source/dialog/svxbmpnumvalueset.cxx | 26 - svx/source/dialog/swframeexample.cxx | 180 ++++----- svx/source/engine3d/scene3d.cxx | 24 - svx/source/engine3d/view3d.cxx | 8 svx/source/fmcomp/fmgridcl.cxx | 8 svx/source/fmcomp/fmgridif.cxx | 4 svx/source/fmcomp/gridctrl.cxx | 26 - svx/source/form/datanavi.cxx | 16 svx/source/form/filtnav.cxx | 16 svx/source/form/fmexpl.cxx | 4 svx/source/form/fmpage.cxx | 8 svx/source/form/fmvwimp.cxx | 16 svx/source/form/tabwin.cxx | 4 svx/source/form/tbxform.cxx | 6 svx/source/gallery2/galbrws1.cxx | 4 svx/source/gallery2/galbrws2.cxx | 4 svx/source/gallery2/galctrl.cxx | 10 svx/source/gallery2/galobj.cxx | 8 svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 8 svx/source/sidebar/PanelLayout.cxx | 4 svx/source/sidebar/line/LineWidthValueSet.cxx | 12 svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 18 svx/source/stbctrls/pszctrl.cxx | 14 svx/source/stbctrls/xmlsecctrl.cxx | 6 svx/source/stbctrls/zoomsliderctrl.cxx | 20 - svx/source/styles/CommonStylePreviewRenderer.cxx | 8 svx/source/svdraw/svdcrtv.cxx | 8 svx/source/svdraw/svddrag.cxx | 8 svx/source/svdraw/svddrgmt.cxx | 68 +-- svx/source/svdraw/svddrgv.cxx | 4 svx/source/svdraw/svdedtv1.cxx | 16 svx/source/svdraw/svdedtv2.cxx | 4 svx/source/svdraw/svdedxv.cxx | 80 ++-- svx/source/svdraw/svdetc.cxx | 16 svx/source/svdraw/svdfmtf.cxx | 26 - svx/source/svdraw/svdglev.cxx | 4 svx/source/svdraw/svdglue.cxx | 40 +- svx/source/svdraw/svdhdl.cxx | 8 svx/source/svdraw/svdhlpln.cxx | 12 svx/source/svdraw/svdibrow.cxx | 10 svx/source/svdraw/svdmrkv.cxx | 24 - svx/source/svdraw/svdmrkv1.cxx | 8 svx/source/svdraw/svdoashp.cxx | 112 ++--- svx/source/svdraw/svdobj.cxx | 96 ++-- svx/source/svdraw/svdocapt.cxx | 16 svx/source/svdraw/svdocirc.cxx | 56 +- svx/source/svdraw/svdoedge.cxx | 272 +++++++------- svx/source/svdraw/svdograf.cxx | 12 svx/source/svdraw/svdogrp.cxx | 8 svx/source/svdraw/svdomeas.cxx | 70 +-- svx/source/svdraw/svdomedia.cxx | 12 svx/source/svdraw/svdopath.cxx | 36 - svx/source/svdraw/svdorect.cxx | 22 - svx/source/svdraw/svdotext.cxx | 38 - svx/source/svdraw/svdotxat.cxx | 38 - svx/source/svdraw/svdotxdr.cxx | 24 - svx/source/svdraw/svdotxed.cxx | 34 - svx/source/svdraw/svdotxtr.cxx | 12 svx/source/svdraw/svdpagv.cxx | 12 svx/source/svdraw/svdpntv.cxx | 2 svx/source/svdraw/svdsnpv.cxx | 20 - svx/source/svdraw/svdtrans.cxx | 94 ++-- svx/source/svdraw/svdxcgv.cxx | 8 svx/source/table/cell.cxx | 10 svx/source/table/svdotable.cxx | 26 - svx/source/table/tablelayouter.cxx | 10 svx/source/table/tablertfimporter.cxx | 2 svx/source/tbxctrls/SvxColorValueSet.cxx | 2 svx/source/tbxctrls/colrctrl.cxx | 20 - svx/source/tbxctrls/fillctrl.cxx | 8 svx/source/tbxctrls/fontworkgallery.cxx | 12 svx/source/tbxctrls/grafctrl.cxx | 2 svx/source/tbxctrls/linectrl.cxx | 10 svx/source/tbxctrls/tbcontrl.cxx | 12 svx/source/tbxctrls/tbunocontroller.cxx | 2 svx/source/unodraw/UnoGraphicExporter.cxx | 8 svx/source/unodraw/unoshape.cxx | 8 svx/source/unodraw/unoshtxt.cxx | 8 svx/source/xoutdev/_xoutbmp.cxx | 8 svx/source/xoutdev/_xpoly.cxx | 76 +-- 106 files changed, 1193 insertions(+), 1193 deletions(-)
New commits: commit 924c0e34fdc36cd44100dafc2c68656ce32374e6 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Feb 20 11:03:20 2018 +0200 loplugin:changetoolsgen in svx and fix the regex in the plugin for matching += operator Change-Id: I26b3e3fac1d4ef3e756cc9431b983b5f27ee76d6 Reviewed-on: https://gerrit.libreoffice.org/50037 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/compilerplugins/clang/changetoolsgen.cxx b/compilerplugins/clang/changetoolsgen.cxx index 53246226eff8..0b072c5dcbde 100644 --- a/compilerplugins/clang/changetoolsgen.cxx +++ b/compilerplugins/clang/changetoolsgen.cxx @@ -214,13 +214,13 @@ bool ChangeToolsGen::ChangeBinaryOperatorPlusMinus(BinaryOperator const* binaryO std::string newText; if (binaryOp->getOpcode() == BO_AddAssign) { - newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) +\\+= *"), + newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *\\+= *"), "Adjust" + methodName + "("); newText += " )"; } else { - newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) +\\-= *"), + newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *\\-= *"), "Adjust" + methodName + "( -("); newText += ") )"; } diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx index f3e25203ff2e..201f268482a8 100644 --- a/include/svx/svdtrans.hxx +++ b/include/svx/svdtrans.hxx @@ -55,7 +55,7 @@ namespace svx } inline void MoveRect(tools::Rectangle& rRect, const Size& S) { rRect.Move(S.Width(),S.Height()); } -inline void MovePoint(Point& rPnt, const Size& S) { rPnt.X()+=S.Width(); rPnt.Y()+=S.Height(); } +inline void MovePoint(Point& rPnt, const Size& S) { rPnt.AdjustX(S.Width()); rPnt.AdjustY(S.Height()); } inline void MovePoly(tools::Polygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); } void MoveXPoly(XPolygon& rPoly, const Size& S); diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index d16b23aa792f..93e1ed34a94b 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -319,10 +319,10 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes ( aPos = xShape->getPosition(); aSize = xShape->getSize(); - aBoundingBox.Left() = aPos.X; - aBoundingBox.Top() = aPos.Y; - aBoundingBox.Right() = aPos.X + aSize.Width; - aBoundingBox.Bottom() = aPos.Y + aSize.Height; + aBoundingBox.SetLeft( aPos.X ); + aBoundingBox.SetTop( aPos.Y ); + aBoundingBox.SetRight( aPos.X + aSize.Width ); + aBoundingBox.SetBottom( aPos.Y + aSize.Height ); // Insert shape if it is visible, i.e. its bounding box overlaps // the visible area. diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 2bb6e448d2a7..c8b820939565 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -305,7 +305,7 @@ css::awt::Rectangle SvxShowCharSetAcc::implGetBounds( ) if ( m_pParent->getCharSetControl()->getScrollBar().IsVisible() ) { const Size aScrollBar = m_pParent->getCharSetControl()->getScrollBar().GetOutputSizePixel(); - aOutSize.Width() -= aScrollBar.Width(); + aOutSize.AdjustWidth( -(aScrollBar.Width()) ); } awt::Rectangle aRet; diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index 7e8aee7af76e..6c02fc7bc9ca 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -213,8 +213,8 @@ uno::Reference<XAccessible > SAL_CALL SvxPixelCtlAccessible::getAccessibleAtPoin throw lang::DisposedException(); Point childPoint; - childPoint.X() = aPoint.X; - childPoint.Y() = aPoint.Y; + childPoint.setX( aPoint.X ); + childPoint.setY( aPoint.Y ); Point pt= mrPixelCtl.PixelToLogic(childPoint); long nIndex = mrPixelCtl.PointToIndex(pt); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 518b74249c16..1cc071e1ff24 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -725,8 +725,8 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : Point aP( pCustomShapeObj->GetSnapRect().Center() ); Size aS( pCustomShapeObj->GetLogicRect().GetSize() ); - aP.X() -= aS.Width() / 2; - aP.Y() -= aS.Height() / 2; + aP.AdjustX( -(aS.Width() / 2) ); + aP.AdjustY( -(aS.Height() / 2) ); aLogicRect = tools::Rectangle( aP, aS ); OUString sShapeType; @@ -935,7 +935,7 @@ Point EnhancedCustomShape2d::GetPoint( const css::drawing::EnhancedCustomShapePa { fVal *= fYScale; } - aRetValue.Y() = static_cast<sal_Int32>(fVal); + aRetValue.setY( static_cast<sal_Int32>(fVal) ); } else // width { @@ -945,7 +945,7 @@ Point EnhancedCustomShape2d::GetPoint( const css::drawing::EnhancedCustomShapePa { fVal *= fXScale; } - aRetValue.X() = static_cast<long>(fVal); + aRetValue.setX( static_cast<long>(fVal) ); } } while ( ++nPass < 2 ); @@ -1107,13 +1107,13 @@ tools::Rectangle EnhancedCustomShape2d::GetTextRect() const Point aBottomRight( GetPoint( seqTextFrames[ nIndex ].BottomRight, !bOOXMLShape, true ) ); if ( bFlipH ) { - aTopLeft.X() = aLogicRect.GetWidth() - aTopLeft.X(); - aBottomRight.X() = aLogicRect.GetWidth() - aBottomRight.X(); + aTopLeft.setX( aLogicRect.GetWidth() - aTopLeft.X() ); + aBottomRight.setX( aLogicRect.GetWidth() - aBottomRight.X() ); } if ( bFlipV ) { - aTopLeft.Y() = aLogicRect.GetHeight() - aTopLeft.Y(); - aBottomRight.Y() = aLogicRect.GetHeight() - aBottomRight.Y(); + aTopLeft.setY( aLogicRect.GetHeight() - aTopLeft.Y() ); + aBottomRight.setY( aLogicRect.GetHeight() - aBottomRight.Y() ); } tools::Rectangle aRect( aTopLeft, aBottomRight ); SAL_INFO("svx", aRect.GetWidth() << " x " << aRect.GetHeight()); @@ -1184,9 +1184,9 @@ bool EnhancedCustomShape2d::GetHandlePosition( const sal_uInt32 nIndex, Point& r RotatePoint( rReturnPosition, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) ); } if ( bFlipH ) - rReturnPosition.X() = aLogicRect.GetWidth() - rReturnPosition.X(); + rReturnPosition.setX( aLogicRect.GetWidth() - rReturnPosition.X() ); if ( bFlipV ) - rReturnPosition.Y() = aLogicRect.GetHeight() - rReturnPosition.Y(); + rReturnPosition.setY( aLogicRect.GetHeight() - rReturnPosition.Y() ); rReturnPosition.Move( aLogicRect.Left(), aLogicRect.Top() ); bRetValue = true; } @@ -1207,9 +1207,9 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex aP.Move( -aLogicRect.Left(), -aLogicRect.Top() ); if ( bFlipH ) - aP.X() = aLogicRect.GetWidth() - aP.X(); + aP.setX( aLogicRect.GetWidth() - aP.X() ); if ( bFlipV ) - aP.Y() = aLogicRect.GetHeight() - aP.Y(); + aP.setY( aLogicRect.GetHeight() - aP.Y() ); if ( nRotateAngle ) { double a = -nRotateAngle * F_PI18000; @@ -1624,8 +1624,8 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen fHeight /= 2; }else if( bIsDefaultPath && !bIsDefaultViewBox /*&& (nGeneratorVersion == SfxObjectShell::Sym_L2)*/ ) { - _aCenter.X() = nCoordWidth/2 * fXScale; - _aCenter.Y() = nCoordHeight/2 * fYScale; + _aCenter.setX( nCoordWidth/2 * fXScale ); + _aCenter.setY( nCoordHeight/2 * fYScale ); fWidth = nCoordWidth/2; fHeight = nCoordHeight/2; const Any* pViewBox = rGeometryItem.GetPropertyValueByName( "ViewBox" ); @@ -1794,10 +1794,10 @@ void EnhancedCustomShape2d::CreateSubPath( sal_Int32& rSrcPt, sal_Int32& rSegmen Point aCenter( aRect.Center() ); Point aStart( GetPoint( seqCoordinates[ static_cast<sal_uInt16>( rSrcPt + nXor ) ], true, true ) ); Point aEnd( GetPoint( seqCoordinates[ static_cast<sal_uInt16>( rSrcPt + ( nXor ^ 1 ) ) ], true, true ) ); - aStart.X() = static_cast<sal_Int32>( static_cast<double>( aStart.X() - aCenter.X() ) ) + aCenter.X(); - aStart.Y() = static_cast<sal_Int32>( static_cast<double>( aStart.Y() - aCenter.Y() ) ) + aCenter.Y(); - aEnd.X() = static_cast<sal_Int32>( static_cast<double>( aEnd.X() - aCenter.X() ) ) + aCenter.X(); - aEnd.Y() = static_cast<sal_Int32>( static_cast<double>( aEnd.Y() - aCenter.Y() ) ) + aCenter.Y(); + aStart.setX( static_cast<sal_Int32>( static_cast<double>( aStart.X() - aCenter.X() ) ) + aCenter.X() ); + aStart.setY( static_cast<sal_Int32>( static_cast<double>( aStart.Y() - aCenter.Y() ) ) + aCenter.Y() ); + aEnd.setX( static_cast<sal_Int32>( static_cast<double>( aEnd.X() - aCenter.X() ) ) + aCenter.X() ); + aEnd.setY( static_cast<sal_Int32>( static_cast<double>( aEnd.Y() - aCenter.Y() ) ) + aCenter.Y() ); aNewB2DPolygon.append(CreateArc( aRect, aStart, aEnd, bClockwise)); } rSrcPt += 4; diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 535f1c9a2ab9..820430b83435 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -229,16 +229,16 @@ Point EnhancedCustomShape3d::Transformation2D::Transform2D( const basegfx::B3DPo Point aPoint2D; if ( eProjectionMode == drawing::ProjectionMode_PARALLEL ) { - aPoint2D.X() = static_cast<sal_Int32>(rPoint3D.getX()); - aPoint2D.Y() = static_cast<sal_Int32>(rPoint3D.getY()); + aPoint2D.setX( static_cast<sal_Int32>(rPoint3D.getX()) ); + aPoint2D.setY( static_cast<sal_Int32>(rPoint3D.getY()) ); } else { double fX = rPoint3D.getX() - fOriginX; double fY = rPoint3D.getY() - fOriginY; double f = ( fZScreen - fViewPoint.getZ() ) / ( rPoint3D.getZ() - fViewPoint.getZ() ); - aPoint2D.X() = static_cast<sal_Int32>(( fX - fViewPoint.getX() ) * f + fViewPoint.getX() + fOriginX ); - aPoint2D.Y() = static_cast<sal_Int32>(( fY - fViewPoint.getY() ) * f + fViewPoint.getY() + fOriginY ); + aPoint2D.setX( static_cast<sal_Int32>(( fX - fViewPoint.getX() ) * f + fViewPoint.getX() + fOriginX ) ); + aPoint2D.setY( static_cast<sal_Int32>(( fY - fViewPoint.getY() ) * f + fViewPoint.getY() + fOriginY ) ); } aPoint2D.Move( aCenter.X(), aCenter.Y() ); return aPoint2D; @@ -285,10 +285,10 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con long dy = aSnapRect.Bottom()- aSnapRect.Top(); Point aP( aSnapRect.TopLeft() ); RotatePoint( aP, pCustomShape->GetSnapRect().Center(), sin( a ), cos( a ) ); - aSnapRect.Left() = aP.X(); - aSnapRect.Top() = aP.Y(); - aSnapRect.Right() = aSnapRect.Left() + dx; - aSnapRect.Bottom() = aSnapRect.Top() + dy; + aSnapRect.SetLeft( aP.X() ); + aSnapRect.SetTop( aP.Y() ); + aSnapRect.SetRight( aSnapRect.Left() + dx ); + aSnapRect.SetBottom( aSnapRect.Top() + dy ); } Point aCenter( aSnapRect.Center() ); diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index a6c033a3fafb..c6d45574a9e4 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -375,7 +375,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F if ( rTextArea.aBoundRect.IsEmpty() ) rTextArea.aBoundRect = tools::Rectangle( Point( 0, 0 ), Size( 1, rFWData.nSingleLineHeight ) ); else - rTextArea.aBoundRect.Bottom() += rFWData.nSingleLineHeight; + rTextArea.aBoundRect.AdjustBottom(rFWData.nSingleLineHeight ); } else { @@ -772,8 +772,8 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa for (sal_uInt16 j = 0; j < _nPointCount; ++j) { Point& rPoint = aLocalPoly[ j ]; - rPoint.X() -= nLeft; - rPoint.Y() -= nTop; + rPoint.AdjustX( -nLeft ); + rPoint.AdjustY( -nTop ); double fX = static_cast<double>(rPoint.X()) / static_cast<double>(nWidth); double fY = static_cast<double>(rPoint.Y()) / static_cast<double>(nHeight); @@ -782,8 +782,8 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa GetPoint( rOutlinePoly2, vDistances2, fX, fx2, fy2 ); double fWidth = fx2 - fx1; double fHeight= fy2 - fy1; - rPoint.X() = static_cast<sal_Int32>( fx1 + fWidth * fY ); - rPoint.Y() = static_cast<sal_Int32>( fy1 + fHeight* fY ); + rPoint.setX( static_cast<sal_Int32>( fx1 + fWidth * fY ) ); + rPoint.setY( static_cast<sal_Int32>( fy1 + fHeight* fY ) ); } } diff --git a/svx/source/dialog/ClassificationEditView.cxx b/svx/source/dialog/ClassificationEditView.cxx index 010090814447..aad04dcfd8ac 100644 --- a/svx/source/dialog/ClassificationEditView.cxx +++ b/svx/source/dialog/ClassificationEditView.cxx @@ -58,7 +58,7 @@ ClassificationEditView::ClassificationEditView(vcl::Window* pParent, WinBits nBi Size aOutputSize(GetOutputSize()); Size aSize(aOutputSize); - aSize.Height() *= 4; + aSize.setHeight( aSize.Height() * 4 ); pEdEngine.reset(new ClassificationEditEngine(EditEngine::CreatePool())); pEdEngine->SetPaperSize( aSize ); @@ -82,7 +82,7 @@ void ClassificationEditView::Resize() { Size aOutputSize(GetOutputSize()); Size aSize(aOutputSize); - aSize.Height() *= 4; + aSize.setHeight( aSize.Height() * 4 ); pEdEngine->SetPaperSize(aSize); pEdView->SetOutputArea(tools::Rectangle(Point(0,0), aOutputSize)); Control::Resize(); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index e23b5a97f84a..25e8045e64f8 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -159,9 +159,9 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, double fWH = static_cast<double>(aSizePix.Width()) / aSizePix.Height(); if( fWH <= 1.0 ) - aSizePix.Width() = FRound( ( aSizePix.Height() = 512 ) * fWH ); + aSizePix.setWidth( FRound( ( aSizePix.Height() = 512 ) * fWH ) ); else - aSizePix.Height() = FRound( ( aSizePix.Width() = 512 ) / fWH ); + aSizePix.setHeight( FRound( ( aSizePix.Width() = 512 ) / fWH ) ); } if( pVDev->SetOutputSizePixel( aSizePix ) ) @@ -273,7 +273,7 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow * m_pTbx1->SetSizePixel( aTbxSize ); m_pTbx1->SetSelectHdl( LINK( this, SvxSuperContourDlg, Tbx1ClickHdl ) ); - aPos.X() += aTbxSize.Width() + LogicToPixel( Size( 3, 0 ), MapMode( MapUnit::MapAppFont ) ).Width(); + aPos.AdjustX(aTbxSize.Width() + LogicToPixel( Size( 3, 0 ), MapMode( MapUnit::MapAppFont ) ).Width() ); m_pMtfTolerance->SetPosPixel( aPos ); m_pMtfTolerance->SetValue( 10 ); @@ -662,10 +662,10 @@ IMPL_LINK( SvxSuperContourDlg, PipetteHdl, ContourWindow&, rWnd, void ) m_pStbStatus->SetLineColor( rColor ); m_pStbStatus->SetFillColor( rColor ); - aRect.Left() += 4; - aRect.Top() += 4; - aRect.Right() -= 4; - aRect.Bottom() -= 4; + aRect.AdjustLeft(4 ); + aRect.AdjustTop(4 ); + aRect.AdjustRight( -4 ); + aRect.AdjustBottom( -4 ); m_pStbStatus->DrawRect( aRect ); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 9fc4f3f66a8b..bf18ee5f86d0 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -197,13 +197,13 @@ void SvxShowCharSet::MouseMove( const MouseEvent& rMEvt ) Size aSize = GetSizePixel(); if ( aPos.X() < 0 ) - aPos.X() = 0; + aPos.setX( 0 ); else if ( aPos.X() > aSize.Width()-5 ) - aPos.X() = aSize.Width()-5; + aPos.setX( aSize.Width()-5 ); if ( aPos.Y() < 0 ) - aPos.Y() = 0; + aPos.setY( 0 ); else if ( aPos.Y() > aSize.Height()-5 ) - aPos.Y() = aSize.Height()-5; + aPos.setY( aSize.Height()-5 ); int nIndex = PixelToMapIndex( aPos ); // Fire the focus event. @@ -545,22 +545,22 @@ tools::Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const S long nXDistFromLeft = x - m_nXGap; if (nXDistFromLeft <= 1) { - aPointUL.X() = 1; - aGridSize.Width() += m_nXGap + nXDistFromLeft; + aPointUL.setX( 1 ); + aGridSize.AdjustWidth(m_nXGap + nXDistFromLeft ); } long nXDistFromRight = rOutputSize.Width() - m_nXGap - nX - x; if (nXDistFromRight <= 1) - aGridSize.Width() += m_nXGap + nXDistFromRight; + aGridSize.AdjustWidth(m_nXGap + nXDistFromRight ); long nXDistFromTop = y - m_nYGap; if (nXDistFromTop <= 1) { - aPointUL.Y() = 1; - aGridSize.Height() += m_nYGap + nXDistFromTop; + aPointUL.setY( 1 ); + aGridSize.AdjustHeight(m_nYGap + nXDistFromTop ); } long nXDistFromBottom = rOutputSize.Height() - m_nYGap - nY - y; if (nXDistFromBottom <= 1) - aGridSize.Height() += m_nYGap + nXDistFromBottom; + aGridSize.AdjustHeight(m_nYGap + nXDistFromBottom ); return tools::Rectangle(aPointUL, aGridSize); } @@ -572,7 +572,7 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, Size aOutputSize(GetOutputSizePixel()); if (aVscrollSB->IsVisible()) - aOutputSize.Width() -= aVscrollSB->GetOptimalSize().Width(); + aOutputSize.AdjustWidth( -(aVscrollSB->GetOptimalSize().Width()) ); int i; for (i = 1; i < COLUMN_COUNT; ++i) @@ -615,7 +615,7 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, // zero advance width => use ink width to center glyph if (!nTextWidth) { - aPointTxTy.X() = x - aBoundRect.Left() + (nX - aBoundRect.GetWidth() + 1) / 2; + aPointTxTy.setX( x - aBoundRect.Left() + (nX - aBoundRect.GetWidth() + 1) / 2 ); } aBoundRect += aPointTxTy; @@ -624,17 +624,17 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, int nYLDelta = aBoundRect.Top() - y; int nYHDelta = (y + nY) - aBoundRect.Bottom(); if (nYLDelta <= 0) - aPointTxTy.Y() -= nYLDelta - 1; + aPointTxTy.AdjustY( -(nYLDelta - 1) ); else if (nYHDelta <= 0) - aPointTxTy.Y() += nYHDelta - 1; + aPointTxTy.AdjustY(nYHDelta - 1 ); // shift back horizontally if needed int nXLDelta = aBoundRect.Left() - x; int nXHDelta = (x + nX) - aBoundRect.Right(); if (nXLDelta <= 0) - aPointTxTy.X() -= nXLDelta - 1; + aPointTxTy.AdjustX( -(nXLDelta - 1) ); else if (nXHDelta <= 0) - aPointTxTy.X() += nXHDelta - 1; + aPointTxTy.AdjustX(nXHDelta - 1 ); } Color aTextCol = rRenderContext.GetTextColor(); @@ -733,7 +733,7 @@ void SvxShowCharSet::RecalculateFont(vcl::RenderContext& rRenderContext) Size aSize(GetOutputSizePixel()); long nSBWidth = aVscrollSB->GetOptimalSize().Width(); - aSize.Width() -= nSBWidth; + aSize.AdjustWidth( -nSBWidth ); vcl::Font aFont = rRenderContext.GetFont(); aFont.SetWeight(WEIGHT_LIGHT); diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index ae45e3ddf275..ca37e67be718 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -104,13 +104,13 @@ void SvxXConnectionPreview::AdaptSize() // Adapt bitmap to Thumb size (not here!) if ( fRectWH < fWinWH) { - aNewSize.Width() = static_cast<long>( static_cast<double>(nHeight) * fRectWH ); - aNewSize.Height()= nHeight; + aNewSize.setWidth( static_cast<long>( static_cast<double>(nHeight) * fRectWH ) ); + aNewSize.setHeight( nHeight ); } else { - aNewSize.Width() = nWidth; - aNewSize.Height()= static_cast<long>( static_cast<double>(nWidth) / fRectWH ); + aNewSize.setWidth( nWidth ); + aNewSize.setHeight( static_cast<long>( static_cast<double>(nWidth) / fRectWH ) ); } Fraction aFrac1( aWinSize.Width(), aRect.GetWidth() ); @@ -122,8 +122,8 @@ void SvxXConnectionPreview::AdaptSize() aDisplayMap.SetScaleY( aMinFrac ); // Centering - aNewPos.X() = ( nWidth - aNewSize.Width() ) >> 1; - aNewPos.Y() = ( nHeight - aNewSize.Height() ) >> 1; + aNewPos.setX( ( nWidth - aNewSize.Width() ) >> 1 ); + aNewPos.setY( ( nHeight - aNewSize.Height() ) >> 1 ); aDisplayMap.SetOrigin( LogicToLogic( aNewPos, aMapMode, aDisplayMap ) ); SetMapMode( aDisplayMap ); @@ -292,8 +292,8 @@ void SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt ) Point aPt( aMapMode.GetOrigin() ); long nX = static_cast<long>( ( static_cast<double>(aOutSize.Width()) - ( static_cast<double>(aOutSize.Width()) * static_cast<double>(*pMultFrac) ) ) / 2.0 + 0.5 ); long nY = static_cast<long>( ( static_cast<double>(aOutSize.Height()) - ( static_cast<double>(aOutSize.Height()) * static_cast<double>(*pMultFrac) ) ) / 2.0 + 0.5 ); - aPt.X() += nX; - aPt.Y() += nY; + aPt.AdjustX(nX ); + aPt.AdjustY(nY ); aMapMode.SetOrigin( aPt ); SetMapMode( aMapMode ); diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index bcaff23e30e0..4f9f14e88064 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -191,8 +191,8 @@ void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt) { GraphCtrl::MouseButtonUp( rMEvt ); - aWorkRect.Right() = aLogPt.X(); - aWorkRect.Bottom() = aLogPt.Y(); + aWorkRect.SetRight( aLogPt.X() ); + aWorkRect.SetBottom( aLogPt.Y() ); aWorkRect.Intersection( aGraphRect ); aWorkRect.Justify(); diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 2e3d8d802b8e..33a2d601e7b3 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -1023,20 +1023,20 @@ void SvxLightCtl3D::NewLayout() maLightControl->SetPosSizePixel(aPoint, aDestSize); // hor scrollbar - aPoint.Y() = aSize.Height() - nScrollSize; - aDestSize.Height() = nScrollSize; + aPoint.setY( aSize.Height() - nScrollSize ); + aDestSize.setHeight( nScrollSize ); maHorScroller->SetPosSizePixel(aPoint, aDestSize); // vert scrollbar - aPoint.X() = aSize.Width() - nScrollSize; - aPoint.Y() = 0; - aDestSize.Width() = nScrollSize; - aDestSize.Height() = aSize.Height() - nScrollSize; + aPoint.setX( aSize.Width() - nScrollSize ); + aPoint.setY( 0 ); + aDestSize.setWidth( nScrollSize ); + aDestSize.setHeight( aSize.Height() - nScrollSize ); maVerScroller->SetPosSizePixel(aPoint, aDestSize); // button - aPoint.Y() = aSize.Height() - nScrollSize; - aDestSize.Height() = nScrollSize; + aPoint.setY( aSize.Height() - nScrollSize ); + aDestSize.setHeight( nScrollSize ); maSwitcher->SetPosSizePixel(aPoint, aDestSize); } @@ -1197,8 +1197,8 @@ void SvxLightCtl3D::GetFocus() Size aFocusSize = maLightControl->GetOutputSizePixel(); - aFocusSize.Width() -= 4; - aFocusSize.Height() -= 4; + aFocusSize.AdjustWidth( -4 ); + aFocusSize.AdjustHeight( -4 ); tools::Rectangle aFocusRect( Point( 2, 2 ), aFocusSize ); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index b6eeafb7ed0f..129e19c0b25b 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -472,10 +472,10 @@ Point SvxRectCtl::SetActualRPWithoutInvalidate( RectPoint eNewRP ) aPtNew = GetPointFromRP( eNewRP ); if( m_nState & CTL_STATE::NOHORZ ) - aPtNew.X() = aPtMM.X(); + aPtNew.setX( aPtMM.X() ); if( m_nState & CTL_STATE::NOVERT ) - aPtNew.Y() = aPtMM.Y(); + aPtNew.setY( aPtMM.Y() ); // fdo#74751 this fix reverse base point on RTL UI. bool bRTL = AllSettings::GetLayoutRTL(); @@ -590,10 +590,10 @@ void SvxRectCtl::SetState( CTL_STATE nState ) Point _aPtNew( aPtLast ); if( m_nState & CTL_STATE::NOHORZ ) - _aPtNew.X() = aPtMM.X(); + _aPtNew.setX( aPtMM.X() ); if( m_nState & CTL_STATE::NOVERT) - _aPtNew.Y() = aPtMM.Y(); + _aPtNew.setY( aPtMM.Y() ); eRP = GetRPFromPoint( _aPtNew ); Invalidate(); @@ -688,8 +688,8 @@ Point SvxPixelCtl::IndexToPoint(long nIndex) const sal_Int32 nYIndex = nIndex / nLines; Point aPtTl; - aPtTl.Y() = aRectSize.Height() * nYIndex / nLines + 1; - aPtTl.X() = aRectSize.Width() * nXIndex / nLines + 1; + aPtTl.setY( aRectSize.Height() * nYIndex / nLines + 1 ); + aPtTl.setX( aRectSize.Width() * nXIndex / nLines + 1 ); return aPtTl; } @@ -812,13 +812,13 @@ void SvxPixelCtl::Paint( vcl::RenderContext& rRenderContext, const tools::Rectan for (i = 0; i < nLines; i++) { - aPtTl.Y() = aRectSize.Height() * i / nLines + 1; - aPtBr.Y() = aRectSize.Height() * (i + 1) / nLines - 1; + aPtTl.setY( aRectSize.Height() * i / nLines + 1 ); + aPtBr.setY( aRectSize.Height() * (i + 1) / nLines - 1 ); for (j = 0; j < nLines; j++) { - aPtTl.X() = aRectSize.Width() * j / nLines + 1; - aPtBr.X() = aRectSize.Width() * (j + 1) / nLines - 1; + aPtTl.setX( aRectSize.Width() * j / nLines + 1 ); + aPtBr.setX( aRectSize.Width() * (j + 1) / nLines - 1 ); if (maPixelData[i * nLines + j] != nLastPixel) { @@ -1554,8 +1554,8 @@ void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rec { const Size aOutputSize(GetOutputSize()); Point aPos = Point( aOutputSize.Width() / 3, aOutputSize.Height() / 2 ); - aPos.X() -= maSymbolSize.Width() / 2; - aPos.Y() -= maSymbolSize.Height() / 2; + aPos.AdjustX( -(maSymbolSize.Width() / 2) ); + aPos.AdjustY( -(maSymbolSize.Height() / 2) ); mpGraphic->Draw(&getBufferDevice(), aPos, maSymbolSize); } @@ -1632,8 +1632,8 @@ SvxXShadowPreview::SvxXShadowPreview( vcl::Window* pParent ) // prepare size Size aSize = GetOutputSize(); - aSize.Width() = aSize.Width() / 3; - aSize.Height() = aSize.Height() / 3; + aSize.setWidth( aSize.Width() / 3 ); + aSize.setHeight( aSize.Height() / 3 ); // create RectangleObject const tools::Rectangle aObjectSize( Point( aSize.Width(), aSize.Height() ), aSize ); @@ -1683,8 +1683,8 @@ void SvxXShadowPreview::Paint(vcl::RenderContext& rRenderContext, const tools::R // prepare size Size aSize = rRenderContext.GetOutputSize(); - aSize.Width() = aSize.Width() / 3; - aSize.Height() = aSize.Height() / 3; + aSize.setWidth( aSize.Width() / 3 ); + aSize.setHeight( aSize.Height() / 3 ); tools::Rectangle aObjectRect(Point(aSize.Width(), aSize.Height()), aSize); mpRectangleObject->SetSnapRect(aObjectRect); diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index baf6a20f4fe7..a943eb4565f3 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -795,8 +795,8 @@ void RecovDocListEntry::Paint(const Point& aPos, SvTreeListBox& aDevice, vcl::Re if (pTxt) { Point aPnt(aPos); - aPnt.X() += pList->m_aGreenCheckImg.GetSizePixel().Width(); - aPnt.X() += 10; + aPnt.AdjustX(pList->m_aGreenCheckImg.GetSizePixel().Width() ); + aPnt.AdjustX(10 ); rRenderContext.DrawText(aPnt, *pTxt); } } diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index df74bc29f474..b95ff217f943 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -99,8 +99,8 @@ void initFont(vcl::Font& rFont) void setFontSize(vcl::Font& rFont) { Size aSize(rFont.GetFontSize()); - aSize.Height() = (aSize.Height() * 3) / 5; - aSize.Width() = (aSize.Width() * 3) / 5; + aSize.setHeight( (aSize.Height() * 3) / 5 ); + aSize.setWidth( (aSize.Width() * 3) / 5 ); rFont.SetFontSize(aSize); } @@ -421,7 +421,7 @@ void FontPrevWin_Impl::DrawPrev(vcl::RenderContext& rRenderContext, Printer* _pP rFont.DrawPrev(&rRenderContext, _pPrinter, rPt, maText, nStart, nEnd - nStart); - rPt.X() += maTextWidth[nIdx++]; + rPt.AdjustX(maTextWidth[nIdx++] ); if (nEnd < maText.getLength() && nIdx < nCnt) { nStart = nEnd; diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index e795710ae31d..f0934c48dd7c 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -863,10 +863,10 @@ basegfx::B2DRange Array::GetCellRange( size_t nCol, size_t nRow, bool bExpandMer // GetColPosition/GetColWidth already. This might be // added due to GetColPosition/GetColWidth not working // correctly over PageChanges (if used), but not sure. - aRect.Left() -= rCell.mnAddLeft; - aRect.Right() += rCell.mnAddRight; - aRect.Top() -= rCell.mnAddTop; - aRect.Bottom() += rCell.mnAddBottom; + aRect.AdjustLeft( -(rCell.mnAddLeft) ); + aRect.AdjustRight(rCell.mnAddRight ); + aRect.AdjustTop( -(rCell.mnAddTop) ); + aRect.AdjustBottom(rCell.mnAddBottom ); } return basegfx::B2DRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom()); diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 272ca54652f4..30a856a2780a 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -216,17 +216,17 @@ void GraphCtrl::Resize() // Adapt Bitmap to Thumb size if ( fGrfWH < fWinWH) { - aNewSize.Width() = static_cast<long>( static_cast<double>(nHeight) * fGrfWH ); - aNewSize.Height()= nHeight; + aNewSize.setWidth( static_cast<long>( static_cast<double>(nHeight) * fGrfWH ) ); + aNewSize.setHeight( nHeight ); } else { - aNewSize.Width() = nWidth; - aNewSize.Height()= static_cast<long>( static_cast<double>(nWidth) / fGrfWH ); + aNewSize.setWidth( nWidth ); + aNewSize.setHeight( static_cast<long>( static_cast<double>(nWidth) / fGrfWH ) ); } - aNewPos.X() = ( nWidth - aNewSize.Width() ) >> 1; - aNewPos.Y() = ( nHeight - aNewSize.Height() ) >> 1; + aNewPos.setX( ( nWidth - aNewSize.Width() ) >> 1 ); + aNewPos.setY( ( nHeight - aNewSize.Height() ) >> 1 ); // Implementing MapMode for Engine aDisplayMap.SetScaleX( Fraction( aNewSize.Width(), aGraphSize.Width() ) ); diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index cba21b4ac2c5..392e98473ffd 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -301,7 +301,7 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet ) long nH = GetCoreValue( *m_pHeightEdit, eUnit ); nH += nDist; // add distance - aSize.Height() = nH; + aSize.setHeight( nH ); aSizeItem.SetSize( aSize ); aSet.Put( aSizeItem ); @@ -1101,7 +1101,7 @@ void SvxHFPage::RangeHdl() static void lcl_Move(vcl::Window& rWin, sal_Int32 nDiff) { Point aPos(rWin.GetPosPixel()); - aPos.Y() -= nDiff; + aPos.AdjustY( -nDiff ); rWin.SetPosPixel(aPos); } diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 693df0354491..392467718611 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -743,8 +743,8 @@ void IMapWindow::CreateDefaultObject() Size aPageSize = pPageView->GetPage()->GetSize(); sal_uInt32 nDefaultObjectSizeWidth = aPageSize.Width() / 4; sal_uInt32 nDefaultObjectSizeHeight = aPageSize.Height() / 4; - aPagePos.X() += (aPageSize.Width() / 2) - (nDefaultObjectSizeWidth / 2); - aPagePos.Y() += (aPageSize.Height() / 2) - (nDefaultObjectSizeHeight / 2); + aPagePos.AdjustX((aPageSize.Width() / 2) - (nDefaultObjectSizeWidth / 2) ); + aPagePos.AdjustY((aPageSize.Height() / 2) - (nDefaultObjectSizeHeight / 2) ); tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight)); SdrObject* pObj = SdrObjFactory::MakeNewObject( pView->GetCurrentObjInventor(), pView->GetCurrentObjIdentifier(), nullptr, pModel); diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 0e58188714d7..ddca770b766d 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -143,8 +143,8 @@ void SvxXMeasurePreview::MouseButtonDown(const MouseEvent& rMEvt) Point aPt(aMapMode.GetOrigin()); long nX = long((double(aOutSize.Width()) - (double(aOutSize.Width()) * double(*pMultFrac))) / 2.0 + 0.5); long nY = long((double(aOutSize.Height()) - (double(aOutSize.Height()) * double(*pMultFrac))) / 2.0 + 0.5); - aPt.X() += nX; - aPt.Y() += nY; + aPt.AdjustX(nX ); + aPt.AdjustY(nY ); aMapMode.SetOrigin(aPt); SetMapMode(aMapMode); diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index a6153e93a0e5..a4ae5bb1f47c 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -74,8 +74,8 @@ SvxPageWindow::SvxPageWindow(vcl::Window* pParent) // Count in Twips by default SetMapMode(MapMode(MapUnit::MapTwip)); aWinSize = GetOptimalSize(); - aWinSize.Height() -= 4; - aWinSize.Width() -= 4; + aWinSize.AdjustHeight( -4 ); + aWinSize.AdjustWidth( -4 ); aWinSize = PixelToLogic(aWinSize); SetBackground(); @@ -187,10 +187,10 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO tools::Rectangle aRect; - aRect.Left() = rOrg.X() + nL; - aRect.Right() = rOrg.X() + aTempSize.Width() - nR; - aRect.Top() = rOrg.Y() + nTop; - aRect.Bottom() = rOrg.Y() + aTempSize.Height() - nBottom; + aRect.SetLeft( rOrg.X() + nL ); + aRect.SetRight( rOrg.X() + aTempSize.Width() - nR ); + aRect.SetTop( rOrg.Y() + nTop ); + aRect.SetBottom( rOrg.Y() + aTempSize.Height() - nBottom ); tools::Rectangle aHdRect(aRect); tools::Rectangle aFtRect(aRect); @@ -208,10 +208,10 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO if (bHeader) { // show headers if possible - aHdRect.Left() += nHdLeft; - aHdRect.Right() -= nHdRight; - aHdRect.Bottom() = aRect.Top() + nHdHeight; - aRect.Top() += nHdHeight + nHdDist; + aHdRect.AdjustLeft(nHdLeft ); + aHdRect.AdjustRight( -(nHdRight) ); + aHdRect.SetBottom( aRect.Top() + nHdHeight ); + aRect.AdjustTop(nHdHeight + nHdDist ); // draw header over PageFill, plus outline drawFillAttributes(rRenderContext, maHeaderFillAttributes, aHdRect, aHdRect); @@ -220,10 +220,10 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO if (bFooter) { // show footer if possible - aFtRect.Left() += nFtLeft; - aFtRect.Right() -= nFtRight; - aFtRect.Top() = aRect.Bottom() - nFtHeight; - aRect.Bottom() -= nFtHeight + nFtDist; + aFtRect.AdjustLeft(nFtLeft ); + aFtRect.AdjustRight( -(nFtRight) ); + aFtRect.SetTop( aRect.Bottom() - nFtHeight ); + aRect.AdjustBottom( -(nFtHeight + nFtDist) ); // draw footer over PageFill, plus outline drawFillAttributes(rRenderContext, maFooterFillAttributes, aFtRect, aFtRect); @@ -254,26 +254,26 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO { case SvxFrameDirection::Horizontal_LR_TB: aPos = aRect.TopLeft(); - aPos.X() += PixelToLogic(Point(1,1)).X(); - aMove.Y() = 0; + aPos.AdjustX(PixelToLogic(Point(1,1)).X() ); + aMove.setY( 0 ); cArrow = 0x2192; break; case SvxFrameDirection::Horizontal_RL_TB: aPos = aRect.TopRight(); - aPos.X() -= nAWidth; - aMove.Y() = 0; - aMove.X() *= -1; + aPos.AdjustX( -nAWidth ); + aMove.setY( 0 ); + aMove.setX( aMove.X() * -1 ); cArrow = 0x2190; break; case SvxFrameDirection::Vertical_LR_TB: aPos = aRect.TopLeft(); - aPos.X() += rRenderContext.PixelToLogic(Point(1,1)).X(); - aMove.X() = 0; + aPos.AdjustX(rRenderContext.PixelToLogic(Point(1,1)).X() ); + aMove.setX( 0 ); break; case SvxFrameDirection::Vertical_RL_TB: aPos = aRect.TopRight(); - aPos.X() -= nAWidth; - aMove.X() = 0; + aPos.AdjustX( -nAWidth ); + aMove.setX( 0 ); break; default: break; } @@ -287,17 +287,17 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO if (!bHorizontal) { nHDiff = (nAWidth - nCharWidth) / 2; - aPos.X() += nHDiff; + aPos.AdjustX(nHDiff ); } rRenderContext.DrawText(aPos,sDraw); if (bHorizontal) { - aPos.X() += aMove.X() < 0 ? -nCharWidth : nCharWidth; + aPos.AdjustX(aMove.X() < 0 ? -nCharWidth : nCharWidth ); } else { - aPos.X() -= nHDiff; - aPos.Y() += aMove.Y(); + aPos.AdjustX( -nHDiff ); + aPos.AdjustY(aMove.Y() ); } } aFont.SetFontSize(aSaveSize); @@ -319,8 +319,8 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO for (sal_uInt16 i = 0; i < 3; ++i) { - aCellRect.Left() = _nLeft; - aCellRect.Right() = _nLeft + CELL_WIDTH; + aCellRect.SetLeft( _nLeft ); + aCellRect.SetRight( _nLeft + CELL_WIDTH ); if(i > 0) aCellRect.Move(0,CELL_HEIGHT); diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx index a0e36c087d25..82dfbf67f0d7 100644 --- a/svx/source/dialog/paraprev.cxx +++ b/svx/source/dialog/paraprev.cxx @@ -61,8 +61,8 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) aWinSize = rRenderContext.PixelToLogic(aWinSize); Size aTmp(1, 1); aTmp = PixelToLogic(aTmp); - aWinSize.Width() -= aTmp.Width() /2; - aWinSize.Height() -= aTmp.Height() /2; + aWinSize.AdjustWidth( -(aTmp.Width() /2) ); + aWinSize.AdjustHeight( -(aTmp.Height() /2) ); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); const Color& rWinColor = rStyleSettings.GetWindowColor(); @@ -77,7 +77,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) Size aLineSiz(aWinSize.Width() - DEF_MARGIN, nH); Size aSiz = aLineSiz; Point aPnt; - aPnt.X() = DEF_MARGIN / 2; + aPnt.setX( DEF_MARGIN / 2 ); rRenderContext.SetFillColor(aGrayColor); for (sal_uInt16 i = 0; i < 9; ++i) @@ -86,7 +86,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) { rRenderContext.SetFillColor(Color(COL_GRAY)); long nTop = nUpper * aLineSiz.Height() / aSize.Height(); - aPnt.Y() += nTop * 2; + aPnt.AdjustY(nTop * 2 ); } if (i == 6 ) @@ -100,16 +100,16 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) if (i == 3) { - aPnt.X() += nTmp; - aSiz.Width() -= nTmp; + aPnt.AdjustX(nTmp ); + aSiz.AdjustWidth( -nTmp ); } else { - aPnt.X() += nLeft; - aSiz.Width() -= nLeft; + aPnt.AdjustX(nLeft ); + aSiz.AdjustWidth( -nLeft ); } long nRight = nRightMargin * aLineSiz.Width() / aSize.Width(); - aSiz.Width() -= nRight; + aSiz.AdjustWidth( -nRight ); } if (4 == i || 5 == i || 6 == i) @@ -119,13 +119,13 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) case SvxPrevLineSpace::N1: break; case SvxPrevLineSpace::N115: - aPnt.Y() += nH / 6.67; // 1/.15 = 6.(6) + aPnt.AdjustY(nH / 6.67 ); // 1/.15 = 6.(6) break; case SvxPrevLineSpace::N15: - aPnt.Y() += nH / 2; + aPnt.AdjustY(nH / 2 ); break; case SvxPrevLineSpace::N2: - aPnt.Y() += nH; + aPnt.AdjustY(nH ); break; case SvxPrevLineSpace::Prop: case SvxPrevLineSpace::Min: @@ -134,7 +134,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) } } - aPnt.Y() += nH; + aPnt.AdjustY(nH ); if (3 <= i && 5 >= i) { @@ -160,10 +160,10 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) case SvxAdjust::Left: break; case SvxAdjust::Right: - aPnt.X() += ( aSiz.Width() - nLW ); + aPnt.AdjustX( aSiz.Width() - nLW ); break; case SvxAdjust::Center: - aPnt.X() += ( aSiz.Width() - nLW ) / 2; + aPnt.AdjustX(( aSiz.Width() - nLW ) / 2 ); break; default: ; //prevent warning } @@ -176,10 +176,10 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) case SvxAdjust::Left: break; case SvxAdjust::Right: - aPnt.X() += ( aSiz.Width() - nLW ); + aPnt.AdjustX( aSiz.Width() - nLW ); break; case SvxAdjust::Center: - aPnt.X() += ( aSiz.Width() - nLW ) / 2; + aPnt.AdjustX(( aSiz.Width() - nLW ) / 2 ); break; case SvxAdjust::Block: nLW = aSiz.Width(); @@ -190,7 +190,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) else nLW = aSiz.Width(); } - aSiz.Width() = nLW; + aSiz.setWidth( nLW ); } tools::Rectangle aRect(aPnt, aSiz); @@ -201,12 +201,12 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext) if (5 == i) { long nBottom = nLower * aLineSiz.Height() / aSize.Height(); - aPnt.Y() += nBottom * 2; + aPnt.AdjustY(nBottom * 2 ); } - aPnt.Y() += nH; + aPnt.AdjustY(nH ); // Reset, recalculate for each line - aPnt.X() = DEF_MARGIN / 2; + aPnt.setX( DEF_MARGIN / 2 ); aSiz = aLineSiz; } } diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index a8e373d7d516..01d07b773d68 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -323,8 +323,8 @@ bool SvxPagePosSizeItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberI css::awt::Rectangle aPagePosSize; if ( rVal >>= aPagePosSize ) { - aPos.X() = aPagePosSize.X; - aPos.Y() = aPagePosSize.Y; + aPos.setX( aPagePosSize.X ); + aPos.setY( aPagePosSize.Y ); lWidth = aPagePosSize.Width; lHeight = aPagePosSize.Height; return true; @@ -336,8 +336,8 @@ bool SvxPagePosSizeItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberI { switch ( nMemberId ) { - case MID_X: aPos.X() = nVal; break; - case MID_Y: aPos.Y() = nVal; break; + case MID_X: aPos.setX( nVal ); break; + case MID_Y: aPos.setY( nVal ); break; case MID_WIDTH: lWidth = nVal; break; case MID_HEIGHT: lHeight = nVal; break; diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx index db6f4e37bbcd..9ede4272cf8f 100644 --- a/svx/source/dialog/searchcharmap.cxx +++ b/svx/source/dialog/searchcharmap.cxx @@ -174,7 +174,7 @@ void SvxSearchCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1 Size aOutputSize(GetOutputSizePixel()); if (aVscrollSB->IsVisible()) - aOutputSize.Width() -= aVscrollSB->GetOptimalSize().Width(); + aOutputSize.AdjustWidth( -(aVscrollSB->GetOptimalSize().Width()) ); int i; for (i = 1; i < COLUMN_COUNT; ++i) @@ -225,7 +225,7 @@ void SvxSearchCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1 // zero advance width => use ink width to center glyph if (!nTextWidth) { - aPointTxTy.X() = x - aBoundRect.Left() + (nX - aBoundRect.GetWidth() + 1) / 2; + aPointTxTy.setX( x - aBoundRect.Left() + (nX - aBoundRect.GetWidth() + 1) / 2 ); } aBoundRect += aPointTxTy; @@ -234,17 +234,17 @@ void SvxSearchCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1 int nYLDelta = aBoundRect.Top() - y; int nYHDelta = (y + nY) - aBoundRect.Bottom(); if (nYLDelta <= 0) - aPointTxTy.Y() -= nYLDelta - 1; + aPointTxTy.AdjustY( -(nYLDelta - 1) ); else if (nYHDelta <= 0) - aPointTxTy.Y() += nYHDelta - 1; + aPointTxTy.AdjustY(nYHDelta - 1 ); // shift back horizontally if needed int nXLDelta = aBoundRect.Left() - x; int nXHDelta = (x + nX) - aBoundRect.Right(); if (nXLDelta <= 0) - aPointTxTy.X() -= nXLDelta - 1; + aPointTxTy.AdjustX( -(nXLDelta - 1) ); else if (nXHDelta <= 0) - aPointTxTy.X() += nXHDelta - 1; + aPointTxTy.AdjustX(nXHDelta - 1 ); } Color aTextCol = rRenderContext.GetTextColor(); @@ -310,7 +310,7 @@ void SvxSearchCharSet::RecalculateFont(vcl::RenderContext& rRenderContext) Size aSize(GetOutputSizePixel()); long nSBWidth = aVscrollSB->GetOptimalSize().Width(); - aSize.Width() -= nSBWidth; + aSize.AdjustWidth( -nSBWidth ); vcl::Font aFont = rRenderContext.GetFont(); aFont.SetWeight(WEIGHT_LIGHT); diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index e03d181fdf8b..ec7df547a0dd 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -103,13 +103,13 @@ static void lcl_PaintLevel(OutputDevice* pVDev, sal_Int16 nNumberingType, rRuleFont.SetStyleName(rFontName); pVDev->SetFont(rRuleFont); pVDev->DrawText(rLeft, rBulletChar); - rLeft.X() += pVDev->GetTextWidth(rBulletChar); + rLeft.AdjustX(pVDev->GetTextWidth(rBulletChar) ); } else { pVDev->SetFont(rTextFont); pVDev->DrawText(rLeft, rText); - rLeft.X() += pVDev->GetTextWidth(rText); + rLeft.AdjustX(pVDev->GetTextWidth(rText) ); } } void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) @@ -148,7 +148,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) Size aSize = aFont.GetFontSize(); vcl::Font aRuleFont( lcl_GetDefaultBulletFont() ); - aSize.Height() = nRectHeight/6; + aSize.setHeight( nRectHeight/6 ); aRuleFont.SetFontSize(aSize); aRuleFont.SetColor(aTextColor); aRuleFont.SetFillColor(aBackColor); @@ -156,7 +156,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) aFont = aRuleFont; else if(ePageType == NumberingPageType::OUTLINE) { - aSize.Height() = nRectHeight/8; + aSize.setHeight( nRectHeight/8 ); } aFont.SetColor(aTextColor); aFont.SetFillColor(aBackColor); @@ -200,13 +200,13 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) for( sal_uInt16 i = 0; i < 3; i++ ) { sal_uInt16 nY = 11 + i * 33; - aStart.Y() = aBLPos.Y() + nRectHeight * nY / 100; + aStart.setY( aBLPos.Y() + nRectHeight * nY / 100 ); OUString sText; if(ePageType == NumberingPageType::BULLET) { sText = OUString( aBulletTypes[nItemId - 1] ); - aStart.Y() -= pDev->GetTextHeight()/2; - aStart.X() = aBLPos.X() + 5; + aStart.AdjustY( -(pDev->GetTextHeight()/2) ); + aStart.setX( aBLPos.X() + 5 ); } else { @@ -227,8 +227,8 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } } // start just next to the left edge - aStart.X() = aBLPos.X() + 2; - aStart.Y() -= pDev->GetTextHeight()/2; + aStart.setX( aBLPos.X() + 2 ); + aStart.AdjustY( -(pDev->GetTextHeight()/2) ); } pDev->DrawText(aStart, sText); } @@ -300,13 +300,13 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) OSL_FAIL("Exception in DefaultNumberingProvider::makeNumberingString"); } - aLeft.Y() -= (pDev->GetTextHeight()/2); + aLeft.AdjustY( -(pDev->GetTextHeight()/2) ); if(!sPrefixes[i].isEmpty() && sPrefixes[i] != " ") { pVDev->SetFont(aFont); pVDev->DrawText(aLeft, sPrefixes[i]); - aLeft.X() += pDev->GetTextWidth(sPrefixes[i]); + aLeft.AdjustX(pDev->GetTextWidth(sPrefixes[i]) ); } if(aParentNumberings[i]) { @@ -339,7 +339,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { pVDev->SetFont(aFont); pVDev->DrawText(aLeft, sSuffixes[i]); - aLeft.X() += pDev->GetTextWidth(sSuffixes[i]); + aLeft.AdjustX(pDev->GetTextWidth(sSuffixes[i]) ); } long nLineTop = nStartY + nRectHeight * aLinesArr[2 * i + 1]/100 ; @@ -542,7 +542,7 @@ void SvxBmpNumValueSet::UserDraw(const UserDrawEvent& rUDEvt) for( sal_uInt16 i = 0; i < 3; i++ ) { sal_uInt16 nY = 11 + i * 33; - aPos.Y() = aBLPos.Y() + nRectHeight * nY / 100; + aPos.setY( aBLPos.Y() + nRectHeight * nY / 100 ); aGraphic.Draw( pDev, aPos, aSize ); } } diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 28464f64f47a..1e621f420636 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -144,8 +144,8 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) // A line of text aTextLine = aPagePrtArea; aTextLine.SetSize(Size(aTextLine.GetWidth(), 2)); - aTextLine.Left() += nLTxtBorder; - aTextLine.Right() -= nRTxtBorder; + aTextLine.AdjustLeft(nLTxtBorder ); + aTextLine.AdjustRight( -sal_Int32(nRTxtBorder) ); aTextLine.Move(0, nTTxtBorder); // Rectangle to edges including paragraph @@ -157,10 +157,10 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) // Rectangle around paragraph without borders aParaPrtArea = aPara; - aParaPrtArea.Left() += nLTxtBorder; - aParaPrtArea.Right() -= nRTxtBorder; - aParaPrtArea.Top() += nTTxtBorder; - aParaPrtArea.Bottom() -= nBTxtBorder; + aParaPrtArea.AdjustLeft(nLTxtBorder ); + aParaPrtArea.AdjustRight( -sal_Int32(nRTxtBorder) ); + aParaPrtArea.AdjustTop(nTTxtBorder ); + aParaPrtArea.AdjustBottom( -sal_Int32(nBTxtBorder) ); if (nAnchor == RndStdIds::FLY_AS_CHAR || nAnchor == RndStdIds::FLY_AT_CHAR) { @@ -189,9 +189,9 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) // Inner Frame anchored at the Frame aFrameAtFrame = aPara; - aFrameAtFrame.Left() += 9; - aFrameAtFrame.Right() -= 5; - aFrameAtFrame.Bottom() += 5; + aFrameAtFrame.AdjustLeft(9 ); + aFrameAtFrame.AdjustRight( -5 ); + aFrameAtFrame.AdjustBottom(5 ); aFrameAtFrame.SetPos(Point(aFrameAtFrame.Left() + 2, (aPagePrtArea.Bottom() - aFrameAtFrame.GetHeight()) / 2 + 5)); // Size of the frame to be positioned @@ -216,8 +216,8 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) aFrmSize = Size(nLBorder - 3, (aTextLine.GetHeight() + 2) * 3); break; } - aFrmSize.Width() = std::max(5L, aFrmSize.Width()); - aFrmSize.Height() = std::max(5L, aFrmSize.Height()); + aFrmSize.setWidth( std::max(5L, aFrmSize.Width()) ); + aFrmSize.setHeight( std::max(5L, aFrmSize.Height()) ); } else { @@ -226,7 +226,7 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) aFrmSize = Size(nFreeWidth / 2, (aTextLine.GetHeight() + 2) * 3); aDrawObj.SetSize(Size(std::max(5L, static_cast<long>(nFreeWidth) / 3L), std::max(5L, aFrmSize.Height() * 3L))); aDrawObj.SetPos(Point(aParaPrtArea.Right() + 1, aParaPrtArea.Bottom() / 2)); - aParaPrtArea.Right() = aDrawObj.Right(); + aParaPrtArea.SetRight( aDrawObj.Right() ); } } @@ -240,24 +240,24 @@ void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) { case RelOrientation::FRAME: case RelOrientation::PAGE_FRAME: - rRect.Left() = aPage.Left(); - rRect.Right() = aPage.Right(); + rRect.SetLeft( aPage.Left() ); + rRect.SetRight( aPage.Right() ); break; case RelOrientation::PRINT_AREA: case RelOrientation::PAGE_PRINT_AREA: - rRect.Left() = aPagePrtArea.Left(); - rRect.Right() = aPagePrtArea.Right(); + rRect.SetLeft( aPagePrtArea.Left() ); + rRect.SetRight( aPagePrtArea.Right() ); break; case RelOrientation::PAGE_LEFT: - rRect.Left() = aPage.Left(); - rRect.Right() = aPagePrtArea.Left(); + rRect.SetLeft( aPage.Left() ); + rRect.SetRight( aPagePrtArea.Left() ); break; case RelOrientation::PAGE_RIGHT: - rRect.Left() = aPagePrtArea.Right(); - rRect.Right() = aPage.Right(); + rRect.SetLeft( aPagePrtArea.Right() ); + rRect.SetRight( aPage.Right() ); break; } @@ -265,14 +265,14 @@ void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) { case RelOrientation::PRINT_AREA: case RelOrientation::PAGE_PRINT_AREA: - rRect.Top() = aPagePrtArea.Top(); - rRect.Bottom() = aPagePrtArea.Bottom(); + rRect.SetTop( aPagePrtArea.Top() ); + rRect.SetBottom( aPagePrtArea.Bottom() ); break; case RelOrientation::FRAME: case RelOrientation::PAGE_FRAME: - rRect.Top() = aPage.Top(); - rRect.Bottom() = aPage.Bottom(); + rRect.SetTop( aPage.Top() ); + rRect.SetBottom( aPage.Bottom() ); break; } } @@ -284,24 +284,24 @@ void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) { case RelOrientation::FRAME: case RelOrientation::PAGE_FRAME: - rRect.Left() = aFrameAtFrame.Left(); - rRect.Right() = aFrameAtFrame.Right(); + rRect.SetLeft( aFrameAtFrame.Left() ); + rRect.SetRight( aFrameAtFrame.Right() ); break; case RelOrientation::PRINT_AREA: case RelOrientation::PAGE_PRINT_AREA: - rRect.Left() = aFrameAtFrame.Left() + FLYINFLY_BORDER; - rRect.Right() = aFrameAtFrame.Right() - FLYINFLY_BORDER; + rRect.SetLeft( aFrameAtFrame.Left() + FLYINFLY_BORDER ); + rRect.SetRight( aFrameAtFrame.Right() - FLYINFLY_BORDER ); break; case RelOrientation::PAGE_RIGHT: - rRect.Left() = aFrameAtFrame.Left(); - rRect.Right() = aFrameAtFrame.Left() + FLYINFLY_BORDER; + rRect.SetLeft( aFrameAtFrame.Left() ); + rRect.SetRight( aFrameAtFrame.Left() + FLYINFLY_BORDER ); break; case RelOrientation::PAGE_LEFT: - rRect.Left() = aFrameAtFrame.Right(); - rRect.Right() = aFrameAtFrame.Right() - FLYINFLY_BORDER; + rRect.SetLeft( aFrameAtFrame.Right() ); + rRect.SetRight( aFrameAtFrame.Right() - FLYINFLY_BORDER ); break; } @@ -309,14 +309,14 @@ void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) { case RelOrientation::FRAME: case RelOrientation::PAGE_FRAME: - rRect.Top() = aFrameAtFrame.Top(); - rRect.Bottom() = aFrameAtFrame.Bottom(); + rRect.SetTop( aFrameAtFrame.Top() ); + rRect.SetBottom( aFrameAtFrame.Bottom() ); break; case RelOrientation::PRINT_AREA: case RelOrientation::PAGE_PRINT_AREA: - rRect.Top() = aFrameAtFrame.Top() + FLYINFLY_BORDER; - rRect.Bottom() = aFrameAtFrame.Bottom() - FLYINFLY_BORDER; + rRect.SetTop( aFrameAtFrame.Top() + FLYINFLY_BORDER ); + rRect.SetBottom( aFrameAtFrame.Bottom() - FLYINFLY_BORDER ); break; } } @@ -327,83 +327,83 @@ void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) switch (nHRel) { case RelOrientation::FRAME: - rRect.Left() = aPara.Left(); - rRect.Right() = aPara.Right(); + rRect.SetLeft( aPara.Left() ); + rRect.SetRight( aPara.Right() ); break; case RelOrientation::PRINT_AREA: - rRect.Left() = aParaPrtArea.Left(); - rRect.Right() = aParaPrtArea.Right(); + rRect.SetLeft( aParaPrtArea.Left() ); + rRect.SetRight( aParaPrtArea.Right() ); break; case RelOrientation::PAGE_LEFT: - rRect.Left() = aPage.Left(); - rRect.Right() = aPagePrtArea.Left(); + rRect.SetLeft( aPage.Left() ); + rRect.SetRight( aPagePrtArea.Left() ); break; case RelOrientation::PAGE_RIGHT: - rRect.Left() = aPagePrtArea.Right(); - rRect.Right() = aPage.Right(); + rRect.SetLeft( aPagePrtArea.Right() ); + rRect.SetRight( aPage.Right() ); break; case RelOrientation::PAGE_FRAME: - rRect.Left() = aPage.Left(); - rRect.Right() = aPage.Right(); + rRect.SetLeft( aPage.Left() ); + rRect.SetRight( aPage.Right() ); break; case RelOrientation::PAGE_PRINT_AREA: - rRect.Left() = aPagePrtArea.Left(); - rRect.Right() = aPagePrtArea.Right(); + rRect.SetLeft( aPagePrtArea.Left() ); + rRect.SetRight( aPagePrtArea.Right() ); break; case RelOrientation::FRAME_LEFT: - rRect.Left() = aPara.Left(); - rRect.Right() = aParaPrtArea.Left(); + rRect.SetLeft( aPara.Left() ); + rRect.SetRight( aParaPrtArea.Left() ); break; case RelOrientation::FRAME_RIGHT: - rRect.Left() = aParaPrtArea.Right(); - rRect.Right() = aPara.Right(); + rRect.SetLeft( aParaPrtArea.Right() ); + rRect.SetRight( aPara.Right() ); break; case RelOrientation::CHAR: - rRect.Left() = aAutoCharFrame.Left(); - rRect.Right() = aAutoCharFrame.Left(); + rRect.SetLeft( aAutoCharFrame.Left() ); + rRect.SetRight( aAutoCharFrame.Left() ); break; } switch (nVRel) { case RelOrientation::FRAME: - rRect.Top() = aPara.Top(); - rRect.Bottom() = aPara.Bottom(); + rRect.SetTop( aPara.Top() ); + rRect.SetBottom( aPara.Bottom() ); break; case RelOrientation::PRINT_AREA: - rRect.Top() = aParaPrtArea.Top(); - rRect.Bottom() = aParaPrtArea.Bottom(); + rRect.SetTop( aParaPrtArea.Top() ); + rRect.SetBottom( aParaPrtArea.Bottom() ); break; case RelOrientation::CHAR: if (nVAlign != VertOrientation::NONE && nVAlign != VertOrientation::CHAR_BOTTOM) - rRect.Top() = aAutoCharFrame.Top(); + rRect.SetTop( aAutoCharFrame.Top() ); else - rRect.Top() = aAutoCharFrame.Bottom(); - rRect.Bottom() = aAutoCharFrame.Bottom(); + rRect.SetTop( aAutoCharFrame.Bottom() ); + rRect.SetBottom( aAutoCharFrame.Bottom() ); break; // OD 12.11.2003 #i22341# case RelOrientation::TEXT_LINE: - rRect.Top() = aAutoCharFrame.Top(); - rRect.Bottom() = aAutoCharFrame.Top(); + rRect.SetTop( aAutoCharFrame.Top() ); + rRect.SetBottom( aAutoCharFrame.Top() ); break; } } break; case RndStdIds::FLY_AS_CHAR: - rRect.Left() = aParaPrtArea.Left(); - rRect.Right() = aParaPrtArea.Right(); + rRect.SetLeft( aParaPrtArea.Left() ); + rRect.SetRight( aParaPrtArea.Right() ); switch (nVAlign) { @@ -414,8 +414,8 @@ void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) { FontMetric aMetric(GetFontMetric()); - rRect.Top() = aParaPrtArea.Bottom() - aMetric.GetDescent(); - rRect.Bottom() = rRect.Top(); + rRect.SetTop( aParaPrtArea.Bottom() - aMetric.GetDescent() ); + rRect.SetBottom( rRect.Top() ); } break; @@ -424,15 +424,15 @@ void SvxSwFrameExample::CalcBoundRect_Impl(tools::Rectangle &rRect) case VertOrientation::LINE_TOP: case VertOrientation::LINE_CENTER: case VertOrientation::LINE_BOTTOM: - rRect.Top() = aParaPrtArea.Top(); - rRect.Bottom() = aDrawObj.Bottom(); + rRect.SetTop( aParaPrtArea.Top() ); + rRect.SetBottom( aDrawObj.Bottom() ); break; case VertOrientation::CHAR_TOP: case VertOrientation::CHAR_CENTER: case VertOrientation::CHAR_BOTTOM: - rRect.Top() = aParaPrtArea.Top(); - rRect.Bottom() = aParaPrtArea.Bottom(); + rRect.SetTop( aParaPrtArea.Top() ); + rRect.SetBottom( aParaPrtArea.Bottom() ); break; } break; @@ -613,10 +613,10 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::R if (nAnchor == RndStdIds::FLY_AT_FLY) { - aTxt.Left() = aFrameAtFrame.Left() + FLYINFLY_BORDER; - aTxt.Right() = aFrameAtFrame.Right() - FLYINFLY_BORDER; - aTxt.Top() = aFrameAtFrame.Top() + FLYINFLY_BORDER; - aTxt.Bottom() = aTxt.Top() + aTextLine.GetHeight() - 1; + aTxt.SetLeft( aFrameAtFrame.Left() + FLYINFLY_BORDER ); + aTxt.SetRight( aFrameAtFrame.Right() - FLYINFLY_BORDER ); + aTxt.SetTop( aFrameAtFrame.Top() + FLYINFLY_BORDER ); + aTxt.SetBottom( aTxt.Top() + aTextLine.GetHeight() - 1 ); nStep = aTxt.GetHeight() + 2; nLines = static_cast<sal_uInt16>(((aFrameAtFrame.GetHeight() - 2 * FLYINFLY_BORDER) * 2 / 3) @@ -649,16 +649,16 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::R switch(nWrap) { case WrapTextMode_NONE: - aTxt.Top() = aFrmRect.Bottom() + nTxtLineHeight; - aTxt.Bottom() = aTxt.Top() + nTxtLineHeight - 1; + aTxt.SetTop( aFrmRect.Bottom() + nTxtLineHeight ); + aTxt.SetBottom( aTxt.Top() + nTxtLineHeight - 1 ); break; case WrapTextMode_LEFT: - aTxt.Right() = aFrmRect.Left(); + aTxt.SetRight( aFrmRect.Left() ); break; case WrapTextMode_RIGHT: - aTxt.Left() = aFrmRect.Right(); + aTxt.SetLeft( aFrmRect.Right() ); break; default: break; } @@ -667,22 +667,22 @@ void SvxSwFrameExample::Paint(vcl::RenderContext& rRenderContext, const tools::R DrawRect_Impl(rRenderContext, aTxt, m_aTxtCol, m_aTransColor ); aTxt.Move(0, nStep); - aTxt.Right() = nOldR; - aTxt.Left() = nOldL; + aTxt.SetRight( nOldR ); + aTxt.SetLeft( nOldL ); } aTxt.Move(0, -nStep); if (nAnchor != RndStdIds::FLY_AT_FLY && aTxt.Bottom() > aParaPrtArea.Bottom()) { // Text has been replaced by frame, so adjust parameters height - sal_uInt32 nDiff = aTxt.Bottom() - aParaPrtArea.Bottom(); - aParaPrtArea.Bottom() += nDiff; - aPara.Bottom() += nDiff; + sal_Int32 nDiff = aTxt.Bottom() - aParaPrtArea.Bottom(); + aParaPrtArea.AdjustBottom(nDiff ); + aPara.AdjustBottom(nDiff ); CalcBoundRect_Impl(aRect); - aParaPrtArea.Bottom() -= nDiff; - aPara.Bottom() -= nDiff; + aParaPrtArea.AdjustBottom( -nDiff ); + aPara.AdjustBottom( -nDiff ); } if (nAnchor == RndStdIds::FLY_AT_CHAR && bIgnoreWrap) rRenderContext.DrawText(aAutoCharFrame, OUString('A')); @@ -706,14 +706,14 @@ void SvxSwFrameExample::SetRelPos(const Point& rP) aRelPos = rP; if (aRelPos.X() > 0) - aRelPos.X() = 5; + aRelPos.setX( 5 ); if (aRelPos.X() < 0) - aRelPos.X() = -5; + aRelPos.setX( -5 ); if (aRelPos.Y() > 0) - aRelPos.Y() = 5; + aRelPos.setY( 5 ); if (aRelPos.Y() < 0) - aRelPos.Y() = -5; + aRelPos.setY( -5 ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 7646a2357d51..f2a59e5def7f 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -526,18 +526,18 @@ void E3dScene::RotateScene (const Point& rRef, double sn, double cs) // point is the origin, and the y-axis increases upward, the X-axis to // the right. This must be especially noted for the Y-values. // (When considering a flat piece of paper the Y-axis pointing downwards - Center.X() = (UpperLeft.X() + dxOutRectHalf) - rRef.X(); - Center.Y() = -((UpperLeft.Y() + dyOutRectHalf) - rRef.Y()); + Center.setX( (UpperLeft.X() + dxOutRectHalf) - rRef.X() ); + Center.setY( -((UpperLeft.Y() + dyOutRectHalf) - rRef.Y()) ); // A few special cases has to be dealt with first (n * 90 degrees n integer) if (sn==1.0 && cs==0.0) { // 90deg - NewCenter.X() = -Center.Y(); - NewCenter.Y() = -Center.X(); + NewCenter.setX( -Center.Y() ); + NewCenter.setY( -Center.X() ); } else if (sn==0.0 && cs==-1.0) { // 180deg - NewCenter.X() = -Center.X(); - NewCenter.Y() = -Center.Y(); + NewCenter.setX( -Center.X() ); + NewCenter.setY( -Center.Y() ); } else if (sn==-1.0 && cs==0.0) { // 270deg - NewCenter.X() = Center.Y(); - NewCenter.Y() = -Center.X(); + NewCenter.setX( Center.Y() ); + NewCenter.setY( -Center.X() ); } else // Here it is rotated to any angle in the mathematically // positive direction! @@ -545,14 +545,14 @@ void E3dScene::RotateScene (const Point& rRef, double sn, double cs) // ynew = x * sin(alpha) + y * cos(alpha) // Bottom Right is not rotated: the pages of aOutRect must // remain parallel to the coordinate axes. - NewCenter.X() = static_cast<long>(Center.X() * cs - Center.Y() * sn); - NewCenter.Y() = static_cast<long>(Center.X() * sn + Center.Y() * cs); + NewCenter.setX( static_cast<long>(Center.X() * cs - Center.Y() * sn) ); + NewCenter.setY( static_cast<long>(Center.X() * sn + Center.Y() * cs) ); } Size Differenz; Point DiffPoint = (NewCenter - Center); - Differenz.Width() = DiffPoint.X(); - Differenz.Height() = -DiffPoint.Y(); // Note that the Y-axis is counted ad positive downward. + Differenz.setWidth( DiffPoint.X() ); + Differenz.setHeight( -DiffPoint.Y() ); // Note that the Y-axis is counted ad positive downward. NbcMove (Differenz); // Actually executes the coordinate transformation. } diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index c25a3b7afc08..70ef4953c5aa 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -1375,10 +1375,10 @@ void E3dView::Start3DCreation() } } - maRef1.X() = basegfx::fround(aR.getMinX()); // Initial move axis 2/100mm to the left - maRef1.Y() = nY1; - maRef2.X() = maRef1.X(); - maRef2.Y() = nY2; + maRef1.setX( basegfx::fround(aR.getMinX()) ); // Initial move axis 2/100mm to the left + maRef1.setY( nY1 ); + maRef2.setX( maRef1.X() ); + maRef2.setY( nY2 ); // Turn on marks SetMarkHandles(nullptr); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 3ee95dad4b0d..ce70ebeefedc 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -162,11 +162,11 @@ void FmGridHeader::RequestHelp( const HelpEvent& rHEvt ) { tools::Rectangle aItemRect = GetItemRect( nItemId ); Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); - aItemRect.Left() = aPt.X(); - aItemRect.Top() = aPt.Y(); + aItemRect.SetLeft( aPt.X() ); + aItemRect.SetTop( aPt.Y() ); aPt = OutputToScreenPixel( aItemRect.BottomRight() ); - aItemRect.Right() = aPt.X(); - aItemRect.Bottom() = aPt.Y(); + aItemRect.SetRight( aPt.X() ); + aItemRect.SetBottom( aPt.Y() ); sal_uInt16 nPos = GetModelColumnPos(nItemId); Reference< css::container::XIndexContainer > xColumns(static_cast<FmGridControl*>(GetParent())->GetPeer()->getColumns()); diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 262d4d47f5bc..96200e7776cd 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1457,8 +1457,8 @@ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt) pGrid->DeactivateCell(); ::tools::Rectangle aColRect = pGrid->GetFieldRect(nId); - aColRect.Top() = 0; - aColRect.Bottom() = pGrid->GetSizePixel().Height(); + aColRect.SetTop( 0 ); + aColRect.SetBottom( pGrid->GetSizePixel().Height() ); pGrid->Invalidate(aColRect); if (bWasEditing) diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 07d08e0249a2..307a88344f38 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -416,7 +416,7 @@ namespace { _rButton.SetPosPixel( _rPos ); _rButton.SetSizePixel( _rSize ); - _rPos.X() += static_cast<sal_uInt16>(_rSize.Width()); + _rPos.AdjustX(static_cast<sal_uInt16>(_rSize.Width()) ); } } @@ -490,33 +490,33 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() if (nX > nW) { - aButtonPos.X() = nW-nH; + aButtonPos.setX( nW-nH ); m_aNewBtn->SetPosPixel(aButtonPos); - aButtonPos.X() -= nH; + aButtonPos.AdjustX( -nH ); m_aLastBtn->SetPosPixel(aButtonPos); - aButtonPos.X() -= nH; + aButtonPos.AdjustX( -nH ); m_aNextBtn->SetPosPixel(aButtonPos); - aButtonPos.X() -= nH; + aButtonPos.AdjustX( -nH ); m_aPrevBtn->SetPosPixel(aButtonPos); - aButtonPos.X() -= nH; + aButtonPos.AdjustX( -nH ); m_aFirstBtn->SetPosPixel(aButtonPos); auto nDiff = nX - nW; Size aSize = m_aAbsolute->GetSizePixel(); - aSize.Width() -= nDiff/3.0; + aSize.AdjustWidth( -(nDiff/3.0) ); m_aAbsolute->SetSizePixel(aSize); aSize = m_aRecordCount->GetSizePixel(); - aSize.Width() -= nDiff/3.0*2; + aSize.AdjustWidth( -(nDiff/3.0*2) ); m_aRecordCount->SetSizePixel(aSize); Point aPos = m_aRecordOf->GetPosPixel(); - aPos.X() -= nDiff/3.0; + aPos.AdjustX( -(nDiff/3.0) ); m_aRecordOf->SetPosPixel(aPos); aPos = m_aRecordCount->GetPosPixel(); - aPos.X() -= nDiff/3.0; + aPos.AdjustX( -(nDiff/3.0) ); m_aRecordCount->SetPosPixel(aPos); vcl::Window* pWindows[] = @@ -540,7 +540,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() auto nExcess = (pWindow->GetPosPixel().X() + aSize.Width()) - nW; if (nExcess > 0) { - aSize.Width() -= nExcess; + aSize.AdjustWidth( -nExcess ); pWindow->SetSizePixel(aSize); } } @@ -2044,8 +2044,8 @@ void DbGridControl::PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, tools::Rectangle aArea(rRect); if ((GetMode() & BrowserMode::CURSOR_WO_FOCUS) == BrowserMode::CURSOR_WO_FOCUS) { - aArea.Top() += 1; - aArea.Bottom() -= 1; + aArea.AdjustTop(1 ); + aArea.AdjustBottom( -1 ); } pColumn->Paint(rDev, aArea, m_xPaintRow.get(), getNumberFormatter()); } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index d385dca65890..a75633f13962 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -372,7 +372,7 @@ namespace svxform m_pToolBox->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); m_pToolBox->SetSelectHdl( LINK( this, XFormsPage, TbxSelectHdl ) ); Point aPos = m_pItemList->GetPosPixel(); - aPos.Y() = aTbxSz.Height(); + aPos.setY( aTbxSz.Height() ); m_pItemList->SetPosPixel( aPos ); m_pItemList->SetSelectHdl( LINK( this, XFormsPage, ItemSelectHdl ) ); @@ -1047,10 +1047,10 @@ namespace svxform { Size aSize = GetOutputSizePixel(); Size aTbxSize = m_pToolBox->GetSizePixel(); - aTbxSize.Width() = aSize.Width(); + aTbxSize.setWidth( aSize.Width() ); m_pToolBox->SetSizePixel( aTbxSize ); - aSize.Width() -= 4; - aSize.Height() -= ( 4 + aTbxSize.Height() ); + aSize.AdjustWidth( -4 ); + aSize.AdjustHeight( -( 4 + aTbxSize.Height() ) ); m_pItemList->SetPosSizePixel( Point( 2, 2 + aTbxSize.Height() ), aSize ); } @@ -2195,8 +2195,8 @@ namespace svxform Size aLogOutputSize = PixelToLogic(GetOutputSizePixel(), MapMode(MapUnit::MapAppFont)); Size aLogExplSize = aLogOutputSize; - aLogExplSize.Width() -= 2; - aLogExplSize.Height() -= 2; + aLogExplSize.AdjustWidth( -2 ); + aLogExplSize.AdjustHeight( -2 ); Point aExplPos = LogicToPixel(Point(1,1), MapMode(MapUnit::MapAppFont)); Size aExplSize = LogicToPixel(aLogExplSize, MapMode(MapUnit::MapAppFont)); @@ -2613,8 +2613,8 @@ namespace svxform Size a3and1Sz = LogicToPixel( Size(3, 1), MapMode(MapUnit::MapAppFont)); Size aNewSz = m_pDefaultED->GetSizePixel(); Point aNewPnt = m_pDefaultED->GetPosPixel(); - aNewPnt.Y() += a3and1Sz.Height(); - aNewSz.Width() -= ( m_pDefaultBtn->GetSizePixel().Width() + a3and1Sz.Width() ); + aNewPnt.AdjustY(a3and1Sz.Height() ); + aNewSz.AdjustWidth( -( m_pDefaultBtn->GetSizePixel().Width() + a3and1Sz.Width() ) ); m_pDefaultED->SetPosSizePixel( aNewPnt, aNewSz ); m_pDefaultBtn->Show(); } diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 6ef160d87a0f..b5a0c9975a77 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -996,9 +996,9 @@ void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::Ren rRenderContext.DrawLine(aFirst, aSecond); aFirst = aSecond; - aFirst.X() += 1; - aSecond.X() += 6; - aSecond.Y() -= 5; + aFirst.AdjustX(1 ); + aSecond.AdjustX(6 ); + aSecond.AdjustY( -5 ); rRenderContext.DrawLine(aFirst, aSecond); rRenderContext.Pop(); @@ -1014,7 +1014,7 @@ void FmFilterItemsString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pE pViewData = pView->GetViewDataItem( pEntry, this ); Size aSize(pView->GetTextWidth(GetText()), pView->GetTextHeight()); - aSize.Width() += nxDBmp; + aSize.AdjustWidth(nxDBmp ); pViewData->maSize = aSize; } @@ -1050,7 +1050,7 @@ void FmFilterString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, Size aSize(pView->GetTextWidth(m_aName), pView->GetTextHeight()); pView->Control::SetFont( aOldFont ); - aSize.Width() += pView->GetTextWidth(GetText()) + nxD; + aSize.AdjustWidth(pView->GetTextWidth(GetText()) + nxD ); pViewData->maSize = aSize; } @@ -1067,7 +1067,7 @@ void FmFilterString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderCo rRenderContext.DrawText(aPos, m_aName); // position for the second text - aPos.X() += rDev.GetTextWidth(m_aName) + nxD; + aPos.AdjustX(rDev.GetTextWidth(m_aName) + nxD ); rRenderContext.Pop(); rDev.DrawText(aPos, GetText()); } @@ -1921,8 +1921,8 @@ void FmFilterNavigatorWin::Resize() Size aLogOutputSize = PixelToLogic(GetOutputSizePixel(), MapMode(MapUnit::MapAppFont)); Size aLogExplSize = aLogOutputSize; - aLogExplSize.Width() -= 6; - aLogExplSize.Height() -= 6; + aLogExplSize.AdjustWidth( -6 ); + aLogExplSize.AdjustHeight( -6 ); Point aExplPos = LogicToPixel(Point(3,3), MapMode(MapUnit::MapAppFont)); Size aExplSize = LogicToPixel(aLogExplSize, MapMode(MapUnit::MapAppFont)); diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 9e96bd6db2d5..394a76c48f70 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -559,8 +559,8 @@ namespace svxform Size aLogOutputSize = PixelToLogic(GetOutputSizePixel(), MapMode(MapUnit::MapAppFont)); Size aLogExplSize = aLogOutputSize; - aLogExplSize.Width() -= 6; - aLogExplSize.Height() -= 6; + aLogExplSize.AdjustWidth( -6 ); + aLogExplSize.AdjustHeight( -6 ); Point aExplPos = LogicToPixel(Point(3, 3), MapMode(MapUnit::MapAppFont)); Size aExplSize = LogicToPixel(aLogExplSize, MapMode(MapUnit::MapAppFont)); diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index 980e954c20ee..7f267cbbcf03 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -200,11 +200,11 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView const * pView, tools::Rectangle aItemRect = pObj->GetCurrentBoundRect(); aItemRect = pWindow->LogicToPixel( aItemRect ); Point aPt = pWindow->OutputToScreenPixel( aItemRect.TopLeft() ); - aItemRect.Left() = aPt.X(); - aItemRect.Top() = aPt.Y(); + aItemRect.SetLeft( aPt.X() ); + aItemRect.SetTop( aPt.Y() ); aPt = pWindow->OutputToScreenPixel( aItemRect.BottomRight() ); - aItemRect.Right() = aPt.X(); - aItemRect.Bottom() = aPt.Y(); + aItemRect.SetRight( aPt.X() ); + aItemRect.SetBottom( aPt.Y() ); if( rEvt.GetMode() == HelpEventMode::BALLOON ) Help::ShowBalloon( pWindow, aItemRect.Center(), aItemRect, aHelpText); else diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 63a3608ffb3a..ba25b1ad29c4 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1478,8 +1478,8 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ const sal_uInt16 nObjID = OBJ_FM_BUTTON; ::Size controlSize(4000, 500); FmFormObj *pControl = static_cast<FmFormObj*>(SdrObjFactory::MakeNewObject( SdrInventor::FmForm, nObjID, nullptr )); - controlSize.Width() = long(controlSize.Width() * eTargetMode.GetScaleX()); - controlSize.Height() = long(controlSize.Height() * eTargetMode.GetScaleY()); + controlSize.setWidth( long(controlSize.Width() * eTargetMode.GetScaleX()) ); + controlSize.setHeight( long(controlSize.Height() * eTargetMode.GetScaleY()) ); ::Point controlPos( OutputDevice::LogicToLogic( ::Point( controlSize.Width(), 0 ), eSourceMode, eTargetMode ) ); ::tools::Rectangle controlRect( controlPos, OutputDevice::LogicToLogic( controlSize, eSourceMode, eTargetMode ) ); pControl->SetLogicRect(controlRect); @@ -1564,12 +1564,12 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int ::Size aDefImageSize(4000, 4000); ::Size aRealSize = OutputDevice::LogicToLogic(aTextSize, eTargetMode, eSourceMode); - aRealSize.Width() = std::max(aRealSize.Width(), aDefTxtSize.Width()); - aRealSize.Height()= aDefSize.Height(); + aRealSize.setWidth( std::max(aRealSize.Width(), aDefTxtSize.Width()) ); + aRealSize.setHeight( aDefSize.Height() ); // adjust to scaling of the target device (#53523#) - aRealSize.Width() = long(Fraction(aRealSize.Width(), 1) * eTargetMode.GetScaleX()); - aRealSize.Height() = long(Fraction(aRealSize.Height(), 1) * eTargetMode.GetScaleY()); + aRealSize.setWidth( long(Fraction(aRealSize.Width(), 1) * eTargetMode.GetScaleX()) ); + aRealSize.setHeight( long(Fraction(aRealSize.Height(), 1) * eTargetMode.GetScaleY()) ); // for boolean fields, we do not create a label, but just a checkbox bool bNeedLabel = ( _nControlObjectID != OBJ_FM_CHECKBOX ); @@ -1635,8 +1635,8 @@ bool FmXFormView::createControlLabelPair( OutputDevice const & _rOutDev, sal_Int if ( OBJ_FM_IMAGECONTROL == _nControlObjectID ) aControlSize = aDefImageSize; - aControlSize.Width() = long(Fraction(aControlSize.Width(), 1) * eTargetMode.GetScaleX()); - aControlSize.Height() = long(Fraction(aControlSize.Height(), 1) * eTargetMode.GetScaleY()); + aControlSize.setWidth( long(Fraction(aControlSize.Width(), 1) * eTargetMode.GetScaleX()) ); + aControlSize.setHeight( long(Fraction(aControlSize.Height(), 1) * eTargetMode.GetScaleY()) ); pControl->SetLogicRect( ::tools::Rectangle( OutputDevice::LogicToLogic( ::Point( aRealSize.Width() + _nXOffsetMM, _nYOffsetMM ), eSourceMode, eTargetMode ), diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 3f3a99fc0efb..cddad49d4d72 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -378,8 +378,8 @@ void FmFieldWin::Resize() // adapt size of css::form::ListBox Point aLBPos( LISTBOX_BORDER, LISTBOX_BORDER ); Size aLBSize( aOutputSize ); - aLBSize.Width() -= (2*LISTBOX_BORDER); - aLBSize.Height() -= (2*LISTBOX_BORDER); + aLBSize.AdjustWidth( -(2*LISTBOX_BORDER) ); + aLBSize.AdjustHeight( -(2*LISTBOX_BORDER) ); pListBox->SetPosSizePixel( aLBPos, aLBSize ); } diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 5bac8c52ed50..f1b1cac55dd8 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -155,7 +155,7 @@ VclPtr<vcl::Window> SvxFmTbxCtlRecText::CreateItemWindow( vcl::Window* pParent ) VclPtrInstance<FixedText> pFixedText( pParent ); Size aSize( pFixedText->GetTextWidth( aText ), pFixedText->GetTextHeight( ) ); pFixedText->SetText( aText ); - aSize.Width() += 6; + aSize.AdjustWidth(6 ); pFixedText->SetSizePixel( aSize ); pFixedText->SetBackground(Wallpaper(Color(COL_TRANSPARENT))); @@ -180,7 +180,7 @@ VclPtr<vcl::Window> SvxFmTbxCtlRecFromText::CreateItemWindow( vcl::Window* pPare OUString aText(SvxResId(RID_STR_REC_FROM_TEXT)); VclPtrInstance<FixedText> pFixedText( pParent, WB_CENTER ); Size aSize( pFixedText->GetTextWidth( aText ), pFixedText->GetTextHeight( ) ); - aSize.Width() += 12; + aSize.AdjustWidth(12 ); pFixedText->SetText( aText ); pFixedText->SetSizePixel( aSize ); pFixedText->SetBackground(Wallpaper(Color(COL_TRANSPARENT))); @@ -207,7 +207,7 @@ VclPtr<vcl::Window> SvxFmTbxCtlRecTotal::CreateItemWindow( vcl::Window* pParent pFixedText.reset(VclPtr<FixedText>::Create( pParent )); OUString const aSample("123456"); Size aSize( pFixedText->GetTextWidth( aSample ), pFixedText->GetTextHeight( ) ); - aSize.Width() += 12; + aSize.AdjustWidth(12 ); pFixedText->SetSizePixel( aSize ); pFixedText->SetBackground(); pFixedText->SetPaintTransparent(true); diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 407da29585ff..1217a632a0a0 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -583,8 +583,8 @@ IMPL_LINK_NOARG(GalleryBrowser1, ShowContextMenuHdl, void*, void) const tools::Rectangle aThemesRect( mpThemes->GetPosPixel(), mpThemes->GetOutputSizePixel() ); Point aSelPos( mpThemes->GetBoundingRectangle( mpThemes->GetSelectedEntryPos() ).Center() ); - aSelPos.X() = std::max( std::min( aSelPos.X(), aThemesRect.Right() ), aThemesRect.Left() ); - aSelPos.Y() = std::max( std::min( aSelPos.Y(), aThemesRect.Bottom() ), aThemesRect.Top() ); + aSelPos.setX( std::max( std::min( aSelPos.X(), aThemesRect.Right() ), aThemesRect.Left() ) ); + aSelPos.setY( std::max( std::min( aSelPos.Y(), aThemesRect.Bottom() ), aThemesRect.Top() ) ); aMenu->Execute( this, aSelPos ); } diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 18e9c814f47b..220e358380ae 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -959,8 +959,8 @@ sal_uInt32 GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& } } - rSelPos.X() = std::max( std::min( rSelPos.X(), aOutputSizePixel.Width() - 1 ), 0L ); - rSelPos.Y() = std::max( std::min( rSelPos.Y(), aOutputSizePixel.Height() - 1 ), 0L ); + rSelPos.setX( std::max( std::min( rSelPos.X(), aOutputSizePixel.Width() - 1 ), 0L ) ); + rSelPos.setY( std::max( std::min( rSelPos.Y(), aOutputSizePixel.Height() - 1 ), 0L ) ); if( nRet && ( !mpCurTheme || ( nRet > mpCurTheme->GetObjectCount() ) ) ) { diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index b8971286cb26..aa7a7c807b41 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -107,13 +107,13 @@ bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, tools::R if ( fGrfWH < fWinWH ) { - aNewSize.Width() = static_cast<long>( aWinSize.Height() * fGrfWH ); - aNewSize.Height()= aWinSize.Height(); + aNewSize.setWidth( static_cast<long>( aWinSize.Height() * fGrfWH ) ); + aNewSize.setHeight( aWinSize.Height() ); } else { - aNewSize.Width() = aWinSize.Width(); - aNewSize.Height()= static_cast<long>( aWinSize.Width() / fGrfWH); + aNewSize.setWidth( aWinSize.Width() ); + aNewSize.setHeight( static_cast<long>( aWinSize.Width() / fGrfWH) ); } const Point aNewPos( ( aWinSize.Width() - aNewSize.Width() ) >> 1, @@ -590,7 +590,7 @@ sal_Int8 GalleryListView::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) { ExecuteDropEvent aEvt( rEvt ); - aEvt.maPosPixel.Y() += GetTitleHeight(); + aEvt.maPosPixel.AdjustY(GetTitleHeight() ); return static_cast<GalleryBrowser2*>( GetParent() )->ExecuteDrop( aEvt ); } diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index b8d11333ac6a..d307b65bfd47 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -114,9 +114,9 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic ) double fFactorPix = static_cast< double >( aBmpSize.Width() ) / aBmpSize.Height(); if( fFactorPix > fFactorLog ) - aBmpSize.Width() = FRound( aBmpSize.Height() * fFactorLog ); + aBmpSize.setWidth( FRound( aBmpSize.Height() * fFactorLog ) ); else - aBmpSize.Height() = FRound( aBmpSize.Width() / fFactorLog ); + aBmpSize.setHeight( FRound( aBmpSize.Width() / fFactorLog ) ); aBmpEx.SetSizePixel( aBmpSize, BmpScaleFlag::BestQuality ); } @@ -152,9 +152,9 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic ) const double fFactor = static_cast<double>(aPrefSize.Width()) / static_cast<double>(aPrefSize.Height()); Size aSize( S_THUMB, S_THUMB ); if ( fFactor < 1.0 ) - aSize.Width() = static_cast<sal_Int32>( S_THUMB * fFactor ); + aSize.setWidth( static_cast<sal_Int32>( S_THUMB * fFactor ) ); else - aSize.Height() = static_cast<sal_Int32>( S_THUMB / fFactor ); + aSize.setHeight( static_cast<sal_Int32>( S_THUMB / fFactor ) ); const GraphicConversionParameters aParameters(aSize, false, true, true /*TODO: extra ", true" post-#i121194#*/); aThumbBmp = rGraphic.GetBitmapEx(aParameters); diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index ab2e8216f139..d26367a646fc 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -265,22 +265,22 @@ namespace sdr // maximum size indirectly shall be limited to getOutputDevice().GetOutputSizePixel() if(aRegionRectanglePixel.Left() < 0) { - aRegionRectanglePixel.Left() = 0; + aRegionRectanglePixel.SetLeft( 0 ); } if(aRegionRectanglePixel.Top() < 0) { - aRegionRectanglePixel.Top() = 0; + aRegionRectanglePixel.SetTop( 0 ); } if(aRegionRectanglePixel.Right() > aDestinationSizePixel.getWidth()) { - aRegionRectanglePixel.Right() = aDestinationSizePixel.getWidth(); + aRegionRectanglePixel.SetRight( aDestinationSizePixel.getWidth() ); } if(aRegionRectanglePixel.Bottom() > aDestinationSizePixel.getHeight()) { - aRegionRectanglePixel.Bottom() = aDestinationSizePixel.getHeight(); + aRegionRectanglePixel.SetBottom( aDestinationSizePixel.getHeight() ); } // get sizes diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx index 14c58c3a2698..c685ffde4832 100644 --- a/svx/source/sidebar/PanelLayout.cxx +++ b/svx/source/sidebar/PanelLayout.cxx @@ -49,8 +49,8 @@ Size PanelLayout::GetOptimalSize() const if (isLayoutEnabled(this)) { Size aSize = VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); - aSize.Width() = std::min<long>(aSize.Width(), - (SidebarController::gnMaximumSidebarWidth - TabBar::GetDefaultWidth()) * GetDPIScaleFactor()); + aSize.setWidth( std::min<long>(aSize.Width(), + (SidebarController::gnMaximumSidebarWidth - TabBar::GetDefaultWidth()) * GetDPIScaleFactor()) ); return aSize; } diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index 6ed3d9edf2d1..8aaeb8005cfb 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -103,7 +103,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne)); Size aSize = aFont.GetFontSize(); - aSize.Height() = nRectHeight*3/5; + aSize.setHeight( nRectHeight*3/5 ); aFont.SetFontSize( aSize ); Point aLineStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - nItemId )/2); @@ -114,9 +114,9 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) pDev->DrawImage(aImgStart, imgCus); // Point aStart(aImgStart.X() + 14 + 20 , aBLPos.Y() + nRectHeight/6); tools::Rectangle aStrRect = aRect; - aStrRect.Top() += nRectHeight/6; - aStrRect.Bottom() -= nRectHeight/6; - aStrRect.Left() += imgCus.GetSizePixel().Width() + 20; + aStrRect.AdjustTop(nRectHeight/6 ); + aStrRect.AdjustBottom( -(nRectHeight/6) ); + aStrRect.AdjustLeft(imgCus.GetSizePixel().Width() + 20 ); if(bCusEnable) aFont.SetColor(GetSettings().GetStyleSettings().GetFieldTextColor()); else @@ -131,8 +131,8 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { Color aBackColor(50,107,197); tools::Rectangle aBackRect = aRect; - aBackRect.Top() += 3; - aBackRect.Bottom() -= 2; + aBackRect.AdjustTop(3 ); + aBackRect.AdjustBottom( -2 ); pDev->SetFillColor(aBackColor); pDev->DrawRect(aBackRect); } diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits