xref: /aoo4110/main/sfx2/inc/sfx2/sfxhelp.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SFX_HELP_HXX
24 #define _SFX_HELP_HXX
25 
26 #include "sal/config.h"
27 #include "sfx2/dllapi.h"
28 #include "sal/types.h"
29 #include <vcl/help.hxx>
30 #include <tools/string.hxx>
31 
32 class SfxHelp_Impl;
33 class SfxFrame;
34 class SFX2_DLLPUBLIC SfxHelp : public Help
35 {
36     String          aTicket;        // for Plugins
37     String          aUser;
38 	String			aLanguageStr;
39 	String			aCountryStr;
40 	sal_Bool		bIsDebug;
41     SfxHelp_Impl*   pImp;
42 
43 private:
44     SAL_DLLPRIVATE sal_Bool Start_Impl( const String& rURL, const Window* pWindow, const String& rKeyword );
45 	SAL_DLLPRIVATE virtual sal_Bool	SearchKeyword( const XubString& rKeyWord );
46     SAL_DLLPRIVATE virtual sal_Bool Start( const String& rURL, const Window* pWindow );
47     SAL_DLLPRIVATE virtual void OpenHelpAgent( const rtl::OString& sHelpId );
48 	SAL_DLLPRIVATE String GetHelpModuleName_Impl();
49 	SAL_DLLPRIVATE String CreateHelpURL_Impl( const String& aCommandURL, const String& rModuleName );
50 
51 public:
52     SfxHelp();
53     ~SfxHelp();
54 
SetTicket(const String & rTicket)55     inline void             SetTicket( const String& rTicket )  { aTicket = rTicket; }
SetUser(const String & rUser)56     inline void             SetUser( const String& rUser )      { aUser = rUser; }
57 
58     virtual XubString       GetHelpText( const String&, const Window* pWindow );
59 
60     static String           CreateHelpURL( const String& aCommandURL, const String& rModuleName );
61     using Help::OpenHelpAgent;
62     static void             OpenHelpAgent( SfxFrame* pFrame, const rtl::OString& sHelpId );
63     static String           GetDefaultHelpModule();
64     static ::rtl::OUString  GetCurrentModuleIdentifier();
65 };
66 
67 #endif // #ifndef _SFX_HELP_HXX
68 
69