Update ooo320-m1
[ooovba.git] / sfx2 / inc / sfxhelp.hxx
blob261b9f895b16355061b323ca152c3d2da7be7abe
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: sfxhelp.hxx,v $
10 * $Revision: 1.21 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SFX_HELP_HXX
31 #define _SFX_HELP_HXX
33 #include "sal/config.h"
34 #include "sfx2/dllapi.h"
35 #include "sal/types.h"
36 #include <vcl/help.hxx>
37 #include <tools/string.hxx>
39 class SfxHelp_Impl;
40 class SfxFrame;
41 class SFX2_DLLPUBLIC SfxHelp : public Help
43 String aTicket; // for Plugins
44 String aUser;
45 String aLanguageStr;
46 String aCountryStr;
47 sal_Bool bIsDebug;
48 SfxHelp_Impl* pImp;
50 private:
51 SAL_DLLPRIVATE virtual BOOL Start( ULONG nHelpId, const Window* pWindow );
52 SAL_DLLPRIVATE virtual BOOL Start( const String& rURL, const Window* pWindow );
54 SAL_DLLPRIVATE String GetHelpModuleName_Impl();
55 SAL_DLLPRIVATE String CreateHelpURL_Impl( ULONG nHelpId, const String& rModuleName );
56 SAL_DLLPRIVATE String CreateHelpURL_Impl( const String& aCommandURL, const String& rModuleName );
58 public:
59 SfxHelp();
60 ~SfxHelp();
62 inline void SetTicket( const String& rTicket ) { aTicket = rTicket; }
63 inline void SetUser( const String& rUser ) { aUser = rUser; }
65 virtual XubString GetHelpText( ULONG nHelpId, const Window* pWindow );
66 virtual XubString GetHelpText( const String&, const Window* pWindow );
68 static String CreateHelpURL( ULONG nHelpId, const String& rModuleName );
69 static String CreateHelpURL( const String& aCommandURL, const String& rModuleName );
70 static void OpenHelpAgent( SfxFrame* pFrame, ULONG nHelpId );
71 static String GetDefaultHelpModule();
72 static ::rtl::OUString GetCurrentModuleIdentifier();
75 #endif // #ifndef _SFX_HELP_HXX