summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-23 08:48:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-27 11:48:46 +0200
commit1534025a0386584a7b8f3f929b10ce5eb33257cf (patch)
tree7f12dd6763148089cd4fb5495c8fffe84f415e12 /sd/source
parent0f2e01677cd0e8857faec99c61d71e88eee78b27 (diff)
loplugin:methodcycles more graph theory for the win
implemeent a reduction approach, which is good at finding virtual methods that only themselves or their virtual partners. The accessibility GetVisArea stuff is dead since commit 891e41fac81fbd8d5cdb277b26639abfd25a7143 Date: Wed Apr 4 11:23:22 2018 +0200 dead code in AccessibleTextHelper_Impl::UpdateVisibleChildren Change-Id: I78d9d8bca585ecec8394f2c3fe2baa93db0e58f5 Reviewed-on: https://gerrit.libreoffice.org/60912 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/sdpage.cxx8
-rw-r--r--sd/source/core/stlsheet.cxx11
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx20
-rw-r--r--sd/source/ui/docshell/docshell.cxx45
-rw-r--r--sd/source/ui/inc/AccessibleOutlineEditSource.hxx1
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx1
-rw-r--r--sd/source/ui/inc/View.hxx1
-rw-r--r--sd/source/ui/view/sdview.cxx7
8 files changed, 0 insertions, 94 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 5b65ce98bcf9..6a86108e47b2 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1715,14 +1715,6 @@ SdrObject* SdPage::NbcRemoveObject(size_t nObjNum)
// Also override ReplaceObject methods to realize when
// objects are removed with this mechanism instead of RemoveObject
-SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, size_t nObjNum)
-{
- onRemoveObject(GetObj( nObjNum ));
- return FmFormPage::NbcReplaceObject(pNewObj, nObjNum);
-}
-
-// Also override ReplaceObject methods to realize when
-// objects are removed with this mechanism instead of RemoveObject
SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, size_t nObjNum)
{
onRemoveObject(GetObj( nObjNum ));
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 2ee00f3c0c69..c2470057c251 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -160,17 +160,6 @@ OUString const & SdStyleSheet::GetApiName() const
return GetName();
}
-void SdStyleSheet::Load (SvStream& rIn, sal_uInt16 nVersion)
-{
- SfxStyleSheetBase::Load(rIn, nVersion);
-
- /* previously, the default mask was 0xAFFE. The needed flags were masked
- from this mask. Now the flag SfxStyleSearchBits::ReadOnly was introduced and with
- this, all style sheets are read only. Since no style sheet should be read
- only in Draw, we reset the flag here. */
- nMask &= ~SfxStyleSearchBits::ReadOnly;
-}
-
bool SdStyleSheet::SetParent(const OUString& rParentName)
{
bool bResult = false;
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index 703aeedbd6a8..ea004a876ccb 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -121,26 +121,6 @@ namespace accessibility
return false;
}
- ::tools::Rectangle AccessibleOutlineEditSource::GetVisArea() const
- {
- if( IsValid() )
- {
- SdrPaintWindow* pPaintWindow = mrView.FindPaintWindow(mrWindow);
- ::tools::Rectangle aVisArea;
-
- if(pPaintWindow)
- {
- aVisArea = pPaintWindow->GetVisibleArea();
- }
-
- MapMode aMapMode(mrWindow.GetMapMode());
- aMapMode.SetOrigin(Point());
- return mrWindow.LogicToPixel( aVisArea, aMapMode );
- }
-
- return ::tools::Rectangle();
- }
-
Point AccessibleOutlineEditSource::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
{
if( IsValid() && mrView.GetModel() )
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 4bc7339b037e..ef981118f6d3 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -341,51 +341,6 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
}
}
-void DrawDocShell::InPlaceActivate( bool bActive )
-{
- SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(this, false);
- std::vector<std::unique_ptr<FrameView>> &rViews = mpDoc->GetFrameViewList();
-
- if( !bActive )
- {
- rViews.clear();
-
- while (pSfxViewFrame)
- {
- // determine the number of FrameViews
- SfxViewShell* pSfxViewSh = pSfxViewFrame->GetViewShell();
- ViewShell* pViewSh = dynamic_cast<ViewShell*>(pSfxViewSh);
-
- if ( pViewSh && pViewSh->GetFrameView() )
- {
- pViewSh->WriteFrameViewData();
- rViews.push_back( o3tl::make_unique<FrameView>( mpDoc, pViewSh->GetFrameView() ) );
- }
-
- pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false);
- }
- }
-
- SfxObjectShell::InPlaceActivate( bActive );
-
- if( bActive )
- {
- for( std::vector<FrameView*>::size_type i = 0; pSfxViewFrame && (i < rViews.size()); i++ )
- {
- // determine the number of FrameViews
- SfxViewShell* pSfxViewSh = pSfxViewFrame->GetViewShell();
- ViewShell* pViewSh = dynamic_cast<ViewShell*>(pSfxViewSh);
-
- if ( pViewSh )
- {
- pViewSh->ReadFrameViewData( rViews[ i ].get() );
- }
-
- pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false);
- }
- }
-}
-
void DrawDocShell::Activate( bool bMDI)
{
if (bMDI)
diff --git a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
index 8bceeae7878d..f177d05143f3 100644
--- a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
+++ b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
@@ -63,7 +63,6 @@ namespace accessibility
// the view forwarder
virtual bool IsValid() const override;
- virtual ::tools::Rectangle GetVisArea() const override;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override;
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index b11af639a4a4..0c73fdadbc89 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -221,7 +221,6 @@ protected:
bool mbOwnDocument; // if true, we own mpDoc and will delete it in our d'tor
void Construct(bool bClipboard);
- virtual void InPlaceActivate( bool bActive ) override;
private:
static void setEditMode(DrawViewShell* pDrawViewShell, bool isMasterPage);
};
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 1340d2711624..4619b7035234 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 sal_Int32 GetMarkedPointCount() const override;
virtual bool IsPointMarkable(const SdrHdl& rHdl) const override;
virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark=false) override;
virtual void CheckPossibilities() override;
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index c0659cc7bf07..5d753fe4aaa5 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -1144,13 +1144,6 @@ bool View::HasMarkedPoints() const
return FmFormView::HasMarkedPoints();
}
-sal_Int32 View::GetMarkedPointCount() const
-{
- sal_Int32 nCount = FmFormView::GetMarkedPointCount();
- nCount += maSmartTags.GetMarkedPointCount();
- return nCount;
-}
-
bool View::IsPointMarkable(const SdrHdl& rHdl) const
{
if( SmartTagSet::IsPointMarkable( rHdl ) )