1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <cppuhelper/exc_hlp.hxx>
21 #include <comphelper/processfactory.hxx>
22 #include <comphelper/sequence.hxx>
23 #include <cppuhelper/factory.hxx>
24 #include <cppuhelper/implbase.hxx>
25 #include <cppuhelper/supportsservice.hxx>
27 #include <tools/urlobj.hxx>
28 #include <ucbhelper/content.hxx>
29 #include <unotools/streamwrap.hxx>
30 #include <tools/stream.hxx>
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>
56 constexpr OUString SERVICE_NAME
= u
"com.sun.star.ucb.SimpleFileAccess"_ustr
;
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
;
72 // Implementation XSimpleFileAccess
73 typedef cppu::WeakImplHelper
<XSimpleFileAccess3
, css::lang::XServiceInfo
>
75 class OCommandEnvironment
;
77 class OFileAccess
: public FileAccessHelper
79 Reference
< XComponentContext
> m_xContext
;
80 rtl::Reference
<OCommandEnvironment
> mxEnvironment
;
82 /// @throws CommandAbortedException
84 /// @throws RuntimeException
85 void transferImpl( const OUString
& rSource
, std::u16string_view rDest
, bool bMoveData
);
87 bool createNewFile( const OUString
& rParentURL
,
88 const OUString
& rTitle
,
89 const Reference
< XInputStream
>& data
);
92 explicit OFileAccess( const Reference
< XComponentContext
> & xContext
)
93 : m_xContext( xContext
) {}
95 virtual void SAL_CALL
copy( const OUString
& SourceURL
, const OUString
& DestURL
) override
;
96 virtual void SAL_CALL
move( const OUString
& SourceURL
, const OUString
& DestURL
) override
;
97 virtual void SAL_CALL
kill( const OUString
& FileURL
) override
;
98 virtual sal_Bool SAL_CALL
isFolder( const OUString
& FileURL
) override
;
99 virtual sal_Bool SAL_CALL
isReadOnly( const OUString
& FileURL
) override
;
100 virtual void SAL_CALL
setReadOnly( const OUString
& FileURL
, sal_Bool bReadOnly
) override
;
101 virtual void SAL_CALL
createFolder( const OUString
& NewFolderURL
) override
;
102 virtual sal_Int32 SAL_CALL
getSize( const OUString
& FileURL
) override
;
103 virtual OUString SAL_CALL
getContentType( const OUString
& FileURL
) override
;
104 virtual css::util::DateTime SAL_CALL
getDateTimeModified( const OUString
& FileURL
) override
;
105 virtual css::uno::Sequence
< OUString
> SAL_CALL
getFolderContents( const OUString
& FolderURL
, sal_Bool bIncludeFolders
) override
;
106 virtual sal_Bool SAL_CALL
exists( const OUString
& FileURL
) override
;
107 virtual css::uno::Reference
< css::io::XInputStream
> SAL_CALL
openFileRead( const OUString
& FileURL
) override
;
108 virtual css::uno::Reference
< css::io::XOutputStream
> SAL_CALL
openFileWrite( const OUString
& FileURL
) override
;
109 virtual css::uno::Reference
< css::io::XStream
> SAL_CALL
openFileReadWrite( const OUString
& FileURL
) override
;
110 virtual void SAL_CALL
setInteractionHandler( const css::uno::Reference
< css::task::XInteractionHandler
>& Handler
) override
;
111 virtual void SAL_CALL
writeFile( const OUString
& FileURL
, const css::uno::Reference
< css::io::XInputStream
>& data
) override
;
112 virtual sal_Bool SAL_CALL
isHidden( const OUString
& FileURL
) override
;
113 virtual void SAL_CALL
setHidden( const OUString
& FileURL
, sal_Bool bHidden
) override
;
115 OUString SAL_CALL
getImplementationName() override
116 { return u
"com.sun.star.comp.ucb.SimpleFileAccess"_ustr
; }
118 sal_Bool SAL_CALL
supportsService(OUString
const & ServiceName
) override
119 { return cppu::supportsService(this, ServiceName
); }
121 css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames() override
122 { return { SERVICE_NAME
}; }
125 // Implementation XActiveDataSink
127 class OActiveDataSink
: public cppu::WeakImplHelper
< XActiveDataSink
>
129 Reference
< XInputStream
> mxStream
;
134 virtual void SAL_CALL
setInputStream( const Reference
< XInputStream
>& aStream
) override
;
135 virtual Reference
< XInputStream
> SAL_CALL
getInputStream( ) override
;
138 // Implementation XActiveDataStreamer
140 class OActiveDataStreamer
: public cppu::WeakImplHelper
< XActiveDataStreamer
>
142 Reference
< XStream
> mxStream
;
147 virtual void SAL_CALL
setStream( const Reference
< XStream
>& aStream
) override
;
148 virtual Reference
< XStream
> SAL_CALL
getStream() override
;
151 // Implementation XCommandEnvironment
153 class OCommandEnvironment
: public cppu::WeakImplHelper
< XCommandEnvironment
>
155 Reference
< XInteractionHandler
> mxInteraction
;
158 void setHandler( const Reference
< XInteractionHandler
>& xInteraction_
)
160 mxInteraction
= xInteraction_
;
164 virtual Reference
< XInteractionHandler
> SAL_CALL
getInteractionHandler() override
;
165 virtual Reference
< XProgressHandler
> SAL_CALL
getProgressHandler() override
;
168 void OActiveDataSink::setInputStream( const Reference
< XInputStream
>& aStream
)
173 Reference
< XInputStream
> OActiveDataSink::getInputStream()
178 void OActiveDataStreamer::setStream( const Reference
< XStream
>& aStream
)
183 Reference
< XStream
> OActiveDataStreamer::getStream()
188 Reference
< XInteractionHandler
> OCommandEnvironment::getInteractionHandler()
190 return mxInteraction
;
193 Reference
< XProgressHandler
> OCommandEnvironment::getProgressHandler()
195 Reference
< XProgressHandler
> xRet
;
199 void OFileAccess::transferImpl( const OUString
& rSource
,
200 std::u16string_view rDest
,
203 // SfxContentHelper::Transfer_Impl
204 INetURLObject
aSourceObj( rSource
, INetProtocol::File
);
205 INetURLObject
aDestObj( rDest
, INetProtocol::File
);
206 OUString aName
= aDestObj
.getName(
207 INetURLObject::LAST_SEGMENT
, true, INetURLObject::DecodeMechanism::WithCharset
);
209 OUString aSourceURL
= aSourceObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
);
210 if ( aDestObj
.removeSegment() )
214 aDestObj
.setFinalSlash();
215 aDestURL
= aDestObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
);
219 // non-hierarchical URL
224 if ( aDestObj
.GetProtocol() == INetProtocol::VndSunStarExpand
)
226 // Hack: Expand destination URL using Macro Expander and try again
227 // with the hopefully hierarchical expanded URL...
231 Reference
< XMacroExpander
> xExpander
= theMacroExpander::get(m_xContext
);
233 aDestURL
= xExpander
->expandMacros(
234 aDestObj
.GetURLPath( INetURLObject::DecodeMechanism::WithCharset
) );
236 catch ( Exception
const & )
238 css::uno::Any anyEx
= cppu::getCaughtException();
239 throw css::lang::WrappedTargetRuntimeException(
240 u
"OFileAccess::transferrImpl - Unable to obtain destination folder URL!"_ustr
,
244 transferImpl( rSource
, aDestURL
, bMoveData
);
248 throw RuntimeException(
249 u
"OFileAccess::transferrImpl - Unable to obtain destination folder URL!"_ustr
,
254 ucbhelper::Content
aDestPath( aDestURL
, mxEnvironment
, comphelper::getProcessComponentContext() );
255 ucbhelper::Content
aSrc ( aSourceURL
, mxEnvironment
, comphelper::getProcessComponentContext() );
259 aDestPath
.transferContent(aSrc
,
261 ? ucbhelper::InsertOperation::Move
262 : ucbhelper::InsertOperation::Copy
,
264 css::ucb::NameClash::OVERWRITE
);
266 catch ( css::ucb::CommandFailedException
const & )
268 // Interaction Handler already handled the error that has occurred...
272 void OFileAccess::copy( const OUString
& SourceURL
, const OUString
& DestURL
)
274 transferImpl( SourceURL
, DestURL
, false );
277 void OFileAccess::move( const OUString
& SourceURL
, const OUString
& DestURL
)
279 transferImpl( SourceURL
, DestURL
, true );
282 void OFileAccess::kill( const OUString
& FileURL
)
284 // SfxContentHelper::Kill
285 INetURLObject
aDeleteObj( FileURL
, INetProtocol::File
);
286 ucbhelper::Content
aCnt( aDeleteObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
289 aCnt
.executeCommand( u
"delete"_ustr
, Any( true ) );
291 catch ( css::ucb::CommandFailedException
const & )
293 // Interaction Handler already handled the error that has occurred...
297 sal_Bool
OFileAccess::isFolder( const OUString
& FileURL
)
302 INetURLObject
aURLObj( FileURL
, INetProtocol::File
);
303 ucbhelper::Content
aCnt( aURLObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
304 bRet
= aCnt
.isFolder();
306 catch (const Exception
&) {}
310 sal_Bool
OFileAccess::isReadOnly( const OUString
& FileURL
)
312 INetURLObject
aURLObj( FileURL
, INetProtocol::File
);
313 ucbhelper::Content
aCnt( aURLObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
314 Any aRetAny
= aCnt
.getPropertyValue(u
"IsReadOnly"_ustr
);
320 void OFileAccess::setReadOnly( const OUString
& FileURL
, sal_Bool bReadOnly
)
322 INetURLObject
aURLObj( FileURL
, INetProtocol::File
);
323 ucbhelper::Content
aCnt( aURLObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
324 aCnt
.setPropertyValue(u
"IsReadOnly"_ustr
, Any(bReadOnly
) );
327 void OFileAccess::createFolder( const OUString
& NewFolderURL
)
329 // Does the folder already exist?
330 if( NewFolderURL
.isEmpty() || isFolder( NewFolderURL
) )
333 // SfxContentHelper::MakeFolder
334 INetURLObject
aURL( NewFolderURL
, INetProtocol::File
);
335 OUString aTitle
= aURL
.getName( INetURLObject::LAST_SEGMENT
, true, INetURLObject::DecodeMechanism::WithCharset
);
336 if ( !aTitle
.isEmpty() )
338 aURL
.removeSegment();
340 // Does the base folder exist? Otherwise create it first
341 OUString aBaseFolderURLStr
= aURL
.GetMainURL( INetURLObject::DecodeMechanism::NONE
);
342 if( !isFolder( aBaseFolderURLStr
) )
344 createFolder( aBaseFolderURLStr
);
348 ucbhelper::Content
aCnt( aURL
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
350 const Sequence
< ContentInfo
> aInfo
= aCnt
.queryCreatableContentsInfo();
352 for ( const ContentInfo
& rCurr
: aInfo
)
354 // Simply look for the first KIND_FOLDER...
355 if ( rCurr
.Attributes
& ContentInfoAttribute::KIND_FOLDER
)
357 // Make sure the only required bootstrap property is "Title",
358 const Sequence
< Property
> & rProps
= rCurr
.Properties
;
359 if ( rProps
.getLength() != 1 )
362 if ( rProps
[ 0 ].Name
!= "Title" )
365 ucbhelper::Content aNew
;
368 if ( !aCnt
.insertNewContent( rCurr
.Type
, { u
"Title"_ustr
}, { Any(aTitle
) }, aNew
) )
371 // Success. We're done.
374 catch ( css::ucb::CommandFailedException
const & )
376 // Interaction Handler already handled the error that has occurred...
383 sal_Int32
OFileAccess::getSize( const OUString
& FileURL
)
385 // SfxContentHelper::GetSize
388 INetURLObject
aObj( FileURL
, INetProtocol::File
);
389 ucbhelper::Content
aCnt( aObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
390 aCnt
.getPropertyValue( u
"Size"_ustr
) >>= nTemp
;
391 nSize
= static_cast<sal_Int32
>(nTemp
);
395 OUString
OFileAccess::getContentType( const OUString
& FileURL
)
397 INetURLObject
aObj( FileURL
, INetProtocol::File
);
398 ucbhelper::Content
aCnt( aObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
400 Reference
< XContent
> xContent
= aCnt
.get();
401 OUString aTypeStr
= xContent
->getContentType();
405 css::util::DateTime
OFileAccess::getDateTimeModified( const OUString
& FileURL
)
407 INetURLObject
aFileObj( FileURL
, INetProtocol::File
);
408 css::util::DateTime aDateTime
;
410 Reference
< XCommandEnvironment
> aCmdEnv
;
411 ucbhelper::Content
aYoung( aFileObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), aCmdEnv
, comphelper::getProcessComponentContext() );
412 aYoung
.getPropertyValue(u
"DateModified"_ustr
) >>= aDateTime
;
416 Sequence
< OUString
> OFileAccess::getFolderContents( const OUString
& FolderURL
, sal_Bool bIncludeFolders
)
418 // SfxContentHelper::GetFolderContents
420 std::vector
<OUString
> aFiles
;
421 INetURLObject
aFolderObj( FolderURL
, INetProtocol::File
);
423 ucbhelper::Content
aCnt( aFolderObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
424 Reference
< XResultSet
> xResultSet
;
426 ucbhelper::ResultSetInclude eInclude
= bIncludeFolders
? ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS
: ucbhelper::INCLUDE_DOCUMENTS_ONLY
;
430 xResultSet
= aCnt
.createCursor( {}, eInclude
);
432 catch ( css::ucb::CommandFailedException
const & )
434 // Interaction Handler already handled the error that has occurred...
437 if ( xResultSet
.is() )
439 Reference
< css::ucb::XContentAccess
> xContentAccess( xResultSet
, UNO_QUERY
);
441 while ( xResultSet
->next() )
443 OUString aId
= xContentAccess
->queryContentIdentifierString();
444 INetURLObject
aURL( aId
, INetProtocol::File
);
445 aFiles
.push_back( aURL
.GetMainURL( INetURLObject::DecodeMechanism::NONE
) );
449 return comphelper::containerToSequence(aFiles
);
452 sal_Bool
OFileAccess::exists( const OUString
& FileURL
)
457 bRet
= isFolder( FileURL
);
460 Reference
< XInputStream
> xStream
= openFileRead( FileURL
);
463 xStream
->closeInput();
466 catch (const Exception
&) {}
470 Reference
< XInputStream
> OFileAccess::openFileRead( const OUString
& FileURL
)
472 Reference
< XInputStream
> xRet
;
473 INetURLObject
aObj( FileURL
, INetProtocol::File
);
474 ucbhelper::Content
aCnt( aObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
476 Reference
<XActiveDataSink
> xSink
= new OActiveDataSink
;
480 bool bRet
= aCnt
.openStream( xSink
);
482 xRet
= xSink
->getInputStream();
484 catch ( css::ucb::CommandFailedException
const & )
486 // Interaction Handler already handled the error that has occurred...
492 Reference
< XOutputStream
> OFileAccess::openFileWrite( const OUString
& FileURL
)
494 Reference
< XOutputStream
> xRet
;
495 Reference
< XStream
> xStream
= OFileAccess::openFileReadWrite( FileURL
);
497 xRet
= xStream
->getOutputStream();
501 Reference
< XStream
> OFileAccess::openFileReadWrite( const OUString
& FileURL
)
503 Reference
<XActiveDataStreamer
> xSink
= new OActiveDataStreamer
;
505 OpenCommandArgument2 aArg
;
506 aArg
.Mode
= OpenMode::DOCUMENT
;
507 aArg
.Priority
= 0; // unused
509 aArg
.Properties
= Sequence
< Property
>( 0 ); // unused
514 INetURLObject
aFileObj( FileURL
, INetProtocol::File
);
515 ucbhelper::Content
aCnt( aFileObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
518 Reference
< XInteractionHandler
> xIH
;
519 if ( mxEnvironment
.is() )
521 xIH
= mxEnvironment
->getInteractionHandler();
522 mxEnvironment
->setHandler( nullptr );
527 aCnt
.executeCommand( u
"open"_ustr
, aCmdArg
);
529 catch ( InteractiveIOException
const & e
)
531 if ( xIH
.is() && mxEnvironment
.is() )
532 mxEnvironment
->setHandler( xIH
);
534 if ( e
.Code
== IOErrorCode_NOT_EXISTING
)
537 SvMemoryStream
aStream(0,0);
538 rtl::Reference
<::utl::OInputStreamWrapper
> pInput
= new ::utl::OInputStreamWrapper( aStream
);
539 InsertCommandArgument aInsertArg
;
540 aInsertArg
.Data
= pInput
;
541 aInsertArg
.ReplaceExisting
= false;
543 aCmdArg
<<= aInsertArg
;
544 aCnt
.executeCommand( u
"insert"_ustr
, aCmdArg
);
547 return openFileReadWrite( FileURL
);
553 if ( xIH
.is() && mxEnvironment
.is() )
554 mxEnvironment
->setHandler( xIH
);
556 Reference
< XStream
> xRet
= xSink
->getStream();
560 void OFileAccess::setInteractionHandler( const Reference
< XInteractionHandler
>& Handler
)
562 if( !mxEnvironment
.is() )
564 mxEnvironment
= new OCommandEnvironment
;
566 mxEnvironment
->setHandler( Handler
);
569 bool OFileAccess::createNewFile( const OUString
& rParentURL
,
570 const OUString
& rTitle
,
571 const Reference
< XInputStream
>& data
)
573 ucbhelper::Content
aParentCnt( rParentURL
, mxEnvironment
, comphelper::getProcessComponentContext() );
575 const Sequence
< ContentInfo
> aInfo
= aParentCnt
.queryCreatableContentsInfo();
577 for ( const ContentInfo
& rCurr
: aInfo
)
579 if ( ( rCurr
.Attributes
580 & ContentInfoAttribute::KIND_DOCUMENT
) &&
582 & ContentInfoAttribute::INSERT_WITH_INPUTSTREAM
) )
584 // Make sure the only required bootstrap property is
586 const Sequence
< Property
> & rProps
= rCurr
.Properties
;
587 if ( rProps
.getLength() != 1 )
590 if ( rProps
[ 0 ].Name
!= "Title" )
595 ucbhelper::Content aNew
;
596 if ( aParentCnt
.insertNewContent(
597 rCurr
.Type
, { u
"Title"_ustr
}, { Any(rTitle
) }, data
, aNew
) )
598 return true; // success.
602 catch ( CommandFailedException
const & )
604 // Interaction Handler already handled the
605 // error that has occurred...
614 void SAL_CALL
OFileAccess::writeFile( const OUString
& FileURL
,
615 const Reference
< XInputStream
>& data
)
617 INetURLObject
aURL( FileURL
, INetProtocol::File
);
620 ucbhelper::Content
aCnt(
621 aURL
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
,
622 comphelper::getProcessComponentContext() );
626 aCnt
.writeStream( data
, true /* bReplaceExisting */ );
628 catch ( CommandFailedException
const & )
630 // Interaction Handler already handled the error that has occurred...
633 catch ( ContentCreationException
const & e
)
635 // Most probably file does not exist. Try to create.
636 if ( e
.eError
== ContentCreationError_CONTENT_CREATION_FAILED
)
638 INetURLObject
aParentURLObj( aURL
);
639 if ( aParentURLObj
.removeSegment() )
642 = aParentURLObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
);
644 // ensure all parent folders exist.
645 createFolder( aParentURL
);
647 // create the new file...
649 = aURL
.getName( INetURLObject::LAST_SEGMENT
,
651 INetURLObject::DecodeMechanism::WithCharset
);
652 if ( createNewFile( aParentURL
, aTitle
, data
) )
664 sal_Bool
OFileAccess::isHidden( const OUString
& FileURL
)
666 INetURLObject
aURLObj( FileURL
, INetProtocol::File
);
667 ucbhelper::Content
aCnt( aURLObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
668 Any aRetAny
= aCnt
.getPropertyValue(u
"IsHidden"_ustr
);
674 void OFileAccess::setHidden( const OUString
& FileURL
, sal_Bool bHidden
)
676 INetURLObject
aURLObj( FileURL
, INetProtocol::File
);
677 ucbhelper::Content
aCnt( aURLObj
.GetMainURL( INetURLObject::DecodeMechanism::NONE
), mxEnvironment
, comphelper::getProcessComponentContext() );
678 aCnt
.setPropertyValue(u
"IsHidden"_ustr
, Any(bHidden
) );
682 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
*
683 ucb_OFileAccess_get_implementation(
684 css::uno::XComponentContext
* context
, css::uno::Sequence
<css::uno::Any
> const&)
686 return cppu::acquire(new OFileAccess(context
));
692 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */