diff options
author | Peter Burow <pb@openoffice.org> | 2001-10-12 06:41:55 +0000 |
---|---|---|
committer | Peter Burow <pb@openoffice.org> | 2001-10-12 06:41:55 +0000 |
commit | f85b8909d0870bb96b79b472561bc4892d7b0068 (patch) | |
tree | ec42e4edf2110c0ac1ff4f2614f1672612d78293 /sfx2 | |
parent | e5c6dceeafb44aafadbdea5dcdcab4ce279b22fe (diff) |
fix: #93080# dont use an empty factory
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index af88a854488a..d81a1d84b316 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: newhelp.cxx,v $ * - * $Revision: 1.60 $ + * $Revision: 1.61 $ * - * last change: $Author: gt $ $Date: 2001-10-11 11:20:45 $ + * last change: $Author: pb $ $Date: 2001-10-12 07:41:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -804,7 +804,9 @@ void IndexTabPage_Impl::SetDoubleClickHdl( const Link& rLink ) void IndexTabPage_Impl::SetFactory( const String& rFactory ) { - if ( rFactory != aFactory && rFactory.Len() > 0 ) + DBG_ASSERT( rFactory.Len() > 0, "empty factory" ); + + if ( rFactory != aFactory ) { aFactory = rFactory; ClearIndex(); @@ -1581,15 +1583,18 @@ void SfxHelpIndexWindow_Impl::SetDoubleClickHdl( const Link& rLink ) void SfxHelpIndexWindow_Impl::SetFactory( const String& rFactory, sal_Bool bActive ) { - if ( !pIPage ) - pIPage = new IndexTabPage_Impl( &aTabCtrl ); - pIPage->SetFactory( rFactory ); - if ( !pSPage ) - pSPage = new SearchTabPage_Impl( &aTabCtrl ); - pSPage->SetFactory( rFactory ); - - if ( bActive ) - SetActiveFactory(); + if ( rFactory.Len() > 0 ) + { + if ( !pIPage ) + pIPage = new IndexTabPage_Impl( &aTabCtrl ); + pIPage->SetFactory( rFactory ); + if ( !pSPage ) + pSPage = new SearchTabPage_Impl( &aTabCtrl ); + pSPage->SetFactory( rFactory ); + + if ( bActive ) + SetActiveFactory(); + } } // ----------------------------------------------------------------------- |