LibreOffice Module unotools (master) 1
Functions
utl::UCBContentHelper Namespace Reference

Functions

UNOTOOLS_DLLPUBLIC bool IsDocument (OUString const &url)
 
UNOTOOLS_DLLPUBLIC bool IsFolder (OUString const &url)
 
UNOTOOLS_DLLPUBLIC bool GetTitle (OUString const &url, OUString *title)
 
UNOTOOLS_DLLPUBLIC bool Kill (OUString const &url)
 
UNOTOOLS_DLLPUBLIC css::uno::Any GetProperty (OUString const &url, OUString const &property)
 
UNOTOOLS_DLLPUBLIC bool MakeFolder (ucbhelper::Content &parent, OUString const &title, ucbhelper::Content &result)
 
UNOTOOLS_DLLPUBLIC bool ensureFolder (const css::uno::Reference< css::uno::XComponentContext > &xCtx, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, std::u16string_view rFolder, ucbhelper::Content &result) noexcept
 like mkdir -p More...
 
UNOTOOLS_DLLPUBLIC bool IsYounger (OUString const &younger, OUString const &older)
 
UNOTOOLS_DLLPUBLIC bool Exists (OUString const &url)
 
UNOTOOLS_DLLPUBLIC bool IsSubPath (OUString const &parent, OUString const &child)
 
UNOTOOLS_DLLPUBLIC bool EqualURLs (OUString const &url1, OUString const &url2)
 
UNOTOOLS_DLLPUBLIC css::uno::Reference< css::ucb::XCommandEnvironment > getDefaultCommandEnvironment ()
 Returns a default XCommandEnvironment to be used when creating a ucbhelper::Content. More...
 

Function Documentation

◆ ensureFolder()

bool utl::UCBContentHelper::ensureFolder ( const css::uno::Reference< css::uno::XComponentContext > &  xCtx,
const css::uno::Reference< css::ucb::XCommandEnvironment > &  xEnv,
std::u16string_view  rFolder,
ucbhelper::Content result 
)
noexcept

◆ EqualURLs()

bool utl::UCBContentHelper::EqualURLs ( OUString const &  url1,
OUString const &  url2 
)

Definition at line 372 of file ucbhelper.cxx.

References comphelper::getProcessComponentContext().

◆ Exists()

bool utl::UCBContentHelper::Exists ( OUString const &  url)

◆ getDefaultCommandEnvironment()

css::uno::Reference< css::ucb::XCommandEnvironment > utl::UCBContentHelper::getDefaultCommandEnvironment ( )

Returns a default XCommandEnvironment to be used when creating a ucbhelper::Content.

Due to the way the WebDAV UCP provider works, an interaction handler is always needed: 1) to activate the credential dialog or to provide the cached credentials whenever the server requests them;

2) in case of ssl connection (https) to activate the dialog to show the certificate if said certificate looks wrong or dubious.

This helper provides the XCommandEnvironment with an interaction handler that intercepts: 1) css::ucb::AuthenticationRequest() 2) css::ucb::CertificateValidationRequest() 3) css::ucb::InteractiveIOException() 4) css::ucb::UnsupportedDataSinkException()

Exception 1) and 2) will be passed to the UI handler, e.g. shown to the user for interaction.

Exception 3) and 4) will be have a default 'Abort' result. See comphelper::StillReadWriteInteraction for details. comphelper::StillReadWriteInteraction was introduced in commit bbe51f039dffca2506ea542feb78571b6358b981.

Definition at line 117 of file ucbhelper.cxx.

References comphelper::getProcessComponentContext().

Referenced by utl::MediaDescriptor::isStreamReadOnly().

◆ GetProperty()

css::uno::Any utl::UCBContentHelper::GetProperty ( OUString const &  url,
OUString const &  property 
)

Definition at line 145 of file ucbhelper.cxx.

References TOOLS_INFO_EXCEPTION.

◆ GetTitle()

bool utl::UCBContentHelper::GetTitle ( OUString const &  url,
OUString *  title 
)
Parameters
titlemust not be null
Returns
true iff title has been set (i.e., if obtaining the "Title" property of the given content yields a non-void value without raising a non-RuntimeException; RuntimeExceptions are passed through)

Definition at line 175 of file ucbhelper.cxx.

References TOOLS_INFO_EXCEPTION.

◆ IsDocument()

bool utl::UCBContentHelper::IsDocument ( OUString const &  url)

Definition at line 131 of file ucbhelper.cxx.

References TOOLS_INFO_EXCEPTION.

◆ IsFolder()

bool utl::UCBContentHelper::IsFolder ( OUString const &  url)

Definition at line 161 of file ucbhelper.cxx.

References TOOLS_INFO_EXCEPTION.

◆ IsSubPath()

bool utl::UCBContentHelper::IsSubPath ( OUString const &  parent,
OUString const &  child 
)

◆ IsYounger()

bool utl::UCBContentHelper::IsYounger ( OUString const &  younger,
OUString const &  older 
)

Definition at line 264 of file ucbhelper.cxx.

References getPropertyValue(), and TOOLS_INFO_EXCEPTION.

◆ Kill()

bool utl::UCBContentHelper::Kill ( OUString const &  url)

Definition at line 192 of file ucbhelper.cxx.

References TOOLS_INFO_EXCEPTION.

◆ MakeFolder()

bool utl::UCBContentHelper::MakeFolder ( ucbhelper::Content parent,
OUString const &  title,
ucbhelper::Content result 
)