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