LibreOffice Module desktop (master) 1
dp_help.cxx
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
20#include <memory>
21#include <config_features.h>
22
23#include <strings.hrc>
24#include <dp_backend.h>
25#include <dp_misc.h>
26#include "dp_helpbackenddb.hxx"
27#include <dp_ucb.h>
28#include <rtl/uri.hxx>
29#include <osl/file.hxx>
30#include <ucbhelper/content.hxx>
31#include <svl/inettype.hxx>
34#include <o3tl/string_view.hxx>
35
36#if HAVE_FEATURE_XMLHELP
39#endif
40#include <com/sun/star/deployment/DeploymentException.hpp>
41#include <com/sun/star/deployment/ExtensionRemovedException.hpp>
42#include <com/sun/star/ucb/SimpleFileAccess.hpp>
43#include <com/sun/star/util/XMacroExpander.hpp>
44#include <optional>
45#include <string_view>
46
47using namespace ::dp_misc;
48using namespace ::com::sun::star;
49using namespace ::com::sun::star::uno;
50using namespace ::com::sun::star::ucb;
51
53namespace {
54
55
57{
58 class PackageImpl : public ::dp_registry::backend::Package
59 {
60 BackendImpl * getMyBackend() const;
61
62 // Package
63 virtual beans::Optional< beans::Ambiguous<sal_Bool> > isRegistered_(
64 ::osl::ResettableMutexGuard & guard,
65 ::rtl::Reference<AbortChannel> const & abortChannel,
66 Reference<XCommandEnvironment> const & xCmdEnv ) override;
67 virtual void processPackage_(
68 ::osl::ResettableMutexGuard & guard,
69 bool registerPackage,
70 bool startup,
71 ::rtl::Reference<AbortChannel> const & abortChannel,
72 Reference<XCommandEnvironment> const & xCmdEnv ) override;
73
74
75 public:
76 PackageImpl(
78 OUString const & url, OUString const & name,
79 Reference<deployment::XPackageTypeInfo> const & xPackageType,
80 bool bRemoved, OUString const & identifier);
81
82 bool extensionContainsCompiledHelp();
83
84 //XPackage
85 virtual css::beans::Optional< OUString > SAL_CALL getRegistrationDataURL() override;
86 };
87 friend class PackageImpl;
88
89 // PackageRegistryBackend
90 virtual Reference<deployment::XPackage> bindPackage_(
91 OUString const & url, OUString const & mediaType,
92 bool bRemoved, OUString const & identifier,
93 Reference<XCommandEnvironment> const & xCmdEnv ) override;
94
95 void implProcessHelp( PackageImpl * package, bool doRegisterPackage,
96 Reference<ucb::XCommandEnvironment> const & xCmdEnv);
97 void implCollectXhpFiles( const OUString& aDir,
98 std::vector< OUString >& o_rXhpFileVector );
99
100 ::std::optional<HelpBackendDb::Data> readDataFromDb(std::u16string_view url);
101 bool hasActiveEntry(std::u16string_view url);
102 bool activateEntry(std::u16string_view url);
103
104 Reference< ucb::XSimpleFileAccess3 > const & getFileAccess();
105 Reference< ucb::XSimpleFileAccess3 > m_xSFA;
106
107 const Reference<deployment::XPackageTypeInfo> m_xHelpTypeInfo;
108 Sequence< Reference<deployment::XPackageTypeInfo> > m_typeInfos;
109 std::unique_ptr<HelpBackendDb> m_backendDb;
110
111public:
112 BackendImpl( Sequence<Any> const & args,
113 Reference<XComponentContext> const & xComponentContext );
114
115 // XServiceInfo
116 virtual OUString SAL_CALL getImplementationName() override;
117 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
118 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
119
120 // XPackageRegistry
121 virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
122 getSupportedPackageTypes() override;
123 virtual void SAL_CALL packageRemoved(OUString const & url, OUString const & mediaType) override;
124
125};
126
127
128BackendImpl::BackendImpl(
129 Sequence<Any> const & args,
130 Reference<XComponentContext> const & xComponentContext )
131 : PackageRegistryBackend( args, xComponentContext ),
132 m_xHelpTypeInfo( new Package::TypeInfo("application/vnd.sun.star.help",
133 OUString(),
134 DpResId(RID_STR_HELP)
135 ) ),
137{
138 if (transientMode())
139 return;
140
141 OUString dbFile = makeURL(getCachePath(), "backenddb.xml");
142 m_backendDb.reset(
143 new HelpBackendDb(getComponentContext(), dbFile));
144
145 //clean up data folders which are no longer used.
146 //This must not be done in the same process where the help files
147 //are still registers. Only after revoking and restarting OOo the folders
148 //can be removed. This works now, because the extension manager is a singleton
149 //and the backends are only create once per process.
150 std::vector<OUString> folders = m_backendDb->getAllDataUrls();
151 deleteUnusedFolders(folders);
152}
153
154// XServiceInfo
155OUString BackendImpl::getImplementationName()
156{
157 return "com.sun.star.comp.deployment.help.PackageRegistryBackend";
158}
159
160sal_Bool BackendImpl::supportsService( const OUString& ServiceName )
161{
162 return cppu::supportsService(this, ServiceName);
163}
164
165css::uno::Sequence< OUString > BackendImpl::getSupportedServiceNames()
166{
167 return { BACKEND_SERVICE_NAME };
168}
169
170// XPackageRegistry
171
172Sequence< Reference<deployment::XPackageTypeInfo> >
173BackendImpl::getSupportedPackageTypes()
174{
175 return m_typeInfos;
176}
177
178void BackendImpl::packageRemoved(OUString const & url, OUString const & /*mediaType*/)
179{
180 if (m_backendDb)
181 m_backendDb->removeEntry(url);
182}
183
184// PackageRegistryBackend
185
186Reference<deployment::XPackage> BackendImpl::bindPackage_(
187 OUString const & url, OUString const & mediaType_,
188 bool bRemoved, OUString const & identifier,
189 Reference<XCommandEnvironment> const & xCmdEnv )
190{
191 // we don't support auto detection:
192 if (mediaType_.isEmpty())
193 throw lang::IllegalArgumentException(
194 StrCannotDetectMediaType() + url,
195 static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
196
197 OUString type, subType;
199 if (INetContentTypes::parse( mediaType_, type, subType, &params ))
200 {
201 if (type.equalsIgnoreAsciiCase("application"))
202 {
203 OUString name;
204 if (!bRemoved)
205 {
206 ::ucbhelper::Content ucbContent(
207 url, xCmdEnv, getComponentContext() );
208 name = StrTitle::getTitle( ucbContent );
209 }
210
211 if (subType.equalsIgnoreAsciiCase( "vnd.sun.star.help"))
212 {
213 return new PackageImpl(
214 this, url, name, m_xHelpTypeInfo, bRemoved,
215 identifier);
216 }
217 }
218 }
219 throw lang::IllegalArgumentException(
220 StrUnsupportedMediaType() + mediaType_,
221 static_cast<OWeakObject *>(this),
222 static_cast<sal_Int16>(-1) );
223}
224
225::std::optional<HelpBackendDb::Data> BackendImpl::readDataFromDb(
226 std::u16string_view url)
227{
228 ::std::optional<HelpBackendDb::Data> data;
229 if (m_backendDb)
230 data = m_backendDb->getEntry(url);
231 return data;
232}
233
234bool BackendImpl::hasActiveEntry(std::u16string_view url)
235{
236 if (m_backendDb)
237 return m_backendDb->hasActiveEntry(url);
238 return false;
239}
240
241bool BackendImpl::activateEntry(std::u16string_view url)
242{
243 if (m_backendDb)
244 return m_backendDb->activateEntry(url);
245 return false;
246}
247
248
249BackendImpl::PackageImpl::PackageImpl(
251 OUString const & url, OUString const & name,
252 Reference<deployment::XPackageTypeInfo> const & xPackageType,
253 bool bRemoved, OUString const & identifier)
254 : Package( myBackend, url, name, name, xPackageType, bRemoved,
256{
257}
258
259// Package
260BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
261{
262 BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
263 if (nullptr == pBackend)
264 {
265 //May throw a DisposedException
266 check();
267 //We should never get here...
268 throw RuntimeException("Failed to get the BackendImpl",
269 static_cast<OWeakObject*>(const_cast<PackageImpl *>(this)));
270 }
271 return pBackend;
272}
273
274bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
275{
276 bool bCompiled = true;
277 OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl(getURL());
278
279 ::osl::Directory helpFolder(aExpandedHelpURL);
280 if ( helpFolder.open() == ::osl::File::E_None)
281 {
282 //iterate over the contents of the help folder
283 //We assume that all folders within the help folder contain language specific
284 //help files. If just one of them does not contain compiled help then this
285 //function returns false.
286 ::osl::DirectoryItem item;
287 ::osl::File::RC errorNext = ::osl::File::E_None;
288 while ((errorNext = helpFolder.getNextItem(item)) == ::osl::File::E_None)
289 {
290 //No find the language folders
291 ::osl::FileStatus stat(osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |osl_FileStatus_Mask_FileURL);
292 if (item.getFileStatus(stat) == ::osl::File::E_None)
293 {
294 if (stat.getFileType() != ::osl::FileStatus::Directory)
295 continue;
296
297 //look if there is the folder help.idxl in the language folder
298 OUString compUrl(stat.getFileURL() + "/help.idxl");
299 ::osl::Directory compiledFolder(compUrl);
300 if (compiledFolder.open() != ::osl::File::E_None)
301 {
302 bCompiled = false;
303 break;
304 }
305 }
306 else
307 {
308 //Error
309 OSL_ASSERT(false);
310 bCompiled = false;
311 break;
312 }
313 }
314 if (errorNext != ::osl::File::E_NOENT
315 && errorNext != ::osl::File::E_None)
316 {
317 //Error
318 OSL_ASSERT(false);
319 bCompiled = false;
320 }
321 }
322 return bCompiled;
323}
324
325
326beans::Optional< beans::Ambiguous<sal_Bool> >
327BackendImpl::PackageImpl::isRegistered_(
328 ::osl::ResettableMutexGuard &,
330 Reference<XCommandEnvironment> const & )
331{
332 BackendImpl * that = getMyBackend();
333
334 bool bReg = false;
335 if (that->hasActiveEntry(getURL()))
336 bReg = true;
337
338 return beans::Optional< beans::Ambiguous<sal_Bool> >( true, beans::Ambiguous<sal_Bool>( bReg, false ) );
339}
340
341
342void BackendImpl::PackageImpl::processPackage_(
343 ::osl::ResettableMutexGuard &,
344 bool doRegisterPackage,
345 bool /* startup */,
347 Reference<XCommandEnvironment> const & xCmdEnv )
348{
349 BackendImpl* that = getMyBackend();
350 that->implProcessHelp( this, doRegisterPackage, xCmdEnv);
351}
352
353beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
354{
355 if (m_bRemoved)
356 throw deployment::ExtensionRemovedException();
357
358 ::std::optional<HelpBackendDb::Data> data =
359 getMyBackend()->readDataFromDb(getURL());
360
361 if (data && getMyBackend()->hasActiveEntry(getURL()))
362 return beans::Optional<OUString>(true, data->dataUrl);
363
364 return beans::Optional<OUString>(true, OUString());
365}
366
367void BackendImpl::implProcessHelp(
368 PackageImpl * package, bool doRegisterPackage,
369 Reference<ucb::XCommandEnvironment> const & xCmdEnv)
370{
371 Reference< deployment::XPackage > xPackage(package);
372 OSL_ASSERT(xPackage.is());
373 if (doRegisterPackage)
374 {
375 //revive already processed help if possible
376 if ( !activateEntry(xPackage->getURL()))
377 {
378 HelpBackendDb::Data data;
379 data.dataUrl = xPackage->getURL();
380 if (!package->extensionContainsCompiledHelp())
381 {
382#if HAVE_FEATURE_XMLHELP
383 const OUString sHelpFolder = createFolder(xCmdEnv);
384 data.dataUrl = sHelpFolder;
385
386 Reference< ucb::XSimpleFileAccess3 > xSFA = getFileAccess();
387 OUString aHelpURL = xPackage->getURL();
388 OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL );
389 if( !xSFA->isFolder( aExpandedHelpURL ) )
390 {
391 OUString aErrStr = DpResId( RID_STR_HELPPROCESSING_GENERAL_ERROR ) +
392 "No help folder";
393 OWeakObject* oWeakThis = this;
394 throw deployment::DeploymentException( OUString(), oWeakThis,
395 Any( uno::Exception( aErrStr, oWeakThis ) ) );
396 }
397
398 // Scan languages
399 Sequence< OUString > aLanguageFolderSeq = xSFA->getFolderContents( aExpandedHelpURL, true );
400 sal_Int32 nLangCount = aLanguageFolderSeq.getLength();
401 const OUString* pSeq = aLanguageFolderSeq.getConstArray();
402 for( sal_Int32 iLang = 0 ; iLang < nLangCount ; ++iLang )
403 {
404 OUString aLangURL = pSeq[iLang];
405 if( xSFA->isFolder( aLangURL ) )
406 {
407 std::vector< OUString > aXhpFileVector;
408
409 // calculate jar file URL
410 sal_Int32 indexStartSegment = aLangURL.lastIndexOf('/');
411 // for example "/en"
412 OUString langFolderURLSegment(
413 aLangURL.copy(
414 indexStartSegment + 1, aLangURL.getLength() - indexStartSegment - 1));
415
416 //create the folder in the "temporary folder"
417 ::ucbhelper::Content langFolderContent;
418 const OUString langFolderDest = makeURL(sHelpFolder, langFolderURLSegment);
419 const OUString langFolderDestExpanded = ::dp_misc::expandUnoRcUrl(langFolderDest);
421 &langFolderContent,
422 langFolderDest, xCmdEnv);
423
424 static constexpr OUStringLiteral aHelpStr(u"help");
425
426 OUString aJarFile(
427 makeURL(sHelpFolder, langFolderURLSegment + "/" + aHelpStr + ".jar"));
428 aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
429
430 OUString aEncodedJarFilePath = rtl::Uri::encode(
431 aJarFile, rtl_UriCharClassPchar,
432 rtl_UriEncodeIgnoreEscapes,
433 RTL_TEXTENCODING_UTF8 );
434 OUString aDestBasePath = "vnd.sun.star.zip://" +
435 aEncodedJarFilePath + "/" ;
436
437 sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
438
439 Sequence< OUString > aSubLangSeq = xSFA->getFolderContents( aLangURL, true );
440 sal_Int32 nSubLangCount = aSubLangSeq.getLength();
441 const OUString* pSubLangSeq = aSubLangSeq.getConstArray();
442 for( sal_Int32 iSubLang = 0 ; iSubLang < nSubLangCount ; ++iSubLang )
443 {
444 OUString aSubFolderURL = pSubLangSeq[iSubLang];
445 if( !xSFA->isFolder( aSubFolderURL ) )
446 continue;
447
448 implCollectXhpFiles( aSubFolderURL, aXhpFileVector );
449
450 // Copy to package (later: move?)
451 std::u16string_view aPureFolderName = aSubFolderURL.subView( nLenLangFolderURL );
452 OUString aDestPath = aDestBasePath + aPureFolderName;
453 xSFA->copy( aSubFolderURL, aDestPath );
454 }
455
456 // Call compiler
457 sal_Int32 nXhpFileCount = aXhpFileVector.size();
458 std::unique_ptr<OUString[]> pXhpFiles(new OUString[nXhpFileCount]);
459 for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
460 {
461 OUString aXhpFile = aXhpFileVector[iXhp];
462 OUString aXhpRelFile = aXhpFile.copy( nLenLangFolderURL );
463 pXhpFiles[iXhp] = aXhpRelFile;
464 }
465
466 OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() );
467 OUString aOfficeHelpPathFileURL;
468 ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
469
470 HelpProcessingErrorInfo aErrorInfo;
471 bool bSuccess = compileExtensionHelp(
472 aOfficeHelpPathFileURL, aHelpStr, aLangURL,
473 nXhpFileCount, pXhpFiles.get(),
474 langFolderDestExpanded, aErrorInfo );
475
476 pXhpFiles.reset();
477
478 if( bSuccess )
479 {
480 OUString aLang;
481 sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
482 if( nLastSlash != -1 )
483 aLang = aLangURL.copy( nLastSlash + 1 );
484 else
485 aLang = "en";
486
487 HelpIndexer aIndexer(aLang, "help", langFolderDestExpanded, langFolderDestExpanded);
488 aIndexer.indexDocuments();
489 }
490
491 if( !bSuccess )
492 {
493 TranslateId pErrStrId;
494 switch( aErrorInfo.m_eErrorClass )
495 {
496 case HelpProcessingErrorClass::General: pErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
497 case HelpProcessingErrorClass::XmlParsing: pErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
498 default: ;
499 };
500
501 OUString aErrStr;
502 if (pErrStrId)
503 {
504 aErrStr = DpResId(pErrStrId);
505
506 // Remove CR/LF
507 OUString aErrMsg( aErrorInfo.m_aErrorMsg );
508 sal_Unicode const nCR = 13, nLF = 10;
509 sal_Int32 nSearchCR = aErrMsg.indexOf( nCR );
510 sal_Int32 nSearchLF = aErrMsg.indexOf( nLF );
511 if( nSearchCR != -1 || nSearchLF != -1 )
512 {
513 sal_Int32 nCopy;
514 if( nSearchCR == -1 )
515 nCopy = nSearchLF;
516 else if( nSearchLF == -1 )
517 nCopy = nSearchCR;
518 else
519 nCopy = ( nSearchCR < nSearchLF ) ? nSearchCR : nSearchLF;
520
521 aErrMsg = aErrMsg.copy( 0, nCopy );
522 }
523 aErrStr += aErrMsg;
524 if (pErrStrId != RID_STR_HELPPROCESSING_XMLPARSING_ERROR && !aErrorInfo.m_aXMLParsingFile.isEmpty() )
525 {
526 aErrStr += " in ";
527
528 OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
529 rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
530 aErrStr += aDecodedFile;
531 if( aErrorInfo.m_nXMLParsingLine != -1 )
532 {
533 aErrStr += ", line " +
534 OUString::number( aErrorInfo.m_nXMLParsingLine );
535 }
536 }
537 }
538
539 OWeakObject* oWeakThis = this;
540 throw deployment::DeploymentException( OUString(), oWeakThis,
541 Any( uno::Exception( aErrStr, oWeakThis ) ) );
542 }
543 }
544 }
545#else
546 (void) xCmdEnv;
547#endif
548 }
549 // Writing the data entry replaces writing the flag file. If we got to this
550 // point the registration was successful.
551 if (m_backendDb)
552 m_backendDb->addEntry(xPackage->getURL(), data);
553 }
554 } //if (doRegisterPackage)
555 else
556 {
557 if (m_backendDb)
558 m_backendDb->revokeEntry(xPackage->getURL());
559 }
560}
561
562void BackendImpl::implCollectXhpFiles( const OUString& aDir,
563 std::vector< OUString >& o_rXhpFileVector )
564{
565 Reference< ucb::XSimpleFileAccess3 > xSFA = getFileAccess();
566
567 // Scan xhp files recursively
568 Sequence< OUString > aSeq = xSFA->getFolderContents( aDir, true );
569 sal_Int32 nCount = aSeq.getLength();
570 const OUString* pSeq = aSeq.getConstArray();
571 for( sal_Int32 i = 0 ; i < nCount ; ++i )
572 {
573 OUString aURL = pSeq[i];
574 if( xSFA->isFolder( aURL ) )
575 {
576 implCollectXhpFiles( aURL, o_rXhpFileVector );
577 }
578 else
579 {
580 sal_Int32 nLastDot = aURL.lastIndexOf( '.' );
581 if( nLastDot != -1 )
582 {
583 std::u16string_view aExt = aURL.subView( nLastDot + 1 );
584 if( o3tl::equalsIgnoreAsciiCase( aExt, u"xhp" ) )
585 o_rXhpFileVector.push_back( aURL );
586 }
587 }
588 }
589}
590
591Reference< ucb::XSimpleFileAccess3 > const & BackendImpl::getFileAccess()
592{
593 if( !m_xSFA.is() )
594 {
595 Reference<XComponentContext> const & xContext = getComponentContext();
596 if( xContext.is() )
597 {
599 }
600 if( !m_xSFA.is() )
601 {
602 throw RuntimeException(
603 "dp_registry::backend::help::BackendImpl::getFileAccess(), "
604 "could not instantiate SimpleFileAccess." );
605 }
606 }
607 return m_xSFA;
608}
609
610} // anon namespace
611
612} // namespace dp_registry
613
614extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
616 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& args)
617{
618 return cppu::acquire(new dp_registry::backend::help::BackendImpl(args, context));
619}
620
621/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool compileExtensionHelp(const OUString &aOfficeHelpPath, std::u16string_view aExtensionName, std::u16string_view aExtensionLanguageRoot, sal_Int32 nXhpFileCount, const OUString *pXhpFiles, std::u16string_view aDestination, HelpProcessingErrorInfo &o_rHelpProcessingErrorInfo)
static bool parse(OUString const &rMediaType, OUString &rType, OUString &rSubType, INetContentTypeParameterList *pParameters=nullptr)
int nCount
URL aURL
Sequence< Reference< deployment::XPackageTypeInfo > > m_typeInfos
Definition: dp_help.cxx:108
const Reference< deployment::XPackageTypeInfo > m_xHelpTypeInfo
Definition: dp_help.cxx:107
Reference< ucb::XSimpleFileAccess3 > m_xSFA
Definition: dp_help.cxx:105
std::unique_ptr< HelpBackendDb > m_backendDb
Definition: dp_help.cxx:109
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &args)
Definition: dp_help.cxx:615
OUString DpResId(TranslateId aId)
Definition: dp_misc.cxx:555
const char * name
std::unordered_map< OString, INetContentTypeParameter > INetContentTypeParameterList
static uno::Reference< css::uno::XComponentContext > xContext
Definition: init.cxx:2642
Sequence< sal_Int8 > aSeq
Reference< XComponentContext > getComponentContext(Reference< XMultiServiceFactory > const &factory)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
OUString makeURL(std::u16string_view baseURL, OUString const &relPath_)
appends a relative path to a url.
Definition: dp_misc.cxx:253
DESKTOP_DEPLOYMENTMISC_DLLPUBLIC bool create_folder(::ucbhelper::Content *ucb_content, OUString const &url, css::uno::Reference< css::ucb::XCommandEnvironment > const &xCmdEnv, bool throw_exc=true)
OUString expandUnoRcUrl(OUString const &url)
Definition: dp_misc.cxx:315
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
constexpr OUStringLiteral BACKEND_SERVICE_NAME
Definition: dp_backend.h:41
int i
def check(model)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
args
::boost::spirit::classic::rule< ScannerT > identifier
HelpProcessingErrorClass m_eErrorClass
unsigned char sal_Bool
sal_uInt16 sal_Unicode
ResultType type