diff options
author | Peter Burow <pb@openoffice.org> | 2000-12-19 11:10:02 +0000 |
---|---|---|
committer | Peter Burow <pb@openoffice.org> | 2000-12-19 11:10:02 +0000 |
commit | bc2838001497285ee8807326779be5e2a4f4ccf4 (patch) | |
tree | 5a230ba754e1dce1584d3396fd62187104b64365 /sfx2 | |
parent | 681b366fee3cdb3ce7bff6dd1d44f118510eebb2 (diff) |
fix: #82284# append Locale and System on all URLs
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 27 | ||||
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 22 |
2 files changed, 41 insertions, 8 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 159ddb560d51..916caf491d80 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: newhelp.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: pb $ $Date: 2000-12-11 12:02:25 $ + * last change: $Author: pb $ $Date: 2000-12-19 12:10:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -130,6 +130,8 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; using namespace com::sun::star::ucb; +extern void AppendConfigToken_Impl( String& rURL, sal_Bool bQuestionMark ); // sfxhelp.cxx + // defines --------------------------------------------------------------- #define SPLITSET_ID 0 @@ -217,6 +219,9 @@ void IndexTabPage_Impl::InitializeIndex() ::rtl::OUString aURL = HELP_URL; ::rtl::OUString _aFactory( aFactory ); aURL += _aFactory; + String aTemp = aURL; + AppendConfigToken_Impl( aTemp, sal_True ); + aURL = aTemp; Content aCnt( aURL, Reference< ::com::sun::star::ucb::XCommandEnvironment > () ); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo = aCnt.getProperties(); if ( xInfo->hasPropertyByName( PROPERTY_KEYWORDLIST ) ) @@ -422,6 +427,7 @@ IMPL_LINK( SearchTabPage_Impl, SearchHdl, PushButton*, EMPTYARG ) aSearchURL += aFactory; aSearchURL += String( HELP_SEARCH_TAG ); aSearchURL += aSearchED.GetText(); + AppendConfigToken_Impl( aSearchURL, sal_False ); Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aSearchURL ); const ::rtl::OUString* pFacs = aFactories.getConstArray(); @@ -538,7 +544,9 @@ SfxHelpIndexWindow_Impl::~SfxHelpIndexWindow_Impl() void SfxHelpIndexWindow_Impl::Initialize() { - Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( HELP_URL ); + String aHelpURL = HELP_URL; + AppendConfigToken_Impl( aHelpURL, sal_True ); + Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aHelpURL ); const ::rtl::OUString* pFacs = aFactories.getConstArray(); UINT32 i, nCount = aFactories.getLength(); for ( i = 0; i < nCount; ++i ) @@ -892,15 +900,21 @@ IMPL_LINK( SfxHelpWindow_Impl, SelectHdl, ToolBox* , pToolBox ) case TBI_START : { + String aStartURL; + aStartURL = HELP_URL; + aStartURL += pIndexWin->GetFactory(); + aStartURL += DEFINE_CONST_UNICODE("/start"); + AppendConfigToken_Impl( aStartURL, sal_True ); + URL aURL; - aURL.Complete = HELP_URL; - aURL.Complete += pIndexWin->GetFactory(); - aURL.Complete += DEFINE_CONST_UNICODE("/start"); + aURL.Complete = aStartURL; PARSE_URL( aURL ); + String aTarget( DEFINE_CONST_UNICODE("_self") ); Reference < XDispatchProvider > xProv( pTextWin->getFrame(), UNO_QUERY ); Reference < XDispatch > xDisp = xProv.is() ? xProv->queryDispatch( aURL, aTarget, 0 ) : Reference < XDispatch >(); + if ( xDisp.is() ) { Sequence < PropertyValue > aArgs( 1 ); @@ -962,6 +976,7 @@ IMPL_LINK( SfxHelpWindow_Impl, OpenHdl, ListBox* , pBox ) aEntry += pIndexWin->GetFactory(); aEntry += '/'; aEntry += *pData; + AppendConfigToken_Impl( aEntry, sal_True ); } URL aURL; aURL.Complete = aEntry; diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 97721b4e568d..93fae595bf4d 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sfxhelp.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: mba $ $Date: 2000-12-15 13:27:25 $ + * last change: $Author: pb $ $Date: 2000-12-19 12:10:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -96,6 +96,10 @@ #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <toolkit/helper/vclunohelper.hxx> +#ifndef INCLUDED_SVTOOLS_HELPOPT_HXX +#include <svtools/helpopt.hxx> +#endif + #include "sfxsids.hrc" #include "app.hxx" #include "viewfrm.hxx" @@ -111,6 +115,19 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; +void AppendConfigToken_Impl( String& rURL, sal_Bool bQuestionMark ) +{ + SvtHelpOptions aHelpOpt; + if ( bQuestionMark ) + rURL += '?'; + else + rURL += '&'; + rURL += DEFINE_CONST_UNICODE("Locale="); + rURL += aHelpOpt.GetLocale(); + rURL += DEFINE_CONST_UNICODE("&System="); + rURL += aHelpOpt.GetSystem(); +} + SfxHelp_Impl::SfxHelp_Impl() { } @@ -186,6 +203,7 @@ BOOL SfxHelp_Impl::Start( ULONG nHelpId ) aHelpURL += '/'; aHelpURL += String::CreateFromInt32( nHelpId ); } + AppendConfigToken_Impl( aHelpURL, sal_True ); if ( aTicket.Len() ) { |