From 09f77e8ed51fc64fccc6a14e87eed48b2f15a28d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 3 Oct 2019 12:57:10 +0200 Subject: loplugin:unusedmethods Change-Id: I9790d053248ae6bd58ecc026c774014c4e5e04aa Reviewed-on: https://gerrit.libreoffice.org/80115 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/view/viewsh.cxx | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 748d8eefe05b..a6f8567f8aac 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1305,37 +1305,6 @@ void SfxViewShell::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue } -// returns the number of current available shells of spec. type viewing the specified doc. -size_t SfxViewShell::GetActiveShells ( bool bOnlyVisible ) -{ - size_t nShells = 0; - - // search for a SfxViewShell of the specified type - SfxViewShellArr_Impl &rShells = SfxGetpApp()->GetViewShells_Impl(); - SfxViewFrameArr_Impl &rFrames = SfxGetpApp()->GetViewFrames_Impl(); - for (SfxViewShell* pShell : rShells) - { - if ( pShell ) - { - // sometimes dangling SfxViewShells exist that point to a dead SfxViewFrame - // these ViewShells shouldn't be accessible anymore - // a destroyed ViewFrame is not in the ViewFrame array anymore, so checking this array helps - for (SfxViewFrame* pFrame : rFrames) - { - if ( pFrame == pShell->GetViewFrame() ) - { - // only ViewShells with a valid ViewFrame will be returned - if ( !bOnlyVisible || pFrame->IsVisible() ) - ++nShells; - } - } - } - } - - return nShells; -} - - // returns the first shell of spec. type viewing the specified doc. SfxViewShell* SfxViewShell::GetFirst ( -- cgit