diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-18 13:58:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-19 08:18:37 +0200 |
commit | 1a37d46c794fd8aa5cf2dba0d74103c5c74e9ca2 (patch) | |
tree | 5d42ac4d6063eaf578831b34f5269c28adf07318 | |
parent | c2238e16fd131c4e6d49960e8b3caf5ec6a3d001 (diff) |
convert SdrInsertReasonKind to scoped enum
Change-Id: I225250ef296bb263bdb83c13e23412bf0204be51
-rw-r--r-- | include/svx/svdpage.hxx | 12 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/fmpage.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 16 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdpoev.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdundo.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 6 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 2 |
11 files changed, 29 insertions, 29 deletions
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index 8749e07c438d..e5205feee39c 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -52,12 +52,12 @@ class Color; class SfxStyleSheet; class SvxUnoDrawPagesAccess; -enum SdrInsertReasonKind { - SDRREASON_UNKNOWN, - SDRREASON_STREAMING, /// importing document - SDRREASON_UNDO, /// from Undo - SDRREASON_COPY, /// something copied... - SDRREASON_VIEWCALL /// via SdrView::Group(), ... +enum class SdrInsertReasonKind { + Unknown, + Streaming, /// importing document + Undo, /// from Undo + Copy, /// something copied... + ViewCall /// via SdrView::Group(), ... }; class SdrInsertReason { diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 247545f00515..b2b2f8871444 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -266,7 +266,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC pNeuObj->SetPage( m_pPage ); pNeuObj->SetModel( m_pModel.get() ); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); m_pPage->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason); Rectangle aRet(VCLPoint((*pCopiesIter)->getPosition()),VCLSize((*pCopiesIter)->getSize())); diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index de5aa87c74c8..0c3c98d1f9fa 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -133,7 +133,7 @@ void FmFormPage::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) { SdrPage::InsertObject( pObj, nPos, pReason ); - if (GetModel() && (!pReason || pReason->GetReason() != SDRREASON_STREAMING)) + if (GetModel() && (!pReason || pReason->GetReason() != SdrInsertReasonKind::Streaming)) static_cast<FmFormModel*>(GetModel())->GetUndoEnv().Inserted(pObj); } diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 657ad7d62693..1497fa34c418 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -676,7 +676,7 @@ void SdrEditView::ForceMarkedObjToAnotherPage() if(bFnd) { pM->GetPageView()->GetObjList()->RemoveObject(pObj->GetOrdNum()); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pPV->GetObjList()->InsertObject(pObj, SAL_MAX_SIZE, &aReason); pM->SetPageView(pPV); InvalidateAllWin(aObjRect); @@ -906,7 +906,7 @@ void SdrEditView::CopyMarkedObj() SdrMark* pM=aSourceObjectsForCopy.GetMark(nm); SdrObject* pO=pM->GetMarkedSdrObj()->Clone(); if (pO!=nullptr) { - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pM->GetPageView()->GetObjList()->InsertObject(pO, SAL_MAX_SIZE, &aReason); if( bUndo ) @@ -969,7 +969,7 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser pObj->SetMergedItemSet(maDefaultAttr); } if (!pObj->IsInserted()) { - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); if (nOptions & SdrInsertFlags::NOBROADCAST) { rPV.GetObjList()->NbcInsertObject(pObj, SAL_MAX_SIZE, &aReason); } else { diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index c92a28e5006a..7cf36ae97b76 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1129,7 +1129,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) { SdrPathObj* pPath = new SdrPathObj(OBJ_PATHFILL, aMergePolyPolygonA); ImpCopyAttributes(pAttrObj, pPath); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pInsOL->InsertObject(pPath, nInsPos, &aReason); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath)); @@ -1375,7 +1375,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) pPath->SetMergedItem(XLineStyleItem(drawing::LineStyle_SOLID)); } - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pInsOL->InsertObject(pPath,nInsPos,&aReason); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath)); @@ -1529,7 +1529,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, SdrPathObj* pPath = new SdrPathObj((SdrObjKind)pSrcPath->GetObjIdentifier(), basegfx::B2DPolyPolygon(rCandidate)); ImpCopyAttributes(pSrcPath, pPath); pLast = pPath; - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); rOL.InsertObject(pPath, rPos, &aReason); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath, true)); @@ -1564,7 +1564,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, SdrPathObj* pPath = new SdrPathObj(eKind, basegfx::B2DPolyPolygon(aNewPolygon)); ImpCopyAttributes(pSrcPath, pPath); pLast = pPath; - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); rOL.InsertObject(pPath, rPos, &aReason); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath, true)); @@ -1600,7 +1600,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, } } - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); rOL.InsertObject(pCandidate, rPos, &aReason); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pCandidate, true)); @@ -1785,7 +1785,7 @@ void SdrEditView::GroupMarked() pSrcLst->RemoveObject(pObj->GetOrdNumDirect()); if (!bForeignList) nInsPos--; // correct InsertPos - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pDstLst->InsertObject(pObj,0,&aReason); GetMarkedObjectListWriteAccess().DeleteMark(nm); pSrcLst0=pSrcLst; @@ -1795,7 +1795,7 @@ void SdrEditView::GroupMarked() { aNewMark.InsertEntry(SdrMark(pGrp,pPV)); const size_t nCount=pDstLst->GetObjCount(); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pAktLst->InsertObject(pGrp,nInsPos,&aReason); if( bUndo ) { @@ -1871,7 +1871,7 @@ void SdrEditView::UnGroupMarked() for (size_t no=0; no<nObjCount; ++no) { SdrObject* pObj=pSrcLst->RemoveObject(0); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pDstLst->InsertObject(pObj,nDstCnt,&aReason); if( bUndo ) AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pObj,true)); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index f2f186ecebe9..f1bdb80be7ef 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -293,7 +293,7 @@ size_t ImpSdrGDIMetaFileImport::DoImport( // insert all objects cached in aTmpList now into rOL from nInsPos nInsPos = std::min(nInsPos, rOL.GetObjCount()); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); for(SdrObject* pObj : maTmpList) { diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 6c93cce2b73f..2fa3614abe6b 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -135,7 +135,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList) bRectsDirty =false; size_t nCloneErrCnt = 0; const size_t nCount = rSrcList.GetObjCount(); - SdrInsertReason aReason(SDRREASON_COPY); + SdrInsertReason aReason(SdrInsertReasonKind::Copy); for (size_t no=0; no<nCount; ++no) { SdrObject* pSO=rSrcList.GetObj(no); @@ -740,7 +740,7 @@ void SdrObjList::UnGroupObj( size_t nObjNum ) for( size_t i=0; i<nCount; ++i ) { SdrObject* pObj = pSrcLst->RemoveObject(0); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); InsertObject(pObj, nInsertPos, &aReason); ++nInsertPos; } diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index 166590d43ebd..b1795f197383 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -380,7 +380,7 @@ void SdrPolyEditView::RipUpAtMarkedPoints() if(pNeuObj) { - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pM->GetPageView()->GetObjList()->InsertObject(pNeuObj, pObj->GetOrdNum() + 1, &aReason); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj)); diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index e2925eee1253..1362de30b4d7 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -746,7 +746,7 @@ void SdrUndoRemoveObj::Undo() } E3DModifySceneSnapRectUpdater aUpdater(pObjList->GetOwnerObj()); - SdrInsertReason aReason(SDRREASON_UNDO); + SdrInsertReason aReason(SdrInsertReasonKind::Undo); pObjList->InsertObject(pObj,nOrdNum,&aReason); // #i11426# @@ -805,7 +805,7 @@ void SdrUndoInsertObj::Redo() aAnchorPos = pObj->GetAnchorPos(); } - SdrInsertReason aReason(SDRREASON_UNDO); + SdrInsertReason aReason(SdrInsertReasonKind::Undo); pObjList->InsertObject(pObj,nOrdNum,&aReason); // Arcs lose position when grouped (#i45952#) diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 6e7cc853e543..3a12bd5ba16e 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -342,7 +342,7 @@ bool SdrExchangeView::Paste( pNeuObj->SetLayer(nLayer); } - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pDstLst->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason); if( bUndo ) @@ -420,7 +420,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2); Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys); pObj->SetLogicRect(aR); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); rLst.InsertObject(pObj, SAL_MAX_SIZE, &aReason); if( IsUndoEnabled() ) @@ -750,7 +750,7 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const pNeuObj->SetModel( pNeuMod ); } - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pNeuPag->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason); // #i13033# diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 5aff1044a7a9..c27542cea78f 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2608,7 +2608,7 @@ bool SvxTableController::GetMarkedObjModel( SdrPage* pNewPage ) pNewTableObj->SetPage( pNewPage ); pNewTableObj->SetModel( pNewPage->GetModel() ); - SdrInsertReason aReason(SDRREASON_VIEWCALL); + SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); pNewPage->InsertObject(pNewTableObj, SAL_MAX_SIZE, &aReason); return true; |