diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-21 10:15:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-21 10:07:37 +0000 |
commit | 0649622956431e0a1955cb80d1175025401ab5e5 (patch) | |
tree | cdaa1ff406d232399d53594ad1a32691402ab665 /svx | |
parent | sd lok: Include parthash in annotation list and callbacks (diff) | |
download | core-0649622956431e0a1955cb80d1175025401ab5e5.tar.gz core-0649622956431e0a1955cb80d1175025401ab5e5.zip |
loplugin:unusedmethods
Change-Id: I52a9f16f3ed543a3c83ca111df70e3f7ae1ef33c
Reviewed-on: https://gerrit.libreoffice.org/34508
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/engine3d/obj3d.cxx | 8 | ||||
-rw-r--r-- | svx/source/form/fmpage.cxx | 5 | ||||
-rw-r--r-- | svx/source/items/postattr.cxx | 5 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv.cxx | 11 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 26 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svdpoev.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdundo.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 9 | ||||
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 3 |
11 files changed, 32 insertions, 60 deletions
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 877575cd6758..da26db574f64 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -105,7 +105,7 @@ E3dObjList::~E3dObjList() { } -void E3dObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) +void E3dObjList::NbcInsertObject(SdrObject* pObj, size_t nPos) { // Get owner DBG_ASSERT(dynamic_cast<const E3dObject*>(GetOwnerObj()), "Insert 3D object in parent != 3DObject"); @@ -115,7 +115,7 @@ void E3dObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertRe { // Normal 3D object, insert means // call parent - SdrObjList::NbcInsertObject(pObj, nPos, pReason); + SdrObjList::NbcInsertObject(pObj, nPos); } else { @@ -124,12 +124,12 @@ void E3dObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertRe } } -void E3dObjList::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) +void E3dObjList::InsertObject(SdrObject* pObj, size_t nPos) { OSL_ENSURE(dynamic_cast<const E3dObject*>(GetOwnerObj()), "Insert 3D object in non-3D Parent"); // call parent - SdrObjList::InsertObject(pObj, nPos, pReason); + SdrObjList::InsertObject(pObj, nPos); E3dScene* pScene = static_cast<E3dObject*>(GetOwnerObj())->GetScene(); if(pScene) diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index dc35dad611d4..ed0da03cfac7 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -129,10 +129,9 @@ SdrPage* FmFormPage::Clone(SdrModel* const pNewModel) const } -void FmFormPage::InsertObject(SdrObject* pObj, size_t nPos, - const SdrInsertReason* pReason) +void FmFormPage::InsertObject(SdrObject* pObj, size_t nPos) { - SdrPage::InsertObject( pObj, nPos, pReason ); + SdrPage::InsertObject( pObj, nPos ); if (GetModel()) static_cast<FmFormModel*>(GetModel())->GetUndoEnv().Inserted(pObj); } diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx index 52d98a312d74..a31d6e33e785 100644 --- a/svx/source/items/postattr.cxx +++ b/svx/source/items/postattr.cxx @@ -151,11 +151,6 @@ SvxPostItIdItem::SvxPostItIdItem( sal_uInt16 _nWhich ) SetWhich( _nWhich ); } -SvxPostItIdItem::SvxPostItIdItem( const OUString& rId, sal_uInt16 _nWhich ) : - SfxStringItem( _nWhich, rId ) -{ -} - SfxPoolItem* SvxPostItIdItem::Clone( SfxItemPool * ) const { return new SvxPostItIdItem( *this ); diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 74de5e46e874..97bd8a7b9287 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -676,8 +676,7 @@ void SdrEditView::ForceMarkedObjToAnotherPage() if(bFnd) { pM->GetPageView()->GetObjList()->RemoveObject(pObj->GetOrdNum()); - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pPV->GetObjList()->InsertObject(pObj, SAL_MAX_SIZE, &aReason); + pPV->GetObjList()->InsertObject(pObj, SAL_MAX_SIZE); pM->SetPageView(pPV); InvalidateAllWin(aObjRect); bFlg=true; @@ -906,8 +905,7 @@ void SdrEditView::CopyMarkedObj() SdrMark* pM=aSourceObjectsForCopy.GetMark(nm); SdrObject* pO=pM->GetMarkedSdrObj()->Clone(); if (pO!=nullptr) { - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pM->GetPageView()->GetObjList()->InsertObject(pO, SAL_MAX_SIZE, &aReason); + pM->GetPageView()->GetObjList()->InsertObject(pO, SAL_MAX_SIZE); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoCopyObject(*pO)); @@ -969,11 +967,10 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser pObj->SetMergedItemSet(maDefaultAttr); } if (!pObj->IsInserted()) { - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); if (nOptions & SdrInsertFlags::NOBROADCAST) { - rPV.GetObjList()->NbcInsertObject(pObj, SAL_MAX_SIZE, &aReason); + rPV.GetObjList()->NbcInsertObject(pObj, SAL_MAX_SIZE); } else { - rPV.GetObjList()->InsertObject(pObj, SAL_MAX_SIZE, &aReason); + rPV.GetObjList()->InsertObject(pObj, SAL_MAX_SIZE); } } if( IsUndoEnabled() ) diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 9ed2ef55029f..cfd03d34b76a 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1129,8 +1129,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) { SdrPathObj* pPath = new SdrPathObj(OBJ_PATHFILL, aMergePolyPolygonA); ImpCopyAttributes(pAttrObj, pPath); - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pInsOL->InsertObject(pPath, nInsPos, &aReason); + pInsOL->InsertObject(pPath, nInsPos); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath)); @@ -1375,8 +1374,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) pPath->SetMergedItem(XLineStyleItem(drawing::LineStyle_SOLID)); } - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pInsOL->InsertObject(pPath,nInsPos,&aReason); + pInsOL->InsertObject(pPath,nInsPos); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath)); @@ -1529,8 +1527,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(SdrInsertReasonKind::ViewCall); - rOL.InsertObject(pPath, rPos, &aReason); + rOL.InsertObject(pPath, rPos); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath, true)); MarkObj(pPath, pPV, false, true); @@ -1564,8 +1561,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, SdrPathObj* pPath = new SdrPathObj(eKind, basegfx::B2DPolyPolygon(aNewPolygon)); ImpCopyAttributes(pSrcPath, pPath); pLast = pPath; - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - rOL.InsertObject(pPath, rPos, &aReason); + rOL.InsertObject(pPath, rPos); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pPath, true)); MarkObj(pPath, pPV, false, true); @@ -1600,8 +1596,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, } } - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - rOL.InsertObject(pCandidate, rPos, &aReason); + rOL.InsertObject(pCandidate, rPos); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pCandidate, true)); MarkObj(pCandidate, pPV, false, true); @@ -1646,7 +1641,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, pTextObj->SetMergedItemSet(aTargetItemSet); // insert object - rOL.InsertObject(pTextObj, rPos + 1, &aReason); + rOL.InsertObject(pTextObj, rPos + 1); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pTextObj, true)); MarkObj(pTextObj, pPV, false, true); @@ -1785,8 +1780,7 @@ void SdrEditView::GroupMarked() pSrcLst->RemoveObject(pObj->GetOrdNumDirect()); if (!bForeignList) nInsPos--; // correct InsertPos - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pDstLst->InsertObject(pObj,0,&aReason); + pDstLst->InsertObject(pObj,0); GetMarkedObjectListWriteAccess().DeleteMark(nm); pSrcLst0=pSrcLst; } @@ -1795,8 +1789,7 @@ void SdrEditView::GroupMarked() { aNewMark.InsertEntry(SdrMark(pGrp,pPV)); const size_t nCount=pDstLst->GetObjCount(); - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pAktLst->InsertObject(pGrp,nInsPos,&aReason); + pAktLst->InsertObject(pGrp,nInsPos); if( bUndo ) { AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pGrp,true)); // no recalculation! @@ -1871,8 +1864,7 @@ void SdrEditView::UnGroupMarked() for (size_t no=0; no<nObjCount; ++no) { SdrObject* pObj=pSrcLst->RemoveObject(0); - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pDstLst->InsertObject(pObj,nDstCnt,&aReason); + pDstLst->InsertObject(pObj,nDstCnt); if( bUndo ) AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoInsertObject(*pObj,true)); nDstCnt++; diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 52a11eceb751..ac7253de8196 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -293,11 +293,9 @@ size_t ImpSdrGDIMetaFileImport::DoImport( // insert all objects cached in aTmpList now into rOL from nInsPos nInsPos = std::min(nInsPos, rOL.GetObjCount()); - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - for(SdrObject* pObj : maTmpList) { - rOL.NbcInsertObject(pObj, nInsPos, &aReason); + rOL.NbcInsertObject(pObj, nInsPos); nInsPos++; if(pProgrInfo) diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 4277668effe4..3e48ddc21cac 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -135,7 +135,6 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList) bRectsDirty =false; size_t nCloneErrCnt = 0; const size_t nCount = rSrcList.GetObjCount(); - SdrInsertReason aReason(SdrInsertReasonKind::Copy); for (size_t no=0; no<nCount; ++no) { SdrObject* pSO=rSrcList.GetObj(no); @@ -144,7 +143,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList) if (pDO!=nullptr) { pDO->SetModel(pModel); pDO->SetPage(pPage); - NbcInsertObject(pDO, SAL_MAX_SIZE, &aReason); + NbcInsertObject(pDO, SAL_MAX_SIZE); } else { nCloneErrCnt++; } @@ -326,7 +325,7 @@ void SdrObjList::impChildInserted(SdrObject& rChild) } } -void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* /*pReason*/) +void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos) { DBG_ASSERT(pObj!=nullptr,"SdrObjList::NbcInsertObject(NULL)"); if (pObj!=nullptr) { @@ -352,7 +351,7 @@ void SdrObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertRe } } -void SdrObjList::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) +void SdrObjList::InsertObject(SdrObject* pObj, size_t nPos) { DBG_ASSERT(pObj!=nullptr,"SdrObjList::InsertObject(NULL)"); @@ -367,7 +366,7 @@ void SdrObjList::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReaso } // do insert to new group - NbcInsertObject(pObj, nPos, pReason); + NbcInsertObject(pObj, nPos); // In case the object is inserted into a group and doesn't overlap with // the group's other members, it needs an own repaint. @@ -734,8 +733,7 @@ void SdrObjList::UnGroupObj( size_t nObjNum ) for( size_t i=0; i<nCount; ++i ) { SdrObject* pObj = pSrcLst->RemoveObject(0); - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - InsertObject(pObj, nInsertPos, &aReason); + InsertObject(pObj, nInsertPos); ++nInsertPos; } diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index b8b0356ad5cd..77185149eafb 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -370,8 +370,7 @@ void SdrPolyEditView::RipUpAtMarkedPoints() if(pNeuObj) { - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pM->GetPageView()->GetObjList()->InsertObject(pNeuObj, pObj->GetOrdNum() + 1, &aReason); + pM->GetPageView()->GetObjList()->InsertObject(pNeuObj, pObj->GetOrdNum() + 1); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj)); MarkObj(pNeuObj, pM->GetPageView(), false, true); diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 530602459d68..a1c836fbb4d5 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -742,8 +742,7 @@ void SdrUndoRemoveObj::Undo() } E3DModifySceneSnapRectUpdater aUpdater(pObjList->GetOwnerObj()); - SdrInsertReason aReason(SdrInsertReasonKind::Undo); - pObjList->InsertObject(pObj,nOrdNum,&aReason); + pObjList->InsertObject(pObj,nOrdNum); // #i11426# if(aOwnerAnchorPos.X() || aOwnerAnchorPos.Y()) @@ -801,8 +800,7 @@ void SdrUndoInsertObj::Redo() aAnchorPos = pObj->GetAnchorPos(); } - SdrInsertReason aReason(SdrInsertReasonKind::Undo); - pObjList->InsertObject(pObj,nOrdNum,&aReason); + pObjList->InsertObject(pObj,nOrdNum); // Arcs lose position when grouped (#i45952#) if ( aAnchorPos.X() || aAnchorPos.Y() ) diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 767b384728fb..ba333fdd4395 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -342,8 +342,7 @@ bool SdrExchangeView::Paste( pNeuObj->SetLayer(nLayer); } - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pDstLst->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason); + pDstLst->InsertObject(pNeuObj, SAL_MAX_SIZE); if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj)); @@ -420,8 +419,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(SdrInsertReasonKind::ViewCall); - rLst.InsertObject(pObj, SAL_MAX_SIZE, &aReason); + rLst.InsertObject(pObj, SAL_MAX_SIZE); if( IsUndoEnabled() ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj)); @@ -750,8 +748,7 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const pNeuObj->SetModel( pNeuMod ); } - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pNeuPag->InsertObject(pNeuObj, SAL_MAX_SIZE, &aReason); + pNeuPag->InsertObject(pNeuObj, SAL_MAX_SIZE); // #i13033# aCloneList.AddPair(pObj, pNeuObj); diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 4268e8f98593..f7d8d7da1fc4 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2564,8 +2564,7 @@ bool SvxTableController::GetMarkedObjModel( SdrPage* pNewPage ) pNewTableObj->SetPage( pNewPage ); pNewTableObj->SetModel( pNewPage->GetModel() ); - SdrInsertReason aReason(SdrInsertReasonKind::ViewCall); - pNewPage->InsertObject(pNewTableObj, SAL_MAX_SIZE, &aReason); + pNewPage->InsertObject(pNewTableObj, SAL_MAX_SIZE); return true; } |