29#include <com/sun/star/task/XJob.hpp>
30#include <com/sun/star/lang/XEventListener.hpp>
31#include <com/sun/star/container/XNameAccess.hpp>
32#include <com/sun/star/frame/XDesktop2.hpp>
33#include <com/sun/star/frame/XModuleManager2.hpp>
34#include <com/sun/star/lang/XServiceInfo.hpp>
35#include <com/sun/star/uno/XComponentContext.hpp>
43class HelpOnStartup final :
public ::cppu::WeakImplHelper< css::lang::XServiceInfo,css::lang::XEventListener,css::task::XJob >
51 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
60 css::uno::Reference< css::container::XNameAccess >
m_xConfig;
81 HelpOnStartup(css::uno::Reference< css::uno::XComponentContext > xContext);
100 virtual css::uno::Any SAL_CALL
execute(
const css::uno::Sequence< css::beans::NamedValue >& lArguments)
override;
103 virtual void SAL_CALL
disposing(
const css::lang::EventObject& aEvent)
override;
183 std::u16string_view sLocale ,
184 std::u16string_view sSystem );
implements a job component, which handle the special feature to show a suitable help page for every (...
HelpOnStartup(css::uno::Reference< css::uno::XComponentContext > xContext)
create new instance of this class.
css::uno::Reference< css::frame::XDesktop2 > m_xDesktop
is needed to locate a might open help frame.
static OUString ist_createHelpURL(std::u16string_view sBaseURL, std::u16string_view sLocale, std::u16string_view sSystem)
create a help URL for the given parameters.
OUString its_checkIfHelpEnabledAndGetURL(const OUString &sModule)
checks, if the help module should be shown automatically for the currently opened office module.
virtual void SAL_CALL disposing(const css::lang::EventObject &aEvent) override
virtual OUString SAL_CALL getImplementationName() override
OUString its_getCurrentHelpURL()
tries to locate the open help module and return the url of the currently shown help content.
OUString m_sSystem
knows the current operating system of this office session, which is needed to build complete help URL...
bool its_isHelpUrlADefaultOne(std::u16string_view sHelpURL)
checks if the given help url match to a default help url of any office module.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::frame::XModuleManager2 > m_xModuleManager
such module manager is used to classify new opened documents.
OUString m_sLocale
knows the current locale of this office session, which is needed to build complete help URLs.
virtual css::uno::Any SAL_CALL execute(const css::uno::Sequence< css::beans::NamedValue > &lArguments) override
virtual ~HelpOnStartup() override
does nothing real ...
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
reference to a uno service manager.
css::uno::Reference< css::container::XNameAccess > m_xConfig
provides read access to the underlying configuration.
OUString its_getModuleIdFromEnv(const css::uno::Sequence< css::beans::NamedValue > &lArguments)
analyze the given job arguments, try to locate a model reference and try to classify this model.