summaryrefslogtreecommitdiff
path: root/sw/source/core/draw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-18 14:32:13 +0200
committerNoel Grandin <noel@peralex.com>2016-08-19 08:18:37 +0200
commit178153e8220aa3bf29078f6df4ed6acd0b2f61e4 (patch)
tree7c42b2bc53c9d70e0029568a727504f92fd259e1 /sw/source/core/draw
parent6078d593fa27eab2035d97e7ef69872564e30f60 (diff)
convert SdrUserCallType to scoped enum
Change-Id: I0121b17242faee4238d82836453cec695f508db0
Diffstat (limited to 'sw/source/core/draw')
-rw-r--r--sw/source/core/draw/dcontact.cxx66
-rw-r--r--sw/source/core/draw/dflyobj.cxx4
2 files changed, 35 insertions, 35 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index b9ef741b2d35..f4c58c47f6e3 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -575,7 +575,7 @@ SwDrawContact::SwDrawContact( SwFrameFormat* pToRegisterIn, SdrObject* pObj ) :
mbUserCallActive( false ),
// Note: value of <meEventTypeOfCurrentUserCall> isn't of relevance, because
// <mbUserCallActive> is false.
- meEventTypeOfCurrentUserCall( SDRUSERCALL_MOVEONLY )
+ meEventTypeOfCurrentUserCall( SdrUserCallType::MoveOnly )
{
// clear list containing 'virtual' drawing objects.
maDrawVirtObjs.clear();
@@ -1043,8 +1043,8 @@ void SwDrawContact::Changed( const SdrObject& rObj,
// #i44339#
// no event handling, if document is in destruction.
- // Exception: It's the SDRUSERCALL_DELETE event
- if ( pDoc->IsInDtor() && eType != SDRUSERCALL_DELETE )
+ // Exception: It's the SdrUserCallType::Delete event
+ if ( pDoc->IsInDtor() && eType != SdrUserCallType::Delete )
{
return;
}
@@ -1121,21 +1121,21 @@ class NestedUserCallHdl
if ( IsNestedUserCall() )
{
bool bTmpAssert( true );
- // Currently its known, that a nested event SDRUSERCALL_RESIZE
- // could occur during parent user call SDRUSERCALL_INSERTED,
- // SDRUSERCALL_DELETE and SDRUSERCALL_RESIZE for edge objects.
- // Also possible are nested SDRUSERCALL_CHILD_RESIZE events for
+ // Currently its known, that a nested event SdrUserCallType::Resize
+ // could occur during parent user call SdrUserCallType::Inserted,
+ // SdrUserCallType::Delete and SdrUserCallType::Resize for edge objects.
+ // Also possible are nested SdrUserCallType::ChildResize events for
// edge objects
// Thus, assert all other combinations
- if ( ( meParentUserCallEventType == SDRUSERCALL_INSERTED ||
- meParentUserCallEventType == SDRUSERCALL_DELETE ||
- meParentUserCallEventType == SDRUSERCALL_RESIZE ) &&
- mpDrawContact->meEventTypeOfCurrentUserCall == SDRUSERCALL_RESIZE )
+ if ( ( meParentUserCallEventType == SdrUserCallType::Inserted ||
+ meParentUserCallEventType == SdrUserCallType::Delete ||
+ meParentUserCallEventType == SdrUserCallType::Resize ) &&
+ mpDrawContact->meEventTypeOfCurrentUserCall == SdrUserCallType::Resize )
{
bTmpAssert = false;
}
- else if ( meParentUserCallEventType == SDRUSERCALL_CHILD_RESIZE &&
- mpDrawContact->meEventTypeOfCurrentUserCall == SDRUSERCALL_CHILD_RESIZE )
+ else if ( meParentUserCallEventType == SdrUserCallType::ChildResize &&
+ mpDrawContact->meEventTypeOfCurrentUserCall == SdrUserCallType::ChildResize )
{
bTmpAssert = false;
}
@@ -1185,7 +1185,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
!bAnchoredAsChar;
switch( eType )
{
- case SDRUSERCALL_DELETE:
+ case SdrUserCallType::Delete:
{
if ( bNotify )
{
@@ -1201,7 +1201,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
aNestedUserCallHdl.DrawContactDeleted();
break;
}
- case SDRUSERCALL_INSERTED:
+ case SdrUserCallType::Inserted:
{
if ( mbDisconnectInProgress )
{
@@ -1217,7 +1217,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
}
break;
}
- case SDRUSERCALL_REMOVED:
+ case SdrUserCallType::Removed:
{
if ( bNotify )
{
@@ -1226,8 +1226,8 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
DisconnectFromLayout( false );
break;
}
- case SDRUSERCALL_CHILD_INSERTED :
- case SDRUSERCALL_CHILD_REMOVED :
+ case SdrUserCallType::ChildInserted :
+ case SdrUserCallType::ChildRemoved :
{
// --> #i113730#
// force layer of controls for group objects containing control objects
@@ -1256,13 +1256,13 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
}
SAL_FALLTHROUGH;
}
- case SDRUSERCALL_MOVEONLY:
- case SDRUSERCALL_RESIZE:
- case SDRUSERCALL_CHILD_MOVEONLY :
- case SDRUSERCALL_CHILD_RESIZE :
- case SDRUSERCALL_CHILD_CHGATTR :
- case SDRUSERCALL_CHILD_DELETE :
- case SDRUSERCALL_CHILD_COPY :
+ case SdrUserCallType::MoveOnly:
+ case SdrUserCallType::Resize:
+ case SdrUserCallType::ChildMoveOnly :
+ case SdrUserCallType::ChildResize :
+ case SdrUserCallType::ChildChangeAttr :
+ case SdrUserCallType::ChildDelete :
+ case SdrUserCallType::ChildCopy :
{
// #i31698# - improvement
// get instance <SwAnchoredDrawObject> only once
@@ -1396,7 +1396,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
lcl_textBoxSizeNotify(GetFormat());
}
- else if (eType == SDRUSERCALL_RESIZE)
+ else if (eType == SdrUserCallType::Resize)
// Even if the bounding box of the shape didn't change,
// notify about the size change, as an adjustment change
// may affect the size of the underlying textbox.
@@ -1404,7 +1404,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
}
}
break;
- case SDRUSERCALL_CHGATTR:
+ case SdrUserCallType::ChangeAttr:
if ( bNotify )
{
lcl_NotifyBackgroundOfObj( *this, rObj, pOldBoundRect );
@@ -2380,7 +2380,7 @@ void SwDrawVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fract
Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect();
rRefObj.Resize(rRef - GetOffset(), xFact, yFact, bUnsetRelative);
SetRectsDirty();
- SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
+ SendUserCall(SdrUserCallType::Resize, aBoundRect0);
}
}
@@ -2391,7 +2391,7 @@ void SwDrawVirtObj::Rotate(const Point& rRef, long nAngle, double sn, double cs)
Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect();
rRefObj.Rotate(rRef - GetOffset(), nAngle, sn, cs);
SetRectsDirty();
- SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
+ SendUserCall(SdrUserCallType::Resize, aBoundRect0);
}
}
@@ -2400,7 +2400,7 @@ void SwDrawVirtObj::Mirror(const Point& rRef1, const Point& rRef2)
Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect();
rRefObj.Mirror(rRef1 - GetOffset(), rRef2 - GetOffset());
SetRectsDirty();
- SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
+ SendUserCall(SdrUserCallType::Resize, aBoundRect0);
}
void SwDrawVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShear)
@@ -2410,7 +2410,7 @@ void SwDrawVirtObj::Shear(const Point& rRef, long nAngle, double tn, bool bVShea
Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect();
rRefObj.Shear(rRef - GetOffset(), nAngle, tn, bVShear);
SetRectsDirty();
- SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
+ SendUserCall(SdrUserCallType::Resize, aBoundRect0);
}
}
@@ -2435,7 +2435,7 @@ void SwDrawVirtObj::SetSnapRect(const Rectangle& rRect)
aR -= GetOffset();
rRefObj.SetSnapRect(aR);
SetRectsDirty();
- SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
+ SendUserCall(SdrUserCallType::Resize, aBoundRect0);
}
void SwDrawVirtObj::NbcSetSnapRect(const Rectangle& rRect)
@@ -2461,7 +2461,7 @@ void SwDrawVirtObj::SetLogicRect(const Rectangle& rRect)
aR -= GetOffset();
rRefObj.SetLogicRect(aR);
SetRectsDirty();
- SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0);
+ SendUserCall(SdrUserCallType::Resize, aBoundRect0);
}
void SwDrawVirtObj::NbcSetLogicRect(const Rectangle& rRect)
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 8451721f02f7..2c60e717bd82 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -539,7 +539,7 @@ void SwVirtFlyDrawObj::SetSnapRect(const Rectangle& )
SetChanged();
BroadcastObjectChange();
if (pUserCall!=nullptr)
- pUserCall->Changed(*this, SDRUSERCALL_RESIZE, aTmp);
+ pUserCall->Changed(*this, SdrUserCallType::Resize, aTmp);
}
void SwVirtFlyDrawObj::NbcSetSnapRect(const Rectangle& )
@@ -560,7 +560,7 @@ void SwVirtFlyDrawObj::SetLogicRect(const Rectangle& )
SetChanged();
BroadcastObjectChange();
if (pUserCall!=nullptr)
- pUserCall->Changed(*this, SDRUSERCALL_RESIZE, aTmp);
+ pUserCall->Changed(*this, SdrUserCallType::Resize, aTmp);
}
void SwVirtFlyDrawObj::NbcSetLogicRect(const Rectangle& )