diff options
-rw-r--r-- | extensions/source/bibliography/bibbeam.cxx | 37 | ||||
-rw-r--r-- | extensions/source/bibliography/bibbeam.hxx | 6 | ||||
-rw-r--r-- | extensions/source/bibliography/bibcont.cxx | 30 | ||||
-rw-r--r-- | extensions/source/bibliography/bibcont.hxx | 7 |
4 files changed, 64 insertions, 16 deletions
diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx index e2c4bbca356c..509edbe64854 100644 --- a/extensions/source/bibliography/bibbeam.cxx +++ b/extensions/source/bibliography/bibbeam.cxx @@ -2,9 +2,9 @@ * * $RCSfile: bibbeam.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: fs $ $Date: 2001-10-23 12:05:05 $ + * last change: $Author: gt $ $Date: 2002-04-24 11:54:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -154,6 +154,8 @@ namespace bib void disposeGridWin(); const Reference< awt::XControlContainer >& getControlContainer() const { return m_xControlContainer; } + + virtual void GetFocus(); }; //--------------------------------------------------------------------- @@ -166,6 +168,7 @@ namespace bib //--------------------------------------------------------------------- BibGridwin::~BibGridwin() { + disposeGridWin(); } //--------------------------------------------------------------------- @@ -225,8 +228,12 @@ namespace bib { if ( m_xControl.is() ) { - m_xControlContainer->removeControl( m_xControl ); - m_xControl->dispose(); + Reference< awt::XControl > xDel( m_xControl ); + m_xControl = NULL; + m_xGridWin = NULL; + + m_xControlContainer->removeControl( xDel ); + xDel->dispose(); } } @@ -240,6 +247,13 @@ namespace bib } //--------------------------------------------------------------------- + void BibGridwin::GetFocus() + { + if(m_xGridWin.is()) + m_xGridWin->setFocus(); + } + + //--------------------------------------------------------------------- BibBeamer::BibBeamer( Window* _pParent, BibDataManager* _pDM, WinBits _nStyle ) :SplitWindow( _pParent, _nStyle | WB_NOSPLITDRAW ) ,pDatMan( _pDM ) @@ -273,10 +287,13 @@ namespace bib DELETEZ( pToolBar ); } - if ( pGridWin ) + if( pGridWin ) { - pGridWin->disposeGridWin(); - DELETEZ( pGridWin ); + BibGridwin* pDel = pGridWin; + pGridWin = NULL; + pDel->disposeGridWin(); +// DELETEZ( pGridWin ); + delete pDel; } } @@ -320,6 +337,12 @@ namespace bib } + void BibBeamer::GetFocus() + { + if( pGridWin ) + pGridWin->GrabFocus(); + } + //......................................................................... } // namespace bib //......................................................................... diff --git a/extensions/source/bibliography/bibbeam.hxx b/extensions/source/bibliography/bibbeam.hxx index abeebea88142..d595fdf6cdd0 100644 --- a/extensions/source/bibliography/bibbeam.hxx +++ b/extensions/source/bibliography/bibbeam.hxx @@ -2,9 +2,9 @@ * * $RCSfile: bibbeam.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: fs $ $Date: 2001-10-22 07:31:41 $ + * last change: $Author: gt $ $Date: 2002-04-24 11:54:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,6 +128,8 @@ namespace bib ~BibBeamer(); void SetXController(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > &); + + virtual void GetFocus(); }; //......................................................................... diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 2cdaf408f348..fcae976542e1 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -2,9 +2,9 @@ * * $RCSfile: bibcont.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: os $ $Date: 2000-12-01 12:46:59 $ + * last change: $Author: gt $ $Date: 2002-04-24 11:54:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -119,7 +119,12 @@ BibWindowContainer::BibWindowContainer( Window* pParent,Window* pWin, WinBits nS BibWindowContainer::~BibWindowContainer() { - if(pChild!=NULL) delete pChild; + if( pChild ) + { + Window* pDel = pChild; + pChild = NULL; // prevents GetFocus for child while deleting! + delete pDel; + } } void BibWindowContainer::Resize() @@ -139,6 +144,11 @@ void BibWindowContainer::SetChild(Window* pWin) } } +void BibWindowContainer::GetFocus() +{ + if( pChild ) + pChild->GrabFocus(); +} BibBookContainer::BibBookContainer(Window* pParent,BibDataManager* pDtMn, WinBits nStyle): @@ -160,8 +170,13 @@ BibBookContainer::~BibBookContainer() if ( xBottomFrameRef.is() ) xBottomFrameRef->dispose(); - if(pTopWin) - delete pTopWin; + if( pTopWin ) + { + DockingWindow* pDel = pTopWin; + pTopWin = NULL; // prevents GetFocus for child while deleting! + delete pDel; + } + if(pBottomWin) delete pBottomWin; CloseBibModul(pBibMod); @@ -374,3 +389,8 @@ void BibBookContainer::createBottomFrame(Window* pWin) } +void BibBookContainer::GetFocus() +{ + if( pTopWin ) + pTopWin->GrabFocus(); +} diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx index 99df2a2fc075..8e3d05112ac0 100644 --- a/extensions/source/bibliography/bibcont.hxx +++ b/extensions/source/bibliography/bibcont.hxx @@ -2,9 +2,9 @@ * * $RCSfile: bibcont.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2000-11-14 15:10:26 $ + * last change: $Author: gt $ $Date: 2002-04-24 11:54:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,6 +95,8 @@ class BibWindowContainer: public DockingWindow Window* GetChild(){return pChild;} void SetChild(Window* pWin); + + virtual void GetFocus(); }; class BibBookContainer: public SplitWindow @@ -145,6 +147,7 @@ class BibBookContainer: public SplitWindow void createBottomFrame(Window* pWin); + virtual void GetFocus(); }; #endif |