diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-23 08:48:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-27 11:48:46 +0200 |
commit | 1534025a0386584a7b8f3f929b10ce5eb33257cf (patch) | |
tree | 7f12dd6763148089cd4fb5495c8fffe84f415e12 /starmath/source | |
parent | 0f2e01677cd0e8857faec99c61d71e88eee78b27 (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 'starmath/source')
-rw-r--r-- | starmath/source/accessibility.cxx | 53 | ||||
-rw-r--r-- | starmath/source/accessibility.hxx | 2 |
2 files changed, 0 insertions, 55 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 6477e6095357..b97dc5a5a6aa 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -807,32 +807,6 @@ bool SmViewForwarder::IsValid() const return rEditAcc.GetEditView() != nullptr; } -tools::Rectangle SmViewForwarder::GetVisArea() const -{ - EditView *pEditView = rEditAcc.GetEditView(); - OutputDevice* pOutDev = pEditView ? pEditView->GetWindow() : nullptr; - - if( pOutDev && pEditView) - { - tools::Rectangle aVisArea = pEditView->GetVisArea(); - - // figure out map mode from edit engine - EditEngine* pEditEngine = pEditView->GetEditEngine(); - - if( pEditEngine ) - { - MapMode aMapMode(pOutDev->GetMapMode()); - aVisArea = OutputDevice::LogicToLogic( aVisArea, - pEditEngine->GetRefMapMode(), - MapMode(aMapMode.GetMapUnit())); - aMapMode.SetOrigin(Point()); - return pOutDev->LogicToPixel( aVisArea, aMapMode ); - } - } - - return tools::Rectangle(); -} - Point SmViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const { EditView *pEditView = rEditAcc.GetEditView(); @@ -1412,33 +1386,6 @@ bool SmEditViewForwarder::IsValid() const return rEditAcc.GetEditView() != nullptr; } -tools::Rectangle SmEditViewForwarder::GetVisArea() const -{ - tools::Rectangle aRect(0,0,0,0); - - EditView *pEditView = rEditAcc.GetEditView(); - OutputDevice* pOutDev = pEditView ? pEditView->GetWindow() : nullptr; - - if( pOutDev && pEditView) - { - tools::Rectangle aVisArea = pEditView->GetVisArea(); - - // figure out map mode from edit engine - EditEngine* pEditEngine = pEditView->GetEditEngine(); - - if( pEditEngine ) - { - MapMode aMapMode(pOutDev->GetMapMode()); - aVisArea = OutputDevice::LogicToLogic( aVisArea, - pEditEngine->GetRefMapMode(), - MapMode(aMapMode.GetMapUnit())); - aMapMode.SetOrigin(Point()); - aRect = pOutDev->LogicToPixel( aVisArea, aMapMode ); - } - } - - return aRect; -} Point SmEditViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const { diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx index 9c669e51f177..8723d61e9309 100644 --- a/starmath/source/accessibility.hxx +++ b/starmath/source/accessibility.hxx @@ -161,7 +161,6 @@ public: virtual ~SmViewForwarder() override; 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; }; @@ -250,7 +249,6 @@ public: 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; |