summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-18 11:06:48 +0200
committerNoel Grandin <noel@peralex.com>2016-08-19 08:18:37 +0200
commit5252d3951f2febdfc714f37ffef9f4c0794c4cec (patch)
tree9ffea1266d65c65b78d22ee60e8c830282975597 /svx
parent4625dcc13cbe6d5277e7c8bc99879b1c060796c0 (diff)
convert SdrRepeatFunc to scoped enum
Change-Id: I7702cf3696222c3e1d2422b602bb6c8394e39d7a
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdedtv.cxx2
-rw-r--r--svx/source/svdraw/svdedtv1.cxx2
-rw-r--r--svx/source/svdraw/svdedtv2.cxx24
-rw-r--r--svx/source/svdraw/svdglev.cxx8
-rw-r--r--svx/source/svdraw/svdpoev.cxx8
-rw-r--r--svx/source/svdraw/svdundo.cxx66
-rw-r--r--svx/source/unodraw/unopage.cxx2
7 files changed, 56 insertions, 56 deletions
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 6e8b88d2619d..657ad7d62693 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -784,7 +784,7 @@ void SdrEditView::DeleteMarkedObj()
// moved breaking action and undo start outside loop
BrkAction();
- BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_DELETE);
+ BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::Delete);
// remove as long as something is selected. This allows to schedule objects for
// removal for a next run as needed
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index f6d9d4045433..c56fa18c47f0 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -182,7 +182,7 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy)
if (bCopy)
aStr += ImpGetResStr(STR_EditWithCopy);
// needs its own UndoGroup because of its parameters
- BegUndo(aStr,GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVE);
+ BegUndo(aStr,GetDescriptionOfMarkedObjects(),SdrRepeatFunc::Move);
}
if (bCopy)
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index a1d0de23144f..c92a28e5006a 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -69,7 +69,7 @@ void SdrEditView::MovMarkedToTop()
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo(ImpGetResStr(STR_EditMovToTop),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVTOTOP);
+ BegUndo(ImpGetResStr(STR_EditMovToTop),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::MoveToTop);
SortMarkedObjects();
for (size_t nm=0; nm<nCount; ++nm)
@@ -156,7 +156,7 @@ void SdrEditView::MovMarkedToBtm()
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo(ImpGetResStr(STR_EditMovToBtm),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVTOBTM);
+ BegUndo(ImpGetResStr(STR_EditMovToBtm),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::MoveToBottom);
SortMarkedObjects();
for (size_t nm=0; nm<nCount; ++nm)
@@ -250,7 +250,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj)
{
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo(ImpGetResStr(STR_EditPutToTop),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_PUTTOTOP);
+ BegUndo(ImpGetResStr(STR_EditPutToTop),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::PutToTop);
SortMarkedObjects();
@@ -352,7 +352,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj)
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo(ImpGetResStr(STR_EditPutToBtm),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_PUTTOBTM);
+ BegUndo(ImpGetResStr(STR_EditPutToBtm),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::PutToBottom);
SortMarkedObjects();
if (pRefObj!=nullptr)
@@ -433,7 +433,7 @@ void SdrEditView::ReverseOrderOfMarked()
bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo(ImpGetResStr(STR_EditRevOrder),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_REVORDER);
+ BegUndo(ImpGetResStr(STR_EditRevOrder),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::ReverseOrder);
size_t a=0;
do {
@@ -1237,7 +1237,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly)
// Undo-String will be set later
if( bUndo )
- BegUndo("", "", bNoPolyPoly ? SDRREPFUNC_OBJ_COMBINE_ONEPOLY : SDRREPFUNC_OBJ_COMBINE_POLYPOLY);
+ BegUndo("", "", bNoPolyPoly ? SdrRepeatFunc::CombineOnePoly : SdrRepeatFunc::CombinePolyPoly);
// #105899# First, guarantee that all objects are converted to polyobjects,
// especially for SdrGrafObj with bitmap filling this is necessary to not
@@ -1668,7 +1668,7 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines)
if( bUndo )
{
// comment is constructed later
- BegUndo("", "", bMakeLines ? SDRREPFUNC_OBJ_DISMANTLE_LINES : SDRREPFUNC_OBJ_DISMANTLE_POLYS);
+ BegUndo("", "", bMakeLines ? SdrRepeatFunc::DismantleLines : SdrRepeatFunc::DismantlePolys);
}
SdrObjList* pOL0=nullptr;
@@ -1724,7 +1724,7 @@ void SdrEditView::GroupMarked()
const bool bUndo = IsUndoEnabled();
if( bUndo )
{
- BegUndo(ImpGetResStr(STR_EditGroup),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_GROUP);
+ BegUndo(ImpGetResStr(STR_EditGroup),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::Group);
for(size_t nm = GetMarkedObjectCount(); nm>0; )
{
@@ -1825,7 +1825,7 @@ void SdrEditView::UnGroupMarked()
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo("", "", SDRREPFUNC_OBJ_UNGROUP);
+ BegUndo("", "", SdrRepeatFunc::Ungroup);
size_t nCount=0;
OUString aName1;
@@ -1960,11 +1960,11 @@ void SdrEditView::ImpConvertTo(bool bPath, bool bLineToArea)
if (bPath) {
if (nMarkCount==1) nDscrID=STR_EditConvToCurve;
else nDscrID=STR_EditConvToCurves;
- BegUndo(ImpGetResStr(nDscrID),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_CONVERTTOPATH);
+ BegUndo(ImpGetResStr(nDscrID),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::ConvertToPath);
} else {
if (nMarkCount==1) nDscrID=STR_EditConvToPoly;
else nDscrID=STR_EditConvToPolys;
- BegUndo(ImpGetResStr(nDscrID),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_CONVERTTOPOLY);
+ BegUndo(ImpGetResStr(nDscrID),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::ConvertToPoly);
}
}
for (size_t nm=nMarkCount; nm>0;) {
@@ -2012,7 +2012,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo("", "", SDRREPFUNC_OBJ_IMPORTMTF);
+ BegUndo("", "", SdrRepeatFunc::ImportMtf);
SortMarkedObjects();
SdrMarkList aForTheDescription;
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index c6e8ae74c583..9f547e12bd0b 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -222,7 +222,7 @@ void SdrGlueEditView::DeleteMarkedGluePoints()
ForceUndirtyMrkPnt();
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_DELETE);
+ BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Delete);
const size_t nMarkCount=GetMarkedObjectCount();
for (size_t nm=0; nm<nMarkCount; ++nm)
@@ -356,7 +356,7 @@ void SdrGlueEditView::MoveMarkedGluePoints(const Size& rSiz, bool bCopy)
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditMove));
if (bCopy) aStr += ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_MOVE);
+ BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Move);
if (bCopy) ImpCopyMarkedGluePoints();
ImpTransformMarkedGluePoints(ImpMove,&rSiz);
EndUndo();
@@ -374,7 +374,7 @@ void SdrGlueEditView::ResizeMarkedGluePoints(const Point& rRef, const Fraction&
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditResize));
if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_RESIZE);
+ BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Resize);
if (bCopy) ImpCopyMarkedGluePoints();
ImpTransformMarkedGluePoints(ImpResize,&rRef,&xFact,&yFact);
EndUndo();
@@ -392,7 +392,7 @@ void SdrGlueEditView::RotateMarkedGluePoints(const Point& rRef, long nAngle, boo
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditRotate));
if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy);
- BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_ROTATE);
+ BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Rotate);
if (bCopy) ImpCopyMarkedGluePoints();
double nSin=sin(nAngle*nPi180);
double nCos=cos(nAngle*nPi180);
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 5eaa83060647..166590d43ebd 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -305,7 +305,7 @@ void SdrPolyEditView::DeleteMarkedPoints()
if( bUndo )
{
// Description
- BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_DELETE);
+ BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedPoints(),SdrRepeatFunc::Delete);
}
for (size_t nMarkNum=nMarkCount; nMarkNum>0;)
@@ -622,7 +622,7 @@ void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz)
{
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditMove));
- BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_MOVE);
+ BegUndo(aStr,GetDescriptionOfMarkedPoints(),SdrRepeatFunc::Move);
ImpTransformMarkedPoints(ImpMove,&rSiz);
EndUndo();
AdjustMarkHdl();
@@ -639,7 +639,7 @@ void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFac
{
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditResize));
- BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_RESIZE);
+ BegUndo(aStr,GetDescriptionOfMarkedPoints(),SdrRepeatFunc::Resize);
ImpTransformMarkedPoints(ImpResize,&rRef,&xFact,&yFact);
EndUndo();
AdjustMarkHdl();
@@ -656,7 +656,7 @@ void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nAngle)
{
ForceUndirtyMrkPnt();
OUString aStr(ImpGetResStr(STR_EditResize));
- BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_ROTATE);
+ BegUndo(aStr,GetDescriptionOfMarkedPoints(),SdrRepeatFunc::Rotate);
double nSin=sin(nAngle*nPi180);
double nCos=cos(nAngle*nPi180);
ImpTransformMarkedPoints(ImpRotate,&rRef,&nAngle,&nSin,&nCos);
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 71af6719d067..e2925eee1253 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -110,7 +110,7 @@ sal_Int32 SdrUndoAction::GetViewShellId() const
SdrUndoGroup::SdrUndoGroup(SdrModel& rNewMod)
: SdrUndoAction(rNewMod),
aBuf(),
- eFunction(SDRREPFUNC_OBJ_NONE)
+ eFunction(SdrRepeatFunc::NONE)
{}
SdrUndoGroup::~SdrUndoGroup()
@@ -158,22 +158,22 @@ bool SdrUndoGroup::CanSdrRepeat(SdrView& rView) const
{
switch (eFunction)
{
- case SDRREPFUNC_OBJ_NONE : return false;
- case SDRREPFUNC_OBJ_DELETE : return rView.AreObjectsMarked();
- case SDRREPFUNC_OBJ_COMBINE_POLYPOLY: return rView.IsCombinePossible();
- case SDRREPFUNC_OBJ_COMBINE_ONEPOLY : return rView.IsCombinePossible(true);
- case SDRREPFUNC_OBJ_DISMANTLE_POLYS : return rView.IsDismantlePossible();
- case SDRREPFUNC_OBJ_DISMANTLE_LINES : return rView.IsDismantlePossible(true);
- case SDRREPFUNC_OBJ_CONVERTTOPOLY : return rView.IsConvertToPolyObjPossible();
- case SDRREPFUNC_OBJ_CONVERTTOPATH : return rView.IsConvertToPathObjPossible();
- case SDRREPFUNC_OBJ_GROUP : return rView.IsGroupPossible();
- case SDRREPFUNC_OBJ_UNGROUP : return rView.IsUnGroupPossible();
- case SDRREPFUNC_OBJ_PUTTOTOP : return rView.IsToTopPossible();
- case SDRREPFUNC_OBJ_PUTTOBTM : return rView.IsToBtmPossible();
- case SDRREPFUNC_OBJ_MOVTOTOP : return rView.IsToTopPossible();
- case SDRREPFUNC_OBJ_MOVTOBTM : return rView.IsToBtmPossible();
- case SDRREPFUNC_OBJ_REVORDER : return rView.IsReverseOrderPossible();
- case SDRREPFUNC_OBJ_IMPORTMTF : return rView.IsImportMtfPossible();
+ case SdrRepeatFunc::NONE : return false;
+ case SdrRepeatFunc::Delete : return rView.AreObjectsMarked();
+ case SdrRepeatFunc::CombinePolyPoly: return rView.IsCombinePossible();
+ case SdrRepeatFunc::CombineOnePoly : return rView.IsCombinePossible(true);
+ case SdrRepeatFunc::DismantlePolys : return rView.IsDismantlePossible();
+ case SdrRepeatFunc::DismantleLines : return rView.IsDismantlePossible(true);
+ case SdrRepeatFunc::ConvertToPoly : return rView.IsConvertToPolyObjPossible();
+ case SdrRepeatFunc::ConvertToPath : return rView.IsConvertToPathObjPossible();
+ case SdrRepeatFunc::Group : return rView.IsGroupPossible();
+ case SdrRepeatFunc::Ungroup : return rView.IsUnGroupPossible();
+ case SdrRepeatFunc::PutToTop : return rView.IsToTopPossible();
+ case SdrRepeatFunc::PutToBottom : return rView.IsToBtmPossible();
+ case SdrRepeatFunc::MoveToTop : return rView.IsToTopPossible();
+ case SdrRepeatFunc::MoveToBottom : return rView.IsToBtmPossible();
+ case SdrRepeatFunc::ReverseOrder : return rView.IsReverseOrderPossible();
+ case SdrRepeatFunc::ImportMtf : return rView.IsImportMtfPossible();
default: break;
} // switch
return false;
@@ -183,22 +183,22 @@ void SdrUndoGroup::SdrRepeat(SdrView& rView)
{
switch (eFunction)
{
- case SDRREPFUNC_OBJ_NONE : break;
- case SDRREPFUNC_OBJ_DELETE : rView.DeleteMarked(); break;
- case SDRREPFUNC_OBJ_COMBINE_POLYPOLY: rView.CombineMarkedObjects(false); break;
- case SDRREPFUNC_OBJ_COMBINE_ONEPOLY : rView.CombineMarkedObjects(); break;
- case SDRREPFUNC_OBJ_DISMANTLE_POLYS : rView.DismantleMarkedObjects(); break;
- case SDRREPFUNC_OBJ_DISMANTLE_LINES : rView.DismantleMarkedObjects(true); break;
- case SDRREPFUNC_OBJ_CONVERTTOPOLY : rView.ConvertMarkedToPolyObj(); break;
- case SDRREPFUNC_OBJ_CONVERTTOPATH : rView.ConvertMarkedToPathObj(false); break;
- case SDRREPFUNC_OBJ_GROUP : rView.GroupMarked(); break;
- case SDRREPFUNC_OBJ_UNGROUP : rView.UnGroupMarked(); break;
- case SDRREPFUNC_OBJ_PUTTOTOP : rView.PutMarkedToTop(); break;
- case SDRREPFUNC_OBJ_PUTTOBTM : rView.PutMarkedToBtm(); break;
- case SDRREPFUNC_OBJ_MOVTOTOP : rView.MovMarkedToTop(); break;
- case SDRREPFUNC_OBJ_MOVTOBTM : rView.MovMarkedToBtm(); break;
- case SDRREPFUNC_OBJ_REVORDER : rView.ReverseOrderOfMarked(); break;
- case SDRREPFUNC_OBJ_IMPORTMTF : rView.DoImportMarkedMtf(); break;
+ case SdrRepeatFunc::NONE : break;
+ case SdrRepeatFunc::Delete : rView.DeleteMarked(); break;
+ case SdrRepeatFunc::CombinePolyPoly : rView.CombineMarkedObjects(false); break;
+ case SdrRepeatFunc::CombineOnePoly : rView.CombineMarkedObjects(); break;
+ case SdrRepeatFunc::DismantlePolys : rView.DismantleMarkedObjects(); break;
+ case SdrRepeatFunc::DismantleLines : rView.DismantleMarkedObjects(true); break;
+ case SdrRepeatFunc::ConvertToPoly : rView.ConvertMarkedToPolyObj(); break;
+ case SdrRepeatFunc::ConvertToPath : rView.ConvertMarkedToPathObj(false); break;
+ case SdrRepeatFunc::Group : rView.GroupMarked(); break;
+ case SdrRepeatFunc::Ungroup : rView.UnGroupMarked(); break;
+ case SdrRepeatFunc::PutToTop : rView.PutMarkedToTop(); break;
+ case SdrRepeatFunc::PutToBottom : rView.PutMarkedToBtm(); break;
+ case SdrRepeatFunc::MoveToTop : rView.MovMarkedToTop(); break;
+ case SdrRepeatFunc::MoveToBottom : rView.MovMarkedToBtm(); break;
+ case SdrRepeatFunc::ReverseOrder : rView.ReverseOrderOfMarked(); break;
+ case SdrRepeatFunc::ImportMtf : rView.DoImportMarkedMtf(); break;
default: break;
} // switch
}
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index e2afa104901e..19a869bcfef7 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -299,7 +299,7 @@ void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape )
if (bUndoEnabled)
{
mpModel->BegUndo(ImpGetResStr(STR_EditDelete),
- pObj->TakeObjNameSingul(), SDRREPFUNC_OBJ_DELETE);
+ pObj->TakeObjNameSingul(), SdrRepeatFunc::Delete);
SdrUndoAction * pAction = mpModel->GetSdrUndoFactory().CreateUndoDeleteObject(*pObj);
mpModel->AddUndo(pAction);