summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-05 13:24:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-06-05 13:49:23 +0100
commit3d1043f6409b4c5690874c3d9cea96c08f449e88 (patch)
treebb4436976f6c2faf2eefa69fde9e0cd027b44156 /sfx2
parentb46276e6c02b22441f87b2bf689e2aa61f806688 (diff)
the only thing that calls ActivateNextChild_Impl is itself
Change-Id: Idcc1971716e42b67739ee7e367e9dfdd835afc32
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/workwin.cxx114
-rw-r--r--sfx2/source/dialog/splitwin.cxx55
-rw-r--r--sfx2/source/inc/splitwin.hxx1
-rw-r--r--sfx2/source/inc/workwin.hxx1
4 files changed, 0 insertions, 171 deletions
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<sal_uInt16> aList;
- for ( size_t i=SFX_OBJECTBAR_MAX; i<aChildren.size(); i++)
- {
- SfxChild_Impl *pCli = aChildren[i];
- if ( pCli && pCli->bCanGetFocus && pCli->pWin )
- {
- sal_uInt16 k;
- for (k=0; k<aList.size(); k++)
- if ( ChildTravelValue( aChildren[aList[k]]->eAlign) > 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; i<aList.size(); i++ )
- {
- SfxChild_Impl* pCli = aChildren[aList[i]];
- if ( pCli->pWin && 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; n<aList.size(); n++ )
- {
- SfxChild_Impl* pCli = aChildren[aList[n]];
- if ( pCli && pCli->pWin && ( 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; i<SFX_SPLITWINDOWS_MAX; i++ )
- {
- // Maybe the pNext is a Splitwindow
- SfxSplitWindow *p = pSplit[i];
- if ( pAct->pWin == 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; n<SFX_SPLITWINDOWS_MAX; n++ )
- {
- // Maybe the pNext is a Splitwindow
- SfxSplitWindow *p = pSplit[i];
- if ( pNext->pWin == 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; n<nCount; n++ )
- {
- const SfxDock_Impl& rD = (*pDockArr)[n];
- if ( rD.pWin && rD.pWin->HasChildPathFocus() )
- 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; nNext<nCount; nNext++ )
- {
- const SfxDock_Impl& rD = (*pDockArr)[nNext];
- if ( rD.pWin )
- {
- rD.pWin->GrabFocus();
- 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<vcl::Window> GetActiveChild_Impl() const { return pActiveChild; }
- bool ActivateNextChild_Impl( bool bForward = true );
bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const;
// Methods for StatusBar