LibreOffice Module sfx2 (master) 1
sfxhelp.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SFX2_SFXHELP_HXX
20#define INCLUDED_SFX2_SFXHELP_HXX
21
22#include <sal/config.h>
23
24#include <string_view>
25
26#include <rtl/ustring.hxx>
27#include <sfx2/dllapi.h>
28#include <sal/types.h>
29#include <vcl/help.hxx>
30
31class SFX2_DLLPUBLIC SfxHelp final : public Help
32{
34 bool bLaunchingHelp; // tdf#140539 don't allow help to be re-launched during help launch
35
36private:
37 SAL_DLLPRIVATE static bool Start_Impl(const OUString& rURL, weld::Widget* pWidget, const OUString& rKeyword);
38 SAL_DLLPRIVATE virtual void SearchKeyword( const OUString& rKeyWord ) override;
39 SAL_DLLPRIVATE virtual bool Start(const OUString& rURL, weld::Widget* pWidget = nullptr) override;
40 SAL_DLLPRIVATE static OUString GetHelpModuleName_Impl(std::u16string_view rHelpId);
41 SAL_DLLPRIVATE static OUString CreateHelpURL_Impl( const OUString& aCommandURL, const OUString& rModuleName );
42
43 SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const vcl::Window* pWindow );
44 SAL_DLLPRIVATE virtual bool Start( const OUString& rURL, const vcl::Window* pWindow ) override;
45
46public:
47 SfxHelp();
48 virtual ~SfxHelp() override;
49
50 virtual OUString GetHelpText(const OUString&, const vcl::Window* pWindow) override;
51 virtual OUString GetHelpText(const OUString&, const weld::Widget* pWindow) override;
52
53 static OUString CreateHelpURL( const OUString& aCommandURL, const OUString& rModuleName );
54 static OUString GetDefaultHelpModule();
55 static OUString GetCurrentModuleIdentifier();
56 // Check for built-in help
57 static bool IsHelpInstalled();
58
59 static OUString GetURLHelpText(std::u16string_view);
60};
61
62#endif // INCLUDED_SFX2_SFXHELP_HXX
63
64/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool Start(const OUString &rHelpId, weld::Widget *pWidget=nullptr)
virtual void SearchKeyword(const OUString &rKeyWord)
virtual OUString GetHelpText(const OUString &aHelpURL, const weld::Widget *pWidget)
bool bLaunchingHelp
Definition: sfxhelp.hxx:34
bool bIsDebug
Definition: sfxhelp.hxx:33
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29