summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-26 11:41:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-27 21:09:20 +0200
commit146e998508d0b6922e4afedc1acde3aa99a44fbb (patch)
tree80f5a0e62624d8cf4440cd6f4f0d7484af301889 /sd
parentf71347b581732aa3d1d29d71f195d9126603ebc7 (diff)
loplugin:virtualdead in sd
Change-Id: Idca2a3a53c4b79ba21a3113da63a8a96d8b2cd81 Reviewed-on: https://gerrit.libreoffice.org/79641 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/motionpathtag.cxx6
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx13
-rw-r--r--sd/source/ui/annotations/annotationtag.hxx3
-rw-r--r--sd/source/ui/func/smarttag.cxx37
-rw-r--r--sd/source/ui/inc/View.hxx1
-rw-r--r--sd/source/ui/inc/smarttag.hxx9
-rw-r--r--sd/source/ui/view/sdview.cxx8
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx6
-rw-r--r--sd/source/ui/view/viewshe2.cxx5
9 files changed, 1 insertions, 87 deletions
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index c6f6a2eade54..53f141e80c76 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -248,7 +248,6 @@ public:
virtual void CreateB2dIAObject() override;
virtual bool IsFocusHdl() const override;
- virtual bool isMarkable() const override;
private:
SdrPathObj* const mpPathObj;
@@ -306,11 +305,6 @@ bool SdPathHdl::IsFocusHdl() const
return false;
}
-bool SdPathHdl::isMarkable() const
-{
- return false;
-}
-
MotionPathTag::MotionPathTag( CustomAnimationPane& rPane, ::sd::View& rView, const CustomAnimationEffectPtr& pEffect )
: SmartTag( rView )
, mrPane( rPane )
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index ac07ef84594a..bbec5d9223c6 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -154,7 +154,6 @@ public:
virtual void CreateB2dIAObject() override;
virtual bool IsFocusHdl() const override;
- virtual bool isMarkable() const override;
private:
Reference< XAnnotation > mxAnnotation;
@@ -238,11 +237,6 @@ bool AnnotationHdl::IsFocusHdl() const
return true;
}
-bool AnnotationHdl::isMarkable() const
-{
- return false;
-}
-
AnnotationTag::AnnotationTag( AnnotationManagerImpl& rManager, ::sd::View& rView, const Reference< XAnnotation >& xAnnotation, Color const & rColor, int nIndex, const vcl::Font& rFont )
: SmartTag( rView )
, mrManager( rManager )
@@ -336,13 +330,6 @@ bool AnnotationTag::KeyInput( const KeyEvent& rKEvt )
}
/** returns true if the SmartTag consumes this event. */
-bool AnnotationTag::RequestHelp( const HelpEvent& /*rHEvt*/ )
-{
-
- return false;
-}
-
-/** returns true if the SmartTag consumes this event. */
bool AnnotationTag::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
diff --git a/sd/source/ui/annotations/annotationtag.hxx b/sd/source/ui/annotations/annotationtag.hxx
index 7a62b5b13a06..65dabdc50bbc 100644
--- a/sd/source/ui/annotations/annotationtag.hxx
+++ b/sd/source/ui/annotations/annotationtag.hxx
@@ -43,9 +43,6 @@ public:
virtual bool KeyInput( const KeyEvent& rKEvt ) override;
/// @return true if the SmartTag consumes this event.
- virtual bool RequestHelp( const HelpEvent& rHEvt ) override;
-
- /// @return true if the SmartTag consumes this event.
virtual bool Command( const CommandEvent& rCEvt ) override;
// callbacks from sdr view
diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx
index 397c2f17f383..ff53821168c9 100644
--- a/sd/source/ui/func/smarttag.cxx
+++ b/sd/source/ui/func/smarttag.cxx
@@ -51,12 +51,6 @@ bool SmartTag::KeyInput( const KeyEvent& /*rKEvt*/ )
}
/** returns true if the SmartTag consumes this event. */
-bool SmartTag::RequestHelp( const HelpEvent& /*rHEvt*/ )
-{
- return false;
-}
-
-/** returns true if the SmartTag consumes this event. */
bool SmartTag::Command( const CommandEvent& /*rCEvt*/ )
{
return false;
@@ -228,25 +222,6 @@ bool SmartTagSet::KeyInput( const KeyEvent& rKEvt )
return false;
}
-bool SmartTagSet::RequestHelp( const HelpEvent& rHEvt )
-{
- Point aMDPos( mrView.GetViewShell()->GetActiveWindow()->PixelToLogic( rHEvt.GetMousePosPixel() ) );
- SdrHdl* pHdl = mrView.PickHandle(aMDPos);
-
- if( pHdl )
- {
- // if a smart tag handle is hit, forward event to its smart tag
- SmartHdl* pSmartHdl = dynamic_cast< SmartHdl* >( pHdl );
- if(pSmartHdl && pSmartHdl->getTag().is() )
- {
- const SmartTagReference& xTag( pSmartHdl->getTag() );
- return xTag->RequestHelp( rHEvt );
- }
- }
-
- return false;
-}
-
/** returns true if the SmartTag consumes this event. */
bool SmartTagSet::Command( const CommandEvent& rCEvt )
{
@@ -319,13 +294,6 @@ sal_uLong SmartTagSet::GetMarkedPointCount() const
return 0;
}
-bool SmartTagSet::IsPointMarkable(const SdrHdl& rHdl)
-{
- const SmartHdl* pSmartHdl = dynamic_cast< const SmartHdl* >( &rHdl );
-
- return pSmartHdl && pSmartHdl->isMarkable();
-}
-
bool SmartTagSet::MarkPoint(SdrHdl& rHdl, bool bUnmark )
{
if( mxSelectedTag.is() )
@@ -360,11 +328,6 @@ SmartHdl::SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind
{
}
-bool SmartHdl::isMarkable() const
-{
- return false;
-}
-
} // end of namespace sd
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 2c4bf3bb1357..029a23f07d2c 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -180,7 +180,6 @@ public:
virtual bool HasMarkablePoints() const override;
virtual sal_Int32 GetMarkablePointCount() const override;
virtual bool HasMarkedPoints() const override;
- virtual bool IsPointMarkable(const SdrHdl& rHdl) const override;
virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark=false) override;
virtual void CheckPossibilities() override;
virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark) override;
diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx
index 2130246128a8..bbce06878ac4 100644
--- a/sd/source/ui/inc/smarttag.hxx
+++ b/sd/source/ui/inc/smarttag.hxx
@@ -56,9 +56,6 @@ public:
virtual bool KeyInput( const KeyEvent& rKEvt );
/** returns true if the SmartTag consumes this event. */
- virtual bool RequestHelp( const HelpEvent& rHEvt );
-
- /** returns true if the SmartTag consumes this event. */
virtual bool Command( const CommandEvent& rCEvt );
/** returns true if this smart tag is currently selected */
@@ -114,9 +111,6 @@ public:
bool KeyInput( const KeyEvent& rKEvt );
/** returns true if a SmartTag consumes this event. */
- bool RequestHelp( const HelpEvent& rHEvt );
-
- /** returns true if a SmartTag consumes this event. */
bool Command( const CommandEvent& rCEvt );
/** disposes all smart tags and clears the set */
@@ -134,7 +128,6 @@ public:
sal_uLong GetMarkablePointCount() const;
bool HasMarkedPoints() const;
sal_uLong GetMarkedPointCount() const;
- static bool IsPointMarkable(const SdrHdl& rHdl);
bool MarkPoint(SdrHdl& rHdl, bool bUnmark);
bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark);
@@ -167,8 +160,6 @@ public:
SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind );
const SmartTagReference& getTag() const { return mxSmartTag; }
-
- virtual bool isMarkable() const;
private:
SmartTagReference const mxSmartTag;
};
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index e1f822411bc4..0abaff31fc9f 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -1116,14 +1116,6 @@ bool View::HasMarkedPoints() const
return FmFormView::HasMarkedPoints();
}
-bool View::IsPointMarkable(const SdrHdl& rHdl) const
-{
- if( SmartTagSet::IsPointMarkable( rHdl ) )
- return true;
- else
- return FmFormView::IsPointMarkable( rHdl );
-}
-
bool View::MarkPoint(SdrHdl& rHdl, bool bUnmark )
{
if( maSmartTags.MarkPoint( rHdl, bUnmark ) )
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index 02e5956b6867..dd5dc860c33f 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -137,7 +137,6 @@ public:
virtual void CreateB2dIAObject() override;
virtual bool IsFocusHdl() const override;
virtual PointerStyle GetPointer() const override;
- virtual bool isMarkable() const override;
virtual void onMouseEnter(const MouseEvent& rMEvt) override;
virtual void onHelpRequest(const HelpEvent& rHEvt) override;
@@ -288,11 +287,6 @@ bool ImageButtonHdl::IsFocusHdl() const
return false;
}
-bool ImageButtonHdl::isMarkable() const
-{
- return false;
-}
-
PointerStyle ImageButtonHdl::GetPointer() const
{
return PointerStyle::Arrow;
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index f06f7bcea7f9..0341c104db7c 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -592,10 +592,7 @@ bool ViewShell::RequestHelp(const HelpEvent& rHEvt)
if (bool(rHEvt.GetMode()))
{
- if( GetView() )
- bReturn = GetView()->getSmartTags().RequestHelp(rHEvt);
-
- if(!bReturn && HasCurrentFunction())
+ if(HasCurrentFunction())
{
bReturn = GetCurrentFunction()->RequestHelp(rHEvt);
}