summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/newhelp.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-01-25 13:47:34 +0000
committerOliver Bolte <obo@openoffice.org>2005-01-25 13:47:34 +0000
commit7e11653b6a5e825d003828d96298e0368a98a168 (patch)
tree663e3f21f2377fbcdaf65f734e439fef67738964 /sfx2/source/appl/newhelp.cxx
parent64a0d1f116f294f77a68d9910e3d08da1322da2c (diff)
INTEGRATION: CWS pbbeta06 (1.104.34); FILE MERGED
2005/01/14 09:00:31 pb 1.104.34.1: fix: #i38481# don't set invalid (shared,schart) factories
Diffstat (limited to 'sfx2/source/appl/newhelp.cxx')
-rw-r--r--sfx2/source/appl/newhelp.cxx31
1 files changed, 23 insertions, 8 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 942715d5f2b3..083f5ef43e19 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: newhelp.cxx,v $
*
- * $Revision: 1.104 $
+ * $Revision: 1.105 $
*
- * last change: $Author: kz $ $Date: 2004-12-16 12:36:57 $
+ * last change: $Author: obo $ $Date: 2005-01-25 14:47:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -281,7 +281,6 @@ extern void AppendConfigToken_Impl( String& rURL, sal_Bool bQuestionMark ); // s
#define CONFIGNAME_INDEXWIN DEFINE_CONST_UNICODE("OfficeHelpIndex")
#define CONFIGNAME_SEARCHPAGE DEFINE_CONST_UNICODE("OfficeHelpSearch")
#define IMAGE_URL DEFINE_CONST_UNICODE("private:factory/")
-#define SHARED_FACTORY DEFINE_CONST_UNICODE("shared")
#define PROPERTY_KEYWORDLIST DEFINE_CONST_OUSTRING("KeywordList")
#define PROPERTY_KEYWORDREF DEFINE_CONST_OUSTRING("KeywordRef")
@@ -683,7 +682,6 @@ IndexTabPage_Impl::IndexTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl*
aIndexCB ( this, ResId( CB_INDEX ) ),
aOpenBtn ( this, ResId( PB_OPEN_INDEX ) ),
- sSharedFactory ( SHARED_FACTORY ),
bIsActivated ( sal_False )
{
@@ -961,15 +959,15 @@ void IndexTabPage_Impl::SetFactory( const String& rFactory )
{
String sNewFactory( rFactory );
DBG_ASSERT( sNewFactory.Len() > 0, "empty factory" );
- bool bShared = ( sNewFactory == sSharedFactory );
+ bool bValid = m_pIdxWin->IsValidFactory( rFactory );
- if ( sFactory.Len() == 0 && bShared )
+ if ( sFactory.Len() == 0 && !bValid )
{
sNewFactory = SfxHelp::GetDefaultHelpModule();
- bShared = false;
+ bValid = true;
}
- if ( sNewFactory != sFactory && !bShared )
+ if ( sNewFactory != sFactory && bValid )
{
sFactory = sNewFactory;
ClearIndex();
@@ -2052,6 +2050,23 @@ void SfxHelpIndexWindow_Impl::AddBookmarks( const String& rTitle, const String&
// -----------------------------------------------------------------------
+bool SfxHelpIndexWindow_Impl::IsValidFactory( const String& _rFactory )
+{
+ bool bValid = false;
+ for ( USHORT i = 0; i < aActiveLB.GetEntryCount(); ++i )
+ {
+ String* pFactory = (String*)(ULONG)aActiveLB.GetEntryData(i);
+ if ( *pFactory == _rFactory )
+ {
+ bValid = true;
+ break;
+ }
+ }
+ return bValid;
+}
+
+// -----------------------------------------------------------------------
+
void SfxHelpIndexWindow_Impl::ClearSearchPage()
{
if ( pSPage )