LibreOffice Module ucb (master)  1
FileAccess.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 <cppuhelper/exc_hlp.hxx>
22 #include <comphelper/sequence.hxx>
23 #include <cppuhelper/factory.hxx>
24 #include <cppuhelper/implbase.hxx>
26 
27 #include <tools/urlobj.hxx>
28 #include <ucbhelper/content.hxx>
29 #include <unotools/streamwrap.hxx>
30 #include <tools/stream.hxx>
31 
32 #include <com/sun/star/beans/Property.hpp>
33 #include <com/sun/star/container/XChild.hpp>
34 #include <com/sun/star/io/XActiveDataSink.hpp>
35 #include <com/sun/star/io/XActiveDataStreamer.hpp>
36 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #include <com/sun/star/sdbc/XResultSet.hpp>
39 #include <com/sun/star/ucb/ContentCreationException.hpp>
40 #include <com/sun/star/ucb/CommandFailedException.hpp>
41 #include <com/sun/star/ucb/ContentInfo.hpp>
42 #include <com/sun/star/ucb/ContentInfoAttribute.hpp>
43 #include <com/sun/star/ucb/InsertCommandArgument.hpp>
44 #include <com/sun/star/ucb/InteractiveIOException.hpp>
45 #include <com/sun/star/ucb/NameClash.hpp>
46 #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
47 #include <com/sun/star/ucb/OpenMode.hpp>
48 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
49 #include <com/sun/star/ucb/XContent.hpp>
50 #include <com/sun/star/ucb/XContentAccess.hpp>
51 #include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
52 #include <com/sun/star/util/theMacroExpander.hpp>
53 
54 #include <vector>
55 
56 #define SERVICE_NAME "com.sun.star.ucb.SimpleFileAccess"
57 
58 using namespace ::com::sun::star::uno;
59 using namespace ::com::sun::star::lang;
60 using namespace ::com::sun::star::io;
61 using namespace ::com::sun::star::ucb;
62 using namespace ::com::sun::star::sdbc;
63 using namespace ::com::sun::star::task;
64 using namespace ::com::sun::star::util;
65 using namespace ::com::sun::star::beans;
66 using namespace ::com::sun::star::registry;
67 using namespace ::com::sun::star::container;
68 
69 using ::std::vector;
70 
71 namespace
72 {
73 
74 // Implementation XSimpleFileAccess
75 typedef cppu::WeakImplHelper<XSimpleFileAccess3, css::lang::XServiceInfo>
76  FileAccessHelper;
77 class OCommandEnvironment;
78 
79 class OFileAccess : public FileAccessHelper
80 {
83 
87  void transferImpl( const OUString& rSource, const OUString& rDest, bool bMoveData );
89  bool createNewFile( const OUString & rParentURL,
90  const OUString & rTitle,
92 
93 public:
94  explicit OFileAccess( const Reference< XComponentContext > & xContext )
95  : m_xContext( xContext) {}
96  // Methods
97  virtual void SAL_CALL copy( const OUString& SourceURL, const OUString& DestURL ) override;
98  virtual void SAL_CALL move( const OUString& SourceURL, const OUString& DestURL ) override;
99  virtual void SAL_CALL kill( const OUString& FileURL ) override;
100  virtual sal_Bool SAL_CALL isFolder( const OUString& FileURL ) override;
101  virtual sal_Bool SAL_CALL isReadOnly( const OUString& FileURL ) override;
102  virtual void SAL_CALL setReadOnly( const OUString& FileURL, sal_Bool bReadOnly ) override;
103  virtual void SAL_CALL createFolder( const OUString& NewFolderURL ) override;
104  virtual sal_Int32 SAL_CALL getSize( const OUString& FileURL ) override;
105  virtual OUString SAL_CALL getContentType( const OUString& FileURL ) override;
106  virtual css::util::DateTime SAL_CALL getDateTimeModified( const OUString& FileURL ) override;
107  virtual css::uno::Sequence< OUString > SAL_CALL getFolderContents( const OUString& FolderURL, sal_Bool bIncludeFolders ) override;
108  virtual sal_Bool SAL_CALL exists( const OUString& FileURL ) override;
109  virtual css::uno::Reference< css::io::XInputStream > SAL_CALL openFileRead( const OUString& FileURL ) override;
110  virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL openFileWrite( const OUString& FileURL ) override;
111  virtual css::uno::Reference< css::io::XStream > SAL_CALL openFileReadWrite( const OUString& FileURL ) override;
112  virtual void SAL_CALL setInteractionHandler( const css::uno::Reference< css::task::XInteractionHandler >& Handler ) override;
113  virtual void SAL_CALL writeFile( const OUString& FileURL, const css::uno::Reference< css::io::XInputStream >& data ) override;
114  virtual sal_Bool SAL_CALL isHidden( const OUString& FileURL ) override;
115  virtual void SAL_CALL setHidden( const OUString& FileURL, sal_Bool bHidden ) override;
116 
117  OUString SAL_CALL getImplementationName() override
118  { return "com.sun.star.comp.ucb.SimpleFileAccess"; }
119 
120  sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
121  { return cppu::supportsService(this, ServiceName); }
122 
123  css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
124  { return { SERVICE_NAME }; }
125 };
126 
127 // Implementation XActiveDataSink
128 
129 class OActiveDataSink : public cppu::WeakImplHelper< XActiveDataSink >
130 {
131  Reference< XInputStream > mxStream;
132 
133 public:
134 
135  // Methods
136  virtual void SAL_CALL setInputStream( const Reference< XInputStream >& aStream ) override;
137  virtual Reference< XInputStream > SAL_CALL getInputStream( ) override;
138 };
139 
140 // Implementation XActiveDataStreamer
141 
142 class OActiveDataStreamer : public cppu::WeakImplHelper< XActiveDataStreamer >
143 {
144  Reference< XStream > mxStream;
145 
146 public:
147 
148  // Methods
149  virtual void SAL_CALL setStream( const Reference< XStream >& aStream ) override;
150  virtual Reference< XStream > SAL_CALL getStream() override;
151 };
152 
153 // Implementation XCommandEnvironment
154 
155 class OCommandEnvironment : public cppu::WeakImplHelper< XCommandEnvironment >
156 {
158 
159 public:
160  void setHandler( const Reference< XInteractionHandler >& xInteraction_ )
161  {
162  mxInteraction = xInteraction_;
163  }
164 
165  // Methods
166  virtual Reference< XInteractionHandler > SAL_CALL getInteractionHandler() override;
167  virtual Reference< XProgressHandler > SAL_CALL getProgressHandler() override;
168 };
169 
170 void OActiveDataSink::setInputStream( const Reference< XInputStream >& aStream )
171 {
172  mxStream = aStream;
173 }
174 
175 Reference< XInputStream > OActiveDataSink::getInputStream()
176 {
177  return mxStream;
178 }
179 
180 void OActiveDataStreamer::setStream( const Reference< XStream >& aStream )
181 {
182  mxStream = aStream;
183 }
184 
185 Reference< XStream > OActiveDataStreamer::getStream()
186 {
187  return mxStream;
188 }
189 
190 Reference< XInteractionHandler > OCommandEnvironment::getInteractionHandler()
191 {
192  return mxInteraction;
193 }
194 
195 Reference< XProgressHandler > OCommandEnvironment::getProgressHandler()
196 {
198  return xRet;
199 }
200 
201 void OFileAccess::transferImpl( const OUString& rSource,
202  const OUString& rDest,
203  bool bMoveData )
204 {
205  // SfxContentHelper::Transfer_Impl
206  INetURLObject aSourceObj( rSource, INetProtocol::File );
207  INetURLObject aDestObj( rDest, INetProtocol::File );
208  OUString aName = aDestObj.getName(
210  OUString aDestURL;
211  OUString aSourceURL = aSourceObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
212  if ( aDestObj.removeSegment() )
213  {
214  // hierarchical URL.
215 
216  aDestObj.setFinalSlash();
217  aDestURL = aDestObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
218  }
219  else
220  {
221  // non-hierarchical URL
222 
223  // #i29648#
224 
225 
226  if ( aDestObj.GetProtocol() == INetProtocol::VndSunStarExpand )
227  {
228  // Hack: Expand destination URL using Macro Expander and try again
229  // with the hopefully hierarchical expanded URL...
230 
231  try
232  {
233  Reference< XMacroExpander > xExpander = theMacroExpander::get(m_xContext);
234 
235  aDestURL = xExpander->expandMacros(
237  }
238  catch ( Exception const & )
239  {
240  css::uno::Any anyEx = cppu::getCaughtException();
241  throw css::lang::WrappedTargetRuntimeException(
242  "OFileAccess::transferrImpl - Unable to obtain destination folder URL!",
243  static_cast< cppu::OWeakObject * >( this ), anyEx );
244  }
245 
246  transferImpl( rSource, aDestURL, bMoveData );
247  return;
248  }
249 
250  throw RuntimeException(
251  "OFileAccess::transferrImpl - Unable to obtain destination folder URL!",
252  static_cast< cppu::OWeakObject * >( this ) );
253 
254  }
255 
256  ucbhelper::Content aDestPath( aDestURL, mxEnvironment, comphelper::getProcessComponentContext() );
257  ucbhelper::Content aSrc ( aSourceURL, mxEnvironment, comphelper::getProcessComponentContext() );
258 
259  try
260  {
261  aDestPath.transferContent(aSrc,
262  bMoveData
265  aName,
266  css::ucb::NameClash::OVERWRITE);
267  }
268  catch ( css::ucb::CommandFailedException const & )
269  {
270  // Interaction Handler already handled the error that has occurred...
271  }
272 }
273 
274 void OFileAccess::copy( const OUString& SourceURL, const OUString& DestURL )
275 {
276  transferImpl( SourceURL, DestURL, false );
277 }
278 
279 void OFileAccess::move( const OUString& SourceURL, const OUString& DestURL )
280 {
281  transferImpl( SourceURL, DestURL, true );
282 }
283 
284 void OFileAccess::kill( const OUString& FileURL )
285 {
286  // SfxContentHelper::Kill
287  INetURLObject aDeleteObj( FileURL, INetProtocol::File );
289  try
290  {
291  aCnt.executeCommand( "delete", makeAny( true ) );
292  }
293  catch ( css::ucb::CommandFailedException const & )
294  {
295  // Interaction Handler already handled the error that has occurred...
296  }
297 }
298 
299 sal_Bool OFileAccess::isFolder( const OUString& FileURL )
300 {
301  bool bRet = false;
302  try
303  {
304  INetURLObject aURLObj( FileURL, INetProtocol::File );
306  bRet = aCnt.isFolder();
307  }
308  catch (const Exception &) {}
309  return bRet;
310 }
311 
312 sal_Bool OFileAccess::isReadOnly( const OUString& FileURL )
313 {
314  INetURLObject aURLObj( FileURL, INetProtocol::File );
316  Any aRetAny = aCnt.getPropertyValue("IsReadOnly");
317  bool bRet = false;
318  aRetAny >>= bRet;
319  return bRet;
320 }
321 
322 void OFileAccess::setReadOnly( const OUString& FileURL, sal_Bool bReadOnly )
323 {
324  INetURLObject aURLObj( FileURL, INetProtocol::File );
326  aCnt.setPropertyValue("IsReadOnly", Any(bReadOnly) );
327 }
328 
329 void OFileAccess::createFolder( const OUString& NewFolderURL )
330 {
331  // Does the folder already exist?
332  if( NewFolderURL.isEmpty() || isFolder( NewFolderURL ) )
333  return;
334 
335  // SfxContentHelper::MakeFolder
336  INetURLObject aURL( NewFolderURL, INetProtocol::File );
338  if ( !aTitle.isEmpty() )
339  {
340  aURL.removeSegment();
341 
342  // Does the base folder exist? Otherwise create it first
343  OUString aBaseFolderURLStr = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
344  if( !isFolder( aBaseFolderURLStr ) )
345  {
346  createFolder( aBaseFolderURLStr );
347  }
348  }
349 
351 
352  const Sequence< ContentInfo > aInfo = aCnt.queryCreatableContentsInfo();
353 
354  for ( const ContentInfo & rCurr : aInfo )
355  {
356  // Simply look for the first KIND_FOLDER...
357  if ( rCurr.Attributes & ContentInfoAttribute::KIND_FOLDER )
358  {
359  // Make sure the only required bootstrap property is "Title",
360  const Sequence< Property > & rProps = rCurr.Properties;
361  if ( rProps.getLength() != 1 )
362  continue;
363 
364  if ( rProps[ 0 ].Name != "Title" )
365  continue;
366 
367  ucbhelper::Content aNew;
368  try
369  {
370  if ( !aCnt.insertNewContent( rCurr.Type, { "Title" }, { Any(aTitle) }, aNew ) )
371  continue;
372 
373  // Success. We're done.
374  return;
375  }
376  catch ( css::ucb::CommandFailedException const & )
377  {
378  // Interaction Handler already handled the error that has occurred...
379  continue;
380  }
381  }
382  }
383 }
384 
385 sal_Int32 OFileAccess::getSize( const OUString& FileURL )
386 {
387  // SfxContentHelper::GetSize
388  sal_Int32 nSize = 0;
389  sal_Int64 nTemp = 0;
390  INetURLObject aObj( FileURL, INetProtocol::File );
392  aCnt.getPropertyValue( "Size" ) >>= nTemp;
393  nSize = static_cast<sal_Int32>(nTemp);
394  return nSize;
395 }
396 
397 OUString OFileAccess::getContentType( const OUString& FileURL )
398 {
399  INetURLObject aObj( FileURL, INetProtocol::File );
401 
402  Reference< XContent > xContent = aCnt.get();
403  OUString aTypeStr = xContent->getContentType();
404  return aTypeStr;
405 }
406 
407 css::util::DateTime OFileAccess::getDateTimeModified( const OUString& FileURL )
408 {
409  INetURLObject aFileObj( FileURL, INetProtocol::File );
410  css::util::DateTime aDateTime;
411 
414  aYoung.getPropertyValue("DateModified") >>= aDateTime;
415  return aDateTime;
416 }
417 
418 Sequence< OUString > OFileAccess::getFolderContents( const OUString& FolderURL, sal_Bool bIncludeFolders )
419 {
420  // SfxContentHelper::GetFolderContents
421 
422  std::vector<OUString> aFiles;
423  INetURLObject aFolderObj( FolderURL, INetProtocol::File );
424 
426  Reference< XResultSet > xResultSet;
427 
429 
430  try
431  {
432  xResultSet = aCnt.createCursor( {}, eInclude );
433  }
434  catch ( css::ucb::CommandFailedException const & )
435  {
436  // Interaction Handler already handled the error that has occurred...
437  }
438 
439  if ( xResultSet.is() )
440  {
441  Reference< css::ucb::XContentAccess > xContentAccess( xResultSet, UNO_QUERY );
442 
443  while ( xResultSet->next() )
444  {
445  OUString aId = xContentAccess->queryContentIdentifierString();
446  INetURLObject aURL( aId, INetProtocol::File );
447  aFiles.push_back( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
448  }
449  }
450 
451  return comphelper::containerToSequence(aFiles);
452 }
453 
454 sal_Bool OFileAccess::exists( const OUString& FileURL )
455 {
456  bool bRet = false;
457  try
458  {
459  bRet = isFolder( FileURL );
460  if( !bRet )
461  {
462  Reference< XInputStream > xStream = openFileRead( FileURL );
463  bRet = xStream.is();
464  if( bRet )
465  xStream->closeInput();
466  }
467  }
468  catch (const Exception &) {}
469  return bRet;
470 }
471 
472 Reference< XInputStream > OFileAccess::openFileRead( const OUString& FileURL )
473 {
475  INetURLObject aObj( FileURL, INetProtocol::File );
477 
478  Reference<XActiveDataSink> xSink = new OActiveDataSink;
479 
480  try
481  {
482  bool bRet = aCnt.openStream( xSink );
483  if( bRet )
484  xRet = xSink->getInputStream();
485  }
486  catch ( css::ucb::CommandFailedException const & )
487  {
488  // Interaction Handler already handled the error that has occurred...
489  }
490 
491  return xRet;
492 }
493 
494 Reference< XOutputStream > OFileAccess::openFileWrite( const OUString& FileURL )
495 {
496  Reference< XOutputStream > xRet;
497  Reference< XStream > xStream = OFileAccess::openFileReadWrite( FileURL );
498  if( xStream.is() )
499  xRet = xStream->getOutputStream();
500  return xRet;
501 }
502 
503 Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL )
504 {
505  Reference<XActiveDataStreamer> xSink = new OActiveDataStreamer;
506 
507  OpenCommandArgument2 aArg;
508  aArg.Mode = OpenMode::DOCUMENT;
509  aArg.Priority = 0; // unused
510  aArg.Sink = xSink;
511  aArg.Properties = Sequence< Property >( 0 ); // unused
512 
513  Any aCmdArg;
514  aCmdArg <<= aArg;
515 
516  INetURLObject aFileObj( FileURL, INetProtocol::File );
518 
519  // Be silent...
521  if ( mxEnvironment.is() )
522  {
523  xIH = mxEnvironment->getInteractionHandler();
524  mxEnvironment->setHandler( nullptr );
525  }
526 
527  try
528  {
529  aCnt.executeCommand( "open", aCmdArg );
530  }
531  catch ( InteractiveIOException const & e )
532  {
533  if ( xIH.is() && mxEnvironment.is() )
534  mxEnvironment->setHandler( xIH );
535 
536  if ( e.Code == IOErrorCode_NOT_EXISTING )
537  {
538  // Create file...
539  SvMemoryStream aStream(0,0);
540  rtl::Reference<::utl::OInputStreamWrapper> pInput = new ::utl::OInputStreamWrapper( aStream );
541  InsertCommandArgument aInsertArg;
542  aInsertArg.Data = pInput;
543  aInsertArg.ReplaceExisting = false;
544 
545  aCmdArg <<= aInsertArg;
546  aCnt.executeCommand( "insert", aCmdArg );
547 
548  // Retry...
549  return openFileReadWrite( FileURL );
550  }
551 
552  throw;
553  }
554 
555  if ( xIH.is() && mxEnvironment.is() )
556  mxEnvironment->setHandler( xIH );
557 
558  Reference< XStream > xRet = xSink->getStream();
559  return xRet;
560 }
561 
562 void OFileAccess::setInteractionHandler( const Reference< XInteractionHandler >& Handler )
563 {
564  if( !mxEnvironment.is() )
565  {
566  mxEnvironment = new OCommandEnvironment;
567  }
568  mxEnvironment->setHandler( Handler );
569 }
570 
571 bool OFileAccess::createNewFile( const OUString & rParentURL,
572  const OUString & rTitle,
574 {
575  ucbhelper::Content aParentCnt( rParentURL, mxEnvironment, comphelper::getProcessComponentContext() );
576 
577  const Sequence< ContentInfo > aInfo = aParentCnt.queryCreatableContentsInfo();
578 
579  for ( const ContentInfo & rCurr : aInfo )
580  {
581  if ( ( rCurr.Attributes
582  & ContentInfoAttribute::KIND_DOCUMENT ) &&
583  ( rCurr.Attributes
584  & ContentInfoAttribute::INSERT_WITH_INPUTSTREAM ) )
585  {
586  // Make sure the only required bootstrap property is
587  // "Title",
588  const Sequence< Property > & rProps = rCurr.Properties;
589  if ( rProps.getLength() != 1 )
590  continue;
591 
592  if ( rProps[ 0 ].Name != "Title" )
593  continue;
594 
595  try
596  {
597  ucbhelper::Content aNew;
598  if ( aParentCnt.insertNewContent(
599  rCurr.Type, { "Title" }, { Any(rTitle) }, data, aNew ) )
600  return true; // success.
601  else
602  continue;
603  }
604  catch ( CommandFailedException const & )
605  {
606  // Interaction Handler already handled the
607  // error that has occurred...
608  continue;
609  }
610  }
611  }
612 
613  return false;
614 }
615 
616 void SAL_CALL OFileAccess::writeFile( const OUString& FileURL,
617  const Reference< XInputStream >& data )
618 {
619  INetURLObject aURL( FileURL, INetProtocol::File );
620  try
621  {
622  ucbhelper::Content aCnt(
623  aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), mxEnvironment,
625 
626  try
627  {
628  aCnt.writeStream( data, true /* bReplaceExisting */ );
629  }
630  catch ( CommandFailedException const & )
631  {
632  // Interaction Handler already handled the error that has occurred...
633  }
634  }
635  catch ( ContentCreationException const & e )
636  {
637  // Most probably file does not exist. Try to create.
638  if ( e.eError == ContentCreationError_CONTENT_CREATION_FAILED )
639  {
640  INetURLObject aParentURLObj( aURL );
641  if ( aParentURLObj.removeSegment() )
642  {
643  OUString aParentURL
645 
646  // ensure all parent folders exist.
647  createFolder( aParentURL );
648 
649  // create the new file...
650  OUString aTitle
652  true,
654  if ( createNewFile( aParentURL, aTitle, data ) )
655  {
656  // success
657  return;
658  }
659  }
660  }
661 
662  throw;
663  }
664 }
665 
666 sal_Bool OFileAccess::isHidden( const OUString& FileURL )
667 {
668  INetURLObject aURLObj( FileURL, INetProtocol::File );
670  Any aRetAny = aCnt.getPropertyValue("IsHidden");
671  bool bRet = false;
672  aRetAny >>= bRet;
673  return bRet;
674 }
675 
676 void OFileAccess::setHidden( const OUString& FileURL, sal_Bool bHidden )
677 {
678  INetURLObject aURLObj( FileURL, INetProtocol::File );
680  aCnt.setPropertyValue("IsHidden", Any(bHidden) );
681 }
682 
683 
684 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
685 ucb_OFileAccess_get_implementation(
686  css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any> const&)
687 {
688  return cppu::acquire(new OFileAccess(context));
689 }
690 
691 }; // namespace end
692 
693 
694 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tools::SvRef< SvBaseLink > xSink
INCLUDE_FOLDERS_AND_DOCUMENTS
#define SERVICE_NAME
Definition: FileAccess.cxx:56
bool insertNewContent(const OUString &rContentType, const css::uno::Sequence< OUString > &rPropertyNames, const css::uno::Sequence< css::uno::Any > &rPropertyValues, Content &rNewContent)
OUString GetURLPath(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
css::uno::Any getPropertyValue(const OUString &rPropertyName)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
OUString aId
OUString Name
css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo()
bool bReadOnly
bool setFinalSlash()
Reference< XInputStream > xStream
Any SAL_CALL getCaughtException()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
OUString getName(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
unsigned char sal_Bool
OUString aURL
exports com.sun.star.chart2. data
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
OUString aName
INetProtocol GetProtocol() const
void transferContent(const Content &rSourceContent, InsertOperation eOperation, const OUString &rTitle, const sal_Int32 nNameClashAction, const OUString &rMimeType=OUString(), bool bMajorVersion=false, const OUString &rCommentVersion=OUString(), OUString *pResultURL=nullptr, const OUString &rDocumentId=OUString()) const
void copy(const fs::path &src, const fs::path &dest)
Reference< XComponentContext > getProcessComponentContext()
uno::Reference< ucb::XContent > xContent
css::uno::Any setPropertyValue(const OUString &rPropertyName, const css::uno::Any &rValue)
css::uno::Any executeCommand(const OUString &rCommandName, const css::uno::Any &rCommandArgument)
Reference< task::XInteractionHandler > mxInteraction
Reference< XComponentContext > m_xContext
void writeStream(const css::uno::Reference< css::io::XInputStream > &rStream, bool bReplaceExisting)
INCLUDE_DOCUMENTS_ONLY
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)