summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-26 11:11:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-27 08:33:58 +0200
commitc0731052db789a876fbc98aceba0f067abba93d1 (patch)
tree08236aaa3c90953c1129362b653e7adde9894e56 /svx
parent55556a4cebbb35f15e7989bf0a6e276db99944e3 (diff)
loplugin:virtualdead in svx
Change-Id: I8af09a2f0a4a8c7952c5855b2934f2d0a64d9740 Reviewed-on: https://gerrit.libreoffice.org/79638 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/docrecovery.cxx10
-rw-r--r--svx/source/inc/docrecovery.hxx5
-rw-r--r--svx/source/svdraw/selectioncontroller.cxx5
-rw-r--r--svx/source/svdraw/svdedxv.cxx3
-rw-r--r--svx/source/svdraw/svdmark.cxx57
-rw-r--r--svx/source/svdraw/svdobj.cxx5
-rw-r--r--svx/source/svdraw/svdoedge.cxx8
-rw-r--r--svx/source/table/tablecontroller.cxx6
-rw-r--r--svx/source/unodraw/gluepts.cxx19
9 files changed, 36 insertions, 82 deletions
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 0039c0fad917..75b9f3b87042 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -352,8 +352,6 @@ void SAL_CALL RecoveryCore::statusChanged(const css::frame::FeatureStateEvent& a
// FeatureDescriptor = "start" || "stop"
if (aEvent.FeatureDescriptor == RECOVERY_OPERATIONSTATE_START)
{
- if (m_pListener)
- m_pListener->start();
return;
}
@@ -632,10 +630,6 @@ void SaveProgressDialog::stepNext(TURLInfo* )
*/
}
-void SaveProgressDialog::start()
-{
-}
-
void SaveProgressDialog::end()
{
m_xDialog->response(DLG_RET_OK);
@@ -877,10 +871,6 @@ short RecoveryDialog::execute()
return DLG_RET_OK;
}
-void RecoveryDialog::start()
-{
-}
-
void RecoveryDialog::updateItems()
{
int c = m_xFileListLB->n_children();
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 48014e6cdd63..525f589f3896 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -158,9 +158,6 @@ class IRecoveryUpdateListener
// inform listener about changed items, which should be refreshed
virtual void updateItems() = 0;
- // inform listener about starting of the asynchronous recovery operation
- virtual void start() = 0;
-
// inform listener about ending of the asynchronous recovery operation
virtual void end() = 0;
@@ -378,7 +375,6 @@ class SaveProgressDialog : public weld::GenericDialogController
// IRecoveryUpdateListener
virtual void updateItems() override;
virtual void stepNext(TURLInfo* pItem) override;
- virtual void start() override;
virtual void end() override;
};
@@ -431,7 +427,6 @@ class RecoveryDialog : public weld::GenericDialogController
// IRecoveryUpdateListener
virtual void updateItems() override;
virtual void stepNext(TURLInfo* pItem) override;
- virtual void start() override;
virtual void end() override;
short execute();
diff --git a/svx/source/svdraw/selectioncontroller.cxx b/svx/source/svdraw/selectioncontroller.cxx
index 8cb678d66467..28dda4ed27a2 100644
--- a/svx/source/svdraw/selectioncontroller.cxx
+++ b/svx/source/svdraw/selectioncontroller.cxx
@@ -90,11 +90,6 @@ bool SelectionController::PasteObjModel( const SdrModel& /*rModel*/ )
return false;
}
-bool SelectionController::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& /*rFormatSet*/ )
-{
- return false;
-}
-
bool SelectionController::ApplyFormatPaintBrush( SfxItemSet& /*rFormatSet*/, bool /*bNoCharacterFormats*/, bool /*bNoParagraphFormats*/ )
{
return false;
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index bc4839d1ec15..ab186938f46c 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2678,9 +2678,6 @@ static const sal_uInt16* GetFormatRangeImpl(bool bTextOnly)
void SdrObjEditView::TakeFormatPaintBrush(std::shared_ptr<SfxItemSet>& rFormatSet)
{
- if (mxSelectionController.is() && mxSelectionController->TakeFormatPaintBrush(rFormatSet))
- return;
-
const SdrMarkList& rMarkList = GetMarkedObjectList();
if (rMarkList.GetMarkCount() > 0)
{
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 9001e601ca8c..6f07641c1953 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -745,43 +745,40 @@ namespace sdr
// build transitive hull
ImplCollectCompleteSelection(pCandidate);
- if(pCandidate->IsNode())
+ // travel over broadcaster/listener to access edges connected to the selected object
+ const SfxBroadcaster* pBC = pCandidate->GetBroadcaster();
+
+ if(pBC)
{
- // travel over broadcaster/listener to access edges connected to the selected object
- const SfxBroadcaster* pBC = pCandidate->GetBroadcaster();
+ const size_t nLstCnt(pBC->GetSizeOfVector());
- if(pBC)
+ for(size_t nl=0; nl < nLstCnt; ++nl)
{
- const size_t nLstCnt(pBC->GetSizeOfVector());
+ SfxListener* pLst = pBC->GetListener(nl);
+ SdrEdgeObj* pEdge = dynamic_cast<SdrEdgeObj*>( pLst );
- for(size_t nl=0; nl < nLstCnt; ++nl)
+ if(pEdge && pEdge->IsInserted() && pEdge->getSdrPageFromSdrObject() == pCandidate->getSdrPageFromSdrObject())
{
- SfxListener* pLst = pBC->GetListener(nl);
- SdrEdgeObj* pEdge = dynamic_cast<SdrEdgeObj*>( pLst );
+ SdrMark aM(pEdge, maMarkedObjectList.GetMark(a)->GetPageView());
- if(pEdge && pEdge->IsInserted() && pEdge->getSdrPageFromSdrObject() == pCandidate->getSdrPageFromSdrObject())
+ if(pEdge->GetConnectedNode(true) == pCandidate)
+ {
+ aM.SetCon1(true);
+ }
+
+ if(pEdge->GetConnectedNode(false) == pCandidate)
+ {
+ aM.SetCon2(true);
+ }
+
+ if(SAL_MAX_SIZE == maMarkedObjectList.FindObject(pEdge))
+ {
+ // check if it itself is selected
+ maEdgesOfMarkedNodes.InsertEntry(aM);
+ }
+ else
{
- SdrMark aM(pEdge, maMarkedObjectList.GetMark(a)->GetPageView());
-
- if(pEdge->GetConnectedNode(true) == pCandidate)
- {
- aM.SetCon1(true);
- }
-
- if(pEdge->GetConnectedNode(false) == pCandidate)
- {
- aM.SetCon2(true);
- }
-
- if(SAL_MAX_SIZE == maMarkedObjectList.FindObject(pEdge))
- {
- // check if it itself is selected
- maEdgesOfMarkedNodes.InsertEntry(aM);
- }
- else
- {
- maMarkedEdgesOfMarkedNodes.InsertEntry(aM);
- }
+ maMarkedEdgesOfMarkedNodes.InsertEntry(aM);
}
}
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index c1cb84e9b3c0..58d06fe6b25c 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2182,11 +2182,6 @@ void SdrObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemove
// Broadcasting while setting attributes is managed by the AttrObj.
-bool SdrObject::IsNode() const
-{
- return true;
-}
-
SdrGluePoint SdrObject::GetVertexGluePoint(sal_uInt16 nPosNum) const
{
// #i41936# Use SnapRect for default GluePoints
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index a06fde26b304..3e052fc825e1 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -408,11 +408,6 @@ void SdrEdgeObj::TakeUnrotatedSnapRect(tools::Rectangle& rRect) const
rRect=GetSnapRect();
}
-bool SdrEdgeObj::IsNode() const
-{
- return true;
-}
-
SdrGluePoint SdrEdgeObj::GetVertexGluePoint(sal_uInt16 nNum) const
{
Point aPt;
@@ -2164,8 +2159,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO
no--;
SdrObject* pObj=pOL->GetObj(no);
if (rVisLayer.IsSet(pObj->GetLayer()) && pObj->IsVisible() && // only visible objects
- (pThis==nullptr || pObj!=static_cast<SdrObject const *>(pThis)) && // don't connect it to itself
- pObj->IsNode())
+ (pThis==nullptr || pObj!=static_cast<SdrObject const *>(pThis))) // don't connect it to itself
{
tools::Rectangle aObjBound(pObj->GetCurrentBoundRect());
if (aObjBound.IsOver(aMouseRect)) {
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 4bb15a495ce0..45a3840149ac 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2816,12 +2816,6 @@ bool SvxTableController::PasteObject( SdrTableObj const * pPasteTableObj )
return true;
}
-bool SvxTableController::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& /*rFormatSet*/ )
-{
- // SdrView::TakeFormatPaintBrush() is enough
- return false;
-}
-
bool SvxTableController::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats )
{
if(!mbCellSelectionMode)
diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx
index 445313698ad5..2b1ba019292e 100644
--- a/svx/source/unodraw/gluepts.cxx
+++ b/svx/source/unodraw/gluepts.cxx
@@ -259,7 +259,7 @@ void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier )
// XIdentifierReplace
void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, const uno::Any& aElement )
{
- if( mpObject.is() && mpObject->IsNode() )
+ if( mpObject.is() )
{
struct drawing::GluePoint2 aGluePoint;
if( (Identifier < NON_USER_DEFINED_GLUE_POINTS) || !(aElement >>= aGluePoint))
@@ -293,7 +293,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, c
// XIdentifierAccess
uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier )
{
- if( mpObject.is() && mpObject->IsNode() )
+ if( mpObject.is() )
{
struct drawing::GluePoint2 aGluePoint;
@@ -447,14 +447,11 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
{
// each node has a default of 4 glue points
// and any number of user defined glue points
- if( mpObject->IsNode() )
- {
- nCount += 4;
+ nCount += 4;
- const SdrGluePointList* pList = mpObject->GetGluePointList();
- if( pList )
- nCount += pList->GetCount();
- }
+ const SdrGluePointList* pList = mpObject->GetGluePointList();
+ if( pList )
+ nCount += pList->GetCount();
}
return nCount;
@@ -462,7 +459,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount()
uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index )
{
- if( Index >= 0 && mpObject.is() && mpObject->IsNode() )
+ if( Index >= 0 && mpObject.is() )
{
struct drawing::GluePoint2 aGluePoint;
@@ -498,7 +495,7 @@ uno::Type SAL_CALL SvxUnoGluePointAccess::getElementType()
sal_Bool SAL_CALL SvxUnoGluePointAccess::hasElements()
{
- return mpObject.is() && mpObject->IsNode();
+ return mpObject.is();
}
/**