summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/changetoolsgen.cxx4
-rw-r--r--include/svx/svdtrans.hxx2
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx8
-rw-r--r--svx/source/accessibility/charmapacc.cxx2
-rw-r--r--svx/source/accessibility/svxpixelctlaccessiblecontext.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx36
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx16
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx10
-rw-r--r--svx/source/dialog/ClassificationEditView.cxx4
-rw-r--r--svx/source/dialog/_contdlg.cxx14
-rw-r--r--svx/source/dialog/charmap.cxx34
-rw-r--r--svx/source/dialog/connctrl.cxx16
-rw-r--r--svx/source/dialog/contwnd.cxx4
-rw-r--r--svx/source/dialog/dlgctl3d.cxx20
-rw-r--r--svx/source/dialog/dlgctrl.cxx32
-rw-r--r--svx/source/dialog/docrecovery.cxx4
-rw-r--r--svx/source/dialog/fntctrl.cxx6
-rw-r--r--svx/source/dialog/framelinkarray.cxx8
-rw-r--r--svx/source/dialog/graphctl.cxx12
-rw-r--r--svx/source/dialog/hdft.cxx4
-rw-r--r--svx/source/dialog/imapwnd.cxx4
-rw-r--r--svx/source/dialog/measctrl.cxx4
-rw-r--r--svx/source/dialog/pagectrl.cxx58
-rw-r--r--svx/source/dialog/paraprev.cxx42
-rw-r--r--svx/source/dialog/rulritem.cxx8
-rw-r--r--svx/source/dialog/searchcharmap.cxx14
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx26
-rw-r--r--svx/source/dialog/swframeexample.cxx180
-rw-r--r--svx/source/engine3d/scene3d.cxx24
-rw-r--r--svx/source/engine3d/view3d.cxx8
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx8
-rw-r--r--svx/source/fmcomp/fmgridif.cxx4
-rw-r--r--svx/source/fmcomp/gridctrl.cxx26
-rw-r--r--svx/source/form/datanavi.cxx16
-rw-r--r--svx/source/form/filtnav.cxx16
-rw-r--r--svx/source/form/fmexpl.cxx4
-rw-r--r--svx/source/form/fmpage.cxx8
-rw-r--r--svx/source/form/fmvwimp.cxx16
-rw-r--r--svx/source/form/tabwin.cxx4
-rw-r--r--svx/source/form/tbxform.cxx6
-rw-r--r--svx/source/gallery2/galbrws1.cxx4
-rw-r--r--svx/source/gallery2/galbrws2.cxx4
-rw-r--r--svx/source/gallery2/galctrl.cxx10
-rw-r--r--svx/source/gallery2/galobj.cxx8
-rw-r--r--svx/source/sdr/overlay/overlaymanagerbuffered.cxx8
-rw-r--r--svx/source/sidebar/PanelLayout.cxx4
-rw-r--r--svx/source/sidebar/line/LineWidthValueSet.cxx12
-rw-r--r--svx/source/sidebar/tools/ValueSetWithTextControl.cxx18
-rw-r--r--svx/source/stbctrls/pszctrl.cxx14
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx6
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx20
-rw-r--r--svx/source/styles/CommonStylePreviewRenderer.cxx8
-rw-r--r--svx/source/svdraw/svdcrtv.cxx8
-rw-r--r--svx/source/svdraw/svddrag.cxx8
-rw-r--r--svx/source/svdraw/svddrgmt.cxx68
-rw-r--r--svx/source/svdraw/svddrgv.cxx4
-rw-r--r--svx/source/svdraw/svdedtv1.cxx16
-rw-r--r--svx/source/svdraw/svdedtv2.cxx4
-rw-r--r--svx/source/svdraw/svdedxv.cxx80
-rw-r--r--svx/source/svdraw/svdetc.cxx16
-rw-r--r--svx/source/svdraw/svdfmtf.cxx26
-rw-r--r--svx/source/svdraw/svdglev.cxx4
-rw-r--r--svx/source/svdraw/svdglue.cxx40
-rw-r--r--svx/source/svdraw/svdhdl.cxx8
-rw-r--r--svx/source/svdraw/svdhlpln.cxx12
-rw-r--r--svx/source/svdraw/svdibrow.cxx10
-rw-r--r--svx/source/svdraw/svdmrkv.cxx24
-rw-r--r--svx/source/svdraw/svdmrkv1.cxx8
-rw-r--r--svx/source/svdraw/svdoashp.cxx112
-rw-r--r--svx/source/svdraw/svdobj.cxx96
-rw-r--r--svx/source/svdraw/svdocapt.cxx16
-rw-r--r--svx/source/svdraw/svdocirc.cxx56
-rw-r--r--svx/source/svdraw/svdoedge.cxx272
-rw-r--r--svx/source/svdraw/svdograf.cxx12
-rw-r--r--svx/source/svdraw/svdogrp.cxx8
-rw-r--r--svx/source/svdraw/svdomeas.cxx70
-rw-r--r--svx/source/svdraw/svdomedia.cxx12
-rw-r--r--svx/source/svdraw/svdopath.cxx36
-rw-r--r--svx/source/svdraw/svdorect.cxx22
-rw-r--r--svx/source/svdraw/svdotext.cxx38
-rw-r--r--svx/source/svdraw/svdotxat.cxx38
-rw-r--r--svx/source/svdraw/svdotxdr.cxx24
-rw-r--r--svx/source/svdraw/svdotxed.cxx34
-rw-r--r--svx/source/svdraw/svdotxtr.cxx12
-rw-r--r--svx/source/svdraw/svdpagv.cxx12
-rw-r--r--svx/source/svdraw/svdpntv.cxx2
-rw-r--r--svx/source/svdraw/svdsnpv.cxx20
-rw-r--r--svx/source/svdraw/svdtrans.cxx94
-rw-r--r--svx/source/svdraw/svdxcgv.cxx8
-rw-r--r--svx/source/table/cell.cxx10
-rw-r--r--svx/source/table/svdotable.cxx26
-rw-r--r--svx/source/table/tablelayouter.cxx10
-rw-r--r--svx/source/table/tablertfimporter.cxx2
-rw-r--r--svx/source/tbxctrls/SvxColorValueSet.cxx2
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx20
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx8
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx12
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx2
-rw-r--r--svx/source/tbxctrls/linectrl.cxx10
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx12
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx2
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx8
-rw-r--r--svx/source/unodraw/unoshape.cxx8
-rw-r--r--svx/source/unodraw/unoshtxt.cxx8
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx8
-rw-r--r--svx/source/xoutdev/_xpoly.cxx76
106 files changed, 1193 insertions, 1193 deletions
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
index da7800057b48..64bf618597a4 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -63,7 +63,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
{
Size aSize = aFont.GetFontSize();
- aSize.Height() = (nRectHeight*4)/9;
+ aSize.setHeight( (nRectHeight*4)/9 );
aFont.SetFontSize( aSize );
}
@@ -72,8 +72,8 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
if ( GetSelectItemId() == nItemId )
{
tools::Rectangle aBackRect = aRect;
- aBackRect.Top() += 3;
- aBackRect.Bottom() -= 2;
+ aBackRect.AdjustTop(3 );
+ aBackRect.AdjustBottom( -2 );
pDev->SetFillColor( sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Color_Highlight ) );
pDev->DrawRect(aBackRect);
}
@@ -93,16 +93,16 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
}
tools::Rectangle aStrRect = aRect;
- aStrRect.Top() += nRectHeight/4;
- aStrRect.Bottom() -= nRectHeight/4;
+ aStrRect.AdjustTop(nRectHeight/4 );
+ aStrRect.AdjustBottom( -(nRectHeight/4) );
const long nRectWidth = aRect.GetWidth();
- aStrRect.Left() += 8;
- aStrRect.Right() -= (nRectWidth*2)/3;
+ aStrRect.AdjustLeft(8 );
+ aStrRect.AdjustRight( -((nRectWidth*2)/3) );
pDev->SetFont(aFont);
pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText, DrawTextFlags::EndEllipsis);
- aStrRect.Left() += nRectWidth/3;
- aStrRect.Right() += (nRectWidth*2)/3;
+ aStrRect.AdjustLeft(nRectWidth/3 );
+ aStrRect.AdjustRight((nRectWidth*2)/3 );
pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText2, DrawTextFlags::EndEllipsis);
}
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 334670aabb11..2a55399a3c3e 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -404,11 +404,11 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
rRect.Left() + rRect.GetWidth() / 2 + PAINT_OFFSET;
// draw position
Point aPnt = rRect.TopLeft();
- aPnt.Y() = aItemPos.Y();
- aPnt.X() += PAINT_OFFSET;
+ aPnt.setY( aItemPos.Y() );
+ aPnt.AdjustX(PAINT_OFFSET );
pDev->DrawImage( aPnt, pImpl->aPosImage );
- aPnt.X() += pImpl->aPosImage.GetSizePixel().Width();
- aPnt.X() += PAINT_OFFSET;
+ aPnt.AdjustX(pImpl->aPosImage.GetSizePixel().Width() );
+ aPnt.AdjustX(PAINT_OFFSET );
OUString aStr = GetMetricStr_Impl( pImpl->aPos.X());
aStr += " / ";
aStr += GetMetricStr_Impl( pImpl->aPos.Y());
@@ -420,14 +420,14 @@ void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
pDev->SetClipRegion(aOrigRegion);
// draw the size, when available
- aPnt.X() = nSizePosX;
+ aPnt.setX( nSizePosX );
if ( pImpl->bSize )
{
pDev->DrawImage( aPnt, pImpl->aSizeImage );
- aPnt.X() += pImpl->aSizeImage.GetSizePixel().Width();
+ aPnt.AdjustX(pImpl->aSizeImage.GetSizePixel().Width() );
Point aDrwPnt = aPnt;
- aPnt.X() += PAINT_OFFSET;
+ aPnt.AdjustX(PAINT_OFFSET );
aStr = GetMetricStr_Impl( pImpl->aSize.Width() );
aStr += " x ";
aStr += GetMetricStr_Impl( pImpl->aSize.Height() );
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index ae43e64dc405..a784b2f8ca0c 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -138,18 +138,18 @@ void XmlSecStatusBarControl::Paint( const UserDrawEvent& rUsrEvt )
if( mpImpl->mnState == SignatureState::OK )
{
- aRect.Top() += yOffset;
+ aRect.AdjustTop(yOffset );
pDev->DrawImage( aRect.TopLeft(), mpImpl->maImage );
}
else if( mpImpl->mnState == SignatureState::BROKEN )
{
- aRect.Top() += yOffset;
+ aRect.AdjustTop(yOffset );
pDev->DrawImage( aRect.TopLeft(), mpImpl->maImageBroken );
}
else if( mpImpl->mnState == SignatureState::NOTVALIDATED
|| mpImpl->mnState == SignatureState::PARTIAL_OK)
{
- aRect.Top() += yOffset;
+ aRect.AdjustTop(yOffset );
pDev->DrawImage( aRect.TopLeft(), mpImpl->maImageNotValidated );
}
else
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index bba6dd21e1f9..449a1a9bc6fc 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -238,10 +238,10 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt )
long nSliderHeight = 2 * pDev->GetDPIScaleFactor();
long nSnappingHeight = 4 * pDev->GetDPIScaleFactor();
- aSlider.Top() += (aControlRect.GetHeight() - nSliderHeight)/2;
- aSlider.Bottom() = aSlider.Top() + nSliderHeight - 1;
- aSlider.Left() += nSliderXOffset;
- aSlider.Right() -= nSliderXOffset;
+ aSlider.AdjustTop((aControlRect.GetHeight() - nSliderHeight)/2 );
+ aSlider.SetBottom( aSlider.Top() + nSliderHeight - 1 );
+ aSlider.AdjustLeft(nSliderXOffset );
+ aSlider.AdjustRight( -nSliderXOffset );
Color aOldLineColor = pDev->GetLineColor();
Color aOldFillColor = pDev->GetFillColor();
@@ -268,19 +268,19 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt )
// draw slider button
Point aImagePoint = aRect.TopLeft();
- aImagePoint.X() += Zoom2Offset( mxImpl->mnCurrentZoom );
- aImagePoint.X() -= mxImpl->maSliderButton.GetSizePixel().Width()/2;
- aImagePoint.Y() += (aControlRect.GetHeight() - mxImpl->maSliderButton.GetSizePixel().Height())/2;
+ aImagePoint.AdjustX(Zoom2Offset( mxImpl->mnCurrentZoom ) );
+ aImagePoint.AdjustX( -(mxImpl->maSliderButton.GetSizePixel().Width()/2) );
+ aImagePoint.AdjustY((aControlRect.GetHeight() - mxImpl->maSliderButton.GetSizePixel().Height())/2 );
pDev->DrawImage( aImagePoint, mxImpl->maSliderButton );
// draw decrease button
aImagePoint = aRect.TopLeft();
- aImagePoint.X() += (nSliderXOffset - mxImpl->maDecreaseButton.GetSizePixel().Width())/2;
- aImagePoint.Y() += (aControlRect.GetHeight() - mxImpl->maDecreaseButton.GetSizePixel().Height())/2;
+ aImagePoint.AdjustX((nSliderXOffset - mxImpl->maDecreaseButton.GetSizePixel().Width())/2 );
+ aImagePoint.AdjustY((aControlRect.GetHeight() - mxImpl->maDecreaseButton.GetSizePixel().Height())/2 );
pDev->DrawImage( aImagePoint, mxImpl->maDecreaseButton );
// draw increase button
- aImagePoint.X() = aRect.TopLeft().X() + aControlRect.GetWidth() - mxImpl->maIncreaseButton.GetSizePixel().Width() - (nSliderXOffset - mxImpl->maIncreaseButton.GetSizePixel().Height())/2;
+ aImagePoint.setX( aRect.TopLeft().X() + aControlRect.GetWidth() - mxImpl->maIncreaseButton.GetSizePixel().Width() - (nSliderXOffset - mxImpl->maIncreaseButton.GetSizePixel().Height())/2 );
pDev->DrawImage( aImagePoint, mxImpl->maIncreaseButton );
pDev->SetLineColor( aOldLineColor );
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 070bdfc50980..866c2edc9a6c 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -159,8 +159,8 @@ bool CommonStylePreviewRenderer::recalculate()
if (aTextRect.Bottom() > mnMaxHeight)
{
double ratio = double(mnMaxHeight) / aTextRect.Bottom();
- maPixelSize.Width() *= ratio;
- maPixelSize.Height() *= ratio;
+ maPixelSize.setWidth( maPixelSize.Width() * ratio );
+ maPixelSize.setHeight( maPixelSize.Height() * ratio );
pFont->SetFontSize(maPixelSize);
}
mrOutputDev.SetFont(aOldFont);
@@ -179,7 +179,7 @@ Size CommonStylePreviewRenderer::getRenderSize()
assert(m_pFont);
maPixelSize = m_pFont->GetTextSize(&mrOutputDev, maStyleName);
if (maPixelSize.Height() > mnMaxHeight)
- maPixelSize.Height() = mnMaxHeight;
+ maPixelSize.setHeight( mnMaxHeight );
return maPixelSize;
}
@@ -211,7 +211,7 @@ bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, Rend
if (eRenderAlign == RenderAlign::CENTER)
{
if (aRectangle.GetHeight() > aPixelSize.Height())
- aFontDrawPosition.Y() += (aRectangle.GetHeight() - aPixelSize.Height()) / 2;
+ aFontDrawPosition.AdjustY((aRectangle.GetHeight() - aPixelSize.Height()) / 2 );
}
mrOutputDev.DrawText(aFontDrawPosition, rText);
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 2b4351d5f5ba..b27b92964517 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -465,22 +465,22 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons
{
if(aPnt.X() < rWorkArea.Left())
{
- aPnt.X() = rWorkArea.Left();
+ aPnt.setX( rWorkArea.Left() );
}
if(aPnt.X() > rWorkArea.Right())
{
- aPnt.X() = rWorkArea.Right();
+ aPnt.setX( rWorkArea.Right() );
}
if(aPnt.Y() < rWorkArea.Top())
{
- aPnt.Y() = rWorkArea.Top();
+ aPnt.setY( rWorkArea.Top() );
}
if(aPnt.Y() > rWorkArea.Bottom())
{
- aPnt.Y() = rWorkArea.Bottom();
+ aPnt.setY( rWorkArea.Bottom() );
}
}
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index 5e123ffbd4c1..381a8def5f66 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -117,12 +117,12 @@ void SdrDragStat::TakeCreateRect(tools::Rectangle& rRect) const
rRect=tools::Rectangle(mvPnts[0], mvPnts.back());
if (mvPnts.size()>1) {
Point aBtmRgt(mvPnts[1]);
- rRect.Right()=aBtmRgt.X();
- rRect.Bottom()=aBtmRgt.Y();
+ rRect.SetRight(aBtmRgt.X() );
+ rRect.SetBottom(aBtmRgt.Y() );
}
if (pView!=nullptr && pView->IsCreate1stPointAsCenter()) {
- rRect.Top()+=rRect.Top()-rRect.Bottom();
- rRect.Left()+=rRect.Left()-rRect.Right();
+ rRect.AdjustTop(rRect.Top()-rRect.Bottom() );
+ rRect.AdjustLeft(rRect.Left()-rRect.Right() );
}
}
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 6233184ab494..1cb2f5aa8bd3 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -997,8 +997,8 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
Point aDif(aPnt-DragStat().GetStart());
getSdrDragView().CheckSnap(Ref1()+aDif,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
getSdrDragView().CheckSnap(Ref2()+aDif,nBestXSnap,nBestYSnap,bXSnapped,bYSnapped);
- aPnt.X()+=nBestXSnap;
- aPnt.Y()+=nBestYSnap;
+ aPnt.AdjustX(nBestXSnap );
+ aPnt.AdjustY(nBestYSnap );
}
if (aPnt!=DragStat().GetNow())
@@ -1061,8 +1061,8 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
// eliminate rounding errors for certain values
if (nSA==9000)
{
- if (nNewAngle==0 || nNewAngle==18000) aPnt.Y()=aRef.Y();
- if (nNewAngle==9000 || nNewAngle==27000) aPnt.X()=aRef.X();
+ if (nNewAngle==0 || nNewAngle==18000) aPnt.setY(aRef.Y() );
+ if (nNewAngle==9000 || nNewAngle==27000) aPnt.setX(aRef.X() );
}
if (nSA==4500)
@@ -1560,8 +1560,8 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
const tools::Rectangle& aSR=GetMarkedRect();
long nMovedx=aNoSnapPnt.X()-DragStat().GetStart().X();
long nMovedy=aNoSnapPnt.Y()-DragStat().GetStart().Y();
- Point aLO(aSR.TopLeft()); aLO.X()+=nMovedx; aLO.Y()+=nMovedy;
- Point aRU(aSR.BottomRight()); aRU.X()+=nMovedx; aRU.Y()+=nMovedy;
+ Point aLO(aSR.TopLeft()); aLO.AdjustX(nMovedx ); aLO.AdjustY(nMovedy );
+ Point aRU(aSR.BottomRight()); aRU.AdjustX(nMovedx ); aRU.AdjustY(nMovedy );
Point aLU(aLO.X(),aRU.Y());
Point aRO(aRU.X(),aLO.Y());
ImpCheckSnap(aLO);
@@ -1607,15 +1607,15 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
if (aSR2.Left()<aLR.Left())
{
- aPt1.X()-=aSR2.Left()-aLR.Left();
+ aPt1.AdjustX( -(aSR2.Left()-aLR.Left()) );
}
else if (aSR2.Right()>aLR.Right())
{
- aPt1.X()-=aSR2.Right()-aLR.Right();
+ aPt1.AdjustX( -(aSR2.Right()-aLR.Right()) );
}
}
else
- aPt1.X()=DragStat().GetStart().X(); // no space to move to
+ aPt1.setX(DragStat().GetStart().X() ); // no space to move to
if (aSR2.Top()>aLR.Top() || aSR2.Bottom()<aLR.Bottom())
{ // any space to move to?
@@ -1623,15 +1623,15 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
if (aSR2.Top()<aLR.Top())
{
- aPt1.Y()-=aSR2.Top()-aLR.Top();
+ aPt1.AdjustY( -(aSR2.Top()-aLR.Top()) );
}
else if (aSR2.Bottom()>aLR.Bottom())
{
- aPt1.Y()-=aSR2.Bottom()-aLR.Bottom();
+ aPt1.AdjustY( -(aSR2.Bottom()-aLR.Bottom()) );
}
}
else
- aPt1.Y()=DragStat().GetStart().Y(); // no space to move to
+ aPt1.setY(DragStat().GetStart().Y() ); // no space to move to
}
if (getSdrDragView().IsDraggingGluePoints())
@@ -1660,10 +1660,10 @@ void SdrDragMove::MoveSdrDrag(const Point& rNoSnapPnt_)
{
Point aPt((*pGPL)[nGlueNum].GetAbsolutePos(*pObj));
aPt+=aPt1; // move by this much
- if (aPt.X()<aBound.Left() ) aPt1.X()-=aPt.X()-aBound.Left() ;
- if (aPt.X()>aBound.Right() ) aPt1.X()-=aPt.X()-aBound.Right() ;
- if (aPt.Y()<aBound.Top() ) aPt1.Y()-=aPt.Y()-aBound.Top() ;
- if (aPt.Y()>aBound.Bottom()) aPt1.Y()-=aPt.Y()-aBound.Bottom();
+ if (aPt.X()<aBound.Left() ) aPt1.AdjustX( -(aPt.X()-aBound.Left()) ) ;
+ if (aPt.X()>aBound.Right() ) aPt1.AdjustX( -(aPt.X()-aBound.Right()) ) ;
+ if (aPt.Y()<aBound.Top() ) aPt1.AdjustY( -(aPt.Y()-aBound.Top()) ) ;
+ if (aPt.Y()>aBound.Bottom()) aPt1.AdjustY( -(aPt.Y()-aBound.Bottom()) );
}
}
}
@@ -1858,14 +1858,14 @@ void SdrDragResize::MoveSdrDrag(const Point& rNoSnapPnt)
}
if (aPnt.X()<aLR.Left())
- aPnt.X()=aLR.Left();
+ aPnt.setX(aLR.Left() );
else if (aPnt.X()>aLR.Right())
- aPnt.X()=aLR.Right();
+ aPnt.setX(aLR.Right() );
if (aPnt.Y()<aLR.Top())
- aPnt.Y()=aLR.Top();
+ aPnt.setY(aLR.Top() );
else if (aPnt.Y()>aLR.Bottom())
- aPnt.Y()=aLR.Bottom();
+ aPnt.setY(aLR.Bottom() );
if (aRef.X()>aSR.Left())
{
@@ -2303,9 +2303,9 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
if (!bSlant && !bResize)
{ // shear, but no resize
if (bVertical)
- aPnt.X()=aP0.X();
+ aPnt.setX(aP0.X() );
else
- aPnt.Y()=aP0.Y();
+ aPnt.setY(aP0.Y() );
}
Point aRef(DragStat().GetRef1());
@@ -3100,22 +3100,22 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
if (bVertical)
{
- aNeuCenter.X()=aStart.X();
- aNeuCenter.Y()=aMarkCenter.Y();
+ aNeuCenter.setX(aStart.X() );
+ aNeuCenter.setY(aMarkCenter.Y() );
}
if (!getSdrDragView().IsCrookAtCenter())
{
switch (GetDragHdlKind())
{
- case SdrHdlKind::UpperLeft: aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
- case SdrHdlKind::Upper: aNeuCenter.Y()=aMarkRect.Bottom(); bUpr=true; break;
- case SdrHdlKind::UpperRight: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
- case SdrHdlKind::Left : aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
- case SdrHdlKind::Right: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
- case SdrHdlKind::LowerLeft: aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
- case SdrHdlKind::Lower: aNeuCenter.Y()=aMarkRect.Top(); bLwr=true; break;
- case SdrHdlKind::LowerRight: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
+ case SdrHdlKind::UpperLeft: aNeuCenter.setX(aMarkRect.Right() ); bLft=true; break;
+ case SdrHdlKind::Upper: aNeuCenter.setY(aMarkRect.Bottom() ); bUpr=true; break;
+ case SdrHdlKind::UpperRight: aNeuCenter.setX(aMarkRect.Left() ); bRgt=true; break;
+ case SdrHdlKind::Left : aNeuCenter.setX(aMarkRect.Right() ); bLft=true; break;
+ case SdrHdlKind::Right: aNeuCenter.setX(aMarkRect.Left() ); bRgt=true; break;
+ case SdrHdlKind::LowerLeft: aNeuCenter.setX(aMarkRect.Right() ); bLft=true; break;
+ case SdrHdlKind::Lower: aNeuCenter.setY(aMarkRect.Top() ); bLwr=true; break;
+ case SdrHdlKind::LowerRight: aNeuCenter.setX(aMarkRect.Left() ); bRgt=true; break;
default: bAtCenter=true;
}
}
@@ -3147,14 +3147,14 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
{
a=static_cast<double>(dy1)/static_cast<double>(dx1); // slope of the radius
nNeuRad=(static_cast<long>(dy1*a)+dx1) /2;
- aNeuCenter.X()+=nNeuRad;
+ aNeuCenter.AdjustX(nNeuRad );
nPntWink=GetAngle(aPnt-aNeuCenter);
}
else
{
a=static_cast<double>(dx1)/static_cast<double>(dy1); // slope of the radius
nNeuRad=(static_cast<long>(dx1*a)+dy1) /2;
- aNeuCenter.Y()+=nNeuRad;
+ aNeuCenter.AdjustY(nNeuRad );
nPntWink=GetAngle(aPnt-aNeuCenter)-9000;
}
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 29293f1c7540..b13383b27a32 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -177,8 +177,8 @@ bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const
{
// drag the whole Object (Move, Resize, ...)
const basegfx::B2DPoint aTransformed(mpCurrentSdrDragMethod->getCurrentTransformation() * basegfx::B2DPoint(aPt.X(), aPt.Y()));
- rPos.X() = basegfx::fround(aTransformed.getX());
- rPos.Y() = basegfx::fround(aTransformed.getY());
+ rPos.setX( basegfx::fround(aTransformed.getX()) );
+ rPos.setY( basegfx::fround(aTransformed.getY()) );
}
}
}
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index d2469a703c67..beb7abfeabda 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -121,10 +121,10 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect)
} else {
t=0; b=h1;
}
- aR1.Left ()=long(l);
- aR1.Right ()=long(r);
- aR1.Top ()=long(t);
- aR1.Bottom()=long(b);
+ aR1.SetLeft(long(l) );
+ aR1.SetRight(long(r) );
+ aR1.SetTop(long(t) );
+ aR1.SetBottom(long(b) );
aR1.Move(x1,y1);
}
pO->SetSnapRect(aR1);
@@ -424,7 +424,7 @@ void SdrEditView::MirrorMarkedObjHorizontal()
{
Point aCenter(GetMarkedObjRect().Center());
Point aPt2(aCenter);
- aPt2.Y()++;
+ aPt2.AdjustY( 1 );
MirrorMarkedObj(aCenter,aPt2);
}
@@ -432,7 +432,7 @@ void SdrEditView::MirrorMarkedObjVertical()
{
Point aCenter(GetMarkedObjRect().Center());
Point aPt2(aCenter);
- aPt2.X()++;
+ aPt2.AdjustX( 1 );
MirrorMarkedObj(aCenter,aPt2);
}
@@ -731,8 +731,8 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr)
tools::Rectangle aRect(aAllSnapRect); // TODO: change this for PolyPt's and GluePt's!!!
if (bAllPosX) aRect.Move(nAllPosX-aRect.Left(),0);
if (bAllPosY) aRect.Move(0,nAllPosY-aRect.Top());
- if (bAllWdt) aRect.Right()=aAllSnapRect.Left()+nAllWdt;
- if (bAllHgt) aRect.Bottom()=aAllSnapRect.Top()+nAllHgt;
+ if (bAllWdt) aRect.SetRight(aAllSnapRect.Left()+nAllWdt );
+ if (bAllHgt) aRect.SetBottom(aAllSnapRect.Top()+nAllHgt );
SetMarkedObjRect(aRect);
}
if (rAttr.GetItemState(SDRATTR_RESIZEXALL,true,&pPoolItem)==SfxItemState::SET) {
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 8be4649c50c0..ac1f11f834f9 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1209,9 +1209,9 @@ void SdrEditView::EqualizeMarkedObjects(bool bWidth)
tools::Rectangle aLogicRect(pObj->GetLogicRect());
Size aLogicRectSize(aLogicRect.GetSize());
if (bWidth)
- aLogicRectSize.Width() = aLastRectSize.Width();
+ aLogicRectSize.setWidth( aLastRectSize.Width() );
else
- aLogicRectSize.Height() = aLastRectSize.Height();
+ aLogicRectSize.setHeight( aLastRectSize.Height() );
aLogicRect.SetSize(aLogicRectSize);
if (bUndo)
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index f239c5cb5b8b..0539648713d6 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -337,10 +337,10 @@ void SdrObjEditView::ModelHasChanged()
tools::Rectangle aTmpRect(aOldArea);
sal_uInt16 nPixSiz=pOLV->GetInvalidateMore()+1;
Size aMore(pWin->PixelToLogic(Size(nPixSiz,nPixSiz)));
- aTmpRect.Left()-=aMore.Width();
- aTmpRect.Right()+=aMore.Width();
- aTmpRect.Top()-=aMore.Height();
- aTmpRect.Bottom()+=aMore.Height();
+ aTmpRect.AdjustLeft( -(aMore.Width()) );
+ aTmpRect.AdjustRight(aMore.Width() );
+ aTmpRect.AdjustTop( -(aMore.Height()) );
+ aTmpRect.AdjustBottom(aMore.Height() );
InvalidateOneWin(*pWin,aTmpRect);
}
if (bAnchorChg)
@@ -775,10 +775,10 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView const & rOutlView) c
tools::Rectangle aPixRect(pWin->LogicToPixel(aBlankRect));
sal_uInt16 nPixSiz(rOutlView.GetInvalidateMore() - 1);
- aPixRect.Left()--;
- aPixRect.Top()--;
- aPixRect.Right()++;
- aPixRect.Bottom()++;
+ aPixRect.AdjustLeft( -1 );
+ aPixRect.AdjustTop( -1 );
+ aPixRect.AdjustRight( 1 );
+ aPixRect.AdjustBottom( 1 );
{
// limit xPixRect because of driver problems when pixel coordinates are too far out
@@ -787,17 +787,17 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView const & rOutlView) c
long nMaxX(aMaxXY.Width() + a);
long nMaxY(aMaxXY.Height() + a);
- if (aPixRect.Left ()<-a) aPixRect.Left()=-a;
- if (aPixRect.Top ()<-a) aPixRect.Top ()=-a;
- if (aPixRect.Right ()>nMaxX) aPixRect.Right ()=nMaxX;
- if (aPixRect.Bottom()>nMaxY) aPixRect.Bottom()=nMaxY;
+ if (aPixRect.Left ()<-a) aPixRect.SetLeft(-a );
+ if (aPixRect.Top ()<-a) aPixRect.SetTop(-a );
+ if (aPixRect.Right ()>nMaxX) aPixRect.SetRight(nMaxX );
+ if (aPixRect.Bottom()>nMaxY) aPixRect.SetBottom(nMaxY );
}
tools::Rectangle aOuterPix(aPixRect);
- aOuterPix.Left()-=nPixSiz;
- aOuterPix.Top()-=nPixSiz;
- aOuterPix.Right()+=nPixSiz;
- aOuterPix.Bottom()+=nPixSiz;
+ aOuterPix.AdjustLeft( -nPixSiz );
+ aOuterPix.AdjustTop( -nPixSiz );
+ aOuterPix.AdjustRight(nPixSiz );
+ aOuterPix.AdjustBottom(nPixSiz );
bool bMerk(pWin->IsMapModeEnabled());
pWin->EnableMapMode(false);
@@ -1558,10 +1558,10 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
aRect.Union(aTextEditArea);
aRect.Union(aMinTextEditArea);
aRect=pWin->LogicToPixel(aRect);
- aRect.Left()-=nMorePix;
- aRect.Top()-=nMorePix;
- aRect.Right()+=nMorePix;
- aRect.Bottom()+=nMorePix;
+ aRect.AdjustLeft( -nMorePix );
+ aRect.AdjustTop( -nMorePix );
+ aRect.AdjustRight(nMorePix );
+ aRect.AdjustBottom(nMorePix );
aRect=pWin->PixelToLogic(aRect);
InvalidateOneWin(*pWin,aRect);
pWin->SetFillColor();
@@ -1703,10 +1703,10 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const
aEditArea.Union(pOLV->GetOutputArea());
if (!aEditArea.IsInside(rHit)) {
Size aSiz(pWin->PixelToLogic(Size(nPixSiz,nPixSiz)));
- aEditArea.Left()-=aSiz.Width();
- aEditArea.Top()-=aSiz.Height();
- aEditArea.Right()+=aSiz.Width();
- aEditArea.Bottom()+=aSiz.Height();
+ aEditArea.AdjustLeft( -(aSiz.Width()) );
+ aEditArea.AdjustTop( -(aSiz.Height()) );
+ aEditArea.AdjustRight(aSiz.Width() );
+ aEditArea.AdjustBottom(aSiz.Height() );
bOk=aEditArea.IsInside(rHit);
}
}
@@ -1790,10 +1790,10 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin)
if (pWin)
{
tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
- if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
- if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
- if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
- if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
+ if (aPixPos.X()<aR.Left ()) aPixPos.setX(aR.Left () );
+ if (aPixPos.X()>aR.Right ()) aPixPos.setX(aR.Right () );
+ if (aPixPos.Y()<aR.Top ()) aPixPos.setY(aR.Top () );
+ if (aPixPos.Y()>aR.Bottom()) aPixPos.setY(aR.Bottom() );
}
MouseEvent aMEvt(aPixPos,rMEvt.GetClicks(),rMEvt.GetMode(),
rMEvt.GetButtons(),rMEvt.GetModifier());
@@ -1823,10 +1823,10 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin)
if (bPostIt && pWin) {
Point aPixPos(rMEvt.GetPosPixel());
tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
- if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
- if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
- if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
- if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
+ if (aPixPos.X()<aR.Left ()) aPixPos.setX(aR.Left () );
+ if (aPixPos.X()>aR.Right ()) aPixPos.setX(aR.Right () );
+ if (aPixPos.Y()<aR.Top ()) aPixPos.setY(aR.Top () );
+ if (aPixPos.Y()>aR.Bottom()) aPixPos.setY(aR.Bottom() );
MouseEvent aMEvt(aPixPos,rMEvt.GetClicks(),rMEvt.GetMode(),
rMEvt.GetButtons(),rMEvt.GetModifier());
if (pTextEditOutlinerView->MouseButtonUp(aMEvt)) {
@@ -1861,10 +1861,10 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin)
aR = pWin->LogicToPixel(aR);
else if (pTextEditWin)
aR = pTextEditWin->LogicToPixel(aR);
- if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
- if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
- if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
- if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
+ if (aPixPos.X()<aR.Left ()) aPixPos.setX(aR.Left () );
+ if (aPixPos.X()>aR.Right ()) aPixPos.setX(aR.Right () );
+ if (aPixPos.Y()<aR.Top ()) aPixPos.setY(aR.Top () );
+ if (aPixPos.Y()>aR.Bottom()) aPixPos.setY(aR.Bottom() );
MouseEvent aMEvt(aPixPos,rMEvt.GetClicks(),rMEvt.GetMode(),
rMEvt.GetButtons(),rMEvt.GetModifier());
if (pTextEditOutlinerView->MouseMove(aMEvt) && bSelMode) {
@@ -1896,10 +1896,10 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
Point aPixPos(rCEvt.GetMousePosPixel());
if (rCEvt.IsMouseEvent() && pWin) {
tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
- if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
- if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
- if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
- if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
+ if (aPixPos.X()<aR.Left ()) aPixPos.setX(aR.Left () );
+ if (aPixPos.X()>aR.Right ()) aPixPos.setX(aR.Right () );
+ if (aPixPos.Y()<aR.Top ()) aPixPos.setY(aR.Top () );
+ if (aPixPos.Y()>aR.Bottom()) aPixPos.setY(aR.Bottom() );
}
CommandEvent aCEvt(aPixPos,rCEvt.GetCommand(),rCEvt.IsMouseEvent());
// Command is void at the OutlinerView, sadly
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 5b1b2695dce6..823dc300f3e9 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -648,8 +648,8 @@ namespace
{
// TopLeft-Spot
aSpotPos[i] = rArea.TopLeft();
- aSpotPos[i].X() += nWidth14;
- aSpotPos[i].Y() += nHeight14;
+ aSpotPos[i].AdjustX(nWidth14 );
+ aSpotPos[i].AdjustY(nHeight14 );
}
break;
@@ -657,8 +657,8 @@ namespace
{
// TopRight-Spot
aSpotPos[i] = rArea.TopLeft();
- aSpotPos[i].X() += nWidth34;
- aSpotPos[i].Y() += nHeight14;
+ aSpotPos[i].AdjustX(nWidth34 );
+ aSpotPos[i].AdjustY(nHeight14 );
}
break;
@@ -666,8 +666,8 @@ namespace
{
// BottomLeft-Spot
aSpotPos[i] = rArea.TopLeft();
- aSpotPos[i].X() += nWidth14;
- aSpotPos[i].Y() += nHeight34;
+ aSpotPos[i].AdjustX(nWidth14 );
+ aSpotPos[i].AdjustY(nHeight34 );
}
break;
@@ -675,8 +675,8 @@ namespace
{
// BottomRight-Spot
aSpotPos[i] = rArea.TopLeft();
- aSpotPos[i].X() += nWidth34;
- aSpotPos[i].Y() += nHeight34;
+ aSpotPos[i].AdjustX(nWidth34 );
+ aSpotPos[i].AdjustY(nHeight34 );
}
break;
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 9197c1f7eea4..457095f6adc0 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -984,9 +984,9 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
Size aSize( nTextWidth, nTextHeight );
if ( eAlg == ALIGN_BASELINE )
- aPos.Y() -= FRound(aFontMetric.GetAscent() * mfScaleY);
+ aPos.AdjustY( -(FRound(aFontMetric.GetAscent() * mfScaleY)) );
else if ( eAlg == ALIGN_BOTTOM )
- aPos.Y() -= nTextHeight;
+ aPos.AdjustY( -nTextHeight );
tools::Rectangle aTextRect( aPos, aSize );
SdrRectObj* pText =new SdrRectObj( OBJ_TEXT, aTextRect );
@@ -1057,7 +1057,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaStretchTextAction const & rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction const & rAct)
{
tools::Rectangle aRect(rAct.GetPoint(),rAct.GetBitmap().GetSizePixel());
- aRect.Right()++; aRect.Bottom()++;
+ aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 );
SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect);
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1069,7 +1069,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction const & rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction const & rAct)
{
tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
- aRect.Right()++; aRect.Bottom()++;
+ aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 );
SdrGrafObj* pGraf=new SdrGrafObj(Graphic(rAct.GetBitmap()),aRect);
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1081,7 +1081,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction const & rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction const & rAct)
{
tools::Rectangle aRect(rAct.GetPoint(),rAct.GetBitmapEx().GetSizePixel());
- aRect.Right()++; aRect.Bottom()++;
+ aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 );
SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect );
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1093,7 +1093,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction const & rAct)
void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScaleAction const & rAct)
{
tools::Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
- aRect.Right()++; aRect.Bottom()++;
+ aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 );
SdrGrafObj* pGraf=new SdrGrafObj( rAct.GetBitmapEx(), aRect );
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1271,8 +1271,8 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction const & rAct)
tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize());
Bitmap aBitmap(rAct.GetBitmap());
- aRect.Right()++;
- aRect.Bottom()++;
+ aRect.AdjustRight( 1 );
+ aRect.AdjustBottom( 1 );
aBitmap.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
SdrGrafObj* pGraf = new SdrGrafObj(aBitmap, aRect);
@@ -1287,8 +1287,8 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction const & rAct)
tools::Rectangle aRect(rAct.GetDestPoint(),rAct.GetDestSize());
BitmapEx aBitmapEx(rAct.GetBitmapEx());
- aRect.Right()++;
- aRect.Bottom()++;
+ aRect.AdjustRight( 1 );
+ aRect.AdjustBottom( 1 );
aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
@@ -1303,7 +1303,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction const & rAct)
tools::Rectangle aRect(rAct.GetPoint(), rAct.GetBitmap().GetSizePixel());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
- aRect.Right()++; aRect.Bottom()++;
+ aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 );
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1317,7 +1317,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction const & rAct)
tools::Rectangle aRect(rAct.GetPoint(), rAct.GetSize());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
- aRect.Right()++; aRect.Bottom()++;
+ aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 );
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
// This action is not creating line and fill, set directly, do not use SetAttributes(..)
@@ -1331,7 +1331,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScalePartAction const & rAct)
tools::Rectangle aRect(rAct.GetDestPoint(), rAct.GetDestSize());
BitmapEx aBitmapEx(rAct.GetBitmap(), rAct.GetColor());
- aRect.Right()++; aRect.Bottom()++;
+ aRect.AdjustRight( 1 ); aRect.AdjustBottom( 1 );
aBitmapEx.Crop(tools::Rectangle(rAct.GetSrcPoint(), rAct.GetSrcSize()));
SdrGrafObj* pGraf = new SdrGrafObj(aBitmapEx, aRect);
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index 86f3212841b1..64da87b646ab 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -347,8 +347,8 @@ void SdrGlueEditView::ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const vo
static void ImpMove(Point& rPt, const void* p1, const void* /*p2*/, const void* /*p3*/, const void* /*p4*/)
{
- rPt.X()+=static_cast<const Size*>(p1)->Width();
- rPt.Y()+=static_cast<const Size*>(p1)->Height();
+ rPt.AdjustX(static_cast<const Size*>(p1)->Width() );
+ rPt.AdjustY(static_cast<const Size*>(p1)->Height() );
}
void SdrGlueEditView::MoveMarkedGluePoints(const Size& rSiz, bool bCopy)
diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index d8f6f9e4a31b..cb253b121444 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -52,13 +52,13 @@ Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const
Point aOfs(aSnap.Center());
switch (GetHorzAlign()) {
- case SdrAlign::HORZ_LEFT : aOfs.X()=aSnap.Left(); break;
- case SdrAlign::HORZ_RIGHT : aOfs.X()=aSnap.Right(); break;
+ case SdrAlign::HORZ_LEFT : aOfs.setX(aSnap.Left() ); break;
+ case SdrAlign::HORZ_RIGHT : aOfs.setX(aSnap.Right() ); break;
default: break;
}
switch (GetVertAlign()) {
- case SdrAlign::VERT_TOP : aOfs.Y()=aSnap.Top(); break;
- case SdrAlign::VERT_BOTTOM: aOfs.Y()=aSnap.Bottom(); break;
+ case SdrAlign::VERT_TOP : aOfs.setY(aSnap.Top() ); break;
+ case SdrAlign::VERT_BOTTOM: aOfs.setY(aSnap.Bottom() ); break;
default: break;
}
if (!bNoPercent) {
@@ -67,20 +67,20 @@ Point SdrGluePoint::GetAbsolutePos(const SdrObject& rObj) const
long nXDiv=10000;
long nYDiv=10000;
if (nXMul!=nXDiv) {
- aPt.X()*=nXMul;
- aPt.X()/=nXDiv;
+ aPt.setX( aPt.X() * nXMul );
+ aPt.setX( aPt.X() / nXDiv );
}
if (nYMul!=nYDiv) {
- aPt.Y()*=nYMul;
- aPt.Y()/=nYDiv;
+ aPt.setY( aPt.Y() * nYMul );
+ aPt.setY( aPt.Y() / nYDiv );
}
}
aPt+=aOfs;
// Now limit to the BoundRect of the object
- if (aPt.X()<aBound.Left ()) aPt.X()=aBound.Left ();
- if (aPt.X()>aBound.Right ()) aPt.X()=aBound.Right ();
- if (aPt.Y()<aBound.Top ()) aPt.Y()=aBound.Top ();
- if (aPt.Y()>aBound.Bottom()) aPt.Y()=aBound.Bottom();
+ if (aPt.X()<aBound.Left ()) aPt.setX(aBound.Left () );
+ if (aPt.X()>aBound.Right ()) aPt.setX(aBound.Right () );
+ if (aPt.Y()<aBound.Top ()) aPt.setY(aBound.Top () );
+ if (aPt.Y()>aBound.Bottom()) aPt.setY(aBound.Bottom() );
return aPt;
}
@@ -95,13 +95,13 @@ void SdrGluePoint::SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj)
Point aOfs(aSnap.Center());
switch (GetHorzAlign()) {
- case SdrAlign::HORZ_LEFT : aOfs.X()=aSnap.Left(); break;
- case SdrAlign::HORZ_RIGHT : aOfs.X()=aSnap.Right(); break;
+ case SdrAlign::HORZ_LEFT : aOfs.setX(aSnap.Left() ); break;
+ case SdrAlign::HORZ_RIGHT : aOfs.setX(aSnap.Right() ); break;
default: break;
}
switch (GetVertAlign()) {
- case SdrAlign::VERT_TOP : aOfs.Y()=aSnap.Top(); break;
- case SdrAlign::VERT_BOTTOM: aOfs.Y()=aSnap.Bottom(); break;
+ case SdrAlign::VERT_TOP : aOfs.setY(aSnap.Top() ); break;
+ case SdrAlign::VERT_BOTTOM: aOfs.setY(aSnap.Bottom() ); break;
default: break;
}
aPt-=aOfs;
@@ -113,12 +113,12 @@ void SdrGluePoint::SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj)
long nXDiv=10000;
long nYDiv=10000;
if (nXMul!=nXDiv) {
- aPt.X()*=nXDiv;
- aPt.X()/=nXMul;
+ aPt.setX( aPt.X() * nXDiv );
+ aPt.setX( aPt.X() / nXMul );
}
if (nYMul!=nYDiv) {
- aPt.Y()*=nYDiv;
- aPt.Y()/=nYMul;
+ aPt.setY( aPt.Y() * nYDiv );
+ aPt.setY( aPt.Y() / nYMul );
}
}
aPos=aPt;
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 293674a88314..cd3bc2f5fcb6 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -554,13 +554,13 @@ void SdrHdl::CreateB2dIAObject()
Size aOffset = rOutDev.PixelToLogic(Size(4, 4));
if(eKind == SdrHdlKind::UpperLeft || eKind == SdrHdlKind::Upper || eKind == SdrHdlKind::UpperRight)
- aMoveOutsideOffset.Y() -= aOffset.Width();
+ aMoveOutsideOffset.AdjustY( -(aOffset.Width()) );
if(eKind == SdrHdlKind::LowerLeft || eKind == SdrHdlKind::Lower || eKind == SdrHdlKind::LowerRight)
- aMoveOutsideOffset.Y() += aOffset.Height();
+ aMoveOutsideOffset.AdjustY(aOffset.Height() );
if(eKind == SdrHdlKind::UpperLeft || eKind == SdrHdlKind::Left || eKind == SdrHdlKind::LowerLeft)
- aMoveOutsideOffset.X() -= aOffset.Width();
+ aMoveOutsideOffset.AdjustX( -(aOffset.Width()) );
if(eKind == SdrHdlKind::UpperRight || eKind == SdrHdlKind::Right || eKind == SdrHdlKind::LowerRight)
- aMoveOutsideOffset.X() += aOffset.Height();
+ aMoveOutsideOffset.AdjustX(aOffset.Height() );
}
rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx
index a1260d51dd95..1baff3ebd537 100644
--- a/svx/source/svdraw/svdhlpln.cxx
+++ b/svx/source/svdraw/svdhlpln.cxx
@@ -60,14 +60,14 @@ tools::Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const
Point aOfs(rOut.GetMapMode().GetOrigin());
Size aSiz(rOut.GetOutputSize());
switch (eKind) {
- case SdrHelpLineKind::Vertical : aRet.Top()=-aOfs.Y(); aRet.Bottom()=-aOfs.Y()+aSiz.Height(); break;
- case SdrHelpLineKind::Horizontal: aRet.Left()=-aOfs.X(); aRet.Right()=-aOfs.X()+aSiz.Width(); break;
+ case SdrHelpLineKind::Vertical : aRet.SetTop(-aOfs.Y() ); aRet.SetBottom(-aOfs.Y()+aSiz.Height() ); break;
+ case SdrHelpLineKind::Horizontal: aRet.SetLeft(-aOfs.X() ); aRet.SetRight(-aOfs.X()+aSiz.Width() ); break;
case SdrHelpLineKind::Point : {
Size aRad(rOut.PixelToLogic(Size(SDRHELPLINE_POINT_PIXELSIZE,SDRHELPLINE_POINT_PIXELSIZE)));
- aRet.Left() -=aRad.Width();
- aRet.Right() +=aRad.Width();
- aRet.Top() -=aRad.Height();
- aRet.Bottom()+=aRad.Height();
+ aRet.AdjustLeft( -(aRad.Width()) );
+ aRet.AdjustRight(aRad.Width() );
+ aRet.AdjustTop( -(aRad.Height()) );
+ aRet.AdjustBottom(aRad.Height() );
} break;
} // switch
return aRet;
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 6e1f04d693ce..c36516c65a2b 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -333,7 +333,7 @@ void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const tools::Rectangl
return;
}
tools::Rectangle aR(rRect);
- aR.Bottom()++;
+ aR.AdjustBottom( 1 );
auto& pEntry=aList[nAktPaintRow];
if (pEntry->bComment)
{
@@ -341,8 +341,8 @@ void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const tools::Rectangl
{
rDev.SetLineColor();
rDev.SetFillColor( Color( COL_LIGHTGRAY ) );
- aR.Left()=0;
- aR.Right()=rDev.GetOutputSize().Width();
+ aR.SetLeft(0 );
+ aR.SetRight(rDev.GetOutputSize().Width() );
rDev.DrawRect(aR);
rDev.DrawText(rRect.TopLeft(),pEntry->aName);
}
@@ -477,8 +477,8 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos)
SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT));
pEditControl=VclPtr<ImpItemEdit>::Create(&GetDataWindow(),this,0);
tools::Rectangle aRect(GetFieldRectPixel(nPos, ITEMBROWSER_VALUECOL_ID, false));
- aRect.Left()+=2; // little offset for the Edit, so it's exact to the pixel
- aRect.Right()--;
+ aRect.AdjustLeft(2 ); // little offset for the Edit, so it's exact to the pixel
+ aRect.AdjustRight( -1 );
pEditControl->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize());
pEditControl->SetText(pEntry->aValue);
pEditControl->SetBackground( Wallpaper(Color(COL_LIGHTGRAY)));
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 85ede4828fa7..985b415ca3b6 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1268,10 +1268,10 @@ void SdrMarkView::ForceRefToMarked()
}
}
- maRef1.X()=aCenter.X();
- maRef1.Y()=nY1;
- maRef2.X()=aCenter.X();
- maRef2.Y()=nY2;
+ maRef1.setX(aCenter.X() );
+ maRef1.setY(nY1 );
+ maRef2.setX(aCenter.X() );
+ maRef2.setY(nY2 );
break;
}
@@ -1698,10 +1698,10 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
nTol2*=2;
}
- aRect.Left ()-=nTol2; // add 1 tolerance for all objects
- aRect.Top ()-=nTol2;
- aRect.Right ()+=nTol2;
- aRect.Bottom()+=nTol2;
+ aRect.AdjustLeft( -nTol2 ); // add 1 tolerance for all objects
+ aRect.AdjustTop( -nTol2 );
+ aRect.AdjustRight(nTol2 );
+ aRect.AdjustBottom(nTol2 );
if (aRect.IsInside(rPnt))
{
@@ -1935,10 +1935,10 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
SdrPageView* pPV=pM->GetPageView();
SdrObject* pObj=pM->GetMarkedSdrObj();
tools::Rectangle aRect(pObj->GetCurrentBoundRect());
- aRect.Left ()-=mnHitTolLog;
- aRect.Top ()-=mnHitTolLog;
- aRect.Right ()+=mnHitTolLog;
- aRect.Bottom()+=mnHitTolLog;
+ aRect.AdjustLeft( -(mnHitTolLog) );
+ aRect.AdjustTop( -(mnHitTolLog) );
+ aRect.AdjustRight(mnHitTolLog );
+ aRect.AdjustBottom(mnHitTolLog );
if (aRect.IsInside(rPnt)) {
rpObj=pObj;
rpPV=pPV;
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 85a2e193fb7b..8c5cd6b12647 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -292,10 +292,10 @@ void SdrMarkView::ImpSetPointsRects() const
if (rR.IsEmpty()) {
rR=tools::Rectangle(aPt,aPt);
} else {
- if (aPt.X()<rR.Left ()) rR.Left ()=aPt.X();
- if (aPt.X()>rR.Right ()) rR.Right ()=aPt.X();
- if (aPt.Y()<rR.Top ()) rR.Top ()=aPt.Y();
- if (aPt.Y()>rR.Bottom()) rR.Bottom()=aPt.Y();
+ if (aPt.X()<rR.Left ()) rR.SetLeft(aPt.X() );
+ if (aPt.X()>rR.Right ()) rR.SetRight(aPt.X() );
+ if (aPt.Y()<rR.Top ()) rR.SetTop(aPt.Y() );
+ if (aPt.Y()>rR.Bottom()) rR.SetBottom(aPt.Y() );
}
}
}
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 3b7ccaf33dae..7b6dddf2fabd 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1669,10 +1669,10 @@ SdrGluePoint SdrObjCustomShape::GetVertexGluePoint(sal_uInt16 nPosNum) const
Point aPt;
switch (nPosNum) {
- case 0: aPt=maRect.TopCenter(); aPt.Y()-=nWdt; break;
- case 1: aPt=maRect.RightCenter(); aPt.X()+=nWdt; break;
- case 2: aPt=maRect.BottomCenter(); aPt.Y()+=nWdt; break;
- case 3: aPt=maRect.LeftCenter(); aPt.X()-=nWdt; break;
+ case 0: aPt=maRect.TopCenter(); aPt.AdjustY( -nWdt ); break;
+ case 1: aPt=maRect.RightCenter(); aPt.AdjustX(nWdt ); break;
+ case 2: aPt=maRect.BottomCenter(); aPt.AdjustY(nWdt ); break;
+ case 3: aPt=maRect.LeftCenter(); aPt.AdjustX( -nWdt ); break;
}
if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
@@ -1751,11 +1751,11 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded()
RotatePoint( aGlue, aRef, sin( fObjectRotation * F_PI180 ), cos( fObjectRotation * F_PI180 ) );
if ( bMirroredX )
- aGlue.X() = maRect.GetWidth() - aGlue.X();
+ aGlue.setX( maRect.GetWidth() - aGlue.X() );
if ( bMirroredY )
- aGlue.Y() = maRect.GetHeight() - aGlue.Y();
- aGlue.X() -= nXDiff;
- aGlue.Y() -= nYDiff;
+ aGlue.setY( maRect.GetHeight() - aGlue.Y() );
+ aGlue.AdjustX( -nXDiff );
+ aGlue.AdjustY( -nYDiff );
rPoint.SetPos( aGlue );
}
}
@@ -2241,18 +2241,18 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
tools::Rectangle aR0(rR);
long nHgt=0,nMinHgt=0,nMaxHgt=0;
long nWdt=0,nMinWdt=0,nMaxWdt=0;
- Size aSiz(rR.GetSize()); aSiz.Width()--; aSiz.Height()--;
+ Size aSiz(rR.GetSize()); aSiz.AdjustWidth( -1 ); aSiz.AdjustHeight( -1 );
Size aMaxSiz(100000,100000);
Size aTmpSiz(pModel->GetMaxObjSize());
- if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();
- if (aTmpSiz.Height()!=0) aMaxSiz.Height()=aTmpSiz.Height();
+ if (aTmpSiz.Width()!=0) aMaxSiz.setWidth(aTmpSiz.Width() );
+ if (aTmpSiz.Height()!=0) aMaxSiz.setHeight(aTmpSiz.Height() );
if (bWdtGrow)
{
nMinWdt=GetMinTextFrameWidth();
nMaxWdt=GetMaxTextFrameWidth();
if (nMaxWdt==0 || nMaxWdt>aMaxSiz.Width()) nMaxWdt=aMaxSiz.Width();
if (nMinWdt<=0) nMinWdt=1;
- aSiz.Width()=nMaxWdt;
+ aSiz.setWidth(nMaxWdt );
}
if (bHgtGrow)
{
@@ -2260,16 +2260,16 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
nMaxHgt=GetMaxTextFrameHeight();
if (nMaxHgt==0 || nMaxHgt>aMaxSiz.Height()) nMaxHgt=aMaxSiz.Height();
if (nMinHgt<=0) nMinHgt=1;
- aSiz.Height()=nMaxHgt;
+ aSiz.setHeight(nMaxHgt );
}
long nHDist=GetTextLeftDistance()+GetTextRightDistance();
long nVDist=GetTextUpperDistance()+GetTextLowerDistance();
- aSiz.Width()-=nHDist;
- aSiz.Height()-=nVDist;
+ aSiz.AdjustWidth( -nHDist );
+ aSiz.AdjustHeight( -nVDist );
if ( aSiz.Width() < 2 )
- aSiz.Width() = 2; // minimum size=2
+ aSiz.setWidth( 2 ); // minimum size=2
if ( aSiz.Height() < 2 )
- aSiz.Height() = 2; // minimum size=2
+ aSiz.setHeight( 2 ); // minimum size=2
if (HasText())
{
@@ -2341,28 +2341,28 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(tools::Rectangle& rR, bool
{
SdrTextHorzAdjust eHAdj=GetTextHorizontalAdjust();
if ( eHAdj == SDRTEXTHORZADJUST_LEFT )
- rR.Right()+=nWdtGrow;
+ rR.AdjustRight(nWdtGrow );
else if ( eHAdj == SDRTEXTHORZADJUST_RIGHT )
- rR.Left()-=nWdtGrow;
+ rR.AdjustLeft( -nWdtGrow );
else
{
long nWdtGrow2=nWdtGrow/2;
- rR.Left()-=nWdtGrow2;
- rR.Right()=rR.Left()+nWdt;
+ rR.AdjustLeft( -nWdtGrow2 );
+ rR.SetRight(rR.Left()+nWdt );
}
}
if ( bHgtGrow )
{
SdrTextVertAdjust eVAdj=GetTextVerticalAdjust();
if ( eVAdj == SDRTEXTVERTADJUST_TOP )
- rR.Bottom()+=nHgtGrow;
+ rR.AdjustBottom(nHgtGrow );
else if ( eVAdj == SDRTEXTVERTADJUST_BOTTOM )
- rR.Top()-=nHgtGrow;
+ rR.AdjustTop( -nHgtGrow );
else
{
long nHgtGrow2=nHgtGrow/2;
- rR.Top()-=nHgtGrow2;
- rR.Bottom()=rR.Top()+nHgt;
+ rR.AdjustTop( -nHgtGrow2 );
+ rR.SetBottom(rR.Top()+nHgt );
}
}
if ( aGeo.nRotationAngle )
@@ -2403,10 +2403,10 @@ tools::Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, cons
double fLeftDiff = static_cast<double>( aAdjustedTextRect.Left() - aNewTextRect.Left() ) * fXScale;
double fTopDiff = static_cast<double>( aAdjustedTextRect.Top() - aNewTextRect.Top() ) * fYScale;
double fBottomDiff= static_cast<double>( aAdjustedTextRect.Bottom()- aNewTextRect.Bottom()) * fYScale;
- aReturnValue.Left() += static_cast<sal_Int32>(fLeftDiff);
- aReturnValue.Right() += static_cast<sal_Int32>(fRightDiff);
- aReturnValue.Top() += static_cast<sal_Int32>(fTopDiff);
- aReturnValue.Bottom() += static_cast<sal_Int32>(fBottomDiff);
+ aReturnValue.AdjustLeft(static_cast<sal_Int32>(fLeftDiff) );
+ aReturnValue.AdjustRight(static_cast<sal_Int32>(fRightDiff) );
+ aReturnValue.AdjustTop(static_cast<sal_Int32>(fTopDiff) );
+ aReturnValue.AdjustBottom(static_cast<sal_Int32>(fBottomDiff) );
}
}
return aReturnValue;
@@ -2497,12 +2497,12 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools
aViewInit.Move(aCenter.X(),aCenter.Y());
}
Size aAnkSiz(aViewInit.GetSize());
- aAnkSiz.Width()--; aAnkSiz.Height()--; // because GetSize() adds 1
+ aAnkSiz.AdjustWidth( -1 ); aAnkSiz.AdjustHeight( -1 ); // because GetSize() adds 1
Size aMaxSiz(1000000,1000000);
if (pModel!=nullptr) {
Size aTmpSiz(pModel->GetMaxObjSize());
- if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();
- if (aTmpSiz.Height()!=0) aMaxSiz.Height()=aTmpSiz.Height();
+ if (aTmpSiz.Width()!=0) aMaxSiz.setWidth(aTmpSiz.Width() );
+ if (aTmpSiz.Height()!=0) aMaxSiz.setHeight(aTmpSiz.Height() );
}
SdrTextHorzAdjust eHAdj(GetTextHorizontalAdjust());
SdrTextVertAdjust eVAdj(GetTextVerticalAdjust());
@@ -2531,11 +2531,11 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools
nMinWdt = nMaxWdt;
}
}
- aPaperMax.Width()=nMaxWdt;
- aPaperMax.Height()=nMaxHgt;
+ aPaperMax.setWidth(nMaxWdt );
+ aPaperMax.setHeight(nMaxHgt );
- aPaperMin.Width()=nMinWdt;
- aPaperMin.Height()=nMinHgt;
+ aPaperMin.setWidth(nMinWdt );
+ aPaperMin.setHeight(nMinHgt );
if ( pViewMin )
{
@@ -2543,30 +2543,30 @@ void SdrObjCustomShape::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools
long nXFree = aAnkSiz.Width() - aPaperMin.Width();
if ( eHAdj == SDRTEXTHORZADJUST_LEFT )
- pViewMin->Right() -= nXFree;
+ pViewMin->AdjustRight( -nXFree );
else if ( eHAdj == SDRTEXTHORZADJUST_RIGHT )
- pViewMin->Left() += nXFree;
- else { pViewMin->Left() += nXFree / 2; pViewMin->Right() = pViewMin->Left() + aPaperMin.Width(); }
+ pViewMin->AdjustLeft(nXFree );
+ else { pViewMin->AdjustLeft(nXFree / 2 ); pViewMin->SetRight( pViewMin->Left() + aPaperMin.Width() ); }
long nYFree = aAnkSiz.Height() - aPaperMin.Height();
if ( eVAdj == SDRTEXTVERTADJUST_TOP )
- pViewMin->Bottom() -= nYFree;
+ pViewMin->AdjustBottom( -nYFree );
else if ( eVAdj == SDRTEXTVERTADJUST_BOTTOM )
- pViewMin->Top() += nYFree;
- else { pViewMin->Top() += nYFree / 2; pViewMin->Bottom() = pViewMin->Top() + aPaperMin.Height(); }
+ pViewMin->AdjustTop(nYFree );
+ else { pViewMin->AdjustTop(nYFree / 2 ); pViewMin->SetBottom( pViewMin->Top() + aPaperMin.Height() ); }
}
if( IsVerticalWriting() )
- aPaperMin.Width() = 0;
+ aPaperMin.setWidth( 0 );
else
- aPaperMin.Height() = 0;
+ aPaperMin.setHeight( 0 );
if( eHAdj != SDRTEXTHORZADJUST_BLOCK )
- aPaperMin.Width()=0;
+ aPaperMin.setWidth(0 );
// For complete vertical adjust support, set paper min height to 0, here.
if(SDRTEXTVERTADJUST_BLOCK != eVAdj )
- aPaperMin.Height() = 0;
+ aPaperMin.setHeight( 0 );
if (pPaperMin!=nullptr) *pPaperMin=aPaperMin;
if (pPaperMax!=nullptr) *pPaperMax=aPaperMax;
@@ -2582,16 +2582,16 @@ void SdrObjCustomShape::TakeTextAnchorRect( tools::Rectangle& rAnchorRect ) cons
if ( GetTextBounds( rAnchorRect ) )
{
Point aRotateRef( maSnapRect.Center() );
- rAnchorRect.Left() += GetTextLeftDistance();
- rAnchorRect.Top() += GetTextUpperDistance();
- rAnchorRect.Right() -= GetTextRightDistance();
- rAnchorRect.Bottom() -= GetTextLowerDistance();
+ rAnchorRect.AdjustLeft(GetTextLeftDistance() );
+ rAnchorRect.AdjustTop(GetTextUpperDistance() );
+ rAnchorRect.AdjustRight( -(GetTextRightDistance()) );
+ rAnchorRect.AdjustBottom( -(GetTextLowerDistance()) );
ImpJustifyRect( rAnchorRect );
if ( rAnchorRect.GetWidth() < 2 )
- rAnchorRect.Right() = rAnchorRect.Left() + 1; // minimal width is 2
+ rAnchorRect.SetRight( rAnchorRect.Left() + 1 ); // minimal width is 2
if ( rAnchorRect.GetHeight() < 2 )
- rAnchorRect.Bottom() = rAnchorRect.Top() + 1; // minimal height is 2
+ rAnchorRect.SetBottom( rAnchorRect.Top() + 1 ); // minimal height is 2
if ( aGeo.nRotationAngle )
{
Point aP( rAnchorRect.TopLeft() );
@@ -2716,17 +2716,17 @@ void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle&
{
long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
if (eHAdj==SDRTEXTHORZADJUST_CENTER)
- aTextPos.X()+=nFreeWdt/2;
+ aTextPos.AdjustX(nFreeWdt/2 );
if (eHAdj==SDRTEXTHORZADJUST_RIGHT)
- aTextPos.X()+=nFreeWdt;
+ aTextPos.AdjustX(nFreeWdt );
}
if (eVAdj==SDRTEXTVERTADJUST_CENTER || eVAdj==SDRTEXTVERTADJUST_BOTTOM)
{
long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
if (eVAdj==SDRTEXTVERTADJUST_CENTER)
- aTextPos.Y()+=nFreeHgt/2;
+ aTextPos.AdjustY(nFreeHgt/2 );
if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
- aTextPos.Y()+=nFreeHgt;
+ aTextPos.AdjustY(nFreeHgt );
}
if (aGeo.nRotationAngle!=0)
RotatePoint(aTextPos,aAnkRect.TopLeft(),aGeo.nSin,aGeo.nCos);
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 612f01ab4d1f..f1fcfd8c7f08 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1195,10 +1195,10 @@ tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
bool bRgt=(eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::Right || eHdl==SdrHdlKind::LowerRight);
bool bTop=(eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::Upper || eHdl==SdrHdlKind::UpperLeft);
bool bBtm=(eHdl==SdrHdlKind::LowerRight || eHdl==SdrHdlKind::Lower || eHdl==SdrHdlKind::LowerLeft);
- if (bLft) aTmpRect.Left() =aPos.X();
- if (bRgt) aTmpRect.Right() =aPos.X();
- if (bTop) aTmpRect.Top() =aPos.Y();
- if (bBtm) aTmpRect.Bottom()=aPos.Y();
+ if (bLft) aTmpRect.SetLeft(aPos.X() );
+ if (bRgt) aTmpRect.SetRight(aPos.X() );
+ if (bTop) aTmpRect.SetTop(aPos.Y() );
+ if (bBtm) aTmpRect.SetBottom(aPos.Y() );
if (bOrtho) { // Ortho
long nWdt0=aRect.Right() -aRect.Left();
long nHgt0=aRect.Bottom()-aRect.Top();
@@ -1223,26 +1223,26 @@ tools::Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bUseX) {
long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
if (bYNeg) nNeed=-nNeed;
- if (bTop) aTmpRect.Top()=aTmpRect.Bottom()-nNeed;
- if (bBtm) aTmpRect.Bottom()=aTmpRect.Top()+nNeed;
+ if (bTop) aTmpRect.SetTop(aTmpRect.Bottom()-nNeed );
+ if (bBtm) aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
} else {
long nNeed=long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
if (bXNeg) nNeed=-nNeed;
- if (bLft) aTmpRect.Left()=aTmpRect.Right()-nNeed;
- if (bRgt) aTmpRect.Right()=aTmpRect.Left()+nNeed;
+ if (bLft) aTmpRect.SetLeft(aTmpRect.Right()-nNeed );
+ if (bRgt) aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
} else { // apex handles
if ((bLft || bRgt) && nXDiv!=0) {
long nHgt0b=aRect.Bottom()-aRect.Top();
long nNeed=long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
- aTmpRect.Top()-=(nNeed-nHgt0b)/2;
- aTmpRect.Bottom()=aTmpRect.Top()+nNeed;
+ aTmpRect.AdjustTop( -((nNeed-nHgt0b)/2) );
+ aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
}
if ((bTop || bBtm) && nYDiv!=0) {
long nWdt0b=aRect.Right()-aRect.Left();
long nNeed=long(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
- aTmpRect.Left()-=(nNeed-nWdt0b)/2;
- aTmpRect.Right()=aTmpRect.Left()+nNeed;
+ aTmpRect.AdjustLeft( -((nNeed-nWdt0b)/2) );
+ aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
}
}
@@ -1371,12 +1371,12 @@ void SdrObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fracti
Point aRef1(GetSnapRect().Center());
if (bXMirr) {
Point aRef2(aRef1);
- aRef2.Y()++;
+ aRef2.AdjustY( 1 );
NbcMirrorGluePoints(aRef1,aRef2);
}
if (bYMirr) {
Point aRef2(aRef1);
- aRef2.X()++;
+ aRef2.AdjustX( 1 );
NbcMirrorGluePoints(aRef1,aRef2);
}
}
@@ -1390,20 +1390,20 @@ void SdrObject::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
aOutRect.Move(-rRef.X(),-rRef.Y());
tools::Rectangle R(aOutRect);
if (sn==1.0 && cs==0.0) { // 90deg
- aOutRect.Left() =-R.Bottom();
- aOutRect.Right() =-R.Top();
- aOutRect.Top() =R.Left();
- aOutRect.Bottom()=R.Right();
+ aOutRect.SetLeft(-R.Bottom() );
+ aOutRect.SetRight(-R.Top() );
+ aOutRect.SetTop(R.Left() );
+ aOutRect.SetBottom(R.Right() );
} else if (sn==0.0 && cs==-1.0) { // 180deg
- aOutRect.Left() =-R.Right();
- aOutRect.Right() =-R.Left();
- aOutRect.Top() =-R.Bottom();
- aOutRect.Bottom()=-R.Top();
+ aOutRect.SetLeft(-R.Right() );
+ aOutRect.SetRight(-R.Left() );
+ aOutRect.SetTop(-R.Bottom() );
+ aOutRect.SetBottom(-R.Top() );
} else if (sn==-1.0 && cs==0.0) { // 270deg
- aOutRect.Left() =R.Top();
- aOutRect.Right() =R.Bottom();
- aOutRect.Top() =-R.Right();
- aOutRect.Bottom()=-R.Left();
+ aOutRect.SetLeft(R.Top() );
+ aOutRect.SetRight(R.Bottom() );
+ aOutRect.SetTop(-R.Right() );
+ aOutRect.SetBottom(-R.Left() );
}
aOutRect.Move(rRef.X(),rRef.Y());
aOutRect.Justify(); // just in case
@@ -1420,21 +1420,21 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
long dx=rRef2.X()-rRef1.X();
long dy=rRef2.Y()-rRef1.Y();
if (dx==0) { // vertical axis
- aOutRect.Left() =-R.Right();
- aOutRect.Right()=-R.Left();
+ aOutRect.SetLeft(-R.Right() );
+ aOutRect.SetRight(-R.Left() );
} else if (dy==0) { // horizontal axis
- aOutRect.Top() =-R.Bottom();
- aOutRect.Bottom()=-R.Top();
+ aOutRect.SetTop(-R.Bottom() );
+ aOutRect.SetBottom(-R.Top() );
} else if (dx==dy) { // 45deg axis
- aOutRect.Left() =R.Top();
- aOutRect.Right() =R.Bottom();
- aOutRect.Top() =R.Left();
- aOutRect.Bottom()=R.Right();
+ aOutRect.SetLeft(R.Top() );
+ aOutRect.SetRight(R.Bottom() );
+ aOutRect.SetTop(R.Left() );
+ aOutRect.SetBottom(R.Right() );
} else if (dx==-dy) { // 45deg axis
- aOutRect.Left() =-R.Bottom();
- aOutRect.Right() =-R.Top();
- aOutRect.Top() =-R.Right();
- aOutRect.Bottom()=-R.Left();
+ aOutRect.SetLeft(-R.Bottom() );
+ aOutRect.SetRight(-R.Top() );
+ aOutRect.SetTop(-R.Right() );
+ aOutRect.SetBottom(-R.Left() );
}
aOutRect.Move(rRef1.X(),rRef1.Y());
aOutRect.Justify(); // just in case
@@ -1953,19 +1953,19 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
const tools::Rectangle& rSnap=GetSnapRect();
const tools::Rectangle& rLogic=GetLogicRect();
Point aRef1(rSnap.Center());
- Point aRef2(aRef1); aRef2.Y()++;
+ Point aRef2(aRef1); aRef2.AdjustY( 1 );
const SfxPoolItem *pPoolItem=nullptr;
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1X,true,&pPoolItem)==SfxItemState::SET) {
- aRef1.X()=static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue();
+ aRef1.setX(static_cast<const SdrTransformRef1XItem*>(pPoolItem)->GetValue() );
}
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF1Y,true,&pPoolItem)==SfxItemState::SET) {
- aRef1.Y()=static_cast<const SdrTransformRef1YItem*>(pPoolItem)->GetValue();
+ aRef1.setY(static_cast<const SdrTransformRef1YItem*>(pPoolItem)->GetValue() );
}
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2X,true,&pPoolItem)==SfxItemState::SET) {
- aRef2.X()=static_cast<const SdrTransformRef2XItem*>(pPoolItem)->GetValue();
+ aRef2.setX(static_cast<const SdrTransformRef2XItem*>(pPoolItem)->GetValue() );
}
if (rAttr.GetItemState(SDRATTR_TRANSFORMREF2Y,true,&pPoolItem)==SfxItemState::SET) {
- aRef2.Y()=static_cast<const SdrTransformRef2YItem*>(pPoolItem)->GetValue();
+ aRef2.setY(static_cast<const SdrTransformRef2YItem*>(pPoolItem)->GetValue() );
}
tools::Rectangle aNewSnap(rSnap);
@@ -1987,11 +1987,11 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
}
if (rAttr.GetItemState(SDRATTR_ONESIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) {
long n=static_cast<const SdrOneSizeWidthItem*>(pPoolItem)->GetValue();
- aNewSnap.Right()=aNewSnap.Left()+n;
+ aNewSnap.SetRight(aNewSnap.Left()+n );
}
if (rAttr.GetItemState(SDRATTR_ONESIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) {
long n=static_cast<const SdrOneSizeHeightItem*>(pPoolItem)->GetValue();
- aNewSnap.Bottom()=aNewSnap.Top()+n;
+ aNewSnap.SetBottom(aNewSnap.Top()+n );
}
if (aNewSnap!=rSnap) {
if (aNewSnap.GetSize()==rSnap.GetSize()) {
@@ -2084,11 +2084,11 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
tools::Rectangle aNewLogic(rLogic);
if (rAttr.GetItemState(SDRATTR_LOGICSIZEWIDTH,true,&pPoolItem)==SfxItemState::SET) {
long n=static_cast<const SdrLogicSizeWidthItem*>(pPoolItem)->GetValue();
- aNewLogic.Right()=aNewLogic.Left()+n;
+ aNewLogic.SetRight(aNewLogic.Left()+n );
}
if (rAttr.GetItemState(SDRATTR_LOGICSIZEHEIGHT,true,&pPoolItem)==SfxItemState::SET) {
long n=static_cast<const SdrLogicSizeHeightItem*>(pPoolItem)->GetValue();
- aNewLogic.Bottom()=aNewLogic.Top()+n;
+ aNewLogic.SetBottom(aNewLogic.Top()+n );
}
if (aNewLogic!=rLogic) {
NbcSetLogicRect(aNewLogic);
@@ -2142,7 +2142,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr) const
}
}
Point aRef1(rSnap.Center());
- Point aRef2(aRef1); aRef2.Y()++;
+ Point aRef2(aRef1); aRef2.AdjustY( 1 );
rAttr.Put(SdrTransformRef1XItem(aRef1.X()));
rAttr.Put(SdrTransformRef1YItem(aRef1.Y()));
rAttr.Put(SdrTransformRef2XItem(aRef2.X()));
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 4a7b3bd878f9..00cb7ded37ab 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -461,11 +461,11 @@ void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPo
if(eEscDir==LKS || eEscDir==RTS)
{
- aPol[0].X() = aEscPos.X();
+ aPol[0].setX( aEscPos.X() );
}
else
{
- aPol[0].Y() = aEscPos.Y();
+ aPol[0].setY( aEscPos.Y() );
}
rPoly = aPol;
@@ -502,17 +502,17 @@ void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPo
if (eEscDir==LKS || eEscDir==RTS) {
if (rPara.bFitLineLen) {
- aPol[1].X()=(aTl.X()+aEscPos.X())/2;
+ aPol[1].setX((aTl.X()+aEscPos.X())/2 );
} else {
- if (eEscDir==LKS) aPol[1].X()-=rPara.nLineLen;
- else aPol[1].X()+=rPara.nLineLen;
+ if (eEscDir==LKS) aPol[1].AdjustX( -(rPara.nLineLen) );
+ else aPol[1].AdjustX(rPara.nLineLen );
}
} else {
if (rPara.bFitLineLen) {
- aPol[1].Y()=(aTl.Y()+aEscPos.Y())/2;
+ aPol[1].setY((aTl.Y()+aEscPos.Y())/2 );
} else {
- if (eEscDir==OBN) aPol[1].Y()-=rPara.nLineLen;
- else aPol[1].Y()+=rPara.nLineLen;
+ if (eEscDir==OBN) aPol[1].AdjustY( -(rPara.nLineLen) );
+ else aPol[1].AdjustY(rPara.nLineLen );
}
}
if (!rPara.bFixedAngle) {
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 61b050d39fe2..78dd14899b20 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -61,25 +61,25 @@ Point GetAnglePnt(const tools::Rectangle& rR, long nAngle)
double a;
a=nAngle*nPi180;
Point aRetval(svx::Round(cos(a)*nMaxRad),-svx::Round(sin(a)*nMaxRad));
- if (nWdt==0) aRetval.X()=0;
- if (nHgt==0) aRetval.Y()=0;
+ if (nWdt==0) aRetval.setX(0 );
+ if (nHgt==0) aRetval.setY(0 );
if (nWdt!=nHgt) {
if (nWdt>nHgt) {
if (nWdt!=0) {
// stop possible overruns for very large objects
if (std::abs(nHgt)>32767 || std::abs(aRetval.Y())>32767) {
- aRetval.Y()=BigMulDiv(aRetval.Y(),nHgt,nWdt);
+ aRetval.setY(BigMulDiv(aRetval.Y(),nHgt,nWdt) );
} else {
- aRetval.Y()=aRetval.Y()*nHgt/nWdt;
+ aRetval.setY(aRetval.Y()*nHgt/nWdt );
}
}
} else {
if (nHgt!=0) {
// stop possible overruns for very large objects
if (std::abs(nWdt)>32767 || std::abs(aRetval.X())>32767) {
- aRetval.X()=BigMulDiv(aRetval.X(),nWdt,nHgt);
+ aRetval.setX(BigMulDiv(aRetval.X(),nWdt,nHgt) );
} else {
- aRetval.X()=aRetval.X()*nWdt/nHgt;
+ aRetval.setX(aRetval.X()*nWdt/nHgt );
}
}
}
@@ -505,11 +505,11 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag)
if(nWdt>=nHgt)
{
- aPt.Y()=BigMulDiv(aPt.Y(),nWdt,nHgt);
+ aPt.setY(BigMulDiv(aPt.Y(),nWdt,nHgt) );
}
else
{
- aPt.X()=BigMulDiv(aPt.X(),nHgt,nWdt);
+ aPt.setX(BigMulDiv(aPt.X(),nHgt,nWdt) );
}
long nAngle=NormAngle360(GetAngle(aPt));
@@ -618,12 +618,12 @@ void ImpCircUser::SetCreateParams(SdrDragStat const & rStat)
nEnd=36000;
if (rStat.GetPointCount()>2) {
Point aP(rStat.GetPoint(2)-aCenter);
- if (nWdt==0) aP.X()=0;
- if (nHgt==0) aP.Y()=0;
+ if (nWdt==0) aP.setX(0 );
+ if (nHgt==0) aP.setY(0 );
if (nWdt>=nHgt) {
- if (nHgt!=0) aP.Y()=aP.Y()*nWdt/nHgt;
+ if (nHgt!=0) aP.setY(aP.Y()*nWdt/nHgt );
} else {
- if (nWdt!=0) aP.X()=aP.X()*nHgt/nWdt;
+ if (nWdt!=0) aP.setX(aP.X()*nHgt/nWdt );
}
nStart=NormAngle360(GetAngle(aP));
if (rStat.GetView()!=nullptr && rStat.GetView()->IsAngleSnapEnabled()) {
@@ -642,9 +642,9 @@ void ImpCircUser::SetCreateParams(SdrDragStat const & rStat)
if (rStat.GetPointCount()>3) {
Point aP(rStat.GetPoint(3)-aCenter);
if (nWdt>=nHgt) {
- aP.Y()=BigMulDiv(aP.Y(),nWdt,nHgt);
+ aP.setY(BigMulDiv(aP.Y(),nWdt,nHgt) );
} else {
- aP.X()=BigMulDiv(aP.X(),nHgt,nWdt);
+ aP.setX(BigMulDiv(aP.X(),nHgt,nWdt) );
}
nEnd=NormAngle360(GetAngle(aP));
if (rStat.GetView()!=nullptr && rStat.GetView()->IsAngleSnapEnabled()) {
@@ -868,14 +868,14 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2)
// starting point
a=nStartAngle*nPi180;
aTmpPt1=Point(svx::Round(cos(a)*nMaxRad),-svx::Round(sin(a)*nMaxRad));
- if (nWdt==0) aTmpPt1.X()=0;
- if (nHgt==0) aTmpPt1.Y()=0;
+ if (nWdt==0) aTmpPt1.setX(0 );
+ if (nHgt==0) aTmpPt1.setY(0 );
aTmpPt1+=aCenter;
// finishing point
a=nEndAngle*nPi180;
aTmpPt2=Point(svx::Round(cos(a)*nMaxRad),-svx::Round(sin(a)*nMaxRad));
- if (nWdt==0) aTmpPt2.X()=0;
- if (nHgt==0) aTmpPt2.Y()=0;
+ if (nWdt==0) aTmpPt2.setX(0 );
+ if (nHgt==0) aTmpPt2.setY(0 );
aTmpPt2+=aCenter;
if (aGeo.nRotationAngle!=0) {
RotatePoint(aTmpPt1,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
@@ -940,10 +940,10 @@ void SdrCircObj::RestGeoData(const SdrObjGeoData& rGeo)
void Union(tools::Rectangle& rR, const Point& rP)
{
- if (rP.X()<rR.Left ()) rR.Left ()=rP.X();
- if (rP.X()>rR.Right ()) rR.Right ()=rP.X();
- if (rP.Y()<rR.Top ()) rR.Top ()=rP.Y();
- if (rP.Y()>rR.Bottom()) rR.Bottom()=rP.Y();
+ if (rP.X()<rR.Left ()) rR.SetLeft(rP.X() );
+ if (rP.X()>rR.Right ()) rR.SetRight(rP.X() );
+ if (rP.Y()<rR.Top ()) rR.SetTop(rP.Y() );
+ if (rP.Y()>rR.Bottom()) rR.SetBottom(rP.Y() );
}
void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
@@ -954,10 +954,10 @@ void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
const Point aPntEnd(GetAnglePnt(maRect,nEndAngle));
long a=nStartAngle;
long e=nEndAngle;
- rRect.Left ()=maRect.Right();
- rRect.Right ()=maRect.Left();
- rRect.Top ()=maRect.Bottom();
- rRect.Bottom()=maRect.Top();
+ rRect.SetLeft(maRect.Right() );
+ rRect.SetRight(maRect.Left() );
+ rRect.SetTop(maRect.Bottom() );
+ rRect.SetBottom(maRect.Top() );
Union(rRect,aPntStart);
Union(rRect,aPntEnd);
if ((a<=18000 && e>=18000) || (a>e && (a<=18000 || e>=18000))) {
@@ -988,13 +988,13 @@ void SdrCircObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
long nDst=svx::Round((rRect.Bottom()-rRect.Top())*aGeo.nTan);
if (aGeo.nShearAngle>0) {
Point aRef(rRect.TopLeft());
- rRect.Left()-=nDst;
+ rRect.AdjustLeft( -nDst );
Point aTmpPt(rRect.TopLeft());
RotatePoint(aTmpPt,aRef,aGeo.nSin,aGeo.nCos);
aTmpPt-=rRect.TopLeft();
rRect.Move(aTmpPt.X(),aTmpPt.Y());
} else {
- rRect.Right()-=nDst;
+ rRect.AdjustRight( -nDst );
}
}
}
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index f0fdf4e06730..7aeb6bf17a04 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -131,8 +131,8 @@ bool SdrEdgeInfoRec::ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rX
void SdrEdgeInfoRec::ImpSetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP, long nVal)
{
Point& rPt=ImpGetLineOffsetPoint(eLineCode);
- if (ImpIsHorzLine(eLineCode,rXP)) rPt.Y()=nVal;
- else rPt.X()=nVal;
+ if (ImpIsHorzLine(eLineCode,rXP)) rPt.setY(nVal );
+ else rPt.setX(nVal );
}
long SdrEdgeInfoRec::ImpGetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const
@@ -232,20 +232,20 @@ void SdrEdgeObj::ImpSetAttrToEdgeInfo()
if(bHor1)
{
- aEdgeInfo.aObj1Line2.X() = nVal1;
+ aEdgeInfo.aObj1Line2.setX( nVal1 );
}
else
{
- aEdgeInfo.aObj1Line2.Y() = nVal1;
+ aEdgeInfo.aObj1Line2.setY( nVal1 );
}
if(bHor2)
{
- aEdgeInfo.aObj2Line2.X() = nVal2;
+ aEdgeInfo.aObj2Line2.setX( nVal2 );
}
else
{
- aEdgeInfo.aObj2Line2.Y() = nVal2;
+ aEdgeInfo.aObj2Line2.setY( nVal2 );
}
}
@@ -418,8 +418,8 @@ SdrGluePoint SdrEdgeObj::GetVertexGluePoint(sal_uInt16 nNum) const
Point aPt1((*pEdgeTrack)[nPointCount/2-1]);
Point aPt2((*pEdgeTrack)[nPointCount/2]);
aPt1+=aPt2;
- aPt1.X()/=2;
- aPt1.Y()/=2;
+ aPt1.setX( aPt1.X() / 2 );
+ aPt1.setY( aPt1.Y() / 2 );
aPt=aPt1;
}
}
@@ -643,44 +643,44 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons
bool bUnt=nEscAngle==27000;
Point aP1(rStPt); // mandatory difference first,...
- if (bLks) aP1.X()=rRect.Left();
- if (bRts) aP1.X()=rRect.Right();
- if (bObn) aP1.Y()=rRect.Top();
- if (bUnt) aP1.Y()=rRect.Bottom();
+ if (bLks) aP1.setX(rRect.Left() );
+ if (bRts) aP1.setX(rRect.Right() );
+ if (bObn) aP1.setY(rRect.Top() );
+ if (bUnt) aP1.setY(rRect.Bottom() );
Point aP2(aP1); // ...now increase to Meeting height, if necessary
- if (bLks && rMeeting.X()<=aP2.X()) aP2.X()=rMeeting.X();
- if (bRts && rMeeting.X()>=aP2.X()) aP2.X()=rMeeting.X();
- if (bObn && rMeeting.Y()<=aP2.Y()) aP2.Y()=rMeeting.Y();
- if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.Y()=rMeeting.Y();
+ if (bLks && rMeeting.X()<=aP2.X()) aP2.setX(rMeeting.X() );
+ if (bRts && rMeeting.X()>=aP2.X()) aP2.setX(rMeeting.X() );
+ if (bObn && rMeeting.Y()<=aP2.Y()) aP2.setY(rMeeting.Y() );
+ if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.setY(rMeeting.Y() );
aXP.Insert(XPOLY_APPEND,aP2,PolyFlags::Normal);
Point aP3(aP2);
if ((bLks && rMeeting.X()>aP2.X()) || (bRts && rMeeting.X()<aP2.X())) { // around
if (rMeeting.Y()<aP2.Y()) {
- aP3.Y()=rRect.Top();
- if (rMeeting.Y()<aP3.Y()) aP3.Y()=rMeeting.Y();
+ aP3.setY(rRect.Top() );
+ if (rMeeting.Y()<aP3.Y()) aP3.setY(rMeeting.Y() );
} else {
- aP3.Y()=rRect.Bottom();
- if (rMeeting.Y()>aP3.Y()) aP3.Y()=rMeeting.Y();
+ aP3.setY(rRect.Bottom() );
+ if (rMeeting.Y()>aP3.Y()) aP3.setY(rMeeting.Y() );
}
aXP.Insert(XPOLY_APPEND,aP3,PolyFlags::Normal);
if (aP3.Y()!=rMeeting.Y()) {
- aP3.X()=rMeeting.X();
+ aP3.setX(rMeeting.X() );
aXP.Insert(XPOLY_APPEND,aP3,PolyFlags::Normal);
}
}
if ((bObn && rMeeting.Y()>aP2.Y()) || (bUnt && rMeeting.Y()<aP2.Y())) { // around
if (rMeeting.X()<aP2.X()) {
- aP3.X()=rRect.Left();
- if (rMeeting.X()<aP3.X()) aP3.X()=rMeeting.X();
+ aP3.setX(rRect.Left() );
+ if (rMeeting.X()<aP3.X()) aP3.setX(rMeeting.X() );
} else {
- aP3.X()=rRect.Right();
- if (rMeeting.X()>aP3.X()) aP3.X()=rMeeting.X();
+ aP3.setX(rRect.Right() );
+ if (rMeeting.X()>aP3.X()) aP3.setX(rMeeting.X() );
}
aXP.Insert(XPOLY_APPEND,aP3,PolyFlags::Normal);
if (aP3.X()!=rMeeting.X()) {
- aP3.Y()=rMeeting.Y();
+ aP3.setY(rMeeting.Y() );
aXP.Insert(XPOLY_APPEND,aP3,PolyFlags::Normal);
}
}
@@ -736,10 +736,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
sal_Int32 nH = rSet.Get(SDRATTR_EDGENODE1HORZDIST).GetValue();
sal_Int32 nV = rSet.Get(SDRATTR_EDGENODE1VERTDIST).GetValue();
- aBewareRect1.Left()-=nH;
- aBewareRect1.Right()+=nH;
- aBewareRect1.Top()-=nV;
- aBewareRect1.Bottom()+=nV;
+ aBewareRect1.AdjustLeft( -nH );
+ aBewareRect1.AdjustRight(nH );
+ aBewareRect1.AdjustTop( -nV );
+ aBewareRect1.AdjustBottom(nV );
} else {
aBoundRect1=tools::Rectangle(aPt1,aPt1);
aBoundRect1.Move(rCon1.aObjOfs.X(),rCon1.aObjOfs.Y());
@@ -759,10 +759,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection&
sal_Int32 nH = rSet.Get(SDRATTR_EDGENODE2HORZDIST).GetValue();
sal_Int32 nV = rSet.Get(SDRATTR_EDGENODE2VERTDIST).GetValue();
- aBewareRect2.Left()-=nH;
- aBewareRect2.Right()+=nH;
- aBewareRect2.Top()-=nV;
- aBewareRect2.Bottom()+=nV;
+ aBewareRect2.AdjustLeft( -nH );
+ aBewareRect2.AdjustRight(nH );
+ aBewareRect2.AdjustTop( -nV );
+ aBewareRect2.AdjustBottom(nV );
} else {
aBoundRect2=tools::Rectangle(aPt2,aPt2);
aBoundRect2.Move(rCon2.aObjOfs.X(),rCon2.aObjOfs.Y());
@@ -866,14 +866,14 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
aXP[1]=rPt1;
aXP[2]=rPt2;
aXP[3]=rPt2;
- if (bRts1) aXP[1].X()=aBewareRect1.Right(); //+=500;
- if (bObn1) aXP[1].Y()=aBewareRect1.Top(); //-=500;
- if (bLks1) aXP[1].X()=aBewareRect1.Left(); //-=500;
- if (bUnt1) aXP[1].Y()=aBewareRect1.Bottom(); //+=500;
- if (bRts2) aXP[2].X()=aBewareRect2.Right(); //+=500;
- if (bObn2) aXP[2].Y()=aBewareRect2.Top(); //-=500;
- if (bLks2) aXP[2].X()=aBewareRect2.Left(); //-=500;
- if (bUnt2) aXP[2].Y()=aBewareRect2.Bottom(); //+=500;
+ if (bRts1) aXP[1].setX(aBewareRect1.Right() ); //+=500;
+ if (bObn1) aXP[1].setY(aBewareRect1.Top() ); //-=500;
+ if (bLks1) aXP[1].setX(aBewareRect1.Left() ); //-=500;
+ if (bUnt1) aXP[1].setY(aBewareRect1.Bottom() ); //+=500;
+ if (bRts2) aXP[2].setX(aBewareRect2.Right() ); //+=500;
+ if (bObn2) aXP[2].setY(aBewareRect2.Top() ); //-=500;
+ if (bLks2) aXP[2].setX(aBewareRect2.Left() ); //-=500;
+ if (bUnt2) aXP[2].setY(aBewareRect2.Bottom() ); //+=500;
if (pnQuality!=nullptr) {
long nQ=std::abs(aXP[1].X()-aXP[0].X())+std::abs(aXP[1].Y()-aXP[0].Y());
nQ+=std::abs(aXP[2].X()-aXP[1].X())+std::abs(aXP[2].Y()-aXP[1].Y());
@@ -884,14 +884,14 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
pInfo->nObj1Lines=2;
pInfo->nObj2Lines=2;
if (bHor1) {
- aXP[1].X()+=pInfo->aObj1Line2.X();
+ aXP[1].AdjustX(pInfo->aObj1Line2.X() );
} else {
- aXP[1].Y()+=pInfo->aObj1Line2.Y();
+ aXP[1].AdjustY(pInfo->aObj1Line2.Y() );
}
if (bHor2) {
- aXP[2].X()+=pInfo->aObj2Line2.X();
+ aXP[2].AdjustX(pInfo->aObj2Line2.X() );
} else {
- aXP[2].Y()+=pInfo->aObj2Line2.Y();
+ aXP[2].AdjustY(pInfo->aObj2Line2.Y() );
}
}
return aXP;
@@ -904,26 +904,26 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
// overlapping on the x axis
long n1=std::max(aBewareRect1.Left(),aBewareRect2.Left());
long n2=std::min(aBewareRect1.Right(),aBewareRect2.Right());
- aMeeting.X()=(n1+n2+1)/2;
+ aMeeting.setX((n1+n2+1)/2 );
} else {
// otherwise the center point of the empty space
if (aC1.X()<aC2.X()) {
- aMeeting.X()=(aBewareRect1.Right()+aBewareRect2.Left()+1)/2;
+ aMeeting.setX((aBewareRect1.Right()+aBewareRect2.Left()+1)/2 );
} else {
- aMeeting.X()=(aBewareRect1.Left()+aBewareRect2.Right()+1)/2;
+ aMeeting.setX((aBewareRect1.Left()+aBewareRect2.Right()+1)/2 );
}
}
if (aBewareRect1.Top()<=aBewareRect2.Bottom() && aBewareRect1.Bottom()>=aBewareRect2.Top()) {
// overlapping on the x axis
long n1=std::max(aBewareRect1.Top(),aBewareRect2.Top());
long n2=std::min(aBewareRect1.Bottom(),aBewareRect2.Bottom());
- aMeeting.Y()=(n1+n2+1)/2;
+ aMeeting.setY((n1+n2+1)/2 );
} else {
// otherwise the center point of the empty space
if (aC1.Y()<aC2.Y()) {
- aMeeting.Y()=(aBewareRect1.Bottom()+aBewareRect2.Top()+1)/2;
+ aMeeting.setY((aBewareRect1.Bottom()+aBewareRect2.Top()+1)/2 );
} else {
- aMeeting.Y()=(aBewareRect1.Top()+aBewareRect2.Bottom()+1)/2;
+ aMeeting.setY((aBewareRect1.Top()+aBewareRect2.Bottom()+1)/2 );
}
}
// Here, there are three cases:
@@ -940,24 +940,24 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
if (nAngle1==nAngle2) nMainCase=1;
else if ((bHor1 && bHor2) || (bVer1 && bVer2)) nMainCase=2;
if (nMainCase==1) { // case 1 (both go in one direction) is possible
- if (bVer1) aMeeting.X()=(aPt1.X()+aPt2.X()+1)/2; // Here, this is better than
- if (bHor1) aMeeting.Y()=(aPt1.Y()+aPt2.Y()+1)/2; // using center point of empty space
+ if (bVer1) aMeeting.setX((aPt1.X()+aPt2.X()+1)/2 ); // Here, this is better than
+ if (bHor1) aMeeting.setY((aPt1.Y()+aPt2.Y()+1)/2 ); // using center point of empty space
// bX1Ok means that the vertical exiting Obj1 doesn't conflict with Obj2, ...
bool bX1Ok=aPt1.X()<=aBewareRect2.Left() || aPt1.X()>=aBewareRect2.Right();
bool bX2Ok=aPt2.X()<=aBewareRect1.Left() || aPt2.X()>=aBewareRect1.Right();
bool bY1Ok=aPt1.Y()<=aBewareRect2.Top() || aPt1.Y()>=aBewareRect2.Bottom();
bool bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom();
if (bLks1 && (bY1Ok || aBewareRect1.Left()<aBewareRect2.Right()) && (bY2Ok || aBewareRect2.Left()<aBewareRect1.Right())) {
- aMeeting.X()=nXMin;
+ aMeeting.setX(nXMin );
}
if (bRts1 && (bY1Ok || aBewareRect1.Right()>aBewareRect2.Left()) && (bY2Ok || aBewareRect2.Right()>aBewareRect1.Left())) {
- aMeeting.X()=nXMax;
+ aMeeting.setX(nXMax );
}
if (bObn1 && (bX1Ok || aBewareRect1.Top()<aBewareRect2.Bottom()) && (bX2Ok || aBewareRect2.Top()<aBewareRect1.Bottom())) {
- aMeeting.Y()=nYMin;
+ aMeeting.setY(nYMin );
}
if (bUnt1 && (bX1Ok || aBewareRect1.Bottom()>aBewareRect2.Top()) && (bX2Ok || aBewareRect2.Bottom()>aBewareRect1.Top())) {
- aMeeting.Y()=nYMax;
+ aMeeting.setY(nYMax );
}
} else if (nMainCase==2) {
// case 2:
@@ -1031,17 +1031,17 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
if (!bCase29Direct) {
bool bObenLang=std::abs(nYMin-aMeeting.Y())<=std::abs(nYMax-aMeeting.Y());
if (bObenLang) {
- aMeeting.Y()=nYMin;
+ aMeeting.setY(nYMin );
} else {
- aMeeting.Y()=nYMax;
+ aMeeting.setY(nYMax );
}
if (bCase29) {
// now make sure that the surrounded object
// isn't traversed
if ((aBewR1.Center().Y()<aBewR2.Center().Y()) != bObenLang) {
- aMeeting.X()=aBewR2.Right();
+ aMeeting.setX(aBewR2.Right() );
} else {
- aMeeting.X()=aBewR1.Left();
+ aMeeting.setX(aBewR1.Left() );
}
}
} else {
@@ -1054,11 +1054,11 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
long nGet2=nSpace-nGet1;
if (bRts1) { // revert normalization
- aBewareRect1.Right()+=nGet1-nWant1;
- aBewareRect2.Left()-=nGet2-nWant2;
+ aBewareRect1.AdjustRight(nGet1-nWant1 );
+ aBewareRect2.AdjustLeft( -(nGet2-nWant2) );
} else {
- aBewareRect2.Right()+=nGet1-nWant1;
- aBewareRect1.Left()-=nGet2-nWant2;
+ aBewareRect2.AdjustRight(nGet1-nWant1 );
+ aBewareRect1.AdjustLeft( -(nGet2-nWant2) );
}
nIntersections++; // lower quality
}
@@ -1092,17 +1092,17 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
if (!bCase29Direct) {
bool bLinksLang=std::abs(nXMin-aMeeting.X())<=std::abs(nXMax-aMeeting.X());
if (bLinksLang) {
- aMeeting.X()=nXMin;
+ aMeeting.setX(nXMin );
} else {
- aMeeting.X()=nXMax;
+ aMeeting.setX(nXMax );
}
if (bCase29) {
// now make sure that the surrounded object
// isn't traversed
if ((aBewR1.Center().X()<aBewR2.Center().X()) != bLinksLang) {
- aMeeting.Y()=aBewR2.Bottom();
+ aMeeting.setY(aBewR2.Bottom() );
} else {
- aMeeting.Y()=aBewR1.Top();
+ aMeeting.setY(aBewR1.Top() );
}
}
} else {
@@ -1115,11 +1115,11 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
long nGet1=BigMulDiv(nWant1,nSpace,nWant1+nWant2);
long nGet2=nSpace-nGet1;
if (bUnt1) { // revert normalization
- aBewareRect1.Bottom()+=nGet1-nWant1;
- aBewareRect2.Top()-=nGet2-nWant2;
+ aBewareRect1.AdjustBottom(nGet1-nWant1 );
+ aBewareRect2.AdjustTop( -(nGet2-nWant2) );
} else {
- aBewareRect2.Bottom()+=nGet1-nWant1;
- aBewareRect1.Top()-=nGet2-nWant2;
+ aBewareRect2.AdjustBottom(nGet1-nWant1 );
+ aBewareRect1.AdjustTop( -(nGet2-nWant2) );
}
nIntersections++; // lower quality
}
@@ -1189,11 +1189,11 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
((bUnt1 && aTmpR1.Bottom()<=aPt2.Y()) || (bObn1 && aTmpR1.Top ()>=aPt2.Y())))) {
// case 3.2 applies: connector with only 2 lines
if (bHor1) {
- aMeeting.X()=aPt2.X();
- aMeeting.Y()=aPt1.Y();
+ aMeeting.setX(aPt2.X() );
+ aMeeting.setY(aPt1.Y() );
} else {
- aMeeting.X()=aPt1.X();
- aMeeting.Y()=aPt2.Y();
+ aMeeting.setX(aPt1.X() );
+ aMeeting.setY(aPt2.Y() );
}
// in the case of overlapping BewareRects:
aBewareRect1=aTmpR1;
@@ -1207,10 +1207,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
((bUnt1 && aBewareRect1.Bottom()>aBewareRect2.Top ()) ||
(bObn1 && aBewareRect1.Top ()<aBewareRect2.Bottom())))) {
// case 3.3
- if (bRts1 || bRts2) { aMeeting.X()=nXMax; }
- if (bLks1 || bLks2) { aMeeting.X()=nXMin; }
- if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; }
- if (bObn1 || bObn2) { aMeeting.Y()=nYMin; }
+ if (bRts1 || bRts2) { aMeeting.setX(nXMax ); }
+ if (bLks1 || bLks2) { aMeeting.setX(nXMin ); }
+ if (bUnt1 || bUnt2) { aMeeting.setY(nYMax ); }
+ if (bObn1 || bObn2) { aMeeting.setY(nYMin ); }
}
}
}
@@ -1405,51 +1405,51 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
if (pInfo->nMiddleLine!=0xFFFF) {
sal_uInt16 nIdx=pInfo->ImpGetPolyIdx(SdrEdgeLineCode::MiddleLine,aXP1);
if (pInfo->ImpIsHorzLine(SdrEdgeLineCode::MiddleLine,aXP1)) {
- aXP1[nIdx].Y()+=pInfo->aMiddleLine.Y();
- aXP1[nIdx+1].Y()+=pInfo->aMiddleLine.Y();
+ aXP1[nIdx].AdjustY(pInfo->aMiddleLine.Y() );
+ aXP1[nIdx+1].AdjustY(pInfo->aMiddleLine.Y() );
} else {
- aXP1[nIdx].X()+=pInfo->aMiddleLine.X();
- aXP1[nIdx+1].X()+=pInfo->aMiddleLine.X();
+ aXP1[nIdx].AdjustX(pInfo->aMiddleLine.X() );
+ aXP1[nIdx+1].AdjustX(pInfo->aMiddleLine.X() );
}
}
if (pInfo->nObj1Lines>=2) {
sal_uInt16 nIdx=pInfo->ImpGetPolyIdx(SdrEdgeLineCode::Obj1Line2,aXP1);
if (pInfo->ImpIsHorzLine(SdrEdgeLineCode::Obj1Line2,aXP1)) {
- aXP1[nIdx].Y()+=pInfo->aObj1Line2.Y();
- aXP1[nIdx+1].Y()+=pInfo->aObj1Line2.Y();
+ aXP1[nIdx].AdjustY(pInfo->aObj1Line2.Y() );
+ aXP1[nIdx+1].AdjustY(pInfo->aObj1Line2.Y() );
} else {
- aXP1[nIdx].X()+=pInfo->aObj1Line2.X();
- aXP1[nIdx+1].X()+=pInfo->aObj1Line2.X();
+ aXP1[nIdx].AdjustX(pInfo->aObj1Line2.X() );
+ aXP1[nIdx+1].AdjustX(pInfo->aObj1Line2.X() );
}
}
if (pInfo->nObj1Lines>=3) {
sal_uInt16 nIdx=pInfo->ImpGetPolyIdx(SdrEdgeLineCode::Obj1Line3,aXP1);
if (pInfo->ImpIsHorzLine(SdrEdgeLineCode::Obj1Line3,aXP1)) {
- aXP1[nIdx].Y()+=pInfo->aObj1Line3.Y();
- aXP1[nIdx+1].Y()+=pInfo->aObj1Line3.Y();
+ aXP1[nIdx].AdjustY(pInfo->aObj1Line3.Y() );
+ aXP1[nIdx+1].AdjustY(pInfo->aObj1Line3.Y() );
} else {
- aXP1[nIdx].X()+=pInfo->aObj1Line3.X();
- aXP1[nIdx+1].X()+=pInfo->aObj1Line3.X();
+ aXP1[nIdx].AdjustX(pInfo->aObj1Line3.X() );
+ aXP1[nIdx+1].AdjustX(pInfo->aObj1Line3.X() );
}
}
if (pInfo->nObj2Lines>=2) {
sal_uInt16 nIdx=pInfo->ImpGetPolyIdx(SdrEdgeLineCode::Obj2Line2,aXP1);
if (pInfo->ImpIsHorzLine(SdrEdgeLineCode::Obj2Line2,aXP1)) {
- aXP1[nIdx].Y()+=pInfo->aObj2Line2.Y();
- aXP1[nIdx+1].Y()+=pInfo->aObj2Line2.Y();
+ aXP1[nIdx].AdjustY(pInfo->aObj2Line2.Y() );
+ aXP1[nIdx+1].AdjustY(pInfo->aObj2Line2.Y() );
} else {
- aXP1[nIdx].X()+=pInfo->aObj2Line2.X();
- aXP1[nIdx+1].X()+=pInfo->aObj2Line2.X();
+ aXP1[nIdx].AdjustX(pInfo->aObj2Line2.X() );
+ aXP1[nIdx+1].AdjustX(pInfo->aObj2Line2.X() );
}
}
if (pInfo->nObj2Lines>=3) {
sal_uInt16 nIdx=pInfo->ImpGetPolyIdx(SdrEdgeLineCode::Obj2Line3,aXP1);
if (pInfo->ImpIsHorzLine(SdrEdgeLineCode::Obj2Line3,aXP1)) {
- aXP1[nIdx].Y()+=pInfo->aObj2Line3.Y();
- aXP1[nIdx+1].Y()+=pInfo->aObj2Line3.Y();
+ aXP1[nIdx].AdjustY(pInfo->aObj2Line3.Y() );
+ aXP1[nIdx+1].AdjustY(pInfo->aObj2Line3.Y() );
} else {
- aXP1[nIdx].X()+=pInfo->aObj2Line3.X();
- aXP1[nIdx+1].X()+=pInfo->aObj2Line3.X();
+ aXP1[nIdx].AdjustX(pInfo->aObj2Line3.X() );
+ aXP1[nIdx+1].AdjustX(pInfo->aObj2Line3.X() );
}
}
}
@@ -1470,20 +1470,20 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
nPointCount=aXP1.GetPointCount();
pPt2=&aXP1[1];
pPt3=&aXP1[nPointCount-2];
- pPt2->X()-=dx1/3;
- pPt2->Y()-=dy1/3;
- pPt3->X()-=dx2/3;
- pPt3->Y()-=dy2/3;
+ pPt2->AdjustX( -(dx1/3) );
+ pPt2->AdjustY( -(dy1/3) );
+ pPt3->AdjustX( -(dx2/3) );
+ pPt3->AdjustY( -(dy2/3) );
} else if (nPointCount>=4 && nPointCount<=6) { // Z or U or ...
// To all others, the end points of the original lines become control
// points for now. Thus, we need to do some more work for nPointCount>4!
aXP1.SetFlags(1,PolyFlags::Control);
aXP1.SetFlags(nPointCount-2,PolyFlags::Control);
// distance x1.5
- pPt2->X()+=dx1/2;
- pPt2->Y()+=dy1/2;
- pPt3->X()+=dx2/2;
- pPt3->Y()+=dy2/2;
+ pPt2->AdjustX(dx1/2 );
+ pPt2->AdjustY(dy1/2 );
+ pPt3->AdjustX(dx2/2 );
+ pPt3->AdjustY(dy2/2 );
if (nPointCount==5) {
// add a control point before and after center
Point aCenter(aXP1[2]);
@@ -1494,12 +1494,12 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
aXP1.Insert(2,aCenter,PolyFlags::Control);
aXP1.SetFlags(3,PolyFlags::Symmetric);
aXP1.Insert(4,aCenter,PolyFlags::Control);
- aXP1[2].X()-=dx1b/2;
- aXP1[2].Y()-=dy1b/2;
- aXP1[3].X()-=(dx1b+dx2b)/4;
- aXP1[3].Y()-=(dy1b+dy2b)/4;
- aXP1[4].X()-=dx2b/2;
- aXP1[4].Y()-=dy2b/2;
+ aXP1[2].AdjustX( -(dx1b/2) );
+ aXP1[2].AdjustY( -(dy1b/2) );
+ aXP1[3].AdjustX( -((dx1b+dx2b)/4) );
+ aXP1[3].AdjustY( -((dy1b+dy2b)/4) );
+ aXP1[4].AdjustX( -(dx2b/2) );
+ aXP1[4].AdjustY( -(dy2b/2) );
}
if (nPointCount==6) {
Point aPt1b(aXP1[2]);
@@ -1508,8 +1508,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const too
aXP1.Insert(5,aPt2b,PolyFlags::Control);
long dx=aPt1b.X()-aPt2b.X();
long dy=aPt1b.Y()-aPt2b.Y();
- aXP1[3].X()-=dx/2;
- aXP1[3].Y()-=dy/2;
+ aXP1[3].AdjustX( -(dx/2) );
+ aXP1[3].AdjustY( -(dy/2) );
aXP1.SetFlags(3,PolyFlags::Symmetric);
aXP1.Remove(4,1); // because it's identical with aXP1[3]
}
@@ -1784,8 +1784,8 @@ SdrHdl* SdrEdgeObj::GetHdl(sal_uInt32 nHdlNum) const
if (nPt>0) {
Point aPos((*pEdgeTrack)[static_cast<sal_uInt16>(nPt)]);
aPos+=(*pEdgeTrack)[static_cast<sal_uInt16>(nPt)+1];
- aPos.X()/=2;
- aPos.Y()/=2;
+ aPos.setX( aPos.X() / 2 );
+ aPos.setY( aPos.Y() / 2 );
pHdl->SetPos(aPos);
} else {
delete pHdl;
@@ -1972,15 +1972,15 @@ basegfx::B2DPolygon SdrEdgeObj::ImplAddConnectorOverlay(SdrDragMethod& rDragMeth
if (bTail1)
{
const basegfx::B2DPoint aTemp(rDragMethod.getCurrentTransformation() * basegfx::B2DPoint(aMyCon1.aObjOfs.X(), aMyCon1.aObjOfs.Y()));
- aMyCon1.aObjOfs.X() = basegfx::fround(aTemp.getX());
- aMyCon1.aObjOfs.Y() = basegfx::fround(aTemp.getY());
+ aMyCon1.aObjOfs.setX( basegfx::fround(aTemp.getX()) );
+ aMyCon1.aObjOfs.setY( basegfx::fround(aTemp.getY()) );
}
if (bTail2)
{
const basegfx::B2DPoint aTemp(rDragMethod.getCurrentTransformation() * basegfx::B2DPoint(aMyCon2.aObjOfs.X(), aMyCon2.aObjOfs.Y()));
- aMyCon2.aObjOfs.X() = basegfx::fround(aTemp.getX());
- aMyCon2.aObjOfs.Y() = basegfx::fround(aTemp.getY());
+ aMyCon2.aObjOfs.setX( basegfx::fround(aTemp.getX()) );
+ aMyCon2.aObjOfs.setY( basegfx::fround(aTemp.getY()) );
}
SdrEdgeInfoRec aInfo(aEdgeInfo);
@@ -2005,15 +2005,15 @@ basegfx::B2DPolygon SdrEdgeObj::ImplAddConnectorOverlay(SdrDragMethod& rDragMeth
if (bTail1)
{
const basegfx::B2DPoint aTemp(rDragMethod.getCurrentTransformation() * basegfx::B2DPoint(aPt1.X(), aPt1.Y()));
- aPt1.X() = basegfx::fround(aTemp.getX());
- aPt1.Y() = basegfx::fround(aTemp.getY());
+ aPt1.setX( basegfx::fround(aTemp.getX()) );
+ aPt1.setY( basegfx::fround(aTemp.getY()) );
}
if (bTail2)
{
const basegfx::B2DPoint aTemp(rDragMethod.getCurrentTransformation() * basegfx::B2DPoint(aPt2.X(), aPt2.Y()));
- aPt2.X() = basegfx::fround(aTemp.getX());
- aPt2.Y() = basegfx::fround(aTemp.getY());
+ aPt2.setX( basegfx::fround(aTemp.getX()) );
+ aPt2.setY( basegfx::fround(aTemp.getY()) );
}
aResult.append(basegfx::B2DPoint(aPt1.X(), aPt1.Y()));
@@ -2107,10 +2107,10 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz);
aHalfConSiz=pOut->PixelToLogic(aHalfConSiz);
tools::Rectangle aMouseRect(rPt,rPt);
- aMouseRect.Left() -=aHalfConSiz.Width();
- aMouseRect.Top() -=aHalfConSiz.Height();
- aMouseRect.Right() +=aHalfConSiz.Width();
- aMouseRect.Bottom()+=aHalfConSiz.Height();
+ aMouseRect.AdjustLeft( -(aHalfConSiz.Width()) );
+ aMouseRect.AdjustTop( -(aHalfConSiz.Height()) );
+ aMouseRect.AdjustRight(aHalfConSiz.Width() );
+ aMouseRect.AdjustBottom(aHalfConSiz.Height() );
sal_uInt16 nBoundHitTol=static_cast<sal_uInt16>(aHalfConSiz.Width())/2; if (nBoundHitTol==0) nBoundHitTol=1;
size_t no=pOL->GetObjCount();
bool bFnd = false;
@@ -2201,10 +2201,10 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
}
if (bFnd) {
tools::Rectangle aMouseRect2(rPt,rPt);
- aMouseRect.Left() -=nBoundHitTol;
- aMouseRect.Top() -=nBoundHitTol;
- aMouseRect.Right() +=nBoundHitTol;
- aMouseRect.Bottom()+=nBoundHitTol;
+ aMouseRect.AdjustLeft( -nBoundHitTol );
+ aMouseRect.AdjustTop( -nBoundHitTol );
+ aMouseRect.AdjustRight(nBoundHitTol );
+ aMouseRect.AdjustBottom(nBoundHitTol );
aObjBound.IsOver(aMouseRect2);
}
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index ceac4a34628b..0027053721ea 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1309,13 +1309,13 @@ void SdrGrafObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrink
// Scale graphic to page size
if ( fGrfWH < fWinWH )
{
- aSize.Width() = static_cast<long>(aMaxSize.Height() * fGrfWH);
- aSize.Height()= aMaxSize.Height();
+ aSize.setWidth( static_cast<long>(aMaxSize.Height() * fGrfWH) );
+ aSize.setHeight( aMaxSize.Height() );
}
else if ( fGrfWH > 0.F )
{
- aSize.Width() = aMaxSize.Width();
- aSize.Height()= static_cast<long>(aMaxSize.Width() / fGrfWH);
+ aSize.setWidth( aMaxSize.Width() );
+ aSize.setHeight( static_cast<long>(aMaxSize.Width() / fGrfWH) );
}
aPos = rMaxRect.Center();
@@ -1324,8 +1324,8 @@ void SdrGrafObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrink
if( bShrinkOnly )
aPos = maRect.TopLeft();
- aPos.X() -= aSize.Width() / 2;
- aPos.Y() -= aSize.Height() / 2;
+ aPos.AdjustX( -(aSize.Width() / 2) );
+ aPos.AdjustY( -(aSize.Height() / 2) );
SetLogicRect( tools::Rectangle( aPos, aSize ) );
}
}
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index dfb0f1d2e779..0ad320da6b8c 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -418,12 +418,12 @@ void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Frac
Point aRef1(GetSnapRect().Center());
if (bXMirr) {
Point aRef2(aRef1);
- aRef2.Y()++;
+ aRef2.AdjustY( 1 );
NbcMirrorGluePoints(aRef1,aRef2);
}
if (bYMirr) {
Point aRef2(aRef1);
- aRef2.X()++;
+ aRef2.AdjustX( 1 );
NbcMirrorGluePoints(aRef1,aRef2);
}
}
@@ -570,12 +570,12 @@ void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fractio
Point aRef1(GetSnapRect().Center());
if (bXMirr) {
Point aRef2(aRef1);
- aRef2.Y()++;
+ aRef2.AdjustY( 1 );
NbcMirrorGluePoints(aRef1,aRef2);
}
if (bYMirr) {
Point aRef2(aRef1);
- aRef2.X()++;
+ aRef2.AdjustX( 1 );
NbcMirrorGluePoints(aRef1,aRef2);
}
}
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index fa6cc17cac2f..8e702e9f5a61 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -492,10 +492,10 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
long nHalfLen=(rPol.nLineLen-nNeedSiz-nArrow1Wdt/4-nArrow2Wdt/4) /2;
rPol.nMainlineCnt=2;
rPol.aMainline1.aP2=aMainlinePt1;
- rPol.aMainline1.aP2.X()+=nHalfLen;
+ rPol.aMainline1.aP2.AdjustX(nHalfLen );
RotatePoint(rPol.aMainline1.aP2,rPol.aMainline1.aP1,nLineSin,nLineCos);
rPol.aMainline2.aP1=aMainlinePt2;
- rPol.aMainline2.aP1.X()-=nHalfLen;
+ rPol.aMainline2.aP1.AdjustX( -nHalfLen );
RotatePoint(rPol.aMainline2.aP1,rPol.aMainline2.aP2,nLineSin,nLineCos);
}
} else {
@@ -507,8 +507,8 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly&
if (rPol.eUsedTextHPos==css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE) nLen2=nArrow2Len+nTextWdt;
}
rPol.aMainline1.aP1=aMainlinePt1;
- rPol.aMainline1.aP2=aMainlinePt1; rPol.aMainline1.aP2.X()-=nLen1; RotatePoint(rPol.aMainline1.aP2,aMainlinePt1,nLineSin,nLineCos);
- rPol.aMainline2.aP1=aMainlinePt2; rPol.aMainline2.aP1.X()+=nLen2; RotatePoint(rPol.aMainline2.aP1,aMainlinePt2,nLineSin,nLineCos);
+ rPol.aMainline1.aP2=aMainlinePt1; rPol.aMainline1.aP2.AdjustX( -nLen1 ); RotatePoint(rPol.aMainline1.aP2,aMainlinePt1,nLineSin,nLineCos);
+ rPol.aMainline2.aP1=aMainlinePt2; rPol.aMainline2.aP1.AdjustX(nLen2 ); RotatePoint(rPol.aMainline2.aP1,aMainlinePt2,nLineSin,nLineCos);
rPol.aMainline2.aP2=aMainlinePt2;
rPol.aMainline3.aP1=aMainlinePt1;
rPol.aMainline3.aP2=aMainlinePt2;
@@ -623,10 +623,10 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
// determine TextSize including text frame margins
Size aTextSize2(aMPol.aTextSize);
- if (aTextSize2.Width()<1) aTextSize2.Width()=1;
- if (aTextSize2.Height()<1) aTextSize2.Height()=1;
- aTextSize2.Width()+=GetTextLeftDistance()+GetTextRightDistance();
- aTextSize2.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
+ if (aTextSize2.Width()<1) aTextSize2.setWidth(1 );
+ if (aTextSize2.Height()<1) aTextSize2.setHeight(1 );
+ aTextSize2.AdjustWidth(GetTextLeftDistance()+GetTextRightDistance() );
+ aTextSize2.AdjustHeight(GetTextUpperDistance()+GetTextLowerDistance() );
Point aPt1b(aMPol.aMainline1.aP1);
long nLen=aMPol.nLineLen;
@@ -649,47 +649,47 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
css::drawing::MeasureTextVertPos eMV=aMPol.eUsedTextVPos;
if (!bRota90) {
switch (eMH) {
- case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: aTextPos.X()=aPt1b.X()-aTextSize2.Width()-nArr1Len-nLWdt; break;
- case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: aTextPos.X()=aPt1b.X()+nLen+nArr2Len+nLWdt; break;
- default: aTextPos.X()=aPt1b.X(); aTextSize2.Width()=nLen;
+ case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: aTextPos.setX(aPt1b.X()-aTextSize2.Width()-nArr1Len-nLWdt ); break;
+ case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: aTextPos.setX(aPt1b.X()+nLen+nArr2Len+nLWdt ); break;
+ default: aTextPos.setX(aPt1b.X() ); aTextSize2.setWidth(nLen );
}
switch (eMV) {
case css::drawing::MeasureTextVertPos_CENTERED:
- aTextPos.Y()=aPt1b.Y()-aTextSize2.Height()/2; break;
+ aTextPos.setY(aPt1b.Y()-aTextSize2.Height()/2 ); break;
case css::drawing::MeasureTextVertPos_WEST: {
- if (!bUpsideDown) aTextPos.Y()=aPt1b.Y()+nLWdt;
- else aTextPos.Y()=aPt1b.Y()-aTextSize2.Height()-nLWdt;
+ if (!bUpsideDown) aTextPos.setY(aPt1b.Y()+nLWdt );
+ else aTextPos.setY(aPt1b.Y()-aTextSize2.Height()-nLWdt );
} break;
default: {
- if (!bUpsideDown) aTextPos.Y()=aPt1b.Y()-aTextSize2.Height()-nLWdt;
- else aTextPos.Y()=aPt1b.Y()+nLWdt;
+ if (!bUpsideDown) aTextPos.setY(aPt1b.Y()-aTextSize2.Height()-nLWdt );
+ else aTextPos.setY(aPt1b.Y()+nLWdt );
}
}
if (bUpsideDown) {
- aTextPos.X()+=aTextSize2.Width();
- aTextPos.Y()+=aTextSize2.Height();
+ aTextPos.AdjustX(aTextSize2.Width() );
+ aTextPos.AdjustY(aTextSize2.Height() );
}
} else { // also if bTextRota90==TRUE
switch (eMH) {
- case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: aTextPos.X()=aPt1b.X()-aTextSize2.Height()-nArr1Len; break;
- case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: aTextPos.X()=aPt1b.X()+nLen+nArr2Len; break;
- default: aTextPos.X()=aPt1b.X(); aTextSize2.Height()=nLen;
+ case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE: aTextPos.setX(aPt1b.X()-aTextSize2.Height()-nArr1Len ); break;
+ case css::drawing::MeasureTextHorzPos_RIGHTOUTSIDE: aTextPos.setX(aPt1b.X()+nLen+nArr2Len ); break;
+ default: aTextPos.setX(aPt1b.X() ); aTextSize2.setHeight(nLen );
}
switch (eMV) {
case css::drawing::MeasureTextVertPos_CENTERED:
- aTextPos.Y()=aPt1b.Y()+aTextSize2.Width()/2; break;
+ aTextPos.setY(aPt1b.Y()+aTextSize2.Width()/2 ); break;
case css::drawing::MeasureTextVertPos_WEST: {
- if (!bBelowRefEdge) aTextPos.Y()=aPt1b.Y()+aTextSize2.Width()+nLWdt;
- else aTextPos.Y()=aPt1b.Y()-nLWdt;
+ if (!bBelowRefEdge) aTextPos.setY(aPt1b.Y()+aTextSize2.Width()+nLWdt );
+ else aTextPos.setY(aPt1b.Y()-nLWdt );
} break;
default: {
- if (!bBelowRefEdge) aTextPos.Y()=aPt1b.Y()-nLWdt;
- else aTextPos.Y()=aPt1b.Y()+aTextSize2.Width()+nLWdt;
+ if (!bBelowRefEdge) aTextPos.setY(aPt1b.Y()-nLWdt );
+ else aTextPos.setY(aPt1b.Y()+aTextSize2.Width()+nLWdt );
}
}
if (bUpsideDown) {
- aTextPos.X()+=aTextSize2.Height();
- aTextPos.Y()-=aTextSize2.Width();
+ aTextPos.AdjustX(aTextSize2.Height() );
+ aTextPos.AdjustY( -(aTextSize2.Width()) );
}
}
if (aMPol.nTextAngle!=aGeo.nRotationAngle) {
@@ -697,7 +697,7 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
const_cast<SdrMeasureObj*>(this)->aGeo.RecalcSinCos();
}
RotatePoint(aTextPos,aPt1b,aMPol.nLineSin,aMPol.nLineCos);
- aTextSize2.Width()++; aTextSize2.Height()++; // because of the Rect-Ctor's odd behavior
+ aTextSize2.AdjustWidth( 1 ); aTextSize2.AdjustHeight( 1 ); // because of the Rect-Ctor's odd behavior
rRect=tools::Rectangle(aTextPos,aTextSize2);
rRect.Justify();
const_cast<SdrMeasureObj*>(this)->maRect=rRect;
@@ -920,8 +920,8 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c
if (bHor) ndy=long(ndy0*nXFact);
if (bVer) ndx=long(ndx0*nYFact);
aPt=aFix;
- aPt.X()+=ndx;
- aPt.Y()+=ndy;
+ aPt.AdjustX(ndx );
+ aPt.AdjustY(ndy );
} // else Ortho8
}
rMov=aPt;
@@ -1026,11 +1026,11 @@ void SdrMeasureObj::NbcRotate(const Point& rRef, long nAngle, double sn, double
dx=BigMulDiv(dx,nLen0,nLen1);
dy=BigMulDiv(dy,nLen0,nLen1);
if (rRef==aPt2) {
- aPt1.X()=aPt2.X()-dx;
- aPt1.Y()=aPt2.Y()-dy;
+ aPt1.setX(aPt2.X()-dx );
+ aPt1.setY(aPt2.Y()-dy );
} else {
- aPt2.X()=aPt1.X()+dx;
- aPt2.Y()=aPt1.Y()+dy;
+ aPt2.setX(aPt1.X()+dx );
+ aPt2.setY(aPt1.Y()+dy );
}
}
SetRectsDirty();
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index e3e46d3d9a82..8303e2b71fa9 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -197,13 +197,13 @@ void SdrMediaObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrin
// scale graphic to page size
if ( fGrfWH < fWinWH )
{
- aSize.Width() = static_cast<long>(aMaxSize.Height() * fGrfWH);
- aSize.Height()= aMaxSize.Height();
+ aSize.setWidth( static_cast<long>(aMaxSize.Height() * fGrfWH) );
+ aSize.setHeight( aMaxSize.Height() );
}
else if ( fGrfWH > 0.F )
{
- aSize.Width() = aMaxSize.Width();
- aSize.Height()= static_cast<long>(aMaxSize.Width() / fGrfWH);
+ aSize.setWidth( aMaxSize.Width() );
+ aSize.setHeight( static_cast<long>(aMaxSize.Width() / fGrfWH) );
}
aPos = rMaxRect.Center();
@@ -212,8 +212,8 @@ void SdrMediaObj::AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrin
if( bShrinkOnly )
aPos = maRect.TopLeft();
- aPos.X() -= aSize.Width() / 2;
- aPos.Y() -= aSize.Height() / 2;
+ aPos.AdjustX( -(aSize.Width() / 2) );
+ aPos.AdjustY( -(aSize.Height() / 2) );
SetLogicRect( tools::Rectangle( aPos, aSize ) );
}
}
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index bbaf3450dbbb..b574da18f22c 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -331,13 +331,13 @@ void ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Poi
if (dAngle<18000) {
nCircStAngle=NormAngle360(nTangAngle-9000);
nCircRelAngle=NormAngle360(2*dAngle);
- aCircCenter.X()+=svx::Round(nRad*cos((nTangAngle+9000)*nPi180));
- aCircCenter.Y()-=svx::Round(nRad*sin((nTangAngle+9000)*nPi180));
+ aCircCenter.AdjustX(svx::Round(nRad*cos((nTangAngle+9000)*nPi180)) );
+ aCircCenter.AdjustY( -(svx::Round(nRad*sin((nTangAngle+9000)*nPi180))) );
} else {
nCircStAngle=NormAngle360(nTangAngle+9000);
nCircRelAngle=-NormAngle360(36000-2*dAngle);
- aCircCenter.X()+=svx::Round(nRad*cos((nTangAngle-9000)*nPi180));
- aCircCenter.Y()-=svx::Round(nRad*sin((nTangAngle-9000)*nPi180));
+ aCircCenter.AdjustX(svx::Round(nRad*cos((nTangAngle-9000)*nPi180)) );
+ aCircCenter.AdjustY( -(svx::Round(nRad*sin((nTangAngle-9000)*nPi180))) );
}
bAngleSnap=pView!=nullptr && pView->IsAngleSnapEnabled();
if (bAngleSnap) {
@@ -462,8 +462,8 @@ void ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point
y+=svx::Round(nGKathLen*sn);
x+=svx::Round(nGKathLen*cs);
}
- aRectP2.X()+=x;
- aRectP2.Y()+=y;
+ aRectP2.AdjustX(x );
+ aRectP2.AdjustY(y );
if (pView!=nullptr && pView->IsOrtho()) {
long dx1=aRectP2.X()-aRectP1.X(); long dx1a=std::abs(dx1);
long dy1=aRectP2.Y()-aRectP1.Y(); long dy1a=std::abs(dy1);
@@ -473,15 +473,15 @@ void ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point
if (b1MoreThan2 != pView->IsBigOrtho()) {
long xtemp=dy2a-dx1a; if (dx1<0) xtemp=-xtemp;
long ytemp=dx2a-dy1a; if (dy1<0) ytemp=-ytemp;
- aRectP2.X()+=xtemp;
- aRectP2.Y()+=ytemp;
- aRectP3.X()+=xtemp;
- aRectP3.Y()+=ytemp;
+ aRectP2.AdjustX(xtemp );
+ aRectP2.AdjustY(ytemp );
+ aRectP3.AdjustX(xtemp );
+ aRectP3.AdjustY(ytemp );
} else {
long xtemp=dy1a-dx2a; if (dx2<0) xtemp=-xtemp;
long ytemp=dx1a-dy2a; if (dy2<0) ytemp=-ytemp;
- aRectP3.X()+=xtemp;
- aRectP3.Y()+=ytemp;
+ aRectP3.AdjustX(xtemp );
+ aRectP3.AdjustY(ytemp );
}
}
bRect=true;
@@ -695,8 +695,8 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
if (bHor) ndy=long(ndy0*nXFact);
if (bVer) ndx=long(ndx0*nYFact);
aNeuPos1=aPnt1;
- aNeuPos1.X()+=ndx;
- aNeuPos1.Y()+=ndy;
+ aNeuPos1.AdjustX(ndx );
+ aNeuPos1.AdjustY(ndy );
}
}
if (nPnt2!=0xFFFF && !bNextIsControl) {
@@ -716,8 +716,8 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const
if (bHor) ndy=long(ndy0*nXFact);
if (bVer) ndx=long(ndx0*nYFact);
aNeuPos2=aPnt2;
- aNeuPos2.X()+=ndx;
- aNeuPos2.Y()+=ndy;
+ aNeuPos2.AdjustX(ndx );
+ aNeuPos2.AdjustY(ndy );
}
}
if (bPnt1 && bPnt2) { // both alternatives exist (and compete)
@@ -894,12 +894,12 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat const & rDrag)
Point aRef1(mrSdrPathObject.GetSnapRect().Center());
if (bXMirr) {
Point aRef2(aRef1);
- aRef2.Y()++;
+ aRef2.AdjustY( 1 );
mrSdrPathObject.NbcMirrorGluePoints(aRef1,aRef2);
}
if (bYMirr) {
Point aRef2(aRef1);
- aRef2.X()++;
+ aRef2.AdjustX( 1 );
mrSdrPathObject.NbcMirrorGluePoints(aRef1,aRef2);
}
}
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index da431e9068e2..7f85da4b71a8 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -199,7 +199,7 @@ void SdrRectObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
if (aGeo.nShearAngle>0)
{
Point aRef(rRect.TopLeft());
- rRect.Left()-=nDst;
+ rRect.AdjustLeft( -nDst );
Point aTmpPt(rRect.TopLeft());
RotatePoint(aTmpPt,aRef,aGeo.nSin,aGeo.nCos);
aTmpPt-=rRect.TopLeft();
@@ -207,7 +207,7 @@ void SdrRectObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
}
else
{
- rRect.Right()-=nDst;
+ rRect.AdjustRight( -nDst );
}
}
}
@@ -335,7 +335,7 @@ SdrHdl* SdrRectObj::GetHdl(sal_uInt32 nHdlNum) const
if (a>b) a=b;
if (a<0) a=0;
aPnt=maRect.TopLeft();
- aPnt.X()+=a;
+ aPnt.AdjustX(a );
eKind = SdrHdlKind::Circle;
break;
}
@@ -520,10 +520,10 @@ SdrGluePoint SdrRectObj::GetVertexGluePoint(sal_uInt16 nPosNum) const
Point aPt;
switch (nPosNum) {
- case 0: aPt=maRect.TopCenter(); aPt.Y()-=nWdt; break;
- case 1: aPt=maRect.RightCenter(); aPt.X()+=nWdt; break;
- case 2: aPt=maRect.BottomCenter(); aPt.Y()+=nWdt; break;
- case 3: aPt=maRect.LeftCenter(); aPt.X()-=nWdt; break;
+ case 0: aPt=maRect.TopCenter(); aPt.AdjustY( -nWdt ); break;
+ case 1: aPt=maRect.RightCenter(); aPt.AdjustX(nWdt ); break;
+ case 2: aPt=maRect.BottomCenter(); aPt.AdjustY(nWdt ); break;
+ case 3: aPt=maRect.LeftCenter(); aPt.AdjustX( -nWdt ); break;
}
if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
@@ -546,10 +546,10 @@ SdrGluePoint SdrRectObj::GetCornerGluePoint(sal_uInt16 nPosNum) const
Point aPt;
switch (nPosNum) {
- case 0: aPt=maRect.TopLeft(); aPt.X()-=nWdt; aPt.Y()-=nWdt; break;
- case 1: aPt=maRect.TopRight(); aPt.X()+=nWdt; aPt.Y()-=nWdt; break;
- case 2: aPt=maRect.BottomRight(); aPt.X()+=nWdt; aPt.Y()+=nWdt; break;
- case 3: aPt=maRect.BottomLeft(); aPt.X()-=nWdt; aPt.Y()+=nWdt; break;
+ case 0: aPt=maRect.TopLeft(); aPt.AdjustX( -nWdt ); aPt.AdjustY( -nWdt ); break;
+ case 1: aPt=maRect.TopRight(); aPt.AdjustX(nWdt ); aPt.AdjustY( -nWdt ); break;
+ case 2: aPt=maRect.BottomRight(); aPt.AdjustX(nWdt ); aPt.AdjustY(nWdt ); break;
+ case 3: aPt=maRect.BottomLeft(); aPt.AdjustX( -nWdt ); aPt.AdjustY(nWdt ); break;
}
if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 4a9f69d1afe3..5449c5f8c877 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -198,9 +198,9 @@ void SdrTextObj::FitFrameToTextSize()
rOutliner.SetText(*pText->GetOutlinerParaObject());
Size aNewSize(rOutliner.CalcTextSize());
rOutliner.Clear();
- aNewSize.Width()++; // because of possible rounding errors
- aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
- aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
+ aNewSize.AdjustWidth( 1 ); // because of possible rounding errors
+ aNewSize.AdjustWidth(GetTextLeftDistance()+GetTextRightDistance() );
+ aNewSize.AdjustHeight(GetTextUpperDistance()+GetTextLowerDistance() );
tools::Rectangle aNewRect(maRect);
aNewRect.SetSize(aNewSize);
ImpJustifyRect(aNewRect);
@@ -397,8 +397,8 @@ void SdrTextObj::ImpJustifyRect(tools::Rectangle& rRect)
{
if (!rRect.IsEmpty()) {
rRect.Justify();
- if (rRect.Left()==rRect.Right()) rRect.Right()++;
- if (rRect.Top()==rRect.Bottom()) rRect.Bottom()++;
+ if (rRect.Left()==rRect.Right()) rRect.AdjustRight( 1 );
+ if (rRect.Top()==rRect.Bottom()) rRect.AdjustBottom( 1 );
}
}
@@ -648,10 +648,10 @@ void SdrTextObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const
TakeUnrotatedSnapRect(aAnkRect);
}
Point aRotateRef(aAnkRect.TopLeft());
- aAnkRect.Left()+=nLeftDist;
- aAnkRect.Top()+=nUpperDist;
- aAnkRect.Right()-=nRightDist;
- aAnkRect.Bottom()-=nLowerDist;
+ aAnkRect.AdjustLeft(nLeftDist );
+ aAnkRect.AdjustTop(nUpperDist );
+ aAnkRect.AdjustRight( -nRightDist );
+ aAnkRect.AdjustBottom( -nLowerDist );
// Since sizes may be bigger than the object bounds it is necessary to
// justify the rect now.
@@ -659,8 +659,8 @@ void SdrTextObj::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const
if (bFrame) {
// TODO: Optimize this.
- if (aAnkRect.GetWidth()<2) aAnkRect.Right()=aAnkRect.Left()+1; // minimum size h and v: 2 px
- if (aAnkRect.GetHeight()<2) aAnkRect.Bottom()=aAnkRect.Top()+1;
+ if (aAnkRect.GetWidth()<2) aAnkRect.SetRight(aAnkRect.Left()+1 ); // minimum size h and v: 2 px
+ if (aAnkRect.GetHeight()<2) aAnkRect.SetBottom(aAnkRect.Top()+1 );
}
if (aGeo.nRotationAngle!=0) {
Point aTmpPt(aAnkRect.TopLeft());
@@ -819,17 +819,17 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, tools::Rectangle& rTextRe
{
long nFreeWdt=aAnkRect.GetWidth()-aTextSiz.Width();
if (eHAdj==SDRTEXTHORZADJUST_CENTER)
- aTextPos.X()+=nFreeWdt/2;
+ aTextPos.AdjustX(nFreeWdt/2 );
if (eHAdj==SDRTEXTHORZADJUST_RIGHT)
- aTextPos.X()+=nFreeWdt;
+ aTextPos.AdjustX(nFreeWdt );
}
if (eVAdj==SDRTEXTVERTADJUST_CENTER || eVAdj==SDRTEXTVERTADJUST_BOTTOM)
{
long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
if (eVAdj==SDRTEXTVERTADJUST_CENTER)
- aTextPos.Y()+=nFreeHgt/2;
+ aTextPos.AdjustY(nFreeHgt/2 );
if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
- aTextPos.Y()+=nFreeHgt;
+ aTextPos.AdjustY(nFreeHgt );
}
if (aGeo.nRotationAngle!=0)
RotatePoint(aTextPos,aAnkRect.TopLeft(),aGeo.nSin,aGeo.nCos);
@@ -1929,14 +1929,14 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle(
if(SdrTextAniDirection::Left == eDirection || SdrTextAniDirection::Right == eDirection)
{
- aScrollFrameRect.Left() = aAnchorRect.Left();
- aScrollFrameRect.Right() = aAnchorRect.Right();
+ aScrollFrameRect.SetLeft( aAnchorRect.Left() );
+ aScrollFrameRect.SetRight( aAnchorRect.Right() );
}
if(SdrTextAniDirection::Up == eDirection || SdrTextAniDirection::Down == eDirection)
{
- aScrollFrameRect.Top() = aAnchorRect.Top();
- aScrollFrameRect.Bottom() = aAnchorRect.Bottom();
+ aScrollFrameRect.SetTop( aAnchorRect.Top() );
+ aScrollFrameRect.SetBottom( aAnchorRect.Bottom() );
}
// create the MetaFile
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index f8c4f2105276..f4c9528d4125 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -92,15 +92,15 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
long nWdt = 0, nMinWdt = 0, nMaxWdt = 0;
Size aNewSize = rR.GetSize();
- aNewSize.Width()--; aNewSize.Height()--;
+ aNewSize.AdjustWidth( -1 ); aNewSize.AdjustHeight( -1 );
Size aMaxSiz(100000, 100000);
Size aTmpSiz = pModel->GetMaxObjSize();
if (aTmpSiz.Width())
- aMaxSiz.Width() = aTmpSiz.Width();
+ aMaxSiz.setWidth( aTmpSiz.Width() );
if (aTmpSiz.Height())
- aMaxSiz.Height() = aTmpSiz.Height();
+ aMaxSiz.setHeight( aTmpSiz.Height() );
if (bWdtGrow)
{
@@ -111,7 +111,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
if (nMinWdt <= 0)
nMinWdt = 1;
- aNewSize.Width() = nMaxWdt;
+ aNewSize.setWidth( nMaxWdt );
}
if (bHgtGrow)
@@ -123,25 +123,25 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
if (nMinHgt <= 0)
nMinHgt = 1;
- aNewSize.Height() = nMaxHgt;
+ aNewSize.setHeight( nMaxHgt );
}
long nHDist = GetTextLeftDistance() + GetTextRightDistance();
long nVDist = GetTextUpperDistance() + GetTextLowerDistance();
- aNewSize.Width() -= nHDist;
- aNewSize.Height() -= nVDist;
+ aNewSize.AdjustWidth( -nHDist );
+ aNewSize.AdjustHeight( -nVDist );
if (aNewSize.Width() < 2)
- aNewSize.Width() = 2;
+ aNewSize.setWidth( 2 );
if (aNewSize.Height() < 2)
- aNewSize.Height() = 2;
+ aNewSize.setHeight( 2 );
if (!IsInEditMode())
{
if (bHScroll)
- aNewSize.Width() = 0x0FFFFFFF; // don't break ticker text
+ aNewSize.setWidth( 0x0FFFFFFF ); // don't break ticker text
if (bVScroll)
- aNewSize.Height() = 0x0FFFFFFF;
+ aNewSize.setHeight( 0x0FFFFFFF );
}
if (pEdtOutl)
@@ -216,14 +216,14 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
SdrTextHorzAdjust eHAdj = GetTextHorizontalAdjust();
if (eHAdj == SDRTEXTHORZADJUST_LEFT)
- rR.Right() += nWdtGrow;
+ rR.AdjustRight(nWdtGrow );
else if (eHAdj == SDRTEXTHORZADJUST_RIGHT)
- rR.Left() -= nWdtGrow;
+ rR.AdjustLeft( -nWdtGrow );
else
{
long nWdtGrow2 = nWdtGrow / 2;
- rR.Left() -= nWdtGrow2;
- rR.Right() = rR.Left() + nWdt;
+ rR.AdjustLeft( -nWdtGrow2 );
+ rR.SetRight( rR.Left() + nWdt );
}
}
@@ -232,14 +232,14 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
SdrTextVertAdjust eVAdj = GetTextVerticalAdjust();
if (eVAdj == SDRTEXTVERTADJUST_TOP)
- rR.Bottom() += nHgtGrow;
+ rR.AdjustBottom(nHgtGrow );
else if (eVAdj == SDRTEXTVERTADJUST_BOTTOM)
- rR.Top() -= nHgtGrow;
+ rR.AdjustTop( -nHgtGrow );
else
{
long nHgtGrow2 = nHgtGrow / 2;
- rR.Top() -= nHgtGrow2;
- rR.Bottom() = rR.Top() + nHgt;
+ rR.AdjustTop( -nHgtGrow2 );
+ rR.SetBottom( rR.Top() + nHgt );
}
}
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index 7f8973e78b4b..c75de2cc0003 100644
--- a/svx/source/svdraw/svdotxdr.cxx
+++ b/svx/source/svdraw/svdotxdr.cxx
@@ -86,10 +86,10 @@ tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
bool bRgt=(eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::Right || eHdl==SdrHdlKind::LowerRight);
bool bTop=(eHdl==SdrHdlKind::UpperRight || eHdl==SdrHdlKind::Upper || eHdl==SdrHdlKind::UpperLeft);
bool bBtm=(eHdl==SdrHdlKind::LowerRight || eHdl==SdrHdlKind::Lower || eHdl==SdrHdlKind::LowerLeft);
- if (bLft) aTmpRect.Left() =aPos.X();
- if (bRgt) aTmpRect.Right() =aPos.X();
- if (bTop) aTmpRect.Top() =aPos.Y();
- if (bBtm) aTmpRect.Bottom()=aPos.Y();
+ if (bLft) aTmpRect.SetLeft(aPos.X() );
+ if (bRgt) aTmpRect.SetRight(aPos.X() );
+ if (bTop) aTmpRect.SetTop(aPos.Y() );
+ if (bBtm) aTmpRect.SetBottom(aPos.Y() );
if (bOrtho) { // Ortho
long nWdt0=maRect.Right() -maRect.Left();
long nHgt0=maRect.Bottom()-maRect.Top();
@@ -114,26 +114,26 @@ tools::Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const
if (bUseX) {
long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv));
if (bYNeg) nNeed=-nNeed;
- if (bTop) aTmpRect.Top()=aTmpRect.Bottom()-nNeed;
- if (bBtm) aTmpRect.Bottom()=aTmpRect.Top()+nNeed;
+ if (bTop) aTmpRect.SetTop(aTmpRect.Bottom()-nNeed );
+ if (bBtm) aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
} else {
long nNeed=long(BigInt(nWdt0)*BigInt(nYMul)/BigInt(nYDiv));
if (bXNeg) nNeed=-nNeed;
- if (bLft) aTmpRect.Left()=aTmpRect.Right()-nNeed;
- if (bRgt) aTmpRect.Right()=aTmpRect.Left()+nNeed;
+ if (bLft) aTmpRect.SetLeft(aTmpRect.Right()-nNeed );
+ if (bRgt) aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
} else { // apex handles
if ((bLft || bRgt) && nXDiv!=0) {
long nHgt0b=maRect.Bottom()-maRect.Top();
long nNeed=long(BigInt(nHgt0b)*BigInt(nXMul)/BigInt(nXDiv));
- aTmpRect.Top()-=(nNeed-nHgt0b)/2;
- aTmpRect.Bottom()=aTmpRect.Top()+nNeed;
+ aTmpRect.AdjustTop( -((nNeed-nHgt0b)/2) );
+ aTmpRect.SetBottom(aTmpRect.Top()+nNeed );
}
if ((bTop || bBtm) && nYDiv!=0) {
long nWdt0b=maRect.Right()-maRect.Left();
long nNeed=long(BigInt(nWdt0b)*BigInt(nYMul)/BigInt(nYDiv));
- aTmpRect.Left()-=(nNeed-nWdt0b)/2;
- aTmpRect.Right()=aTmpRect.Left()+nNeed;
+ aTmpRect.AdjustLeft( -((nNeed-nWdt0b)/2) );
+ aTmpRect.SetRight(aTmpRect.Left()+nNeed );
}
}
}
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 5f9591193525..3290435144b1 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -144,12 +144,12 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Recta
aViewInit.Move(aCenter.X(),aCenter.Y());
}
Size aAnkSiz(aViewInit.GetSize());
- aAnkSiz.Width()--; aAnkSiz.Height()--; // because GetSize() adds 1
+ aAnkSiz.AdjustWidth( -1 ); aAnkSiz.AdjustHeight( -1 ); // because GetSize() adds 1
Size aMaxSiz(1000000,1000000);
if (pModel!=nullptr) {
Size aTmpSiz(pModel->GetMaxObjSize());
- if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();
- if (aTmpSiz.Height()!=0) aMaxSiz.Height()=aTmpSiz.Height();
+ if (aTmpSiz.Width()!=0) aMaxSiz.setWidth(aTmpSiz.Width() );
+ if (aTmpSiz.Height()!=0) aMaxSiz.setHeight(aTmpSiz.Height() );
}
// Done earlier since used in else tree below
@@ -206,15 +206,15 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Recta
}
}
- aPaperMax.Width()=nMaxWdt;
- aPaperMax.Height()=nMaxHgt;
+ aPaperMax.setWidth(nMaxWdt );
+ aPaperMax.setHeight(nMaxHgt );
}
else
{
aPaperMax=aMaxSiz;
}
- aPaperMin.Width()=nMinWdt;
- aPaperMin.Height()=nMinHgt;
+ aPaperMin.setWidth(nMinWdt );
+ aPaperMin.setHeight(nMinHgt );
}
else
{
@@ -233,30 +233,30 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Recta
*pViewMin=aViewInit;
long nXFree=aAnkSiz.Width()-aPaperMin.Width();
- if (eHAdj==SDRTEXTHORZADJUST_LEFT) pViewMin->Right()-=nXFree;
- else if (eHAdj==SDRTEXTHORZADJUST_RIGHT) pViewMin->Left()+=nXFree;
- else { pViewMin->Left()+=nXFree/2; pViewMin->Right()=pViewMin->Left()+aPaperMin.Width(); }
+ if (eHAdj==SDRTEXTHORZADJUST_LEFT) pViewMin->AdjustRight( -nXFree );
+ else if (eHAdj==SDRTEXTHORZADJUST_RIGHT) pViewMin->AdjustLeft(nXFree );
+ else { pViewMin->AdjustLeft(nXFree/2 ); pViewMin->SetRight(pViewMin->Left()+aPaperMin.Width() ); }
long nYFree=aAnkSiz.Height()-aPaperMin.Height();
- if (eVAdj==SDRTEXTVERTADJUST_TOP) pViewMin->Bottom()-=nYFree;
- else if (eVAdj==SDRTEXTVERTADJUST_BOTTOM) pViewMin->Top()+=nYFree;
- else { pViewMin->Top()+=nYFree/2; pViewMin->Bottom()=pViewMin->Top()+aPaperMin.Height(); }
+ if (eVAdj==SDRTEXTVERTADJUST_TOP) pViewMin->AdjustBottom( -nYFree );
+ else if (eVAdj==SDRTEXTVERTADJUST_BOTTOM) pViewMin->AdjustTop(nYFree );
+ else { pViewMin->AdjustTop(nYFree/2 ); pViewMin->SetBottom(pViewMin->Top()+aPaperMin.Height() ); }
}
// PaperSize should grow automatically in most cases
if(IsVerticalWriting())
- aPaperMin.Width() = 0;
+ aPaperMin.setWidth( 0 );
else
- aPaperMin.Height() = 0;
+ aPaperMin.setHeight( 0 );
if(eHAdj!=SDRTEXTHORZADJUST_BLOCK || bFitToSize) {
- aPaperMin.Width()=0;
+ aPaperMin.setWidth(0 );
}
// For complete vertical adjustment support, set paper min height to 0, here.
if(SDRTEXTVERTADJUST_BLOCK != eVAdj || bFitToSize)
{
- aPaperMin.Height() = 0;
+ aPaperMin.setHeight( 0 );
}
if (pPaperMin!=nullptr) *pPaperMin=aPaperMin;
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 04f28084af78..6ecdbcb47b22 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -110,12 +110,12 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
Point aRef1(GetSnapRect().Center());
if (bXMirr) {
Point aRef2(aRef1);
- aRef2.Y()++;
+ aRef2.AdjustY( 1 );
NbcMirrorGluePoints(aRef1,aRef2);
}
if (bYMirr) {
Point aRef2(aRef1);
- aRef2.X()++;
+ aRef2.AdjustX( 1 );
NbcMirrorGluePoints(aRef1,aRef2);
}
}
@@ -191,10 +191,10 @@ void SdrTextObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs)
long dy=maRect.Bottom()-maRect.Top();
Point aP(maRect.TopLeft());
RotatePoint(aP,rRef,sn,cs);
- maRect.Left()=aP.X();
- maRect.Top()=aP.Y();
- maRect.Right()=maRect.Left()+dx;
- maRect.Bottom()=maRect.Top()+dy;
+ maRect.SetLeft(aP.X() );
+ maRect.SetTop(aP.Y() );
+ maRect.SetRight(maRect.Left()+dx );
+ maRect.SetBottom(maRect.Top()+dy );
if (aGeo.nRotationAngle==0) {
aGeo.nRotationAngle=NormAngle360(nAngle);
aGeo.nSin=sn;
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 764cd48aa212..728c06b861c3 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -142,8 +142,8 @@ SdrPageView::SdrPageView(SdrPage* pPage1, SdrView& rNewView)
if(mpPage)
{
- aPgOrg.X()=mpPage->GetLeftBorder();
- aPgOrg.Y()=mpPage->GetUpperBorder();
+ aPgOrg.setX(mpPage->GetLeftBorder() );
+ aPgOrg.setY(mpPage->GetUpperBorder() );
}
mbHasMarked = false;
aLayerVisi.SetAll();
@@ -701,10 +701,10 @@ void SdrPageView::ImpInvalidateHelpLineArea(sal_uInt16 nNum) const
OutputDevice& rOutDev = pCandidate->GetOutputDevice();
tools::Rectangle aR(rHL.GetBoundRect(rOutDev));
Size aSiz(rOutDev.PixelToLogic(Size(1,1)));
- aR.Left() -= aSiz.Width();
- aR.Right() += aSiz.Width();
- aR.Top() -= aSiz.Height();
- aR.Bottom() += aSiz.Height();
+ aR.AdjustLeft( -(aSiz.Width()) );
+ aR.AdjustRight(aSiz.Width() );
+ aR.AdjustTop( -(aSiz.Height()) );
+ aR.AdjustBottom(aSiz.Height() );
const_cast<SdrView&>(GetView()).InvalidateOneWin(static_cast<vcl::Window&>(rOutDev), aR);
}
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 9361d3620fbf..ee95936790d7 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -929,7 +929,7 @@ void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect)
tools::Rectangle aRect(rRect);
Point aOrg(rOutDev.GetMapMode().GetOrigin());
- aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y();
+ aOrg.setX(-aOrg.X() ); aOrg.setY(-aOrg.Y() );
tools::Rectangle aOutRect(aOrg, rOutDev.GetOutputSize());
// In case of tiled rendering we want to get all invalidations, so visual area is not interesting.
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index 6b6e0968de92..94f1f5affc00 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -329,10 +329,10 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
while (aIter.IsMore() && (nMaxPointSnapCount>0 || nMaxFrameSnapCount>0)) {
SdrObject* pO=aIter.Next();
tools::Rectangle aRect(pO->GetCurrentBoundRect());
- aRect.Left ()-=mx;
- aRect.Right ()+=mx;
- aRect.Top ()-=my;
- aRect.Bottom()+=my;
+ aRect.AdjustLeft( -mx );
+ aRect.AdjustRight(mx );
+ aRect.AdjustTop( -my );
+ aRect.AdjustBottom(my );
if (aRect.IsInside(rPnt)) {
if (bOPntSnap && nMaxPointSnapCount>0)
{
@@ -352,10 +352,10 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
if (bOFrmSnap && nMaxFrameSnapCount>0) {
tools::Rectangle aLog(pO->GetSnapRect());
tools::Rectangle aR1(aLog);
- aR1.Left ()-=mx;
- aR1.Right ()+=mx;
- aR1.Top ()-=my;
- aR1.Bottom()+=my;
+ aR1.AdjustLeft( -mx );
+ aR1.AdjustRight(mx );
+ aR1.AdjustTop( -my );
+ aR1.AdjustBottom(my );
if (aR1.IsInside(rPnt)) {
if (std::abs(x-aLog.Left ())<=mx) { dx1=-(x-aLog.Left ()); if (std::abs(dx1)<std::abs(dx)) dx=dx1; }
if (std::abs(x-aLog.Right ())<=mx) { dx1=-(x-aLog.Right ()); if (std::abs(dx1)<std::abs(dx)) dx=dx1; }
@@ -403,8 +403,8 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
SdrSnap bRet=SdrSnap::NOTSNAPPED;
if (dx==NOT_SNAPPED) dx=0; else bRet|=SdrSnap::XSNAPPED;
if (dy==NOT_SNAPPED) dy=0; else bRet|=SdrSnap::YSNAPPED;
- rPnt.X()=x+dx;
- rPnt.Y()=y+dy;
+ rPnt.setX(x+dx );
+ rPnt.setY(y+dy );
return bRet;
}
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index c110d62b444f..5d8719b7abea 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -40,19 +40,19 @@ void ResizeRect(tools::Rectangle& rRect, const Point& rRef, const Fraction& rxFa
SAL_WARN( "svx.svdraw", "invalid fraction xFract, using Fraction(1,1)" );
aXFact = Fraction(1,1);
long nWdt = rRect.Right() - rRect.Left();
- if (nWdt == 0) rRect.Right()++;
+ if (nWdt == 0) rRect.AdjustRight( 1 );
}
- rRect.Left() = rRef.X() + svx::Round( (rRect.Left() - rRef.X()) * double(aXFact) );
- rRect.Right() = rRef.X() + svx::Round( (rRect.Right() - rRef.X()) * double(aXFact) );
+ rRect.SetLeft( rRef.X() + svx::Round( (rRect.Left() - rRef.X()) * double(aXFact) ) );
+ rRect.SetRight( rRef.X() + svx::Round( (rRect.Right() - rRef.X()) * double(aXFact) ) );
if (!aYFact.IsValid()) {
SAL_WARN( "svx.svdraw", "invalid fraction yFract, using Fraction(1,1)" );
aYFact = Fraction(1,1);
long nHgt = rRect.Bottom() - rRect.Top();
- if (nHgt == 0) rRect.Bottom()++;
+ if (nHgt == 0) rRect.AdjustBottom( 1 );
}
- rRect.Top() = rRef.Y() + svx::Round( (rRect.Top() - rRef.Y()) * double(aYFact) );
- rRect.Bottom() = rRef.Y() + svx::Round( (rRect.Bottom() - rRef.Y()) * double(aYFact) );
+ rRect.SetTop( rRef.Y() + svx::Round( (rRect.Top() - rRef.Y()) * double(aYFact) ) );
+ rRect.SetBottom( rRef.Y() + svx::Round( (rRect.Bottom() - rRef.Y()) * double(aYFact) ) );
rRect.Justify();
}
@@ -104,20 +104,20 @@ void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2)
long my=rRef2.Y()-rRef1.Y();
if (mx==0) { // vertical axis
long dx=rRef1.X()-rPnt.X();
- rPnt.X()+=2*dx;
+ rPnt.AdjustX(2*dx );
} else if (my==0) { // horizontal axis
long dy=rRef1.Y()-rPnt.Y();
- rPnt.Y()+=2*dy;
+ rPnt.AdjustY(2*dy );
} else if (mx==my) { // diagonal axis '\'
long dx1=rPnt.X()-rRef1.X();
long dy1=rPnt.Y()-rRef1.Y();
- rPnt.X()=rRef1.X()+dy1;
- rPnt.Y()=rRef1.Y()+dx1;
+ rPnt.setX(rRef1.X()+dy1 );
+ rPnt.setY(rRef1.Y()+dx1 );
} else if (mx==-my) { // diagonal axis '/'
long dx1=rPnt.X()-rRef1.X();
long dy1=rPnt.Y()-rRef1.Y();
- rPnt.X()=rRef1.X()-dy1;
- rPnt.Y()=rRef1.Y()-dx1;
+ rPnt.setX(rRef1.X()-dy1 );
+ rPnt.setY(rRef1.Y()-dx1 );
} else { // arbitrary axis
// TODO: Optimize this! Raise perpendicular on the mirroring axis..?
long nRefWink=GetAngle(rRef2-rRef1);
@@ -172,36 +172,36 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent
if (bC1) {
if (bVert) {
// move into the direction of the center, as a basic position for the rotation
- pC1->Y()-=y0;
+ pC1->AdjustY( -y0 );
// resize, account for the distance from the center
- pC1->Y()=svx::Round(static_cast<double>(pC1->Y()) /rRad.X()*(cx-pC1->X()));
- pC1->Y()+=cy;
+ pC1->setY(svx::Round(static_cast<double>(pC1->Y()) /rRad.X()*(cx-pC1->X())) );
+ pC1->AdjustY(cy );
} else {
// move into the direction of the center, as a basic position for the rotation
- pC1->X()-=x0;
+ pC1->AdjustX( -x0 );
// resize, account for the distance from the center
long nPntRad=cy-pC1->Y();
double nFact=static_cast<double>(nPntRad)/static_cast<double>(rRad.Y());
- pC1->X()=svx::Round(static_cast<double>(pC1->X())*nFact);
- pC1->X()+=cx;
+ pC1->setX(svx::Round(static_cast<double>(pC1->X())*nFact) );
+ pC1->AdjustX(cx );
}
RotatePoint(*pC1,rCenter,sn,cs);
}
if (bC2) {
if (bVert) {
// move into the direction of the center, as a basic position for the rotation
- pC2->Y()-=y0;
+ pC2->AdjustY( -y0 );
// resize, account for the distance from the center
- pC2->Y()=svx::Round(static_cast<double>(pC2->Y()) /rRad.X()*(rCenter.X()-pC2->X()));
- pC2->Y()+=cy;
+ pC2->setY(svx::Round(static_cast<double>(pC2->Y()) /rRad.X()*(rCenter.X()-pC2->X())) );
+ pC2->AdjustY(cy );
} else {
// move into the direction of the center, as a basic position for the rotation
- pC2->X()-=x0;
+ pC2->AdjustX( -x0 );
// resize, account for the distance from the center
long nPntRad=rCenter.Y()-pC2->Y();
double nFact=static_cast<double>(nPntRad)/static_cast<double>(rRad.Y());
- pC2->X()=svx::Round(static_cast<double>(pC2->X())*nFact);
- pC2->X()+=cx;
+ pC2->setX(svx::Round(static_cast<double>(pC2->X())*nFact) );
+ pC2->AdjustX(cx );
}
RotatePoint(*pC2,rCenter,sn,cs);
}
@@ -223,42 +223,42 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente
if (bVert) {
long nStart=rCenter.X()-rRad.X();
dx1=rPnt.X()-nStart;
- rPnt.X()=nStart;
+ rPnt.setX(nStart );
if (bC1) {
dxC1=pC1->X()-nStart;
- pC1->X()=nStart;
+ pC1->setX(nStart );
}
if (bC2) {
dxC2=pC2->X()-nStart;
- pC2->X()=nStart;
+ pC2->setX(nStart );
}
} else {
long nStart=rCenter.Y()-rRad.Y();
dy1=rPnt.Y()-nStart;
- rPnt.Y()=nStart;
+ rPnt.setY(nStart );
if (bC1) {
dyC1=pC1->Y()-nStart;
- pC1->Y()=nStart;
+ pC1->setY(nStart );
}
if (bC2) {
dyC2=pC2->Y()-nStart;
- pC2->Y()=nStart;
+ pC2->setY(nStart );
}
}
double nAngle=GetCrookAngle(rPnt,rCenter,rRad,bVert);
double sn=sin(nAngle);
double cs=cos(nAngle);
RotatePoint(rPnt,rCenter,sn,cs);
- if (bC1) { if (bVert) pC1->Y()-=y0-rCenter.Y(); else pC1->X()-=x0-rCenter.X(); RotatePoint(*pC1,rCenter,sn,cs); }
- if (bC2) { if (bVert) pC2->Y()-=y0-rCenter.Y(); else pC2->X()-=x0-rCenter.X(); RotatePoint(*pC2,rCenter,sn,cs); }
+ if (bC1) { if (bVert) pC1->AdjustY( -(y0-rCenter.Y()) ); else pC1->AdjustX( -(x0-rCenter.X()) ); RotatePoint(*pC1,rCenter,sn,cs); }
+ if (bC2) { if (bVert) pC2->AdjustY( -(y0-rCenter.Y()) ); else pC2->AdjustX( -(x0-rCenter.X()) ); RotatePoint(*pC2,rCenter,sn,cs); }
if (bVert) {
- rPnt.X()+=dx1;
- if (bC1) pC1->X()+=dxC1;
- if (bC2) pC2->X()+=dxC2;
+ rPnt.AdjustX(dx1 );
+ if (bC1) pC1->AdjustX(dxC1 );
+ if (bC2) pC2->AdjustX(dxC2 );
} else {
- rPnt.Y()+=dy1;
- if (bC1) pC1->Y()+=dyC1;
- if (bC2) pC2->Y()+=dyC2;
+ rPnt.AdjustY(dy1 );
+ if (bC1) pC1->AdjustY(dyC1 );
+ if (bC2) pC2->AdjustY(dyC2 );
}
rSin=sn;
rCos=cs;
@@ -279,7 +279,7 @@ double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCen
long dy=rPnt.Y()-y0;
double a=static_cast<double>(y0-nTop)/nHgt;
a*=dy;
- rPnt.Y()=y0+svx::Round(a);
+ rPnt.setY(y0+svx::Round(a) );
} return 0.0;
}
@@ -515,8 +515,8 @@ void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGe
rGeo.nShearAngle=nShW;
rGeo.RecalcTan();
Point aRU(aPt0);
- aRU.X()+=nWdt;
- aRU.Y()+=nHgt;
+ aRU.AdjustX(nWdt );
+ aRU.AdjustY(nHgt );
rRect=tools::Rectangle(aPt0,aRU);
}
@@ -528,12 +528,12 @@ void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho)
long dxa=std::abs(dx);
long dya=std::abs(dy);
if (dx==0 || dy==0 || dxa==dya) return;
- if (dxa>=dya*2) { rPt.Y()=rPt0.Y(); return; }
- if (dya>=dxa*2) { rPt.X()=rPt0.X(); return; }
+ if (dxa>=dya*2) { rPt.setY(rPt0.Y() ); return; }
+ if (dya>=dxa*2) { rPt.setX(rPt0.X() ); return; }
if ((dxa<dya) != bBigOrtho) {
- rPt.Y()=rPt0.Y()+(dxa* (dy>=0 ? 1 : -1) );
+ rPt.setY(rPt0.Y()+(dxa* (dy>=0 ? 1 : -1) ) );
} else {
- rPt.X()=rPt0.X()+(dya* (dx>=0 ? 1 : -1) );
+ rPt.setX(rPt0.X()+(dya* (dx>=0 ? 1 : -1) ) );
}
}
@@ -544,9 +544,9 @@ void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho)
long dxa=std::abs(dx);
long dya=std::abs(dy);
if ((dxa<dya) != bBigOrtho) {
- rPt.Y()=rPt0.Y()+(dxa* (dy>=0 ? 1 : -1) );
+ rPt.setY(rPt0.Y()+(dxa* (dy>=0 ? 1 : -1) ) );
} else {
- rPt.X()=rPt0.X()+(dya* (dx>=0 ? 1 : -1) );
+ rPt.setX(rPt0.X()+(dya* (dx>=0 ? 1 : -1) ) );
}
}
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 865ff1d0b8d2..1011c8a11e87 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -70,25 +70,25 @@ bool SdrExchangeView::ImpLimitToWorkArea(Point& rPt) const
{
if(rPt.X()<maMaxWorkArea.Left())
{
- rPt.X() = maMaxWorkArea.Left();
+ rPt.setX( maMaxWorkArea.Left() );
bRet = true;
}
if(rPt.X()>maMaxWorkArea.Right())
{
- rPt.X() = maMaxWorkArea.Right();
+ rPt.setX( maMaxWorkArea.Right() );
bRet = true;
}
if(rPt.Y()<maMaxWorkArea.Top())
{
- rPt.Y() = maMaxWorkArea.Top();
+ rPt.setY( maMaxWorkArea.Top() );
bRet = true;
}
if(rPt.Y()>maMaxWorkArea.Bottom())
{
- rPt.Y() = maMaxWorkArea.Bottom();
+ rPt.setY( maMaxWorkArea.Bottom() );
bRet = true;
}
}
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index b76f39e51f6f..b5ba5ddbb8eb 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -695,10 +695,10 @@ SfxStyleSheet* Cell::GetStyleSheet() const
void Cell::TakeTextAnchorRect(tools::Rectangle& rAnchorRect) const
{
- rAnchorRect.Left() = maCellRect.Left() + GetTextLeftDistance();
- rAnchorRect.Right() = maCellRect.Right() - GetTextRightDistance();
- rAnchorRect.Top() = maCellRect.Top() + GetTextUpperDistance();
- rAnchorRect.Bottom() = maCellRect.Bottom() - GetTextLowerDistance();
+ rAnchorRect.SetLeft( maCellRect.Left() + GetTextLeftDistance() );
+ rAnchorRect.SetRight( maCellRect.Right() - GetTextRightDistance() );
+ rAnchorRect.SetTop( maCellRect.Top() + GetTextUpperDistance() );
+ rAnchorRect.SetBottom( maCellRect.Bottom() - GetTextLowerDistance() );
}
@@ -735,7 +735,7 @@ sal_Int32 Cell::getMinimumHeight()
tools::Rectangle aTextRect;
TakeTextAnchorRect( aTextRect );
Size aSize( aTextRect.GetSize() );
- aSize.Height()=0x0FFFFFFF;
+ aSize.setHeight(0x0FFFFFFF );
SdrOutliner* pEditOutliner = rTableObj.GetCellTextEditOutliner( *this );
if(pEditOutliner)
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index c8f7df06313d..4bbd1cb11625 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1448,9 +1448,9 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, too
{
long nFreeHgt=aAnkRect.GetHeight()-aTextSiz.Height();
if (eVAdj==SDRTEXTVERTADJUST_CENTER)
- aTextPos.Y()+=nFreeHgt/2;
+ aTextPos.AdjustY(nFreeHgt/2 );
if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
- aTextPos.Y()+=nFreeHgt;
+ aTextPos.AdjustY(nFreeHgt );
}
if (pAnchorRect)
@@ -1563,14 +1563,14 @@ void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size*
TakeTextAnchorRect( rPos, aViewInit );
Size aAnkSiz(aViewInit.GetSize());
- aAnkSiz.Width()--; aAnkSiz.Height()--; // because GetSize() increments by one
+ aAnkSiz.AdjustWidth( -1 ); aAnkSiz.AdjustHeight( -1 ); // because GetSize() increments by one
Size aMaxSiz(aAnkSiz.Width(),1000000);
if (pModel!=nullptr)
{
Size aTmpSiz(pModel->GetMaxObjSize());
if (aTmpSiz.Height()!=0)
- aMaxSiz.Height()=aTmpSiz.Height();
+ aMaxSiz.setHeight(aTmpSiz.Height() );
}
CellRef xCell( mpImpl->getCell( rPos ) );
@@ -1578,7 +1578,7 @@ void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size*
aPaperMax=aMaxSiz;
- aPaperMin.Width() = aAnkSiz.Width();
+ aPaperMin.setWidth( aAnkSiz.Width() );
if (pViewMin!=nullptr)
{
@@ -1587,24 +1587,24 @@ void SdrTableObj::TakeTextEditArea( const CellPos& rPos, Size* pPaperMin, Size*
if (eVAdj==SDRTEXTVERTADJUST_TOP)
{
- pViewMin->Bottom()-=nYFree;
+ pViewMin->AdjustBottom( -nYFree );
}
else if (eVAdj==SDRTEXTVERTADJUST_BOTTOM)
{
- pViewMin->Top()+=nYFree;
+ pViewMin->AdjustTop(nYFree );
}
else
{
- pViewMin->Top()+=nYFree/2;
- pViewMin->Bottom()=pViewMin->Top()+aPaperMin.Height();
+ pViewMin->AdjustTop(nYFree/2 );
+ pViewMin->SetBottom(pViewMin->Top()+aPaperMin.Height() );
}
}
if(IsVerticalWriting())
- aPaperMin.Width() = 0;
+ aPaperMin.setWidth( 0 );
else
- aPaperMin.Height() = 0;
+ aPaperMin.setHeight( 0 );
if (pPaperMin!=nullptr) *pPaperMin=aPaperMin;
if (pPaperMax!=nullptr) *pPaperMax=aPaperMax;
@@ -2018,7 +2018,7 @@ void SdrTableObj::AddToHdlList(SdrHdlList& rHdlList) const
nEdgeMax -= nEdge;
Point aPoint( maRect.TopLeft() );
- aPoint.Y() += nEdge;
+ aPoint.AdjustY(nEdge );
TableEdgeHdl* pHdl= new TableEdgeHdl(aPoint,true,nEdgeMin,nEdgeMax,nColCount+1);
pHdl->SetPointNum( nRow );
@@ -2037,7 +2037,7 @@ void SdrTableObj::AddToHdlList(SdrHdlList& rHdlList) const
nEdgeMax -= nEdge;
Point aPoint( maRect.TopLeft() );
- aPoint.X() += nEdge;
+ aPoint.AdjustX(nEdge );
TableEdgeHdl* pHdl = new TableEdgeHdl(aPoint,false,nEdgeMin,nEdgeMax, nRowCount+1);
pHdl->SetPointNum( nCol );
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 6b598c986687..b6f90afaa76d 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -867,10 +867,10 @@ void TableLayouter::updateCells( tools::Rectangle& rRectangle )
if( getCellArea( xCell, aPos, aCellArea ) )
{
tools::Rectangle aCellRect;
- aCellRect.Left() = aCellArea.getMinX();
- aCellRect.Right() = aCellArea.getMaxX();
- aCellRect.Top() = aCellArea.getMinY();
- aCellRect.Bottom() = aCellArea.getMaxY();
+ aCellRect.SetLeft( aCellArea.getMinX() );
+ aCellRect.SetRight( aCellArea.getMaxX() );
+ aCellRect.SetTop( aCellArea.getMinY() );
+ aCellRect.SetBottom( aCellArea.getMaxY() );
aCellRect.Move( rRectangle.Left(), rRectangle.Top() );
xCell->setCellRect( aCellRect );
}
@@ -1111,7 +1111,7 @@ void TableLayouter::DistributeRows( ::tools::Rectangle& rArea, sal_Int32 nFirstR
if( nHeight < nMinHeight )
{
sal_Int32 nNeededHeight = nRows * nMinHeight;
- rArea.Bottom() += nNeededHeight - nAllHeight;
+ rArea.AdjustBottom(nNeededHeight - nAllHeight );
nHeight = nMinHeight;
nAllHeight = nRows * nMinHeight;
}
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index 46f43cd6b377..714e0c62c4ed 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -340,7 +340,7 @@ void SdrTableRTFParser::FillTable()
}
tools::Rectangle aRect( mrTableObj.GetSnapRect() );
- aRect.Right() = aRect.Left() + nLastEdge;
+ aRect.SetRight( aRect.Left() + nLastEdge );
mrTableObj.NbcSetSnapRect( aRect );
}
diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx
index bef5006d07d6..b56fd4d7be12 100644
--- a/svx/source/tbxctrls/SvxColorValueSet.cxx
+++ b/svx/source/tbxctrls/SvxColorValueSet.cxx
@@ -160,7 +160,7 @@ Size SvxColorValueSet::layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntry
}
// set height to wanted height
- aNewSize.Height() = nHeight;
+ aNewSize.setHeight( nHeight );
SetItemWidth(aItemSize.Width());
SetItemHeight(aItemSize.Height());
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 46e82045ace1..dab0b66302e7 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -222,10 +222,10 @@ SvxColorDockingWindow::SvxColorDockingWindow
}
aItemSize = aColorSet->CalcItemSizePixel(Size(SvxColorValueSet::getEntryEdgeLength(), SvxColorValueSet::getEntryEdgeLength()));
- aItemSize.Width() = aItemSize.Width() + SvxColorValueSet::getEntryEdgeLength();
- aItemSize.Width() /= 2;
- aItemSize.Height() = aItemSize.Height() + SvxColorValueSet::getEntryEdgeLength();
- aItemSize.Height() /= 2;
+ aItemSize.setWidth( aItemSize.Width() + SvxColorValueSet::getEntryEdgeLength() );
+ aItemSize.setWidth( aItemSize.Width() / 2 );
+ aItemSize.setHeight( aItemSize.Height() + SvxColorValueSet::getEntryEdgeLength() );
+ aItemSize.setHeight( aItemSize.Height() / 2 );
SetSize();
aColorSet->Show();
@@ -288,8 +288,8 @@ void SvxColorDockingWindow::SetSize()
{
// calculate the size for ValueSet
Size aSize = GetOutputSizePixel();
- aSize.Width() -= 4;
- aSize.Height() -= 4;
+ aSize.AdjustWidth( -4 );
+ aSize.AdjustHeight( -4 );
// calculate rows and columns
nCols = static_cast<sal_uInt16>( aSize.Width() / aItemSize.Width() );
@@ -436,8 +436,8 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl, ValueSet*, void)
void SvxColorDockingWindow::Resizing( Size& rNewSize )
{
- rNewSize.Width() -= 4;
- rNewSize.Height() -= 4;
+ rNewSize.AdjustWidth( -4 );
+ rNewSize.AdjustHeight( -4 );
// determine columns and rows
nCols = static_cast<sal_uInt16>( static_cast<float>(rNewSize.Width()) / static_cast<float>(aItemSize.Width()) + 0.5 );
@@ -473,8 +473,8 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize )
std::min< long >( nLines, nMaxLines ) );
// set size of the window
- rNewSize.Width() = nCols * aItemSize.Width() + nScrollWidth + 4;
- rNewSize.Height() = nLines * aItemSize.Height() + 4;
+ rNewSize.setWidth( nCols * aItemSize.Width() + nScrollWidth + 4 );
+ rNewSize.setHeight( nLines * aItemSize.Height() + 4 );
}
void SvxColorDockingWindow::Resize()
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index de2daa040229..d41058d73a21 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -884,11 +884,11 @@ void FillControl::SetOptimalSize()
Point aAttrPnt = mpLbFillAttr->GetPosPixel();
- aSize.Height() = std::max(aSize.Height(), mpLbFillType->get_preferred_size().Height());
- aSize.Height() = std::max(aSize.Height(), mpToolBoxColor->get_preferred_size().Height());
- aSize.Height() = std::max(aSize.Height(), mpLbFillAttr->get_preferred_size().Height());
+ aSize.setHeight( std::max(aSize.Height(), mpLbFillType->get_preferred_size().Height()) );
+ aSize.setHeight( std::max(aSize.Height(), mpToolBoxColor->get_preferred_size().Height()) );
+ aSize.setHeight( std::max(aSize.Height(), mpLbFillAttr->get_preferred_size().Height()) );
- aSize.Width() = aAttrPnt.X() + aSize.Width();
+ aSize.setWidth( aAttrPnt.X() + aSize.Width() );
SetSizePixel(aSize);
}
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 23b1e05a1490..c77ec207f98e 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -150,10 +150,10 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId)
mnThemeId = nThemeId;
Size aThumbSize( mpCtlFavorites->GetSizePixel() );
- aThumbSize.Width() /= nColCount;
- aThumbSize.Height() /= nLineCount;
- aThumbSize.Width() -= 12;
- aThumbSize.Height() -= 12;
+ aThumbSize.setWidth( aThumbSize.Width() / nColCount );
+ aThumbSize.setHeight( aThumbSize.Height() / nLineCount );
+ aThumbSize.AdjustWidth( -12 );
+ aThumbSize.AdjustHeight( -12 );
std::vector< Bitmap * >::size_type nFavCount = maFavoritesHorizontal.size();
@@ -206,8 +206,8 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
tools::Rectangle aObjRect( pNewObject->GetLogicRect() );
tools::Rectangle aVisArea = pOutDev->PixelToLogic(tools::Rectangle(Point(0,0), pOutDev->GetOutputSizePixel()));
Point aPagePos = aVisArea.Center();
- aPagePos.X() -= aObjRect.GetWidth() / 2;
- aPagePos.Y() -= aObjRect.GetHeight() / 2;
+ aPagePos.AdjustX( -(aObjRect.GetWidth() / 2) );
+ aPagePos.AdjustY( -(aObjRect.GetHeight() / 2) );
tools::Rectangle aNewObjectRectangle(aPagePos, aObjRect.GetSize());
SdrPageView* pPV = mpSdrView->GetSdrPageView();
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 97267ec5fdf5..73e27238bd2a 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -303,7 +303,7 @@ void ImplGrafControl::GetFocus()
void ImplGrafControl::Resize()
{
Size aFldSize(maField->GetSizePixel());
- aFldSize.Width() = GetSizePixel().Width() - SYMBOL_TO_FIELD_OFFSET - maImage->GetSizePixel().Width();
+ aFldSize.setWidth( GetSizePixel().Width() - SYMBOL_TO_FIELD_OFFSET - maImage->GetSizePixel().Width() );
maField->SetSizePixel(aFldSize);
Control::Resize();
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 4360b8155156..e7424b6af23c 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -379,7 +379,7 @@ void SvxLineEndWindow::FillValueSet()
maBmpSize = aBmp.GetSizePixel();
pVD->SetOutputSizePixel( maBmpSize, false );
- maBmpSize.Width() = maBmpSize.Width() / 2;
+ maBmpSize.setWidth( maBmpSize.Width() / 2 );
Point aPt0( 0, 0 );
Point aPt1( maBmpSize.Width(), 0 );
@@ -438,12 +438,12 @@ void SvxLineEndWindow::SetSize()
mpLineEndSet->SetStyle( nBits );
Size aSize( maBmpSize );
- aSize.Width() += 6;
- aSize.Height() += 6;
+ aSize.AdjustWidth(6 );
+ aSize.AdjustHeight(6 );
aSize = mpLineEndSet->CalcWindowSizePixel( aSize );
mpLineEndSet->SetPosSizePixel( Point( 2, 2 ), aSize );
- aSize.Width() += 4;
- aSize.Height() += 4;
+ aSize.AdjustWidth(4 );
+ aSize.AdjustHeight(4 );
SetOutputSizePixel( aSize );
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index a6d0e02b5067..20d04a2c055e 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -610,8 +610,8 @@ bool SvxStyleBox_Impl::AdjustFontForItemHeight(OutputDevice* pDevice, tools::Rec
double ratio = static_cast< double >( nHeight ) / rTextRect.Bottom();
vcl::Font aFont(pDevice->GetFont());
Size aPixelSize(aFont.GetFontSize());
- aPixelSize.Width() *= ratio;
- aPixelSize.Height() *= ratio;
+ aPixelSize.setWidth( aPixelSize.Width() * ratio );
+ aPixelSize.setHeight( aPixelSize.Height() * ratio );
aFont.SetFontSize(aPixelSize);
pDevice->SetFont(aFont);
return true;
@@ -640,10 +640,10 @@ void SvxStyleBox_Impl::UserDrawEntry(const UserDrawEvent& rUDEvt, const OUString
pDevice->GetTextBoundRect(aTextRect, rStyleName);
Point aPos( rUDEvt.GetRect().TopLeft() );
- aPos.X() += nLeftDistance;
+ aPos.AdjustX(nLeftDistance );
if (!AdjustFontForItemHeight(pDevice, aTextRect, rUDEvt.GetRect().GetHeight()))
- aPos.Y() += ( rUDEvt.GetRect().GetHeight() - aTextRect.Bottom() ) / 2;
+ aPos.AdjustY(( rUDEvt.GetRect().GetHeight() - aTextRect.Bottom() ) / 2 );
pDevice->DrawText(aPos, rStyleName);
}
@@ -1948,8 +1948,8 @@ void SvxFrameWindow_Impl::CalcSizeValueSet()
Size aItemSize( 20 * GetParent()->GetDPIScaleFactor(), 20 * GetParent()->GetDPIScaleFactor() );
Size aSize = aFrameSet->CalcWindowSizePixel( aItemSize );
aFrameSet->SetPosSizePixel( Point( 2, 2 ), aSize );
- aSize.Width() += 4;
- aSize.Height() += 4;
+ aSize.AdjustWidth(4 );
+ aSize.AdjustHeight(4 );
SetOutputSizePixel( aSize );
}
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 1ba5165cb8e9..32b2858098af 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -246,7 +246,7 @@ bool SvxFontSizeBox_Impl::EventNotify( NotifyEvent& rNEvt )
void SvxFontSizeBox_Impl::SetOptimalSize()
{
Size aPrefSize(LogicToPixel(m_aLogicalSize, MapMode(MapUnit::MapAppFont)));
- aPrefSize.Width() = get_preferred_size().Width();
+ aPrefSize.setWidth( get_preferred_size().Width() );
SetSizePixel(aPrefSize);
}
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 093afe13308e..9fb0d021930a 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -228,12 +228,12 @@ namespace {
{
if(aTargetSize.Width())
{
- aTargetSize.Width() -= 1;
+ aTargetSize.AdjustWidth( -1 );
}
if(aTargetSize.Height())
{
- aTargetSize.Height() -= 1;
+ aTargetSize.AdjustHeight( -1 );
}
}
}
@@ -268,8 +268,8 @@ namespace {
nHeight = ( nWidth * aBoundSize.Height() ) / aBoundSize.Width();
}
- aOutSize.Width() = nWidth;
- aOutSize.Height() = nHeight;
+ aOutSize.setWidth( nWidth );
+ aOutSize.setHeight( nHeight );
return &aOutSize;
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 0f33c8287e87..550c897e5a17 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2065,8 +2065,8 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
basegfx::B2DHomMatrix aNewHomogenMatrix;
mpObj->TRGetBaseGeometry(aNewHomogenMatrix, aNewPolyPolygon);
- aVclPoint.X() += basegfx::fround(aNewHomogenMatrix.get(0, 2));
- aVclPoint.Y() += basegfx::fround(aNewHomogenMatrix.get(1, 2));
+ aVclPoint.AdjustX(basegfx::fround(aNewHomogenMatrix.get(0, 2)) );
+ aVclPoint.AdjustY(basegfx::fround(aNewHomogenMatrix.get(1, 2)) );
// #88657# metric of pool maybe twips (writer)
ForceMetricToItemPoolMetric(aVclPoint);
@@ -2514,8 +2514,8 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
basegfx::B2DHomMatrix aNewHomogenMatrix;
mpObj->TRGetBaseGeometry(aNewHomogenMatrix, aNewPolyPolygon);
- aVclPoint.X() -= basegfx::fround(aNewHomogenMatrix.get(0, 2));
- aVclPoint.Y() -= basegfx::fround(aNewHomogenMatrix.get(1, 2));
+ aVclPoint.AdjustX( -(basegfx::fround(aNewHomogenMatrix.get(0, 2))) );
+ aVclPoint.AdjustY( -(basegfx::fround(aNewHomogenMatrix.get(1, 2))) );
awt::Point aPnt( aVclPoint.X(), aVclPoint.Y() );
rValue <<= aPnt;
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 6c2f2ff825f0..4cb601c3495f 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -948,8 +948,8 @@ Point SvxTextEditSourceImpl::LogicToPixel( const Point& rPoint, const MapMode& r
else if( IsValid() && mpModel )
{
Point aPoint1( rPoint );
- aPoint1.X() += maTextOffset.X();
- aPoint1.Y() += maTextOffset.Y();
+ aPoint1.AdjustX(maTextOffset.X() );
+ aPoint1.AdjustY(maTextOffset.Y() );
Point aPoint2( OutputDevice::LogicToLogic( aPoint1, rMapMode,
MapMode(mpModel->GetScaleUnit()) ) );
@@ -984,8 +984,8 @@ Point SvxTextEditSourceImpl::PixelToLogic( const Point& rPoint, const MapMode& r
Point aPoint2( OutputDevice::LogicToLogic( aPoint1,
MapMode(mpModel->GetScaleUnit()),
rMapMode ) );
- aPoint2.X() -= maTextOffset.X();
- aPoint2.Y() -= maTextOffset.Y();
+ aPoint2.AdjustX( -(maTextOffset.X()) );
+ aPoint2.AdjustY( -(maTextOffset.Y()) );
return aPoint2;
}
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 4cfc14e9b9f8..6b8b2211f693 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -67,12 +67,12 @@ Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, bool bHMirr,
// Adjust the positions inside the whole bitmap
if( bHMirr )
- aAnimBmp.aPosPix.X() = rGlobalSize.Width() - aAnimBmp.aPosPix.X() -
- aAnimBmp.aSizePix.Width();
+ aAnimBmp.aPosPix.setX( rGlobalSize.Width() - aAnimBmp.aPosPix.X() -
+ aAnimBmp.aSizePix.Width() );
if( bVMirr )
- aAnimBmp.aPosPix.Y() = rGlobalSize.Height() - aAnimBmp.aPosPix.Y() -
- aAnimBmp.aSizePix.Height();
+ aAnimBmp.aPosPix.setY( rGlobalSize.Height() - aAnimBmp.aPosPix.Y() -
+ aAnimBmp.aSizePix.Height() );
aNewAnim.Replace( aAnimBmp, i );
}
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 76bf2d4be071..b4b65449ebf1 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -102,20 +102,20 @@ XPolygon::XPolygon(const tools::Rectangle& rRect, long nRx, long nRy)
switch ( nQuad )
{
case 0: aCenter = rRect.TopLeft();
- aCenter.X() -= nRx;
- aCenter.Y() += nRy;
+ aCenter.AdjustX( -nRx );
+ aCenter.AdjustY(nRy );
break;
case 1: aCenter = rRect.TopRight();
- aCenter.X() += nRx;
- aCenter.Y() += nRy;
+ aCenter.AdjustX(nRx );
+ aCenter.AdjustY(nRy );
break;
case 2: aCenter = rRect.BottomRight();
- aCenter.X() += nRx;
- aCenter.Y() -= nRy;
+ aCenter.AdjustX(nRx );
+ aCenter.AdjustY( -nRy );
break;
case 3: aCenter = rRect.BottomLeft();
- aCenter.X() -= nRx;
- aCenter.Y() -= nRy;
+ aCenter.AdjustX( -nRx );
+ aCenter.AdjustY( -nRy );
break;
}
GenBezArc(aCenter, nRx, nRy, nXHdl, nYHdl, 0, 900, nQuad, nPos);
@@ -221,8 +221,8 @@ void XPolygon::Move( long nHorzMove, long nVertMove )
for ( sal_uInt16 i = 0; i < nCount; i++ )
{
Point* pPt = &(pImpXPolygon->mvPointsAndFlags[i].first);
- pPt->X() += nHorzMove;
- pPt->Y() += nVertMove;
+ pPt->AdjustX(nHorzMove );
+ pPt->AdjustY(nVertMove );
}
}
@@ -335,28 +335,28 @@ void XPolygon::SubdivideBezier(sal_uInt16 nPos, bool bCalcFirst, double fT)
nPosInc = 1;
nIdxInc = 1;
}
- rPoints[nPos].first.X() = static_cast<long>(fU3 * rPoints[nIdx ].first.X() +
+ rPoints[nPos].first.setX( static_cast<long>(fU3 * rPoints[nIdx ].first.X() +
fT * fU2 * rPoints[nIdx+1].first.X() * 3 +
fT2 * fU * rPoints[nIdx+2].first.X() * 3 +
- fT3 * rPoints[nIdx+3].first.X());
- rPoints[nPos].first.Y() = static_cast<long>(fU3 * rPoints[nIdx ].first.Y() +
+ fT3 * rPoints[nIdx+3].first.X()) );
+ rPoints[nPos].first.setY( static_cast<long>(fU3 * rPoints[nIdx ].first.Y() +
fT * fU2 * rPoints[nIdx+1].first.Y() * 3 +
fT2 * fU * rPoints[nIdx+2].first.Y() * 3 +
- fT3 * rPoints[nIdx+3].first.Y());
+ fT3 * rPoints[nIdx+3].first.Y()) );
nPos = nPos + nPosInc;
nIdx = nIdx + nIdxInc;
- rPoints[nPos].first.X() = static_cast<long>(fU2 * rPoints[nIdx ].first.X() +
+ rPoints[nPos].first.setX( static_cast<long>(fU2 * rPoints[nIdx ].first.X() +
fT * fU * rPoints[nIdx+1].first.X() * 2 +
- fT2 * rPoints[nIdx+2].first.X());
- rPoints[nPos].first.Y() = static_cast<long>(fU2 * rPoints[nIdx ].first.Y() +
+ fT2 * rPoints[nIdx+2].first.X()) );
+ rPoints[nPos].first.setY( static_cast<long>(fU2 * rPoints[nIdx ].first.Y() +
fT * fU * rPoints[nIdx+1].first.Y() * 2 +
- fT2 * rPoints[nIdx+2].first.Y());
+ fT2 * rPoints[nIdx+2].first.Y()) );
nPos = nPos + nPosInc;
nIdx = nIdx + nIdxInc;
- rPoints[nPos].first.X() = static_cast<long>(fU * rPoints[nIdx ].first.X() +
- fT * rPoints[nIdx+1].first.X());
- rPoints[nPos].first.Y() = static_cast<long>(fU * rPoints[nIdx ].first.Y() +
- fT * rPoints[nIdx+1].first.Y());
+ rPoints[nPos].first.setX( static_cast<long>(fU * rPoints[nIdx ].first.X() +
+ fT * rPoints[nIdx+1].first.X()) );
+ rPoints[nPos].first.setY( static_cast<long>(fU * rPoints[nIdx ].first.Y() +
+ fT * rPoints[nIdx+1].first.Y()) );
}
/// Generate a Bézier arc
@@ -379,22 +379,22 @@ void XPolygon::GenBezArc(const Point& rCenter, long nRx, long nRy,
if ( nQuad == 0 || nQuad == 2 )
{
- rPoints[nFirst].first.X() += nRx; rPoints[nFirst+3].first.Y() += nRy;
+ rPoints[nFirst].first.AdjustX(nRx ); rPoints[nFirst+3].first.AdjustY(nRy );
}
else
{
- rPoints[nFirst].first.Y() += nRy; rPoints[nFirst+3].first.X() += nRx;
+ rPoints[nFirst].first.AdjustY(nRy ); rPoints[nFirst+3].first.AdjustX(nRx );
}
rPoints[nFirst+1] = rPoints[nFirst];
rPoints[nFirst+2] = rPoints[nFirst+3];
if ( nQuad == 0 || nQuad == 2 )
{
- rPoints[nFirst+1].first.Y() += nYHdl; rPoints[nFirst+2].first.X() += nXHdl;
+ rPoints[nFirst+1].first.AdjustY(nYHdl ); rPoints[nFirst+2].first.AdjustX(nXHdl );
}
else
{
- rPoints[nFirst+1].first.X() += nXHdl; rPoints[nFirst+2].first.Y() += nYHdl;
+ rPoints[nFirst+1].first.AdjustX(nXHdl ); rPoints[nFirst+2].first.AdjustY(nYHdl );
}
if ( nStart > 0 )
SubdivideBezier(nFirst, false, static_cast<double>(nStart) / 900);
@@ -452,8 +452,8 @@ void XPolygon::CalcSmoothJoin(sal_uInt16 nCenter, sal_uInt16 nDrag, sal_uInt16 n
// keep the length if SMOOTH
if ( GetFlags(nCenter) == PolyFlags::Smooth || !IsControl(nDrag) )
{
- aDiff.X() = static_cast<long>(fRatio * aDiff.X());
- aDiff.Y() = static_cast<long>(fRatio * aDiff.Y());
+ aDiff.setX( static_cast<long>(fRatio * aDiff.X()) );
+ aDiff.setY( static_cast<long>(fRatio * aDiff.Y()) );
}
rPoints[nPnt].first = rPoints[nCenter].first - aDiff;
}
@@ -485,10 +485,10 @@ void XPolygon::CalcTangent(sal_uInt16 nCenter, sal_uInt16 nPrev, sal_uInt16 nNex
fPrevLen = (fNextLen + fPrevLen) / 2;
fNextLen = fPrevLen;
}
- rNext.X() = rCenter.X() + static_cast<long>(fNextLen * aDiff.X());
- rNext.Y() = rCenter.Y() + static_cast<long>(fNextLen * aDiff.Y());
- rPrev.X() = rCenter.X() - static_cast<long>(fPrevLen * aDiff.X());
- rPrev.Y() = rCenter.Y() - static_cast<long>(fPrevLen * aDiff.Y());
+ rNext.setX( rCenter.X() + static_cast<long>(fNextLen * aDiff.X()) );
+ rNext.setY( rCenter.Y() + static_cast<long>(fNextLen * aDiff.Y()) );
+ rPrev.setX( rCenter.X() - static_cast<long>(fPrevLen * aDiff.X()) );
+ rPrev.setY( rCenter.Y() - static_cast<long>(fPrevLen * aDiff.Y()) );
}
/// convert four polygon points into a Bézier curve
@@ -566,8 +566,8 @@ void XPolygon::Scale(double fSx, double fSy)
for (sal_uInt16 i = 0; i < nPntCnt; i++)
{
Point& rPnt = pImpXPolygon->mvPointsAndFlags[i].first;
- rPnt.X() = static_cast<long>(fSx * rPnt.X());
- rPnt.Y() = static_cast<long>(fSy * rPnt.Y());
+ rPnt.setX( static_cast<long>(fSx * rPnt.X()) );
+ rPnt.setY( static_cast<long>(fSy * rPnt.Y()) );
}
}
@@ -621,10 +621,10 @@ void XPolygon::Distort(const tools::Rectangle& rRefRect,
fUx = 1.0 - fTx;
fUy = 1.0 - fTy;
- rPnt.X() = static_cast<long>( fUy * (fUx * X1 + fTx * X2) +
- fTy * (fUx * X3 + fTx * X4) );
- rPnt.Y() = static_cast<long>( fUx * (fUy * Y1 + fTy * Y3) +
- fTx * (fUy * Y2 + fTy * Y4) );
+ rPnt.setX( static_cast<long>( fUy * (fUx * X1 + fTx * X2) +
+ fTy * (fUx * X3 + fTx * X4) ) );
+ rPnt.setY( static_cast<long>( fUx * (fUy * Y1 + fTy * Y3) +
+ fTx * (fUy * Y2 + fTy * Y4) ) );
}
}