LibreOffice Module sfx2 (master) 1
|
#include <config_folders.h>
#include <sfx2/sfxhelp.hxx>
#include <string_view>
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <sal/log.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/UnknownModuleException.hpp>
#include <com/sun/star/frame/XFrame2.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <toolkit/helper/vclunohelper.hxx>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <unotools/configmgr.hxx>
#include <unotools/moduleoptions.hxx>
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <unotools/pathoptions.hxx>
#include <rtl/byteseq.hxx>
#include <rtl/ustring.hxx>
#include <o3tl/string_view.hxx>
#include <officecfg/Office/Common.hxx>
#include <osl/process.h>
#include <osl/file.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/securityoptions.hxx>
#include <rtl/uri.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/keycod.hxx>
#include <vcl/settings.hxx>
#include <vcl/locktoplevels.hxx>
#include <vcl/weld.hxx>
#include <openuriexternally.hxx>
#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <sfx2/viewsh.hxx>
#include "newhelp.hxx"
#include <sfx2/flatpak.hxx>
#include <sfx2/sfxresid.hxx>
#include <helper.hxx>
#include <sfx2/strings.hrc>
#include <vcl/svapp.hxx>
#include <rtl/string.hxx>
#include <svtools/langtab.hxx>
#include <comphelper/diagnose_ex.hxx>
Go to the source code of this file.
Functions | |
IMPL_STATIC_LINK_NOARG (NoHelpErrorBox, HelpRequestHdl, weld::Widget &, bool) | |
static OUString const & | HelpLocaleString () |
Return the locale we prefer for displaying help. More... | |
void | AppendConfigToken (OUStringBuffer &rURL, bool bQuestionMark) |
Appends ?Language=xy&System=abc to the help URL in rURL. More... | |
static bool | GetHelpAnchor_Impl (std::u16string_view _rURL, OUString &_rAnchor) |
static OUString | getDefaultModule_Impl () |
static OUString | getCurrentModuleIdentifier_Impl () |
static SfxHelpWindow_Impl * | impl_createHelp (Reference< XFrame2 > &rHelpTask, Reference< XFrame > &rHelpContent) |
static bool | impl_showOnlineHelp (const OUString &rURL, weld::Widget *pDialogParent) |
Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org. More... | |
static bool | impl_showOfflineHelp (const OUString &rURL, weld::Widget *pDialogParent) |
Variables | |
constexpr OUStringLiteral | SHTML1 = u"<!DOCTYPE HTML><html lang=\"en-US\"><head><meta charset=\"UTF-8\">" |
constexpr OUStringLiteral | SHTML2 = u"<noscript><meta http-equiv=\"refresh\" content=\"0; url='" |
constexpr OUStringLiteral | SHTML3 = u"/noscript.html'\"></noscript><meta http-equiv=\"refresh\" content=\"1; url='" |
constexpr OUStringLiteral | SHTML4 = u"'\"><script type=\"text/javascript\"> window.location.href = \"" |
constexpr OUStringLiteral | SHTML5 = u"\";</script><title>Help Page Redirection</title></head><body></body></html>" |
void AppendConfigToken | ( | OUStringBuffer & | rURL, |
bool | bQuestionMark | ||
) |
Appends ?Language=xy&System=abc to the help URL in rURL.
Definition at line 267 of file sfxhelp.cxx.
References utl::ConfigManager::getProductVersion(), and HelpLocaleString().
Referenced by SfxHelpWindow_Impl::buildHelpURL(), SfxHelp::CreateHelpURL_Impl(), SfxHelpIndexWindow_Impl::Initialize(), IndexTabPage_Impl::InitializeIndex(), SearchTabPage_Impl::Search(), and SfxHelp::Start_Impl().
|
static |
Definition at line 385 of file sfxhelp.cxx.
References Exception, SAL_INFO, and TOOLS_WARN_EXCEPTION.
Referenced by SfxHelp::GetCurrentModuleIdentifier(), SfxHelp::GetHelpModuleName_Impl(), SfxHelp::GetHelpText(), and SfxHelp::Start_Impl().
|
static |
Definition at line 358 of file sfxhelp.cxx.
References SvtModuleOptions::BASIC, SvtModuleOptions::CALC, SvtModuleOptions::CHART, SvtModuleOptions::DATABASE, SvtModuleOptions::DRAW, SvtModuleOptions::IMPRESS, SvtModuleOptions::IsModuleInstalled(), SvtModuleOptions::MATH, SAL_WARN, and SvtModuleOptions::WRITER.
Referenced by SfxHelp::CreateHelpURL_Impl(), SfxHelp::GetDefaultHelpModule(), and SfxHelp::GetHelpModuleName_Impl().
|
static |
Definition at line 288 of file sfxhelp.cxx.
References comphelper::getProcessComponentContext(), ucbhelper::Content::getPropertyValue(), INetURLObject::NONE, and SAL_WARN.
Referenced by SfxHelp::CreateHelpURL_Impl().
|
static |
Return the locale we prefer for displaying help.
Definition at line 201 of file sfxhelp.cxx.
References LanguageTag::getBcp47(), comphelper::LibreOfficeKit::getLanguageTag(), utl::ConfigManager::getProductVersion(), utl::ConfigManager::getUILocale(), comphelper::LibreOfficeKit::isActive(), and u.
Referenced by AppendConfigToken(), and impl_showOfflineHelp().
|
static |
Definition at line 532 of file sfxhelp.cxx.
References Any, VclPtr< class reference_type >::disposeAndClear(), VCLUnoHelper::GetInterface(), VCLUnoHelper::GetWindow(), and SfxResId().
Referenced by SfxHelp::Start_Impl().
|
static |
Definition at line 938 of file sfxhelp.cxx.
References utl::TempFileNamed::CloseStream(), flatpak::createTemporaryHtmlDirectory(), utl::TempFileNamed::EnableKillingFile(), Exception, utl::TempFileNamed::GetStream(), utl::TempFileNamed::GetURL(), HelpLocaleString(), flatpak::isFlatpak(), sfx2::openUriExternally(), SvStream::SetStreamCharSet(), SHTML1, SHTML2, SHTML3, SHTML4, SHTML5, u, and SvStream::WriteUnicodeOrByteText().
Referenced by SfxHelp::Start_Impl().
|
static |
Redirect the vnd.sun.star.help:// urls to http://help.libreoffice.org.
Definition at line 710 of file sfxhelp.cxx.
References SfxViewShell::Current(), Exception, GetpApp(), comphelper::LibreOfficeKit::isActive(), Application::libreOfficeKitViewCallback(), sfx2::openUriExternally(), and u.
Referenced by SfxHelp::Start_Impl().
IMPL_STATIC_LINK_NOARG | ( | NoHelpErrorBox | , |
HelpRequestHdl | , | ||
weld::Widget & | , | ||
bool | |||
) |
Definition at line 112 of file sfxhelp.cxx.
|
constexpr |
Definition at line 931 of file sfxhelp.cxx.
Referenced by impl_showOfflineHelp().
|
constexpr |
Definition at line 932 of file sfxhelp.cxx.
Referenced by impl_showOfflineHelp().
|
constexpr |
Definition at line 933 of file sfxhelp.cxx.
Referenced by impl_showOfflineHelp().
|
constexpr |
Definition at line 934 of file sfxhelp.cxx.
Referenced by impl_showOfflineHelp().
|
constexpr |
Definition at line 935 of file sfxhelp.cxx.
Referenced by impl_showOfflineHelp().