From 3d1043f6409b4c5690874c3d9cea96c08f449e88 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 5 Jun 2015 13:24:51 +0100 Subject: the only thing that calls ActivateNextChild_Impl is itself Change-Id: Idcc1971716e42b67739ee7e367e9dfdd835afc32 --- sfx2/source/appl/workwin.cxx | 114 ---------------------------------------- sfx2/source/dialog/splitwin.cxx | 55 ------------------- sfx2/source/inc/splitwin.hxx | 1 - sfx2/source/inc/workwin.hxx | 1 - 4 files changed, 171 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index cb431171041c..688cdb5fb2f4 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -2725,120 +2725,6 @@ void SfxWorkWindow::SetActiveChild_Impl( vcl::Window *pChild ) pActiveChild = pChild; } -bool SfxWorkWindow::ActivateNextChild_Impl( bool bForward ) -{ - // Sort all children under list - std::vector aList; - for ( size_t i=SFX_OBJECTBAR_MAX; ibCanGetFocus && pCli->pWin ) - { - sal_uInt16 k; - for (k=0; keAlign) > ChildTravelValue(pCli->eAlign) ) - break; - aList.insert( aList.begin() + k, i ); - } - } - - if ( aList.empty() ) - return false; - - sal_uInt16 nTopValue = ChildTravelValue( SfxChildAlignment::LOWESTTOP ); - for ( size_t i=0; ipWin && ChildTravelValue( pCli->eAlign ) > nTopValue ) - break; - } - - sal_uInt16 n = bForward ? 0 : aList.size()-1; - SfxChild_Impl *pAct=NULL; - if ( pActiveChild ) - { - // Look for the active window - for ( n=0; npWin && ( pCli->pWin == pActiveChild || !pActiveChild ) ) - { - pAct = pCli; - break; - } - } - } - - // dummy entries for the container window - aList.insert( aList.begin(), 0xFFFF ); - aList.push_back( 0xFFFF ); - n = n + 1; - if ( pAct ) - { - for ( sal_uInt16 i=0; ipWin == p ) - { - if( p->ActivateNextChild_Impl( bForward ) ) - return true; - break; - } - } - - // pAct is a direct ChildWindow - // continue with the successor or predecessor of the active window - if ( bForward ) - n = n+1; - else - n = n-1; - - if ( n == 0 || n == aList.size()-1 ) - return false; - } - - for( ;; ) - { - SfxChild_Impl* pCli = aChildren[aList[n]]; - if ( pCli->pWin ) - { - SfxChild_Impl* pNext = pCli; - for ( sal_uInt16 i=0; npWin == p ) - { - // Activate the first/last window - p->SetActiveWindow_Impl( NULL ); - pNext = NULL; - if( p->ActivateNextChild_Impl( bForward ) ) - return true; - break; - } - } - - if ( pNext ) - { - pNext->pWin->GrabFocus(); - pActiveChild = pNext->pWin; - return true; - } - } - - if ( bForward ) - n = n+1; - else - n = n-1; - - if ( n == 0 || n == aList.size()-1 ) - break; - } - - return false; -} - void SfxWorkWindow::DataChanged_Impl( const DataChangedEvent& ) { sal_uInt16 n; diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 1b1b33b810a1..805c8002ebe7 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -1247,61 +1247,6 @@ void SfxSplitWindow::FadeIn() SetFadeIn_Impl( true ); } -bool SfxSplitWindow::ActivateNextChild_Impl( bool bForward ) -{ - // If no pActive, go to first and last window (!bForward is first - // decremented in the loop) - sal_uInt16 nCount = pDockArr->size(); - sal_uInt16 n = bForward ? 0 : nCount; - - // if Focus is within, then move to a window forward or backwards - // if possible - if ( pActive ) - { - // Determine the active window - for ( n=0; nHasChildPathFocus() ) - break; - } - - if ( bForward ) - // up window counter (then when n>nCount, the loop below is - // not entered) - n++; - } - - if ( bForward ) - { - // Search for next window - for ( sal_uInt16 nNext=n; nNextGrabFocus(); - return true; - } - } - } - else - { - // Search for previous window - for ( sal_uInt16 nNext=n; nNext--; ) - { - const SfxDock_Impl& rD = (*pDockArr)[nNext]; - if ( rD.pWin ) - { - rD.pWin->GrabFocus(); - return true; - } - } - } - - return false; -} - void SfxSplitWindow::SetActiveWindow_Impl( SfxDockingWindow* pWin ) { pActive = pWin; diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx index bc21c05853a9..4c2ab46d2761 100644 --- a/sfx2/source/inc/splitwin.hxx +++ b/sfx2/source/inc/splitwin.hxx @@ -125,7 +125,6 @@ public: virtual void FadeOut() SAL_OVERRIDE; virtual void FadeIn() SAL_OVERRIDE; void Pin_Impl( bool bPinned ); - bool ActivateNextChild_Impl( bool bForward = true ); void SetActiveWindow_Impl( SfxDockingWindow* pWin ); }; diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx index 9574b67b5147..6fcc88e94890 100644 --- a/sfx2/source/inc/workwin.hxx +++ b/sfx2/source/inc/workwin.hxx @@ -323,7 +323,6 @@ public: bool IsFloating( sal_uInt16 nId ); void SetActiveChild_Impl( vcl::Window *pChild ); VclPtr GetActiveChild_Impl() const { return pActiveChild; } - bool ActivateNextChild_Impl( bool bForward = true ); bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const; // Methods for StatusBar -- cgit