20#include <config_folders.h>
22#include <officecfg/Office/Common.hxx>
23#include <officecfg/Setup.hxx>
24#include <com/sun/star/container/XContainer.hpp>
25#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
26#include <com/sun/star/uno/XComponentContext.hpp>
45ContentProvider::ContentProvider(
const uno::Reference< uno::XComponentContext >& rxContext )
47 , isInitialized( false )
52ContentProvider::~ContentProvider()
60 return "CHelpContentProvider";
69uno::Sequence< OUString > SAL_CALL
72 return {
"com.sun.star.help.XMLHelp",
"com.sun.star.ucb.HelpContentProvider" };
78uno::Reference< ucb::XContent > SAL_CALL
80 const uno::Reference< ucb::XContentIdentifier >& xCanonicId )
82 if ( !xCanonicId->getContentProviderScheme()
85 throw ucb::IllegalIdentifierException();
89 osl::MutexGuard aGuard( m_aMutex );
95 throw uno::RuntimeException();
98 uno::Reference< ucb::XContent > xContent
99 = queryExistingContent( xCanonicId );
106 registerNewContent( xContent );
110 if ( !xContent->getIdentifier().is() )
111 throw ucb::IllegalIdentifierException();
133 Event.Accessor >>= accessor;
134 if(accessor !=
"HelpStyleSheet")
137 OUString replacedElement,element;
138 Event.ReplacedElement >>= replacedElement;
139 Event.Element >>= element;
141 if(replacedElement == element)
154 officecfg::Office::Common::Path::Current::Help::get());
155 if( instPath.isEmpty() )
157 instPath =
"$(instpath)/" LIBO_SHARE_HELP_FOLDER;
162 officecfg::Office::Common::Help::HelpStyleSheet::get());
166 officecfg::Office::Common::Help::get(),
167 css::uno::UNO_QUERY_THROW);
170 OUString setupversion(
171 officecfg::Setup::Product::ooSetupVersion::get());
172 OUString setupextension(
173 officecfg::Setup::Product::ooSetupExtension::get());
174 OUString productversion( setupversion +
" " + setupextension );
176 bool showBasic = officecfg::Office::Common::Help::ShowBasic::get();
191extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
193 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const&)
Reference< XComponentContext > m_xContext
OUString SubstituteVariable(const OUString &rVar) const
std::unique_ptr< Databases > m_pDatabases
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier) override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
static void subst(OUString &instpath)
css::uno::Reference< css::container::XContainer > m_xContainer
static OUString getProductName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * CHelpContentProvider_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)