diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-29 15:01:37 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-11-04 12:30:39 -0500 |
commit | 222d79a895f5ee6b4ae3459d72e863e776c535e8 (patch) | |
tree | 4a1f753dd50fbbc7466526c25ddd42332140ff11 /svx | |
parent | e2f674e475b8705c02962e564956952108060ade (diff) |
Rename aRect -> maRect for a member variable.
Conflicts:
svx/source/svdraw/svdoashp.cxx
svx/source/svdraw/svdocirc.cxx
svx/source/svdraw/svdograf.cxx
svx/source/svdraw/svdoole2.cxx
svx/source/svdraw/svdorect.cxx
svx/source/svdraw/svdotext.cxx
svx/source/svdraw/svdotxdr.cxx
svx/source/svdraw/svdotxtr.cxx
Change-Id: I12dc6c12ee44753c63b15f03276cdaa24e57d395
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 100 | ||||
-rw-r--r-- | svx/source/svdraw/svdocapt.cxx | 28 | ||||
-rw-r--r-- | svx/source/svdraw/svdocirc.cxx | 122 | ||||
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 16 | ||||
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdomedia.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 16 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdorect.cxx | 86 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 68 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 9 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxdr.cxx | 48 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxtr.cxx | 62 | ||||
-rw-r--r-- | svx/source/svdraw/svdouno.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/svdotable.cxx | 88 |
16 files changed, 340 insertions, 323 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 3c4026fe97a9..1814c0061392 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1464,7 +1464,7 @@ void SdrObjCustomShape::AdaptTextMinSize() else { // recreate from CustomShape-specific TextBounds - Rectangle aTextBound(aRect); + Rectangle aTextBound(maRect); if(GetTextBounds(aTextBound)) { @@ -1486,8 +1486,8 @@ void SdrObjCustomShape::AdaptTextMinSize() void SdrObjCustomShape::NbcSetSnapRect( const Rectangle& rRect ) { - aRect=rRect; - ImpJustifyRect(aRect); + maRect = rRect; + ImpJustifyRect(maRect); InvalidateRenderGeometry(); // #115391# @@ -1497,6 +1497,7 @@ void SdrObjCustomShape::NbcSetSnapRect( const Rectangle& rRect ) SetRectsDirty(); SetChanged(); } + void SdrObjCustomShape::SetSnapRect( const Rectangle& rRect ) { Rectangle aBoundRect0; @@ -1506,10 +1507,11 @@ void SdrObjCustomShape::SetSnapRect( const Rectangle& rRect ) BroadcastObjectChange(); SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0); } + void SdrObjCustomShape::NbcSetLogicRect( const Rectangle& rRect ) { - aRect = rRect; - ImpJustifyRect( aRect ); + maRect = rRect; + ImpJustifyRect(maRect); InvalidateRenderGeometry(); // #115391# @@ -1518,6 +1520,7 @@ void SdrObjCustomShape::NbcSetLogicRect( const Rectangle& rRect ) SetRectsDirty(); SetChanged(); } + void SdrObjCustomShape::SetLogicRect( const Rectangle& rRect ) { Rectangle aBoundRect0; @@ -1527,6 +1530,7 @@ void SdrObjCustomShape::SetLogicRect( const Rectangle& rRect ) BroadcastObjectChange(); SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0); } + void SdrObjCustomShape::Move( const Size& rSiz ) { if ( rSiz.Width() || rSiz.Height() ) @@ -1572,7 +1576,7 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, co Fraction yFact( ryFact ); // taking care of handles that should not been changed - Rectangle aOld( aRect ); + Rectangle aOld( maRect ); std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); SdrTextObj::NbcResize( rRef, xFact, yFact ); @@ -1601,12 +1605,12 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const Fraction& rxFact, co aIter->xInteraction->setControllerPosition( aIter->aPosition ); if ( aIter->nMode & CUSTOMSHAPE_HANDLE_RESIZE_ABSOLUTE_X ) { - sal_Int32 nX = ( aIter->aPosition.X - aOld.Left() ) + aRect.Left(); + sal_Int32 nX = ( aIter->aPosition.X - aOld.Left() ) + maRect.Left(); aIter->xInteraction->setControllerPosition( com::sun::star::awt::Point( nX, aIter->xInteraction->getPosition().Y ) ); } if ( aIter->nMode & CUSTOMSHAPE_HANDLE_RESIZE_ABSOLUTE_Y ) { - sal_Int32 nY = ( aIter->aPosition.Y - aOld.Top() ) + aRect.Top(); + sal_Int32 nY = ( aIter->aPosition.Y - aOld.Top() ) + maRect.Top(); aIter->xInteraction->setControllerPosition( com::sun::star::awt::Point( aIter->xInteraction->getPosition().X, nY ) ); } } @@ -1627,7 +1631,7 @@ void SdrObjCustomShape::NbcRotate( const Point& rRef, long nAngle, double sn, do // the rotation angle for ashapes is stored in fObjectRotation, this rotation // has to be applied to the text object (which is internally using aGeo.nAngle). - SdrTextObj::NbcRotate( aRect.TopLeft(), -aGeo.nRotationAngle, // retrieving the unrotated text object + SdrTextObj::NbcRotate( maRect.TopLeft(), -aGeo.nRotationAngle, // retrieving the unrotated text object sin( (-aGeo.nRotationAngle) * F_PI18000 ), cos( (-aGeo.nRotationAngle) * F_PI18000 ) ); aGeo.nRotationAngle = 0; // resetting aGeo data @@ -1641,7 +1645,7 @@ void SdrObjCustomShape::NbcRotate( const Point& rRef, long nAngle, double sn, do nW = nW % 36000; if ( nW < 0 ) nW = 36000 + nW; - SdrTextObj::NbcRotate( aRect.TopLeft(), nW, // applying text rotation + SdrTextObj::NbcRotate( maRect.TopLeft(), nW, // applying text rotation sin( nW * F_PI18000 ), cos( nW * F_PI18000 ) ); @@ -1751,13 +1755,13 @@ SdrGluePoint SdrObjCustomShape::GetVertexGluePoint(sal_uInt16 nPosNum) const Point aPt; switch (nPosNum) { - case 0: aPt=aRect.TopCenter(); aPt.Y()-=nWdt; break; - case 1: aPt=aRect.RightCenter(); aPt.X()+=nWdt; break; - case 2: aPt=aRect.BottomCenter(); aPt.Y()+=nWdt; break; - case 3: aPt=aRect.LeftCenter(); aPt.X()-=nWdt; break; + 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; } - if (aGeo.nShearAngle!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan); - if (aGeo.nRotationAngle!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan); + if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); aPt-=GetSnapRect().Center(); SdrGluePoint aGP(aPt); aGP.SetPercent(false); @@ -1804,19 +1808,19 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded() if ( aGeo.nRotationAngle || nShearAngle || bMirroredX || bMirroredY ) { - Polygon aPoly( aRect ); + Polygon aPoly( maRect ); if( nShearAngle ) { sal_uInt16 nPointCount=aPoly.GetSize(); for (sal_uInt16 i=0; i<nPointCount; i++) - ShearPoint(aPoly[i],aRect.Center(), fTan, false ); + ShearPoint(aPoly[i],maRect.Center(), fTan, false ); } if ( aGeo.nRotationAngle ) - aPoly.Rotate( aRect.Center(), aGeo.nRotationAngle / 10 ); + aPoly.Rotate( maRect.Center(), aGeo.nRotationAngle / 10 ); Rectangle aBoundRect( aPoly.GetBoundRect() ); - sal_Int32 nXDiff = aBoundRect.Left() - aRect.Left(); - sal_Int32 nYDiff = aBoundRect.Top() - aRect.Top(); + sal_Int32 nXDiff = aBoundRect.Left() - maRect.Left(); + sal_Int32 nYDiff = aBoundRect.Top() - maRect.Top(); if (nShearAngle&&((bMirroredX&&!bMirroredY)||(bMirroredY&&!bMirroredX))) { @@ -1824,7 +1828,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded() fTan = -fTan; } - Point aRef( aRect.GetWidth() / 2, aRect.GetHeight() / 2 ); + Point aRef( maRect.GetWidth() / 2, maRect.GetHeight() / 2 ); for ( a = 0; a < aNewList.GetCount(); a++ ) { SdrGluePoint& rPoint = aNewList[ a ]; @@ -1834,9 +1838,9 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded() RotatePoint( aGlue, aRef, sin( fObjectRotation * F_PI180 ), cos( fObjectRotation * F_PI180 ) ); if ( bMirroredX ) - aGlue.X() = aRect.GetWidth() - aGlue.X(); + aGlue.X() = maRect.GetWidth() - aGlue.X(); if ( bMirroredY ) - aGlue.Y() = aRect.GetHeight() - aGlue.Y(); + aGlue.Y() = maRect.GetHeight() - aGlue.Y(); aGlue.X() -= nXDiff; aGlue.Y() -= nYDiff; rPoint.SetPos( aGlue ); @@ -1975,7 +1979,7 @@ bool SdrObjCustomShape::beginSpecialDrag(SdrDragStat& rDrag) const void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect ) { - Rectangle aOld( aRect ); + Rectangle aOld( maRect ); bool bOldMirroredX( IsMirroredX() ); bool bOldMirroredY( IsMirroredY() ); @@ -1985,7 +1989,7 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect ) std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); GeoStat aGeoStat( GetGeoStat() ); - if ( aNewRect.TopLeft()!= aRect.TopLeft() && + if ( aNewRect.TopLeft()!= maRect.TopLeft() && ( aGeo.nRotationAngle || aGeo.nShearAngle ) ) { Point aNewPos( aNewRect.TopLeft() ); @@ -1993,7 +1997,7 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect ) if ( aGeo.nRotationAngle ) RotatePoint(aNewPos, aOld.TopLeft(), aGeoStat.nSin, aGeoStat.nCos ); aNewRect.SetPos( aNewPos ); } - if ( aNewRect != aRect ) + if ( aNewRect != maRect ) { SetLogicRect( aNewRect ); InvalidateRenderGeometry(); @@ -2025,17 +2029,17 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect ) { nX = ( aIter->aPosition.X - aOld.Right() ); if ( rNewRect.Left() > rNewRect.Right() ) - nX = aRect.Left() - nX; + nX = maRect.Left() - nX; else - nX += aRect.Right(); + nX += maRect.Right(); } else { nX = ( aIter->aPosition.X - aOld.Left() ); if ( rNewRect.Left() > rNewRect.Right() ) - nX = aRect.Right() - nX; + nX = maRect.Right() - nX; else - nX += aRect.Left(); + nX += maRect.Left(); } aIter->xInteraction->setControllerPosition( com::sun::star::awt::Point( nX, aIter->xInteraction->getPosition().Y ) ); } @@ -2046,17 +2050,17 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect ) { nY = ( aIter->aPosition.Y - aOld.Bottom() ); if ( rNewRect.Top() > rNewRect.Bottom() ) - nY = aRect.Top() - nY; + nY = maRect.Top() - nY; else - nY += aRect.Bottom(); + nY += maRect.Bottom(); } else { nY = ( aIter->aPosition.Y - aOld.Top() ); if ( rNewRect.Top() > rNewRect.Bottom() ) - nY = aRect.Bottom() - nY; + nY = maRect.Bottom() - nY; else - nY += aRect.Top(); + nY += maRect.Top(); } aIter->xInteraction->setControllerPosition( com::sun::star::awt::Point( aIter->xInteraction->getPosition().X, nY ) ); } @@ -2085,7 +2089,7 @@ void SdrObjCustomShape::DragMoveCustomShapeHdl( const Point aDestination, sal_Int32 nXDiff = aPt.X - aInteractionHandle.aPosition.X; sal_Int32 nYDiff = aPt.Y - aInteractionHandle.aPosition.Y; - aRect.Move( nXDiff, nYDiff ); + maRect.Move( nXDiff, nYDiff ); aOutRect.Move( nXDiff, nYDiff ); maSnapRect.Move( nXDiff, nYDiff ); SetRectsDirty(true); @@ -2171,12 +2175,12 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat ) if ( !aInteractionHandles.empty() ) { sal_Int32 nHandlePos = aInteractionHandles[ aInteractionHandles.size() - 1 ].xInteraction->getPosition().X; - aRect1.Move( aRect.Left() - nHandlePos, 0 ); + aRect1.Move( maRect.Left() - nHandlePos, 0 ); } } ImpJustifyRect( aRect1 ); rStat.SetActionRect( aRect1 ); - aRect = aRect1; + maRect = aRect1; SetRectsDirty(); for (std::vector< SdrCustomShapeInteraction >::const_iterator aIter( aInteractionHandles.begin() ), aEnd( aInteractionHandles.end() ); @@ -2475,9 +2479,9 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool { Rectangle aReturnValue; - Rectangle aOldTextRect( aRect ); // <- initial text rectangle + Rectangle aOldTextRect( maRect ); // <- initial text rectangle - Rectangle aNewTextRect( aRect ); // <- new text rectangle returned from the custom shape renderer, + Rectangle aNewTextRect( maRect ); // <- new text rectangle returned from the custom shape renderer, GetTextBounds( aNewTextRect ); // it depends to the current logical shape size Rectangle aAdjustedTextRect( aNewTextRect ); // <- new text rectangle is being tested by AdjustTextFrameWidthAndHeight to ensure @@ -2486,7 +2490,7 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool if (aAdjustedTextRect != aNewTextRect && aOldTextRect != aAdjustedTextRect && aNewTextRect.GetWidth() && aNewTextRect.GetHeight()) { - aReturnValue = aRect; + aReturnValue = maRect; double fXScale = (double)aOldTextRect.GetWidth() / (double)aNewTextRect.GetWidth(); double fYScale = (double)aOldTextRect.GetHeight() / (double)aNewTextRect.GetHeight(); double fRightDiff = (double)( aAdjustedTextRect.Right() - aNewTextRect.Right() ) * fXScale; @@ -2505,13 +2509,13 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); - bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != aRect ); + bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != maRect ); if ( bRet ) { // taking care of handles that should not been changed std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); - aRect = aNewTextRect; + maRect = aNewTextRect; SetRectsDirty(); SetChanged(); @@ -2534,7 +2538,7 @@ bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); - bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != aRect ); + bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != maRect ); if ( bRet ) { Rectangle aBoundRect0; @@ -2544,7 +2548,7 @@ bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) // taking care of handles that should not been changed std::vector< SdrCustomShapeInteraction > aInteractionHandles( GetInteractionHandles() ); - aRect = aNewTextRect; + maRect = aNewTextRect; SetRectsDirty(); for (std::vector< SdrCustomShapeInteraction >::const_iterator aIter( aInteractionHandles.begin() ), aEnd( aInteractionHandles.end() ) ; @@ -2936,7 +2940,7 @@ void SdrObjCustomShape::SetPage( SdrPage* pNewPage ) // invalidating rectangles by SetRectsDirty is not sufficient, // AdjustTextFrameWidthAndHeight() also has to be made, both // actions are done by NbcSetSnapRect - Rectangle aTmp( aRect ); //creating temporary rectangle #i61108# + Rectangle aTmp( maRect ); //creating temporary rectangle #i61108# NbcSetSnapRect( aTmp ); } } @@ -3086,7 +3090,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf double fShearX = (aGeo.nShearAngle / 100.0) * F_PI180; // get aRect, this is the unrotated snaprect - Rectangle aRectangle(aRect); + Rectangle aRectangle(maRect); bool bMirroredX = IsMirroredX(); bool bMirroredY = IsMirroredY(); @@ -3097,7 +3101,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf if ( bMirroredX ) { - Polygon aPol( Rect2Poly( aRect, aNewGeo ) ); + Polygon aPol = Rect2Poly(maRect, aNewGeo); Rectangle aBoundRect( aPol.GetBoundRect() ); Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 1390794f6cf6..d556b6493fac 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -330,7 +330,7 @@ bool SdrCaptionObj::beginSpecialDrag(SdrDragStat& rDrag) const return false; rDrag.SetNoSnap(true); - rDrag.SetActionRect(aRect); + rDrag.SetActionRect(maRect); Point aHit(rDrag.GetStart()); @@ -367,7 +367,7 @@ bool SdrCaptionObj::applySpecialDrag(SdrDragStat& rDrag) if(!pHdl) { - aRect.Move(aDelt.X(),aDelt.Y()); + maRect.Move(aDelt.X(),aDelt.Y()); } else { @@ -436,7 +436,7 @@ void SdrCaptionObj::ImpRecalcTail() { ImpCaptParams aPara; ImpGetCaptParams(aPara); - ImpCalcTail(aPara,aTailPoly,aRect); + ImpCalcTail(aPara, aTailPoly, maRect); SetRectsDirty(); SetXPolyDirty(); } @@ -544,14 +544,14 @@ void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, Polygon& rPoly, Rect bool SdrCaptionObj::BegCreate(SdrDragStat& rStat) { - if (aRect.IsEmpty()) return false; // Create currently only works with the given Rect + if (maRect.IsEmpty()) return false; // Create currently only works with the given Rect ImpCaptParams aPara; ImpGetCaptParams(aPara); - aRect.SetPos(rStat.GetNow()); + maRect.SetPos(rStat.GetNow()); aTailPoly[0]=rStat.GetStart(); - ImpCalcTail(aPara,aTailPoly,aRect); - rStat.SetActionRect(aRect); + ImpCalcTail(aPara,aTailPoly,maRect); + rStat.SetActionRect(maRect); return true; } @@ -559,9 +559,9 @@ bool SdrCaptionObj::MovCreate(SdrDragStat& rStat) { ImpCaptParams aPara; ImpGetCaptParams(aPara); - aRect.SetPos(rStat.GetNow()); - ImpCalcTail(aPara,aTailPoly,aRect); - rStat.SetActionRect(aRect); + maRect.SetPos(rStat.GetNow()); + ImpCalcTail(aPara,aTailPoly,maRect); + rStat.SetActionRect(maRect); SetBoundRectDirty(); bSnapRectDirty=true; return true; @@ -571,8 +571,8 @@ bool SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { ImpCaptParams aPara; ImpGetCaptParams(aPara); - aRect.SetPos(rStat.GetNow()); - ImpCalcTail(aPara,aTailPoly,aRect); + maRect.SetPos(rStat.GetNow()); + ImpCalcTail(aPara,aTailPoly,maRect); SetRectsDirty(); return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2); } @@ -589,7 +589,7 @@ void SdrCaptionObj::BrkCreate(SdrDragStat& /*rStat*/) basegfx::B2DPolyPolygon SdrCaptionObj::TakeCreatePoly(const SdrDragStat& /*rDrag*/) const { basegfx::B2DPolyPolygon aRetval; - const basegfx::B2DRange aRange(aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom()); + const basegfx::B2DRange aRange(maRect.Left(), maRect.Top(), maRect.Right(), maRect.Bottom()); aRetval.append(basegfx::tools::createPolygonFromRect(aRange)); aRetval.append(aTailPoly.getB2DPolygon()); return aRetval; @@ -664,7 +664,7 @@ void SdrCaptionObj::NbcSetSnapRect(const Rectangle& rRect) const Rectangle& SdrCaptionObj::GetLogicRect() const { - return aRect; + return maRect; } void SdrCaptionObj::NbcSetLogicRect(const Rectangle& rRect) diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 25f2b7a87ecf..1542670f274a 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -279,14 +279,15 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c void SdrCircObj::RecalcXPoly() { - const basegfx::B2DPolygon aPolyCirc(ImpCalcXPolyCirc(meCircleKind, aRect, nStartAngle, nEndAngle)); + const basegfx::B2DPolygon aPolyCirc(ImpCalcXPolyCirc(meCircleKind, maRect, nStartAngle, nEndAngle)); mpXPoly = new XPolygon(aPolyCirc); } OUString SdrCircObj::TakeObjNameSingul() const { sal_uInt16 nID=STR_ObjNameSingulCIRC; - if (aRect.GetWidth()==aRect.GetHeight() && aGeo.nShearAngle==0) { + if (maRect.GetWidth() == maRect.GetHeight() && aGeo.nShearAngle==0) + { switch (meCircleKind) { case OBJ_CIRC: nID=STR_ObjNameSingulCIRC; break; case OBJ_SECT: nID=STR_ObjNameSingulSECT; break; @@ -319,7 +320,8 @@ OUString SdrCircObj::TakeObjNameSingul() const OUString SdrCircObj::TakeObjNamePlural() const { sal_uInt16 nID=STR_ObjNamePluralCIRC; - if (aRect.GetWidth()==aRect.GetHeight() && aGeo.nShearAngle==0) { + if (maRect.GetWidth() == maRect.GetHeight() && aGeo.nShearAngle==0) + { switch (meCircleKind) { case OBJ_CIRC: nID=STR_ObjNamePluralCIRC; break; case OBJ_SECT: nID=STR_ObjNamePluralSECT; break; @@ -346,7 +348,7 @@ SdrCircObj* SdrCircObj::Clone() const basegfx::B2DPolyPolygon SdrCircObj::TakeXorPoly() const { - const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, aRect, nStartAngle, nEndAngle)); + const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, maRect, nStartAngle, nEndAngle)); return basegfx::B2DPolyPolygon(aCircPolygon); } @@ -405,57 +407,57 @@ SdrHdl* SdrCircObj::GetHdl(sal_uInt32 nHdlNum) const switch (nHdlNum) { case 0: - aPnt = GetAnglePnt(aRect,nStartAngle); + aPnt = GetAnglePnt(maRect,nStartAngle); eLocalKind = HDL_CIRC; nPNum = 1; break; case 1: - aPnt = GetAnglePnt(aRect,nEndAngle); + aPnt = GetAnglePnt(maRect,nEndAngle); eLocalKind = HDL_CIRC; nPNum = 2L; break; case 2: - aPnt = aRect.TopLeft(); + aPnt = maRect.TopLeft(); eLocalKind = HDL_UPLFT; break; case 3: - aPnt = aRect.TopCenter(); + aPnt = maRect.TopCenter(); eLocalKind = HDL_UPPER; break; case 4: - aPnt = aRect.TopRight(); + aPnt = maRect.TopRight(); eLocalKind = HDL_UPRGT; break; case 5: - aPnt = aRect.LeftCenter(); + aPnt = maRect.LeftCenter(); eLocalKind = HDL_LEFT; break; case 6: - aPnt = aRect.RightCenter(); + aPnt = maRect.RightCenter(); eLocalKind = HDL_RIGHT; break; case 7: - aPnt = aRect.BottomLeft(); + aPnt = maRect.BottomLeft(); eLocalKind = HDL_LWLFT; break; case 8: - aPnt = aRect.BottomCenter(); + aPnt = maRect.BottomCenter(); eLocalKind = HDL_LOWER; break; case 9: - aPnt = aRect.BottomRight(); + aPnt = maRect.BottomRight(); eLocalKind = HDL_LWRGT; break; } if (aGeo.nShearAngle) { - ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan); + ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan); } if (aGeo.nRotationAngle) { - RotatePoint(aPnt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + RotatePoint(aPnt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); } if (eLocalKind != HDL_MOVE) @@ -502,15 +504,15 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag) Point aPt(rDrag.GetNow()); if (aGeo.nRotationAngle!=0) - RotatePoint(aPt,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); + RotatePoint(aPt,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos); if (aGeo.nShearAngle!=0) - ShearPoint(aPt,aRect.TopLeft(),-aGeo.nTan); + ShearPoint(aPt,maRect.TopLeft(),-aGeo.nTan); - aPt-=aRect.Center(); + aPt -= maRect.Center(); - long nWdt=aRect.Right()-aRect.Left(); - long nHgt=aRect.Bottom()-aRect.Top(); + long nWdt = maRect.Right() - maRect.Left(); + long nHgt = maRect.Bottom() - maRect.Top(); if(nWdt>=nHgt) { @@ -687,7 +689,7 @@ bool SdrCircObj::BegCreate(SdrDragStat& rStat) Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); - aRect = aRect1; + maRect = aRect1; ImpSetCreateParams(rStat); return true; } @@ -697,8 +699,8 @@ bool SdrCircObj::MovCreate(SdrDragStat& rStat) ImpSetCreateParams(rStat); ImpCircUser* pU=static_cast<ImpCircUser*>(rStat.GetUser()); rStat.SetActionRect(pU->aR); - aRect=pU->aR; // for ObjName - ImpJustifyRect(aRect); + maRect = pU->aR; // for ObjName + ImpJustifyRect(maRect); nStartAngle=pU->nStart; nEndAngle=pU->nEnd; SetBoundRectDirty(); @@ -724,16 +726,16 @@ bool SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) if (meCircleKind==OBJ_CIRC) { bRet=rStat.GetPointAnz()>=2; if (bRet) { - aRect=pU->aR; - ImpJustifyRect(aRect); + maRect = pU->aR; + ImpJustifyRect(maRect); } } else { rStat.SetNoSnap(rStat.GetPointAnz()>=2); rStat.SetOrtho4Possible(rStat.GetPointAnz()<2); bRet=rStat.GetPointAnz()>=4; if (bRet) { - aRect=pU->aR; - ImpJustifyRect(aRect); + maRect = pU->aR; + ImpJustifyRect(maRect); nStartAngle=pU->nStart; nEndAngle=pU->nEnd; } @@ -804,7 +806,7 @@ Pointer SdrCircObj::GetCreatePointer() const void SdrCircObj::NbcMove(const Size& aSiz) { - MoveRect(aRect,aSiz); + MoveRect(maRect,aSiz); MoveRect(aOutRect,aSiz); MoveRect(maSnapRect,aSiz); SetXPolyDirty(); @@ -875,9 +877,9 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) Point aTmpPt1; Point aTmpPt2; if (bFreeMirr) { // some preparations for using an arbitrary axis of reflection - Point aCenter(aRect.Center()); - long nWdt=aRect.GetWidth()-1; - long nHgt=aRect.GetHeight()-1; + Point aCenter(maRect.Center()); + long nWdt=maRect.GetWidth()-1; + long nHgt=maRect.GetHeight()-1; long nMaxRad=((nWdt>nHgt ? nWdt : nHgt)+1) /2; double a; // starting point @@ -893,12 +895,12 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) if (nHgt==0) aTmpPt2.Y()=0; aTmpPt2+=aCenter; if (aGeo.nRotationAngle!=0) { - RotatePoint(aTmpPt1,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); - RotatePoint(aTmpPt2,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + RotatePoint(aTmpPt1,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); + RotatePoint(aTmpPt2,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); } if (aGeo.nShearAngle!=0) { - ShearPoint(aTmpPt1,aRect.TopLeft(),aGeo.nTan); - ShearPoint(aTmpPt2,aRect.TopLeft(),aGeo.nTan); + ShearPoint(aTmpPt1,maRect.TopLeft(),aGeo.nTan); + ShearPoint(aTmpPt2,maRect.TopLeft(),aGeo.nTan); } } SdrTextObj::NbcMirror(rRef1,rRef2); @@ -907,15 +909,15 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) MirrorPoint(aTmpPt2,rRef1,rRef2); // unrotate: if (aGeo.nRotationAngle!=0) { - RotatePoint(aTmpPt1,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin for reversion - RotatePoint(aTmpPt2,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin for reversion + RotatePoint(aTmpPt1,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin for reversion + RotatePoint(aTmpPt2,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // -sin for reversion } // unshear: if (aGeo.nShearAngle!=0) { - ShearPoint(aTmpPt1,aRect.TopLeft(),-aGeo.nTan); // -tan for reversion - ShearPoint(aTmpPt2,aRect.TopLeft(),-aGeo.nTan); // -tan for reversion + ShearPoint(aTmpPt1,maRect.TopLeft(),-aGeo.nTan); // -tan for reversion + ShearPoint(aTmpPt2,maRect.TopLeft(),-aGeo.nTan); // -tan for reversion } - Point aCenter(aRect.Center()); + Point aCenter(maRect.Center()); aTmpPt1-=aCenter; aTmpPt2-=aCenter; // because it's mirrored, the angles are swapped, too @@ -963,36 +965,36 @@ void Union(Rectangle& rR, const Point& rP) void SdrCircObj::TakeUnrotatedSnapRect(Rectangle& rRect) const { - rRect=aRect; + rRect = maRect; if (meCircleKind!=OBJ_CIRC) { - const Point aPntStart(GetAnglePnt(aRect,nStartAngle)); - const Point aPntEnd(GetAnglePnt(aRect,nEndAngle)); + const Point aPntStart(GetAnglePnt(maRect,nStartAngle)); + const Point aPntEnd(GetAnglePnt(maRect,nEndAngle)); long a=nStartAngle; long e=nEndAngle; - rRect.Left ()=aRect.Right(); - rRect.Right ()=aRect.Left(); - rRect.Top ()=aRect.Bottom(); - rRect.Bottom()=aRect.Top(); + rRect.Left ()=maRect.Right(); + rRect.Right ()=maRect.Left(); + rRect.Top ()=maRect.Bottom(); + rRect.Bottom()=maRect.Top(); Union(rRect,aPntStart); Union(rRect,aPntEnd); if ((a<=18000 && e>=18000) || (a>e && (a<=18000 || e>=18000))) { - Union(rRect,aRect.LeftCenter()); + Union(rRect,maRect.LeftCenter()); } if ((a<=27000 && e>=27000) || (a>e && (a<=27000 || e>=27000))) { - Union(rRect,aRect.BottomCenter()); + Union(rRect,maRect.BottomCenter()); } if (a>e) { - Union(rRect,aRect.RightCenter()); + Union(rRect,maRect.RightCenter()); } if ((a<=9000 && e>=9000) || (a>e && (a<=9000 || e>=9000))) { - Union(rRect,aRect.TopCenter()); + Union(rRect,maRect.TopCenter()); } if (meCircleKind==OBJ_SECT) { - Union(rRect,aRect.Center()); + Union(rRect,maRect.Center()); } if (aGeo.nRotationAngle!=0) { Point aDst(rRect.TopLeft()); - aDst-=aRect.TopLeft(); + aDst-=maRect.TopLeft(); Point aDst0(aDst); RotatePoint(aDst,Point(),aGeo.nSin,aGeo.nCos); aDst-=aDst0; @@ -1034,8 +1036,8 @@ void SdrCircObj::NbcSetSnapRect(const Rectangle& rRect) NbcResize(maSnapRect.TopLeft(),Fraction(nWdt1,nWdt0),Fraction(nHgt1,nHgt0)); NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top())); } else { - aRect=rRect; - ImpJustifyRect(aRect); + maRect=rRect; + ImpJustifyRect(maRect); } SetRectsDirty(); SetXPolyDirty(); @@ -1054,9 +1056,9 @@ sal_uInt32 SdrCircObj::GetSnapPointCount() const Point SdrCircObj::GetSnapPoint(sal_uInt32 i) const { switch (i) { - case 1 : return GetAnglePnt(aRect,nStartAngle); - case 2 : return GetAnglePnt(aRect,nEndAngle); - default: return aRect.Center(); + case 1 : return GetAnglePnt(maRect,nStartAngle); + case 2 : return GetAnglePnt(maRect,nEndAngle); + default: return maRect.Center(); } } @@ -1147,7 +1149,7 @@ void SdrCircObj::ImpSetCircInfoToAttr() SdrObject* SdrCircObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const { const bool bFill(OBJ_CARC == meCircleKind ? sal_False : sal_True); - const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, aRect, nStartAngle, nEndAngle)); + const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, maRect, nStartAngle, nEndAngle)); SdrObject* pRet = ImpConvertMakeObj(basegfx::B2DPolyPolygon(aCircPolygon), bFill, bBezier); if(bAddText) diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 3e8c25eb811b..564d07c8b0cf 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -1698,7 +1698,7 @@ void SdrEdgeObj::SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly ) // #i110629# also set aRect and maSnapeRect depending on pEdgeTrack const Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect()); - aRect = aPolygonBounds; + maRect = aPolygonBounds; maSnapRect = aPolygonBounds; } } @@ -2229,11 +2229,11 @@ void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect) if(aOld != rRect) { - if(aRect.IsEmpty() && 0 == pEdgeTrack->GetPointCount()) + if (maRect.IsEmpty() && 0 == pEdgeTrack->GetPointCount()) { // #i110629# When initializing, do not scale on empty Rectangle; this // will mirror the underlying text object (!) - aRect = rRect; + maRect = rRect; maSnapRect = rRect; } else diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 1bf234fec3ab..ca735430d445 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -870,10 +870,10 @@ basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly() const // take grown rectangle const sal_Int32 nHalfLineWidth(ImpGetLineWdt() / 2); const Rectangle aGrownRect( - aRect.Left() - nHalfLineWidth, - aRect.Top() - nHalfLineWidth, - aRect.Right() + nHalfLineWidth, - aRect.Bottom() + nHalfLineWidth); + maRect.Left() - nHalfLineWidth, + maRect.Top() - nHalfLineWidth, + maRect.Right() + nHalfLineWidth, + maRect.Bottom() + nHalfLineWidth); XPolygon aXPoly(ImpCalcXPoly(aGrownRect, GetEckenradius())); aRetval.append(aXPoly.getB2DPolygon()); @@ -1083,7 +1083,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const case GRAPHIC_GDIMETAFILE: { // Sort into group and return ONLY those objects that can be created from the MetaFile. - ImpSdrGDIMetaFileImport aFilter(*GetModel(), GetLayer(), aRect); + ImpSdrGDIMetaFileImport aFilter(*GetModel(), GetLayer(), maRect); SdrObjGroup* pGrp = new SdrObjGroup(); if(aFilter.DoImport(aMtf, *pGrp->GetSubList(), 0)) @@ -1095,13 +1095,13 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const if(aGeoStat.nShearAngle) { aGeoStat.RecalcTan(); - pGrp->NbcShear(aRect.TopLeft(), aGeoStat.nShearAngle, aGeoStat.nTan, false); + pGrp->NbcShear(maRect.TopLeft(), aGeoStat.nShearAngle, aGeoStat.nTan, false); } if(aGeoStat.nRotationAngle) { aGeoStat.RecalcSinCos(); - pGrp->NbcRotate(aRect.TopLeft(), aGeoStat.nRotationAngle, aGeoStat.nSin, aGeoStat.nCos); + pGrp->NbcRotate(maRect.TopLeft(), aGeoStat.nRotationAngle, aGeoStat.nSin, aGeoStat.nCos); } } @@ -1273,7 +1273,7 @@ void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly ) } if( bShrinkOnly ) - aPos = aRect.TopLeft(); + aPos = maRect.TopLeft(); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 70ff1a4680dc..b59409bf823a 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -728,7 +728,7 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const aTextSize2.Width()++; aTextSize2.Height()++; // because of the Rect-Ctor's odd behavior rRect=Rectangle(aTextPos,aTextSize2); rRect.Justify(); - ((SdrMeasureObj*)this)->aRect=rRect; + ((SdrMeasureObj*)this)->maRect=rRect; if (aMPol.nTextAngle!=aGeo.nRotationAngle) { ((SdrMeasureObj*)this)->aGeo.nRotationAngle=aMPol.nTextAngle; diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index a9027d7aa575..0a7615f7df9e 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -223,7 +223,7 @@ void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly / } if( bShrinkOnly ) - aPos = aRect.TopLeft(); + aPos = maRect.TopLeft(); aPos.X() -= aSize.Width() / 2; aPos.Y() -= aSize.Height() / 2; diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index d97e4cba65a4..e26129f58db9 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1780,8 +1780,8 @@ void SdrOle2Obj::ImpSetVisAreaSize() // objects' visual area. The scaling will not change, but it might exist already and must // be used in calculations MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) ); - Size aVisSize( (long)( Fraction( aRect.GetWidth() ) / aScaleWidth ), - (long)( Fraction( aRect.GetHeight() ) / aScaleHeight ) ); + Size aVisSize( (long)( Fraction( maRect.GetWidth() ) / aScaleWidth ), + (long)( Fraction( maRect.GetHeight() ) / aScaleHeight ) ); aVisSize = OutputDevice::LogicToLogic( aVisSize, pModel->GetScaleUnit(), aMapUnit); awt::Size aSz; @@ -1804,14 +1804,14 @@ void SdrOle2Obj::ImpSetVisAreaSize() // server changed VisArea to its liking and the VisArea is different than the suggested one // store the new value as given by the object MapUnit aNewMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) ); - aRect.SetSize(OutputDevice::LogicToLogic( aAcceptedVisArea.GetSize(), aNewMapUnit, pModel->GetScaleUnit())); + maRect.SetSize(OutputDevice::LogicToLogic( aAcceptedVisArea.GetSize(), aNewMapUnit, pModel->GetScaleUnit())); } // make the new object area known to the client // compared to the "else" branch aRect might have been changed by the object and no additional scaling was applied // WHY this -> OSL_ASSERT( pClient ); if( pClient ) - pClient->SetObjArea(aRect); + pClient->SetObjArea(maRect); // we need a new replacement image as the object has resized itself @@ -1832,7 +1832,7 @@ void SdrOle2Obj::ImpSetVisAreaSize() { if ( pClient ) { - Rectangle aScaleRect(aRect.TopLeft(), aObjAreaSize); + Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize); pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight); } else @@ -1851,8 +1851,8 @@ void SdrOle2Obj::ImpSetVisAreaSize() if( xVisualObject.is() ) { MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) ); - Point aTL( aRect.TopLeft() ); - Point aBR( aRect.BottomRight() ); + Point aTL( maRect.TopLeft() ); + Point aBR( maRect.BottomRight() ); Point aTL2( OutputDevice::LogicToLogic( aTL, pModel->GetScaleUnit(), aMapUnit) ); Point aBR2( OutputDevice::LogicToLogic( aBR, pModel->GetScaleUnit(), aMapUnit) ); Rectangle aNewRect( aTL2, aBR2 ); @@ -2220,7 +2220,7 @@ bool SdrOle2Obj::CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHei MapMode aMapMode( pModel->GetScaleUnit() ); aObjAreaSize = mpImpl->mxObjRef.GetSize( &aMapMode ); - Size aSize = aRect.GetSize(); + Size aSize = maRect.GetSize(); aScaleWidth = Fraction(aSize.Width(), aObjAreaSize.Width() ); aScaleHeight = Fraction(aSize.Height(), aObjAreaSize.Height() ); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index c9647b061eb7..bdc898e43abc 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1718,8 +1718,8 @@ void SdrPathObj::ImpForceLineAngle() aGeo.RecalcTan(); // for SdrTextObj, keep aRect up to date - aRect = Rectangle(aPoint0, aPoint1); - aRect.Justify(); + maRect = Rectangle(aPoint0, aPoint1); + maRect.Justify(); } } @@ -1784,7 +1784,7 @@ void SdrPathObj::ImpForceKind() // #i10659# for SdrTextObj, keep aRect up to date if(GetPathPoly().count()) { - aRect = lcl_ImpGetBoundRect(GetPathPoly()); + maRect = lcl_ImpGetBoundRect(GetPathPoly()); } } @@ -2529,7 +2529,7 @@ void SdrPathObj::NbcSetPoint(const Point& rPnt, sal_uInt32 nHdlNum) if(GetPathPoly().count()) { // #i10659# for SdrTextObj, keep aRect up to date - aRect = lcl_ImpGetBoundRect(GetPathPoly()); + maRect = lcl_ImpGetBoundRect(GetPathPoly()); } } diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 65f5aa7c05e2..024d1387913a 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -145,15 +145,15 @@ XPolygon SdrRectObj::ImpCalcXPoly(const Rectangle& rRect1, long nRad1) const aXPoly=aNeuPoly; // these angles always relate to the top left corner of aRect - if (aGeo.nShearAngle!=0) ShearXPoly(aXPoly,aRect.TopLeft(),aGeo.nTan); - if (aGeo.nRotationAngle!=0) RotateXPoly(aXPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + if (aGeo.nShearAngle!=0) ShearXPoly(aXPoly,maRect.TopLeft(),aGeo.nTan); + if (aGeo.nRotationAngle!=0) RotateXPoly(aXPoly,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); return aXPoly; } void SdrRectObj::RecalcXPoly() { delete mpXPoly; - mpXPoly = new XPolygon(ImpCalcXPoly(aRect,GetEckenradius())); + mpXPoly = new XPolygon(ImpCalcXPoly(maRect,GetEckenradius())); } const XPolygon& SdrRectObj::GetXPoly() const @@ -204,17 +204,21 @@ sal_uInt16 SdrRectObj::GetObjIdentifier() const void SdrRectObj::TakeUnrotatedSnapRect(Rectangle& rRect) const { - rRect=aRect; - if (aGeo.nShearAngle!=0) { - long nDst=Round((aRect.Bottom()-aRect.Top())*aGeo.nTan); - if (aGeo.nShearAngle>0) { + rRect = maRect; + if (aGeo.nShearAngle!=0) + { + long nDst=Round((maRect.Bottom()-maRect.Top())*aGeo.nTan); + if (aGeo.nShearAngle>0) + { Point aRef(rRect.TopLeft()); rRect.Left()-=nDst; Point aTmpPt(rRect.TopLeft()); RotatePoint(aTmpPt,aRef,aGeo.nSin,aGeo.nCos); aTmpPt-=rRect.TopLeft(); rRect.Move(aTmpPt.X(),aTmpPt.Y()); - } else { + } + else + { rRect.Right()-=nDst; } } @@ -233,7 +237,7 @@ OUString SdrRectObj::TakeObjNameSingul() const if (aGeo.nShearAngle!=0) { nResId+=4; // parallelogram or, maybe, rhombus } else { - if (aRect.GetWidth()==aRect.GetHeight()) nResId+=2; // square + if (maRect.GetWidth() == maRect.GetHeight()) nResId+=2; // square } if (GetEckenradius()!=0) nResId+=8; // rounded down sName.append(ImpGetResStr(nResId)); @@ -265,7 +269,7 @@ OUString SdrRectObj::TakeObjNamePlural() const } else { - if (aRect.GetWidth()==aRect.GetHeight()) + if (maRect.GetWidth() == maRect.GetHeight()) nResId+=2; // square } @@ -283,7 +287,7 @@ SdrRectObj* SdrRectObj::Clone() const basegfx::B2DPolyPolygon SdrRectObj::TakeXorPoly() const { XPolyPolygon aXPP; - aXPP.Insert(ImpCalcXPoly(aRect,GetEckenradius())); + aXPP.Insert(ImpCalcXPoly(maRect,GetEckenradius())); return aXPP.getB2DPolyPolygon(); } @@ -332,7 +336,7 @@ SdrHdl* SdrRectObj::GetHdl(sal_uInt32 nHdlNum) const OSL_ENSURE(!IsTextEditActive(), "Do not use a ImpTextframeHdl for hilighting text in active text edit, this will collide with EditEngine paints (!)"); // hack for calc grid sync to ensure the hatched area // for a textbox is displayed at correct position - pH = new ImpTextframeHdl(aRect + GetGridOffset() ); + pH = new ImpTextframeHdl(maRect + GetGridOffset() ); pH->SetObj((SdrObject*)this); pH->SetRotationAngle(aGeo.nRotationAngle); break; @@ -340,34 +344,34 @@ SdrHdl* SdrRectObj::GetHdl(sal_uInt32 nHdlNum) const case 1: { long a = GetEckenradius(); - long b = std::max(aRect.GetWidth(),aRect.GetHeight())/2; // rounded up, because GetWidth() adds 1 + long b = std::max(maRect.GetWidth(),maRect.GetHeight())/2; // rounded up, because GetWidth() adds 1 if (a>b) a=b; if (a<0) a=0; - aPnt=aRect.TopLeft(); + aPnt=maRect.TopLeft(); aPnt.X()+=a; eKind = HDL_CIRC; break; } - case 2: aPnt=aRect.TopLeft(); eKind = HDL_UPLFT; break; - case 3: aPnt=aRect.TopCenter(); eKind = HDL_UPPER; break; - case 4: aPnt=aRect.TopRight(); eKind = HDL_UPRGT; break; - case 5: aPnt=aRect.LeftCenter(); eKind = HDL_LEFT ; break; - case 6: aPnt=aRect.RightCenter(); eKind = HDL_RIGHT; break; - case 7: aPnt=aRect.BottomLeft(); eKind = HDL_LWLFT; break; - case 8: aPnt=aRect.BottomCenter(); eKind = HDL_LOWER; break; - case 9: aPnt=aRect.BottomRight(); eKind = HDL_LWRGT; break; + case 2: aPnt=maRect.TopLeft(); eKind = HDL_UPLFT; break; + case 3: aPnt=maRect.TopCenter(); eKind = HDL_UPPER; break; + case 4: aPnt=maRect.TopRight(); eKind = HDL_UPRGT; break; + case 5: aPnt=maRect.LeftCenter(); eKind = HDL_LEFT ; break; + case 6: aPnt=maRect.RightCenter(); eKind = HDL_RIGHT; break; + case 7: aPnt=maRect.BottomLeft(); eKind = HDL_LWLFT; break; + case 8: aPnt=maRect.BottomCenter(); eKind = HDL_LOWER; break; + case 9: aPnt=maRect.BottomRight(); eKind = HDL_LWRGT; break; } if(!pH) { if(aGeo.nShearAngle) { - ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan); + ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan); } if(aGeo.nRotationAngle) { - RotatePoint(aPnt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + RotatePoint(aPnt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); } pH = new SdrHdl(aPnt,eKind); @@ -408,9 +412,9 @@ bool SdrRectObj::applySpecialDrag(SdrDragStat& rDrag) Point aPt(rDrag.GetNow()); if(aGeo.nRotationAngle) - RotatePoint(aPt,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos); + RotatePoint(aPt,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos); - sal_Int32 nRad(aPt.X() - aRect.Left()); + sal_Int32 nRad(aPt.X() - maRect.Left()); if (nRad < 0) nRad = 0; @@ -446,9 +450,9 @@ OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const // -sin for reversal if(aGeo.nRotationAngle) - RotatePoint(aPt, aRect.TopLeft(), -aGeo.nSin, aGeo.nCos); + RotatePoint(aPt, maRect.TopLeft(), -aGeo.nSin, aGeo.nCos); - sal_Int32 nRad(aPt.X() - aRect.Left()); + sal_Int32 nRad(aPt.X() - maRect.Left()); if(nRad < 0) nRad = 0; @@ -541,13 +545,13 @@ SdrGluePoint SdrRectObj::GetVertexGluePoint(sal_uInt16 nPosNum) const Point aPt; switch (nPosNum) { - case 0: aPt=aRect.TopCenter(); aPt.Y()-=nWdt; break; - case 1: aPt=aRect.RightCenter(); aPt.X()+=nWdt; break; - case 2: aPt=aRect.BottomCenter(); aPt.Y()+=nWdt; break; - case 3: aPt=aRect.LeftCenter(); aPt.X()-=nWdt; break; + 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; } - if (aGeo.nShearAngle!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan); - if (aGeo.nRotationAngle!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan); + if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); aPt-=GetSnapRect().Center(); SdrGluePoint aGP(aPt); aGP.SetPercent(false); @@ -567,13 +571,13 @@ SdrGluePoint SdrRectObj::GetCornerGluePoint(sal_uInt16 nPosNum) const Point aPt; switch (nPosNum) { - case 0: aPt=aRect.TopLeft(); aPt.X()-=nWdt; aPt.Y()-=nWdt; break; - case 1: aPt=aRect.TopRight(); aPt.X()+=nWdt; aPt.Y()-=nWdt; break; - case 2: aPt=aRect.BottomRight(); aPt.X()+=nWdt; aPt.Y()+=nWdt; break; - case 3: aPt=aRect.BottomLeft(); aPt.X()-=nWdt; aPt.Y()+=nWdt; break; + 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; } - if (aGeo.nShearAngle!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan); - if (aGeo.nRotationAngle!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + if (aGeo.nShearAngle!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan); + if (aGeo.nRotationAngle!=0) RotatePoint(aPt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); aPt-=GetSnapRect().Center(); SdrGluePoint aGP(aPt); aGP.SetPercent(false); @@ -582,7 +586,7 @@ SdrGluePoint SdrRectObj::GetCornerGluePoint(sal_uInt16 nPosNum) const SdrObject* SdrRectObj::DoConvertToPolyObj(bool bBezier, bool bAddText) const { - XPolygon aXP(ImpCalcXPoly(aRect,GetEckenradius())); + XPolygon aXP(ImpCalcXPoly(maRect,GetEckenradius())); { // TODO: this is only for the moment, until we have the new TakeContour() aXP.Remove(0,1); aXP[aXP.GetPointCount()-1]=aXP[0]; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 3be6f28def47..727211f13240 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -109,7 +109,7 @@ SdrTextObj::SdrTextObj() SdrTextObj::SdrTextObj(const Rectangle& rNewRect) : SdrAttrObj(), - aRect(rNewRect), + maRect(rNewRect), mpText(NULL), pEdtOutl(NULL), pFormTextBoundRect(NULL), @@ -122,7 +122,7 @@ SdrTextObj::SdrTextObj(const Rectangle& rNewRect) bNoRotate=false; bNoMirror=false; bDisableAutoWidthOnDragging=false; - ImpJustifyRect(aRect); + ImpJustifyRect(maRect); mbInEditMode = false; mbTextHidden = false; @@ -161,7 +161,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind) SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect) : SdrAttrObj(), - aRect(rNewRect), + maRect(rNewRect), mpText(NULL), pEdtOutl(NULL), pFormTextBoundRect(NULL), @@ -174,7 +174,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect) bNoRotate=false; bNoMirror=true; bDisableAutoWidthOnDragging=false; - ImpJustifyRect(aRect); + ImpJustifyRect(maRect); mbInEditMode = false; mbTextHidden = false; @@ -205,13 +205,13 @@ SdrTextObj::~SdrTextObj() void SdrTextObj::FitFrameToTextSize() { DBG_ASSERT(pModel!=NULL,"SdrTextObj::FitFrameToTextSize(): pModel=NULL!"); - ImpJustifyRect(aRect); + ImpJustifyRect(maRect); SdrText* pText = getActiveText(); if( pText!=NULL && pText->GetOutlinerParaObject() && pModel!=NULL) { SdrOutliner& rOutliner=ImpGetDrawOutliner(); - rOutliner.SetPaperSize(Size(aRect.Right()-aRect.Left(),aRect.Bottom()-aRect.Top())); + rOutliner.SetPaperSize(Size(maRect.Right()-maRect.Left(),maRect.Bottom()-maRect.Top())); rOutliner.SetUpdateMode(true); rOutliner.SetText(*pText->GetOutlinerParaObject()); Size aNewSize(rOutliner.CalcTextSize()); @@ -219,10 +219,10 @@ void SdrTextObj::FitFrameToTextSize() aNewSize.Width()++; // because of possible rounding errors aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance(); aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance(); - Rectangle aNewRect(aRect); + Rectangle aNewRect(maRect); aNewRect.SetSize(aNewSize); ImpJustifyRect(aNewRect); - if (aNewRect!=aRect) { + if (aNewRect!=maRect) { SetLogicRect(aNewRect); } } @@ -573,7 +573,7 @@ void SdrTextObj::AdaptTextMinSize() { // Set minimum width. const long nDist = GetTextLeftDistance() + GetTextRightDistance(); - const long nW = std::max<long>(0, aRect.GetWidth() - 1 - nDist); // text width without margins + const long nW = std::max<long>(0, maRect.GetWidth() - 1 - nDist); // text width without margins aSet.Put(makeSdrTextMinFrameWidthItem(nW)); @@ -588,7 +588,7 @@ void SdrTextObj::AdaptTextMinSize() { // Set Minimum height. const long nDist = GetTextUpperDistance() + GetTextLowerDistance(); - const long nH = std::max<long>(0, aRect.GetHeight() - 1 - nDist); // text height without margins + const long nH = std::max<long>(0, maRect.GetHeight() - 1 - nDist); // text height without margins aSet.Put(makeSdrTextMinFrameHeightItem(nH)); @@ -662,7 +662,7 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAncho void SdrTextObj::TakeUnrotatedSnapRect(Rectangle& rRect) const { - rRect=aRect; + rRect=maRect; } void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const @@ -671,7 +671,7 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const long nRightDist=GetTextRightDistance(); long nUpperDist=GetTextUpperDistance(); long nLowerDist=GetTextLowerDistance(); - Rectangle aAnkRect(aRect); // the rectangle in which we anchor + Rectangle aAnkRect(maRect); // the rectangle in which we anchor bool bFrame=IsTextFrame(); if (!bFrame) { TakeUnrotatedSnapRect(aAnkRect); @@ -1085,7 +1085,7 @@ SdrTextObj& SdrTextObj::operator=(const SdrTextObj& rObj) // call parent SdrObject::operator=(rObj); - aRect =rObj.aRect; + maRect = rObj.maRect; aGeo =rObj.aGeo; eTextKind =rObj.eTextKind; bTextFrame=rObj.bTextFrame; @@ -1122,9 +1122,9 @@ SdrTextObj& SdrTextObj::operator=(const SdrTextObj& rObj) basegfx::B2DPolyPolygon SdrTextObj::TakeXorPoly() const { - Polygon aPol(aRect); - if (aGeo.nShearAngle!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan); - if (aGeo.nRotationAngle!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + Polygon aPol(maRect); + if (aGeo.nShearAngle!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.nTan); + if (aGeo.nRotationAngle!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); basegfx::B2DPolyPolygon aRetval; aRetval.append(aPol.getB2DPolygon()); @@ -1160,13 +1160,14 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const void SdrTextObj::RecalcSnapRect() { - if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0) { - Polygon aPol(aRect); - if (aGeo.nShearAngle!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan); - if (aGeo.nRotationAngle!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0) + { + Polygon aPol(maRect); + if (aGeo.nShearAngle!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.nTan); + if (aGeo.nRotationAngle!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); maSnapRect=aPol.GetBoundRect(); } else { - maSnapRect=aRect; + maSnapRect = maRect; } } @@ -1179,14 +1180,14 @@ Point SdrTextObj::GetSnapPoint(sal_uInt32 i) const { Point aP; switch (i) { - case 0: aP=aRect.TopLeft(); break; - case 1: aP=aRect.TopRight(); break; - case 2: aP=aRect.BottomLeft(); break; - case 3: aP=aRect.BottomRight(); break; - default: aP=aRect.Center(); break; - } - if (aGeo.nShearAngle!=0) ShearPoint(aP,aRect.TopLeft(),aGeo.nTan); - if (aGeo.nRotationAngle!=0) RotatePoint(aP,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + case 0: aP=maRect.TopLeft(); break; + case 1: aP=maRect.TopRight(); break; + case 2: aP=maRect.BottomLeft(); break; + case 3: aP=maRect.BottomRight(); break; + default: aP=maRect.Center(); break; + } + if (aGeo.nShearAngle!=0) ShearPoint(aP,maRect.TopLeft(),aGeo.nTan); + if (aGeo.nRotationAngle!=0) RotatePoint(aP,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); return aP; } @@ -1471,7 +1472,7 @@ void SdrTextObj::SaveGeoData(SdrObjGeoData& rGeo) const { SdrAttrObj::SaveGeoData(rGeo); SdrTextObjGeoData& rTGeo=static_cast<SdrTextObjGeoData&>(rGeo); - rTGeo.aRect =aRect; + rTGeo.aRect = maRect; rTGeo.aGeo =aGeo; } @@ -1494,6 +1495,11 @@ SdrFitToSizeType SdrTextObj::GetFitToSize() const return eType; } +const Rectangle& SdrTextObj::GetGeoRect() const +{ + return maRect; +} + void SdrTextObj::ForceOutlinerParaObject() { SdrText* pText = getActiveText(); @@ -1607,7 +1613,7 @@ bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP double fShearX = (aGeo.nShearAngle / 100.0) * F_PI180; // get aRect, this is the unrotated snaprect - Rectangle aRectangle(aRect); + Rectangle aRectangle(maRect); // fill other values basegfx::B2DTuple aScale(aRectangle.GetWidth(), aRectangle.GetHeight()); diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 293e011589b7..52e7150ac922 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -260,8 +260,9 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( Rectangle& rR, bool bHgt, bool b bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { - bool bRet=AdjustTextFrameWidthAndHeight(aRect,bHgt,bWdt); - if (bRet) { + bool bRet = AdjustTextFrameWidthAndHeight(maRect,bHgt,bWdt); + if (bRet) + { SetRectsDirty(); if (HAS_BASE(SdrRectObj,this)) { // this is a hack static_cast<SdrRectObj*>(this)->SetXPolyDirty(); @@ -275,11 +276,11 @@ bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) bool SdrTextObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { - Rectangle aNeuRect(aRect); + Rectangle aNeuRect(maRect); bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); if (bRet) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); - aRect=aNeuRect; + maRect = aNeuRect; SetRectsDirty(); if (HAS_BASE(SdrRectObj,this)) { // this is a hack static_cast<SdrRectObj*>(this)->SetXPolyDirty(); diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index 351b7733f989..4bfeff4098d4 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -43,17 +43,17 @@ SdrHdl* SdrTextObj::GetHdl(sal_uInt32 nHdlNum) const Point aPnt; SdrHdlKind eKind=HDL_MOVE; switch (nHdlNum) { - case 0: aPnt=aRect.TopLeft(); eKind=HDL_UPLFT; break; - case 1: aPnt=aRect.TopCenter(); eKind=HDL_UPPER; break; - case 2: aPnt=aRect.TopRight(); eKind=HDL_UPRGT; break; - case 3: aPnt=aRect.LeftCenter(); eKind=HDL_LEFT ; break; - case 4: aPnt=aRect.RightCenter(); eKind=HDL_RIGHT; break; - case 5: aPnt=aRect.BottomLeft(); eKind=HDL_LWLFT; break; - case 6: aPnt=aRect.BottomCenter(); eKind=HDL_LOWER; break; - case 7: aPnt=aRect.BottomRight(); eKind=HDL_LWRGT; break; + case 0: aPnt=maRect.TopLeft(); eKind=HDL_UPLFT; break; + case 1: aPnt=maRect.TopCenter(); eKind=HDL_UPPER; break; + case 2: aPnt=maRect.TopRight(); eKind=HDL_UPRGT; break; + case 3: aPnt=maRect.LeftCenter(); eKind=HDL_LEFT ; break; + case 4: aPnt=maRect.RightCenter(); eKind=HDL_RIGHT; break; + case 5: aPnt=maRect.BottomLeft(); eKind=HDL_LWLFT; break; + case 6: aPnt=maRect.BottomCenter(); eKind=HDL_LOWER; break; + case 7: aPnt=maRect.BottomRight(); eKind=HDL_LWRGT; break; } - if (aGeo.nShearAngle!=0) ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan); - if (aGeo.nRotationAngle!=0) RotatePoint(aPnt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + if (aGeo.nShearAngle!=0) ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan); + if (aGeo.nRotationAngle!=0) RotatePoint(aPnt,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); if (eKind!=HDL_MOVE) { pH=new SdrHdl(aPnt,eKind); pH->SetObj((SdrObject*)this); @@ -71,7 +71,7 @@ bool SdrTextObj::hasSpecialDrag() const Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const { - Rectangle aTmpRect(aRect); + Rectangle aTmpRect(maRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind(); bool bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); @@ -92,8 +92,8 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const if (bTop) aTmpRect.Top() =aPos.Y(); if (bBtm) aTmpRect.Bottom()=aPos.Y(); if (bOrtho) { // Ortho - long nWdt0=aRect.Right() -aRect.Left(); - long nHgt0=aRect.Bottom()-aRect.Top(); + long nWdt0=maRect.Right() -maRect.Left(); + long nHgt0=maRect.Bottom()-maRect.Top(); long nXMul=aTmpRect.Right() -aTmpRect.Left(); long nYMul=aTmpRect.Bottom()-aTmpRect.Top(); long nXDiv=nWdt0; @@ -125,13 +125,13 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const } } else { // apex handles if ((bLft || bRgt) && nXDiv!=0) { - long nHgt0b=aRect.Bottom()-aRect.Top(); + 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; } if ((bTop || bBtm) && nYDiv!=0) { - long nWdt0b=aRect.Right()-aRect.Left(); + 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; @@ -150,22 +150,22 @@ bool SdrTextObj::applySpecialDrag(SdrDragStat& rDrag) { Rectangle aNewRect(ImpDragCalcRect(rDrag)); - if(aNewRect.TopLeft() != aRect.TopLeft() && (aGeo.nRotationAngle || aGeo.nShearAngle)) + if(aNewRect.TopLeft() != maRect.TopLeft() && (aGeo.nRotationAngle || aGeo.nShearAngle)) { Point aNewPos(aNewRect.TopLeft()); if(aGeo.nShearAngle) - ShearPoint(aNewPos,aRect.TopLeft(),aGeo.nTan); + ShearPoint(aNewPos,maRect.TopLeft(),aGeo.nTan); if(aGeo.nRotationAngle) - RotatePoint(aNewPos,aRect.TopLeft(),aGeo.nSin,aGeo.nCos); + RotatePoint(aNewPos,maRect.TopLeft(),aGeo.nSin,aGeo.nCos); aNewRect.SetPos(aNewPos); } - if(aNewRect != aRect) + if (aNewRect != maRect) { - NbcSetLogicRect(aNewRect); + NbcSetLogicRect(aNewRect); } return true; @@ -187,7 +187,7 @@ bool SdrTextObj::BegCreate(SdrDragStat& rStat) Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); - aRect = aRect1; + maRect = aRect1; return true; } @@ -197,7 +197,7 @@ bool SdrTextObj::MovCreate(SdrDragStat& rStat) rStat.TakeCreateRect(aRect1); ImpJustifyRect(aRect1); rStat.SetActionRect(aRect1); - aRect=aRect1; // for ObjName + maRect = aRect1; // for ObjName SetBoundRectDirty(); bSnapRectDirty=true; if (HAS_BASE(SdrRectObj,this)) { @@ -208,8 +208,8 @@ bool SdrTextObj::MovCreate(SdrDragStat& rStat) bool SdrTextObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { - rStat.TakeCreateRect(aRect); - ImpJustifyRect(aRect); + rStat.TakeCreateRect(maRect); + ImpJustifyRect(maRect); // #115391# AdaptTextMinSize(); diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 01a197465075..525439c49796 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -57,8 +57,8 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) { // No rotation or shear. - aRect=rRect; - ImpJustifyRect(aRect); + maRect = rRect; + ImpJustifyRect(maRect); // #115391# AdaptTextMinSize(); @@ -70,19 +70,19 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) const Rectangle& SdrTextObj::GetLogicRect() const { - return aRect; + return maRect; } void SdrTextObj::NbcSetLogicRect(const Rectangle& rRect) { long nHDist=GetTextLeftDistance()+GetTextRightDistance(); long nVDist=GetTextUpperDistance()+GetTextLowerDistance(); - long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0; - long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0; + long nTWdt0=maRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0; + long nTHgt0=maRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0; long nTWdt1=rRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0; long nTHgt1=rRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0; - aRect=rRect; - ImpJustifyRect(aRect); + maRect = rRect; + ImpJustifyRect(maRect); // #115391# AdaptTextMinSize(); @@ -102,7 +102,7 @@ long SdrTextObj::GetShearAngle(bool /*bVertical*/) const void SdrTextObj::NbcMove(const Size& rSiz) { - MoveRect(aRect,rSiz); + MoveRect(maRect,rSiz); MoveRect(aOutRect,rSiz); MoveRect(maSnapRect,rSiz); SetRectsDirty(true); @@ -114,8 +114,8 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract bool bRota90Merk=bNoShearMerk && aGeo.nRotationAngle % 9000 ==0; long nHDist=GetTextLeftDistance()+GetTextRightDistance(); long nVDist=GetTextUpperDistance()+GetTextLowerDistance(); - long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0; - long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0; + long nTWdt0=maRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0; + long nTHgt0=maRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0; bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { @@ -133,17 +133,17 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract } if (aGeo.nRotationAngle==0 && aGeo.nShearAngle==0) { - ResizeRect(aRect,rRef,xFact,yFact); + ResizeRect(maRect,rRef,xFact,yFact); if (bYMirr) { - aRect.Justify(); - aRect.Move(aRect.Right()-aRect.Left(),aRect.Bottom()-aRect.Top()); + maRect.Justify(); + maRect.Move(maRect.Right()-maRect.Left(),maRect.Bottom()-maRect.Top()); aGeo.nRotationAngle=18000; aGeo.RecalcSinCos(); } } else { - Polygon aPol(Rect2Poly(aRect,aGeo)); + Polygon aPol(Rect2Poly(maRect,aGeo)); for(sal_uInt16 a(0); a < aPol.GetSize(); a++) { @@ -162,7 +162,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract aPol[4] = aPol0[1]; } - Poly2Rect(aPol, aRect, aGeo); + Poly2Rect(aPol, maRect, aGeo); } if (bRota90Merk) { @@ -183,10 +183,10 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract } } - ImpJustifyRect(aRect); + ImpJustifyRect(maRect); - long nTWdt1=aRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0; - long nTHgt1=aRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0; + long nTWdt1=maRect.GetWidth ()-1-nHDist; if (nTWdt1<0) nTWdt1=0; + long nTHgt1=maRect.GetHeight()-1-nVDist; if (nTHgt1<0) nTHgt1=0; // #115391# AdaptTextMinSize(); @@ -203,14 +203,14 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract void SdrTextObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) { SetGlueReallyAbsolute(true); - long dx=aRect.Right()-aRect.Left(); - long dy=aRect.Bottom()-aRect.Top(); - Point aP(aRect.TopLeft()); + long dx=maRect.Right()-maRect.Left(); + long dy=maRect.Bottom()-maRect.Top(); + Point aP(maRect.TopLeft()); RotatePoint(aP,rRef,sn,cs); - aRect.Left()=aP.X(); - aRect.Top()=aP.Y(); - aRect.Right()=aRect.Left()+dx; - aRect.Bottom()=aRect.Top()+dy; + maRect.Left()=aP.X(); + maRect.Top()=aP.Y(); + maRect.Right()=maRect.Left()+dx; + maRect.Bottom()=maRect.Top()+dy; if (aGeo.nRotationAngle==0) { aGeo.nRotationAngle=NormAngle360(nAngle); aGeo.nSin=sn; @@ -229,14 +229,14 @@ void SdrTextObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea SetGlueReallyAbsolute(true); // when this is a SdrPathObj, aRect may be uninitialized - Polygon aPol(Rect2Poly(aRect.IsEmpty() ? GetSnapRect() : aRect, aGeo)); + Polygon aPol(Rect2Poly(maRect.IsEmpty() ? GetSnapRect() : maRect, aGeo)); sal_uInt16 nPointCount=aPol.GetSize(); for (sal_uInt16 i=0; i<nPointCount; i++) { ShearPoint(aPol[i],rRef,tn,bVShear); } - Poly2Rect(aPol,aRect,aGeo); - ImpJustifyRect(aRect); + Poly2Rect(aPol,maRect,aGeo); + ImpJustifyRect(maRect); if (bTextFrame) { NbcAdjustTextFrameWidthAndHeight(); } @@ -256,7 +256,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) std::abs(rRef1.X()-rRef2.X())==std::abs(rRef1.Y()-rRef2.Y()))) { bRota90Merk=aGeo.nRotationAngle % 9000 ==0; } - Polygon aPol(Rect2Poly(aRect,aGeo)); + Polygon aPol(Rect2Poly(maRect,aGeo)); sal_uInt16 i; sal_uInt16 nPntAnz=aPol.GetSize(); for (i=0; i<nPntAnz; i++) { @@ -269,7 +269,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) aPol[2]=aPol0[3]; aPol[3]=aPol0[2]; aPol[4]=aPol0[1]; - Poly2Rect(aPol,aRect,aGeo); + Poly2Rect(aPol,maRect,aGeo); if (bRota90Merk) { bool bRota90=aGeo.nRotationAngle % 9000 ==0; @@ -289,7 +289,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) aGeo.RecalcTan(); } - ImpJustifyRect(aRect); + ImpJustifyRect(maRect); if (bTextFrame) { NbcAdjustTextFrameWidthAndHeight(); } diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 166123d51d79..02ffaaa7d7e9 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -329,7 +329,7 @@ void SdrUnoObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fracti // small correctures if (aGeo.nRotationAngle>=9000 && aGeo.nRotationAngle<27000) { - aRect.Move(aRect.Left()-aRect.Right(),aRect.Top()-aRect.Bottom()); + maRect.Move(maRect.Left()-maRect.Right(),maRect.Top()-maRect.Bottom()); } aGeo.nRotationAngle = 0; diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 0079467b1e37..fe67817d1a27 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -282,8 +282,8 @@ void SdrTableObjImpl::init( SdrTableObj* pTable, sal_Int32 nColumns, sal_Int32 n Reference< XModifyListener > xListener( static_cast< ::com::sun::star::util::XModifyListener* >(this) ); mxTable->addModifyListener( xListener ); mpLayouter = new TableLayouter( mxTable ); - LayoutTable( mpTableObj->aRect, true, true ); - mpTableObj->maLogicRect = mpTableObj->aRect; + LayoutTable( mpTableObj->maRect, true, true ); + mpTableObj->maLogicRect = mpTableObj->maRect; } @@ -316,8 +316,8 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const SdrTableObjImpl& rSource ) mxTable->addModifyListener( xListener ); mxTableStyle = rSource.mxTableStyle; ApplyCellStyles(); - mpTableObj->aRect = mpTableObj->maLogicRect; - LayoutTable( mpTableObj->aRect, false, false ); + mpTableObj->maRect = mpTableObj->maLogicRect; + LayoutTable( mpTableObj->maRect, false, false ); connectTableStyle(); } @@ -592,8 +592,8 @@ void SdrTableObjImpl::update() ApplyCellStyles(); - mpTableObj->aRect = mpTableObj->maLogicRect; - LayoutTable( mpTableObj->aRect, false, false ); + mpTableObj->maRect = mpTableObj->maLogicRect; + LayoutTable( mpTableObj->maRect, false, false ); mpTableObj->SetRectsDirty(); mpTableObj->ActionChanged(); @@ -1072,10 +1072,10 @@ TableHitKind SdrTableObj::CheckTableHit( const Point& rPos, sal_Int32& rnX, sal_ const sal_Int32 nColCount = mpImpl->getColumnCount(); const sal_Int32 nRowCount = mpImpl->getRowCount(); - sal_Int32 nX = rPos.X() + nTol - aRect.Left(); - sal_Int32 nY = rPos.Y() + nTol - aRect.Top(); + sal_Int32 nX = rPos.X() + nTol - maRect.Left(); + sal_Int32 nY = rPos.Y() + nTol - maRect.Top(); - if( (nX < 0) || (nX > (aRect.GetWidth() + nTol)) || (nY < 0) || (nY > (aRect.GetHeight() + nTol) ) ) + if( (nX < 0) || (nX > (maRect.GetWidth() + nTol)) || (nY < 0) || (nY > (maRect.GetHeight() + nTol) ) ) return SDRTABLEHIT_NONE; // get vertical edge number and check for a hit @@ -1334,13 +1334,13 @@ void SdrTableObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus ) { if( (pEditStatus->GetStatusWord() & EE_STAT_TEXTHEIGHTCHANGED) && mpImpl && mpImpl->mpLayouter ) { - Rectangle aRect0( aRect ); - aRect = maLogicRect; - mpImpl->LayoutTable( aRect, false, false ); + Rectangle aRect0( maRect ); + maRect = maLogicRect; + mpImpl->LayoutTable( maRect, false, false ); SetRectsDirty(); ActionChanged(); BroadcastObjectChange(); - if( aRect0 != aRect ) + if (aRect0 != maRect) SendUserCall(SDRUSERCALL_RESIZE,aRect0); } } @@ -1401,8 +1401,8 @@ void SdrTableObj::SetModel(SdrModel* pNewModel) if( !maLogicRect.IsEmpty() ) { - aRect = maLogicRect; - mpImpl->LayoutTable( aRect, false, false ); + maRect = maLogicRect; + mpImpl->LayoutTable( maRect, false, false ); } } } @@ -1583,7 +1583,7 @@ void SdrTableObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const void SdrTableObj::TakeTextAnchorRect( const CellPos& rPos, Rectangle& rAnchorRect ) const { - Rectangle aAnkRect(aRect); + Rectangle aAnkRect(maRect); if( mpImpl ) { @@ -1736,7 +1736,7 @@ SdrTableObj& SdrTableObj::operator=(const SdrTableObj& rObj) TableModelNotifyGuard aGuard( mpImpl ? mpImpl->mxTable.get() : 0 ); maLogicRect = rObj.maLogicRect; - aRect = rObj.aRect; + maRect = rObj.maRect; aGeo = rObj.aGeo; eTextKind = rObj.eTextKind; bTextFrame = rObj.bTextFrame; @@ -1770,7 +1770,7 @@ basegfx::B2DPolyPolygon SdrTableObj::TakeContour() const const Rectangle& SdrTableObj::GetSnapRect() const { - return aRect; + return maRect; } @@ -1936,9 +1936,9 @@ void SdrTableObj::NbcSetLogicRect(const Rectangle& rRect) { maLogicRect=rRect; ImpJustifyRect(maLogicRect); - const bool bWidth = maLogicRect.getWidth() != aRect.getWidth(); - const bool bHeight = maLogicRect.getHeight() != aRect.getHeight(); - aRect=maLogicRect; + const bool bWidth = maLogicRect.getWidth() != maRect.getWidth(); + const bool bHeight = maLogicRect.getHeight() != maRect.getHeight(); + maRect = maLogicRect; NbcAdjustTextFrameWidthAndHeight( !bHeight, !bWidth ); SetRectsDirty(); } @@ -1960,7 +1960,7 @@ void SdrTableObj::NbcMove(const Size& rSiz) MoveRect(maLogicRect,rSiz); SdrTextObj::NbcMove( rSiz ); if( mpImpl ) - mpImpl->UpdateCells( aRect ); + mpImpl->UpdateCells( maRect ); } @@ -1970,7 +1970,7 @@ void SdrTableObj::NbcResize(const Point& rRef, const Fraction& xFact, const Frac Rectangle aOldRect( maLogicRect ); ResizeRect(maLogicRect,rRef,xFact,yFact); - aRect = maLogicRect; + maRect = maLogicRect; NbcAdjustTextFrameWidthAndHeight( maLogicRect.GetHeight() == aOldRect.GetHeight(), maLogicRect.GetWidth() == aOldRect.GetWidth() ); SetRectsDirty(); } @@ -1986,7 +1986,7 @@ bool SdrTableObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); - aRect=aNeuRect; + maRect = aNeuRect; SetRectsDirty(); SetChanged(); BroadcastObjectChange(); @@ -2146,7 +2146,7 @@ void SdrTableObj::AddToHdlList(SdrHdlList& rHdlList) const nEdgeMin -= nEdge; nEdgeMax -= nEdge; - Point aPoint( aRect.TopLeft() ); + Point aPoint( maRect.TopLeft() ); aPoint.Y() += nEdge; TableEdgeHdl* pHdl= new TableEdgeHdl(aPoint,true,nEdgeMin,nEdgeMax,nColCount+1); @@ -2165,7 +2165,7 @@ void SdrTableObj::AddToHdlList(SdrHdlList& rHdlList) const nEdgeMin -= nEdge; nEdgeMax -= nEdge; - Point aPoint( aRect.TopLeft() ); + Point aPoint( maRect.TopLeft() ); aPoint.X() += nEdge; TableEdgeHdl* pHdl = new TableEdgeHdl(aPoint,false,nEdgeMin,nEdgeMax, nRowCount+1); @@ -2211,15 +2211,15 @@ void SdrTableObj::AddToHdlList(SdrHdlList& rHdlList) const // add remaining handles SdrHdl* pH=0; - rHdlList.AddHdl( pH = new TableBorderHdl( aRect, !IsTextEditActive() ) ); pH->SetMoveOutside( true ); - rHdlList.AddHdl( pH = new SdrHdl(aRect.TopLeft(),HDL_UPLFT) ); pH->SetMoveOutside( true ); - rHdlList.AddHdl( pH = new SdrHdl(aRect.TopCenter(),HDL_UPPER) ); pH->SetMoveOutside( true ); - rHdlList.AddHdl( pH = new SdrHdl(aRect.TopRight(),HDL_UPRGT) ); pH->SetMoveOutside( true ); - rHdlList.AddHdl( pH = new SdrHdl(aRect.LeftCenter(),HDL_LEFT) ); pH->SetMoveOutside( true ); - rHdlList.AddHdl( pH = new SdrHdl(aRect.RightCenter(),HDL_RIGHT) ); pH->SetMoveOutside( true ); - rHdlList.AddHdl( pH = new SdrHdl(aRect.BottomLeft(),HDL_LWLFT) ); pH->SetMoveOutside( true ); - rHdlList.AddHdl( pH = new SdrHdl(aRect.BottomCenter(),HDL_LOWER) ); pH->SetMoveOutside( true ); - rHdlList.AddHdl( pH = new SdrHdl(aRect.BottomRight(),HDL_LWRGT) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new TableBorderHdl( maRect, !IsTextEditActive() ) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new SdrHdl(maRect.TopLeft(),HDL_UPLFT) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new SdrHdl(maRect.TopCenter(),HDL_UPPER) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new SdrHdl(maRect.TopRight(),HDL_UPRGT) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new SdrHdl(maRect.LeftCenter(),HDL_LEFT) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new SdrHdl(maRect.RightCenter(),HDL_RIGHT) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new SdrHdl(maRect.BottomLeft(),HDL_LWLFT) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new SdrHdl(maRect.BottomCenter(),HDL_LOWER) ); pH->SetMoveOutside( true ); + rHdlList.AddHdl( pH = new SdrHdl(maRect.BottomRight(),HDL_LWRGT) ); pH->SetMoveOutside( true ); const size_t nHdlCount = rHdlList.GetHdlCount(); for( size_t nHdl = 0; nHdl < nHdlCount; ++nHdl ) @@ -2313,7 +2313,7 @@ bool SdrTableObj::applySpecialDrag(SdrDragStat& rDrag) { const Rectangle aNewRectangle(ImpDragCalcRect(rDrag)); - if(aNewRectangle != aRect) + if (aNewRectangle != maRect) { NbcSetLogicRect(aNewRectangle); } @@ -2387,7 +2387,7 @@ bool SdrTableObj::BegCreate(SdrDragStat& rStat) Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); - aRect = aRect1; + maRect = aRect1; return true; } @@ -2399,7 +2399,7 @@ bool SdrTableObj::MovCreate(SdrDragStat& rStat) rStat.TakeCreateRect(aRect1); ImpJustifyRect(aRect1); rStat.SetActionRect(aRect1); - aRect=aRect1; // fuer ObjName + maRect = aRect1; // fuer ObjName SetBoundRectDirty(); bSnapRectDirty=true; return true; @@ -2409,8 +2409,8 @@ bool SdrTableObj::MovCreate(SdrDragStat& rStat) bool SdrTableObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { - rStat.TakeCreateRect(aRect); - ImpJustifyRect(aRect); + rStat.TakeCreateRect(maRect); + ImpJustifyRect(maRect); return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2); } @@ -2481,7 +2481,7 @@ void SdrTableObj::RestGeoData(const SdrObjGeoData& rGeo) SdrTextObj::RestGeoData (rGeo); if( mpImpl ) - mpImpl->LayoutTable( aRect, false, false ); + mpImpl->LayoutTable(maRect, false, false); ActionChanged(); } @@ -2551,7 +2551,7 @@ void SdrTableObj::DistributeColumns( sal_Int32 nFirstColumn, sal_Int32 nLastColu if( mpImpl && mpImpl->mpLayouter ) { TableModelNotifyGuard aGuard( mpImpl->mxTable.get() ); - mpImpl->mpLayouter->DistributeColumns( aRect, nFirstColumn, nLastColumn ); + mpImpl->mpLayouter->DistributeColumns( maRect, nFirstColumn, nLastColumn ); } } @@ -2562,7 +2562,7 @@ void SdrTableObj::DistributeRows( sal_Int32 nFirstRow, sal_Int32 nLastRow ) if( mpImpl && mpImpl->mpLayouter ) { TableModelNotifyGuard aGuard( mpImpl->mxTable.get() ); - mpImpl->mpLayouter->DistributeRows( aRect, nFirstRow, nLastRow ); + mpImpl->mpLayouter->DistributeRows( maRect, nFirstRow, nLastRow ); } } @@ -2572,7 +2572,7 @@ void SdrTableObj::SetChanged() { if( mpImpl ) { - mpImpl->LayoutTable( aRect, false, false ); + mpImpl->LayoutTable( maRect, false, false ); } ::SdrTextObj::SetChanged(); |