[Libreoffice-commits] core.git: Branch 'feature/perfwork4' - 4 commits - include/svx sd/inc svx/source
Kohei Yoshida
kohei.yoshida at collabora.com
Wed Oct 29 12:36:37 PDT 2014
include/svx/svdobj.hxx | 5 +
include/svx/svdotext.hxx | 4 -
include/svx/svdpage.hxx | 2
sd/inc/pch/precompiled_sd.hxx | 1
svx/source/svdraw/svdoashp.cxx | 100 +++++++++++++++--------------
svx/source/svdraw/svdobj.cxx | 136 ++++++++++++++++++++++++++++++++++------
svx/source/svdraw/svdocapt.cxx | 28 ++++----
svx/source/svdraw/svdocirc.cxx | 122 ++++++++++++++++++-----------------
svx/source/svdraw/svdoedge.cxx | 6 -
svx/source/svdraw/svdograf.cxx | 16 ++--
svx/source/svdraw/svdomeas.cxx | 2
svx/source/svdraw/svdomedia.cxx | 2
svx/source/svdraw/svdoole2.cxx | 16 ++--
svx/source/svdraw/svdopath.cxx | 8 +-
svx/source/svdraw/svdorect.cxx | 86 +++++++++++++------------
svx/source/svdraw/svdotext.cxx | 65 ++++++++++---------
svx/source/svdraw/svdotxat.cxx | 9 +-
svx/source/svdraw/svdotxdr.cxx | 48 +++++++-------
svx/source/svdraw/svdotxtr.cxx | 62 +++++++++---------
svx/source/svdraw/svdouno.cxx | 2
svx/source/table/svdotable.cxx | 88 ++++++++++++-------------
svx/source/unodraw/unopage.cxx | 29 --------
22 files changed, 464 insertions(+), 373 deletions(-)
New commits:
commit b5cd2186d965eb8984dceaf38e17156ac3ca6f47
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Wed Oct 29 12:47:05 2014 -0400
Create a variant of MakeNewObject that takes snap rectangle.
And absorb 2 special cases from SvxDrawPage::_CreateSdrObject().
Change-Id: I8e400794b9aef4b229b6760835b80dffd56cbc8d
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index f1dc3a3..e91360d 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -1050,10 +1050,15 @@ public:
SdrObjUserData* pNewData;
private:
+
+ static SVX_DLLPRIVATE SdrObject* CreateObjectFromFactory(
+ sal_uInt32 nInventor, sal_uInt16 nIdentifier, SdrPage* pPage, SdrModel* pModel );
+
SVX_DLLPRIVATE SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pNewPage, SdrModel* pNewModel);
public:
static SdrObject* MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pPage, SdrModel* pModel=NULL);
+ static SdrObject* MakeNewObject( sal_uInt32 nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage );
static void InsertMakeObjectHdl(const Link& rLink);
static void RemoveMakeObjectHdl(const Link& rLink);
static void InsertMakeUserDataHdl(const Link& rLink);
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 5dda6de..d9cbe9a 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -3257,13 +3257,32 @@ SdrObjFactory::SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pNe
pNewData=NULL;
}
+SdrObject* SdrObjFactory::CreateObjectFromFactory( sal_uInt32 nInventor, sal_uInt16 nIdentifier, SdrPage* pPage, SdrModel* pModel )
+{
+ boost::scoped_ptr<SdrObjFactory> pFact(new SdrObjFactory(nInventor, nIdentifier, pPage, pModel));
+
+ SdrLinkList& rLL = ImpGetUserMakeObjHdl();
+ unsigned n = rLL.GetLinkCount();
+ unsigned i = 0;
+ SdrObject* pObj = NULL;
+ while (i < n && !pObj)
+ {
+ rLL.GetLink(i).Call((void*)pFact.get());
+ pObj = pFact->pNewObj;
+ i++;
+ }
+
+ return pObj;
+}
+
SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pPage, SdrModel* pModel)
{
- if(pModel == NULL && pPage != NULL)
+ if (!pModel && pPage)
pModel = pPage->GetModel();
+
SdrObject* pObj = NULL;
- if(nInvent == SdrInventor)
+ if (nInvent == SdrInventor)
{
switch (nIdent)
{
@@ -3304,32 +3323,111 @@ SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, S
}
}
- if(pObj == NULL)
+ if (!pObj)
+ pObj = CreateObjectFromFactory(nInvent, nIdent, pPage, pModel);
+
+ if (!pObj)
{
- boost::scoped_ptr<SdrObjFactory> pFact(new SdrObjFactory(nInvent,nIdent,pPage,pModel));
- SdrLinkList& rLL=ImpGetUserMakeObjHdl();
- unsigned nAnz=rLL.GetLinkCount();
- unsigned i=0;
- while (i<nAnz && pObj==NULL) {
- rLL.GetLink(i).Call((void*)pFact.get());
- pObj=pFact->pNewObj;
- i++;
- }
+ // Well, if no one wants it...
+ return NULL;
}
- if(pObj == NULL)
+ if (pPage)
+ pObj->SetPage(pPage);
+ else if (pModel)
+ pObj->SetModel(pModel);
+
+ return pObj;
+}
+
+SdrObject* SdrObjFactory::MakeNewObject(
+ sal_uInt32 nInventor, sal_uInt16 nIdentifier, const Rectangle& rSnapRect, SdrPage* pPage )
+{
+ SdrModel* pModel = pPage ? pPage->GetModel() : NULL;
+
+ SdrObject* pObj = NULL;
+
+ bool bSetSnapRect = true;
+
+ if (nInventor == SdrInventor)
{
- // Well, if no one wants it...
+ switch (nIdentifier)
+ {
+ case OBJ_MEASURE:
+ {
+ pObj = new SdrMeasureObj(rSnapRect.TopLeft(), rSnapRect.BottomRight());
+ }
+ break;
+ case OBJ_LINE:
+ {
+ basegfx::B2DPolygon aPoly;
+ aPoly.append(basegfx::B2DPoint(rSnapRect.Left(), rSnapRect.Top()));
+ aPoly.append(basegfx::B2DPoint(rSnapRect.Right(), rSnapRect.Bottom()));
+ pObj = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
+ }
+ break;
+ case OBJ_TEXT:
+ case OBJ_TEXTEXT:
+ case OBJ_TITLETEXT:
+ case OBJ_OUTLINETEXT:
+ {
+ pObj = new SdrRectObj(static_cast<SdrObjKind>(nIdentifier), rSnapRect);
+ bSetSnapRect = false;
+ }
+ break;
+ case OBJ_CIRC:
+ case OBJ_SECT:
+ case OBJ_CARC:
+ case OBJ_CCUT:
+ {
+ pObj = new SdrCircObj(static_cast<SdrObjKind>(nIdentifier), rSnapRect);
+ bSetSnapRect = false;
+ }
+ break;
+ case sal_uInt16(OBJ_NONE ): pObj=new SdrObject; break;
+ case sal_uInt16(OBJ_GRUP ): pObj=new SdrObjGroup; break;
+ case sal_uInt16(OBJ_POLY ): pObj=new SdrPathObj(OBJ_POLY ); break;
+ case sal_uInt16(OBJ_PLIN ): pObj=new SdrPathObj(OBJ_PLIN ); break;
+ case sal_uInt16(OBJ_PATHLINE ): pObj=new SdrPathObj(OBJ_PATHLINE ); break;
+ case sal_uInt16(OBJ_PATHFILL ): pObj=new SdrPathObj(OBJ_PATHFILL ); break;
+ case sal_uInt16(OBJ_FREELINE ): pObj=new SdrPathObj(OBJ_FREELINE ); break;
+ case sal_uInt16(OBJ_FREEFILL ): pObj=new SdrPathObj(OBJ_FREEFILL ); break;
+ case sal_uInt16(OBJ_PATHPOLY ): pObj=new SdrPathObj(OBJ_POLY ); break;
+ case sal_uInt16(OBJ_PATHPLIN ): pObj=new SdrPathObj(OBJ_PLIN ); break;
+ case sal_uInt16(OBJ_EDGE ): pObj=new SdrEdgeObj; break;
+ case sal_uInt16(OBJ_RECT ): pObj=new SdrRectObj; break;
+ case sal_uInt16(OBJ_GRAF ): pObj=new SdrGrafObj; break;
+ case sal_uInt16(OBJ_OLE2 ): pObj=new SdrOle2Obj; break;
+ case sal_uInt16(OBJ_FRAME ): pObj=new SdrOle2Obj(true); break;
+ case sal_uInt16(OBJ_CAPTION ): pObj=new SdrCaptionObj; break;
+ case sal_uInt16(OBJ_PAGE ): pObj=new SdrPageObj; break;
+ case sal_uInt16(OBJ_UNO ): pObj=new SdrUnoObj(OUString()); break;
+ case sal_uInt16(OBJ_CUSTOMSHAPE ): pObj=new SdrObjCustomShape(); break;
+#if HAVE_FEATURE_AVMEDIA
+ case sal_uInt16(OBJ_MEDIA ): pObj=new SdrMediaObj(); break;
+#endif
+ case sal_uInt16(OBJ_TABLE ): pObj=new ::sdr::table::SdrTableObj(pModel); break;
+ case sal_uInt16(OBJ_OPENGL ): pObj=new SdrOpenGLObj; break;
+ }
}
- if(pObj != NULL)
+ if (!pObj)
+ pObj = CreateObjectFromFactory(nInventor, nIdentifier, pPage, pModel);
+
+ if (!pObj)
{
- if(pPage != NULL)
- pObj->SetPage(pPage);
- else if(pModel != NULL)
- pObj->SetModel(pModel);
+ // Well, if no one wants it...
+ return NULL;
}
+ if (pPage)
+ pObj->SetPage(pPage);
+ else if (pModel)
+ pObj->SetModel(pModel);
+
+ if (bSetSnapRect)
+ pObj->SetSnapRect(rSnapRect);
+
return pObj;
}
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index cdce0f0..99fd63f 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -500,43 +500,16 @@ SdrObject *SvxDrawPage::_CreateSdrObject(const Reference< drawing::XShape > & xS
if (!nType)
return NULL;
- SdrObject* pNewObj = 0;
-
awt::Size aSize = xShape->getSize();
aSize.Width += 1;
aSize.Height += 1;
awt::Point aPos = xShape->getPosition();
Rectangle aRect( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) );
- // special cases
- if( nInventor == SdrInventor )
- {
- switch( nType )
- {
- case OBJ_MEASURE:
- {
- pNewObj = new SdrMeasureObj( aRect.TopLeft(), aRect.BottomRight() );
- break;
- }
- case OBJ_LINE:
- {
- basegfx::B2DPolygon aPoly;
- aPoly.append(basegfx::B2DPoint(aRect.Left(), aRect.Top()));
- aPoly.append(basegfx::B2DPoint(aRect.Right(), aRect.Bottom()));
- pNewObj = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
- break;
- }
- }
- }
-
- if( pNewObj == NULL )
- pNewObj = SdrObjFactory::MakeNewObject( nInventor, nType, mpPage );
-
+ SdrObject* pNewObj = SdrObjFactory::MakeNewObject(nInventor, nType, aRect, mpPage);
if (!pNewObj)
return NULL;
- pNewObj->SetSnapRect(aRect);
-
if( pNewObj->ISA(E3dPolyScene))
{
// Szene initialisieren
commit 9b2e0150ea23c2349b35a9fc26d5aaebded39f93
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Wed Oct 29 15:01:37 2014 -0400
Rename aRect -> maRect for a member variable.
Change-Id: I12dc6c12ee44753c63b15f03276cdaa24e57d395
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 42eac31..1d843ad 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -175,7 +175,7 @@ protected:
// Das aRect ist gleichzeig auch das Rect vom RectObj und CircObj.
// Bei bTextFrame=sal_True wird der Text in dieses Rect hineinformatiert.
// Bei bTextFrame=sal_False wird der Text am Mittelpunkt des Rect zentriert.
- Rectangle aRect;
+ Rectangle maRect;
// Der GeoStat enthaelt den Drehwinkel und einen Shearwinkel
GeoStat aGeo;
@@ -398,7 +398,7 @@ public:
long GetMaxTextFrameWidth() const;
SdrFitToSizeType GetFitToSize() const;
- const Rectangle &GetGeoRect() const { return aRect; }
+ const Rectangle &GetGeoRect() const;
// Feststellen, ob TextFontwork
virtual bool IsFontwork() const;
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 7f17a11..0e2b386 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 boost::rational<long
boost::rational<long> 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 boost::rational<long
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 nWink, double sn, dou
// the rotation angle for ashapes is stored in fObjectRotation, this rotation
// has to be applied to the text object (which is internally using aGeo.nWink).
- SdrTextObj::NbcRotate( aRect.TopLeft(), -aGeo.nDrehWink, // retrieving the unrotated text object
+ SdrTextObj::NbcRotate( maRect.TopLeft(), -aGeo.nDrehWink, // retrieving the unrotated text object
sin( (-aGeo.nDrehWink) * F_PI18000 ),
cos( (-aGeo.nDrehWink) * F_PI18000 ) );
aGeo.nDrehWink = 0; // resetting aGeo data
@@ -1641,7 +1645,7 @@ void SdrObjCustomShape::NbcRotate( const Point& rRef, long nWink, double sn, dou
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.nShearWink!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ if (aGeo.nShearWink!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=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.nDrehWink || nShearWink || bMirroredX || bMirroredY )
{
- Polygon aPoly( aRect );
+ Polygon aPoly( maRect );
if( nShearWink )
{
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.nDrehWink )
- aPoly.Rotate( aRect.Center(), aGeo.nDrehWink / 10 );
+ aPoly.Rotate( maRect.Center(), aGeo.nDrehWink / 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 (nShearWink&&((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.nDrehWink || aGeo.nShearWink ) )
{
Point aNewPos( aNewRect.TopLeft() );
@@ -1993,7 +1997,7 @@ void SdrObjCustomShape::DragResizeCustomShape( const Rectangle& rNewRect )
if ( aGeo.nDrehWink ) 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
@@ -2485,7 +2489,7 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool
{
if ( ( aAdjustedTextRect != aNewTextRect ) && ( aOldTextRect != aAdjustedTextRect ) )
{
- 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;
@@ -2504,13 +2508,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();
@@ -2533,7 +2537,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;
@@ -2543,7 +2547,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() ) ;
@@ -2935,7 +2939,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 );
}
}
@@ -3085,7 +3089,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
double fShearX = (aGeo.nShearWink / 100.0) * F_PI180;
// get aRect, this is the unrotated snaprect
- Rectangle aRectangle(aRect);
+ Rectangle aRectangle(maRect);
bool bMirroredX = IsMirroredX();
bool bMirroredY = IsMirroredY();
@@ -3096,7 +3100,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 85f7502..0b85691 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 81a9c41..6ed5d5c 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, nStartWink, nEndWink));
+ const basegfx::B2DPolygon aPolyCirc(ImpCalcXPolyCirc(meCircleKind, maRect, nStartWink, nEndWink));
mpXPoly = new XPolygon(aPolyCirc);
}
OUString SdrCircObj::TakeObjNameSingul() const
{
sal_uInt16 nID=STR_ObjNameSingulCIRC;
- if (aRect.GetWidth()==aRect.GetHeight() && aGeo.nShearWink==0) {
+ if (maRect.GetWidth() == maRect.GetHeight() && aGeo.nShearWink==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.nShearWink==0) {
+ if (maRect.GetWidth() == maRect.GetHeight() && aGeo.nShearWink==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, nStartWink, nEndWink));
+ const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, maRect, nStartWink, nEndWink));
return basegfx::B2DPolyPolygon(aCircPolygon);
}
@@ -405,57 +407,57 @@ SdrHdl* SdrCircObj::GetHdl(sal_uInt32 nHdlNum) const
switch (nHdlNum)
{
case 0:
- aPnt = GetWinkPnt(aRect,nStartWink);
+ aPnt = GetWinkPnt(maRect,nStartWink);
eLocalKind = HDL_CIRC;
nPNum = 1;
break;
case 1:
- aPnt = GetWinkPnt(aRect,nEndWink);
+ aPnt = GetWinkPnt(maRect,nEndWink);
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.nShearWink)
{
- ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan);
+ ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan);
}
if (aGeo.nDrehWink)
{
- 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.nDrehWink!=0)
- RotatePoint(aPt,aRect.TopLeft(),-aGeo.nSin,aGeo.nCos);
+ RotatePoint(aPt,maRect.TopLeft(),-aGeo.nSin,aGeo.nCos);
if (aGeo.nShearWink!=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=(ImpCircUser*)rStat.GetUser();
rStat.SetActionRect(pU->aR);
- aRect=pU->aR; // for ObjName
- ImpJustifyRect(aRect);
+ maRect = pU->aR; // for ObjName
+ ImpJustifyRect(maRect);
nStartWink=pU->nStart;
nEndWink=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);
nStartWink=pU->nStart;
nEndWink=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.nDrehWink!=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.nShearWink!=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.nDrehWink!=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.nShearWink!=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(GetWinkPnt(aRect,nStartWink));
- const Point aPntEnd(GetWinkPnt(aRect,nEndWink));
+ const Point aPntStart(GetWinkPnt(maRect,nStartWink));
+ const Point aPntEnd(GetWinkPnt(maRect,nEndWink));
long a=nStartWink;
long e=nEndWink;
- 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.nDrehWink!=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(),boost::rational<long>(nWdt1,nWdt0),boost::rational<long>(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 GetWinkPnt(aRect,nStartWink);
- case 2 : return GetWinkPnt(aRect,nEndWink);
- default: return aRect.Center();
+ case 1 : return GetWinkPnt(maRect,nStartWink);
+ case 2 : return GetWinkPnt(maRect,nEndWink);
+ 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, nStartWink, nEndWink));
+ const basegfx::B2DPolygon aCircPolygon(ImpCalcXPolyCirc(meCircleKind, maRect, nStartWink, nEndWink));
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 c73a6d1..452b03b 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 acbc721..91d089d 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -862,10 +862,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());
@@ -1075,7 +1075,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))
@@ -1087,13 +1087,13 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
if(aGeoStat.nShearWink)
{
aGeoStat.RecalcTan();
- pGrp->NbcShear(aRect.TopLeft(), aGeoStat.nShearWink, aGeoStat.nTan, false);
+ pGrp->NbcShear(maRect.TopLeft(), aGeoStat.nShearWink, aGeoStat.nTan, false);
}
if(aGeoStat.nDrehWink)
{
aGeoStat.RecalcSinCos();
- pGrp->NbcRotate(aRect.TopLeft(), aGeoStat.nDrehWink, aGeoStat.nSin, aGeoStat.nCos);
+ pGrp->NbcRotate(maRect.TopLeft(), aGeoStat.nDrehWink, aGeoStat.nSin, aGeoStat.nCos);
}
}
@@ -1265,7 +1265,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 dd3998b..72d68be 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -722,7 +722,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.nTextWink!=aGeo.nDrehWink) {
((SdrMeasureObj*)this)->aGeo.nDrehWink=aMPol.nTextWink;
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index e34a728..1b3f4c8 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -214,7 +214,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 cb9dd89..f8b1daa 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1781,8 +1781,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( boost::rational_cast<long>(aRect.GetWidth() / aScaleWidth),
- boost::rational_cast<long>(aRect.GetHeight() / aScaleHeight) );
+ Size aVisSize( boost::rational_cast<long>(maRect.GetWidth() / aScaleWidth),
+ boost::rational_cast<long>(maRect.GetHeight() / aScaleHeight) );
aVisSize = OutputDevice::LogicToLogic( aVisSize, pModel->GetScaleUnit(), aMapUnit);
awt::Size aSz;
@@ -1805,14 +1805,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
@@ -1833,7 +1833,7 @@ void SdrOle2Obj::ImpSetVisAreaSize()
{
if ( pClient )
{
- Rectangle aScaleRect(aRect.TopLeft(), aObjAreaSize);
+ Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize);
pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight);
}
else
@@ -1852,8 +1852,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 );
@@ -2221,7 +2221,7 @@ bool SdrOle2Obj::CalculateNewScaling( boost::rational<long>& aScaleWidth, boost:
MapMode aMapMode( pModel->GetScaleUnit() );
aObjAreaSize = mpImpl->mxObjRef.GetSize( &aMapMode );
- Size aSize = aRect.GetSize();
+ Size aSize = maRect.GetSize();
aScaleWidth = boost::rational<long>(aSize.Width(), aObjAreaSize.Width() );
aScaleHeight = boost::rational<long>(aSize.Height(), aObjAreaSize.Height() );
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 7a20ab0..21afb0c 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1718,8 +1718,8 @@ void SdrPathObj::ImpForceLineWink()
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 0d22e46..86222636 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.nShearWink!=0) ShearXPoly(aXPoly,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=0) RotateXPoly(aXPoly,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ if (aGeo.nShearWink!=0) ShearXPoly(aXPoly,maRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=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.nShearWink!=0) {
- long nDst=Round((aRect.Bottom()-aRect.Top())*aGeo.nTan);
- if (aGeo.nShearWink>0) {
+ rRect = maRect;
+ if (aGeo.nShearWink!=0)
+ {
+ long nDst=Round((maRect.Bottom()-maRect.Top())*aGeo.nTan);
+ if (aGeo.nShearWink>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.nShearWink!=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->SetDrehWink(aGeo.nDrehWink);
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.nShearWink)
{
- ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan);
+ ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan);
}
if(aGeo.nDrehWink)
{
- 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.nDrehWink)
- 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.nDrehWink)
- 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.nShearWink!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ if (aGeo.nShearWink!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=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.nShearWink!=0) ShearPoint(aPt,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=0) RotatePoint(aPt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ if (aGeo.nShearWink!=0) ShearPoint(aPt,maRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=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 35f7819..d60810a 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.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ Polygon aPol(maRect);
+ if (aGeo.nShearWink!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
basegfx::B2DPolyPolygon aRetval;
aRetval.append(aPol.getB2DPolygon());
@@ -1161,12 +1161,12 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const
void SdrTextObj::RecalcSnapRect()
{
if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) {
- Polygon aPol(aRect);
- if (aGeo.nShearWink!=0) ShearPoly(aPol,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=0) RotatePoly(aPol,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ Polygon aPol(maRect);
+ if (aGeo.nShearWink!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
maSnapRect=aPol.GetBoundRect();
} else {
- maSnapRect=aRect;
+ maSnapRect = maRect;
}
}
@@ -1179,14 +1179,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.nShearWink!=0) ShearPoint(aP,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=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.nShearWink!=0) ShearPoint(aP,maRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=0) RotatePoint(aP,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
return aP;
}
@@ -1471,7 +1471,7 @@ void SdrTextObj::SaveGeoData(SdrObjGeoData& rGeo) const
{
SdrAttrObj::SaveGeoData(rGeo);
SdrTextObjGeoData& rTGeo=(SdrTextObjGeoData&)rGeo;
- rTGeo.aRect =aRect;
+ rTGeo.aRect = maRect;
rTGeo.aGeo =aGeo;
}
@@ -1494,6 +1494,11 @@ SdrFitToSizeType SdrTextObj::GetFitToSize() const
return eType;
}
+const Rectangle& SdrTextObj::GetGeoRect() const
+{
+ return maRect;
+}
+
void SdrTextObj::ForceOutlinerParaObject()
{
SdrText* pText = getActiveText();
@@ -1607,7 +1612,7 @@ bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP
double fShearX = (aGeo.nShearWink / 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 d980b50..01c105b 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
((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
((SdrRectObj*)this)->SetXPolyDirty();
diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx
index d7d5631..37a1100 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.nShearWink!=0) ShearPoint(aPnt,aRect.TopLeft(),aGeo.nTan);
- if (aGeo.nDrehWink!=0) RotatePoint(aPnt,aRect.TopLeft(),aGeo.nSin,aGeo.nCos);
+ if (aGeo.nShearWink!=0) ShearPoint(aPnt,maRect.TopLeft(),aGeo.nTan);
+ if (aGeo.nDrehWink!=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.nDrehWink || aGeo.nShearWink))
+ if (aNewRect.TopLeft() != maRect.TopLeft() && (aGeo.nDrehWink || aGeo.nShearWink))
{
Point aNewPos(aNewRect.TopLeft());
if(aGeo.nShearWink)
- ShearPoint(aNewPos,aRect.TopLeft(),aGeo.nTan);
+ ShearPoint(aNewPos,maRect.TopLeft(),aGeo.nTan);
if(aGeo.nDrehWink)
- 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 1108817..48d16a6 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 boost::rational<long>& xFact
bool bRota90Merk=bNoShearMerk && aGeo.nDrehWink % 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.numerator() < 0;
bool bYMirr = yFact.numerator() < 0;
if (bXMirr || bYMirr) {
@@ -133,17 +133,17 @@ void SdrTextObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact
}
if (aGeo.nDrehWink==0 && aGeo.nShearWink==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.nDrehWink=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 boost::rational<long>& xFact
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 boost::rational<long>& xFact
}
}
- 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 boost::rational<long>& xFact
void SdrTextObj::NbcRotate(const Point& rRef, long nWink, 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.nDrehWink==0) {
aGeo.nDrehWink=NormAngle360(nWink);
aGeo.nSin=sn;
@@ -229,14 +229,14 @@ void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear
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.nDrehWink % 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.nDrehWink % 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 eceb1f3..1fa9564 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -329,7 +329,7 @@ void SdrUnoObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact,
// small correctures
if (aGeo.nDrehWink>=9000 && aGeo.nDrehWink<27000)
{
- aRect.Move(aRect.Left()-aRect.Right(),aRect.Top()-aRect.Bottom());
+ maRect.Move(maRect.Left()-maRect.Right(),maRect.Top()-maRect.Bottom());
}
aGeo.nDrehWink = 0;
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index f0dcb57..2939706 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 boost::rational<long>& xFac
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();
commit 26dc19743de06835ea87e4ed3d6059d344273b56
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Tue Oct 28 15:24:37 2014 -0400
Remove 'virtual' keyword. Nobody overwrites this.
Change-Id: I02499441f00d6499a576d97115df0ad1d85dcd5e
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index ae8dbc8..b098f1b 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -145,7 +145,7 @@ public:
virtual SdrObject* NbcSetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum);
virtual SdrObject* SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum);
- virtual void SetRectsDirty();
+ void SetRectsDirty();
const Rectangle& GetAllObjSnapRect() const;
const Rectangle& GetAllObjBoundRect() const;
commit 36c142f6fe188855cf86efa41c1163eb8924c2ee
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Tue Oct 28 15:05:50 2014 -0400
Windows build fix.
Change-Id: Ia118c81e39f5f48d4678cc375bad45f31ba8322e
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 2df50de..a091554 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -694,7 +694,6 @@
#include <svx/sdr/overlay/overlayobjectcell.hxx>
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
#include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx>
-#include <svx/sdr/properties/attributeproperties.hxx>
#include <svx/sdr/properties/properties.hxx>
#include <svx/sdr/table/tablecontroller.hxx>
#include <svx/sdr/table/tabledesign.hxx>
More information about the Libreoffice-commits
mailing list