LibreOffice Module unotools (master) 1
|
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... | |
|
noexcept |
like mkdir -p
Definition at line 388 of file ucbhelper.cxx.
References aURL, ucbhelper::Content::create(), INetURLObject::LAST_SEGMENT, MakeFolder(), INetURLObject::NONE, result, and INetURLObject::WithCharset.
bool utl::UCBContentHelper::EqualURLs | ( | OUString const & | url1, |
OUString const & | url2 | ||
) |
Definition at line 372 of file ucbhelper.cxx.
References comphelper::getProcessComponentContext().
bool utl::UCBContentHelper::Exists | ( | OUString const & | url | ) |
Definition at line 290 of file ucbhelper.cxx.
References Translate::get(), INetURLObject::GetMainURL(), INetURLObject::getName(), INetURLObject::LAST_SEGMENT, name, INetURLObject::NONE, INetURLObject::removeFinalSlash(), INetURLObject::removeSegment(), and INetURLObject::WithCharset.
Referenced by SvtPathOptions::SearchFile().
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().
css::uno::Any utl::UCBContentHelper::GetProperty | ( | OUString const & | url, |
OUString const & | property | ||
) |
Definition at line 145 of file ucbhelper.cxx.
References TOOLS_INFO_EXCEPTION.
bool utl::UCBContentHelper::GetTitle | ( | OUString const & | url, |
OUString * | title | ||
) |
title | must not be null |
Definition at line 175 of file ucbhelper.cxx.
References TOOLS_INFO_EXCEPTION.
bool utl::UCBContentHelper::IsDocument | ( | OUString const & | url | ) |
Definition at line 131 of file ucbhelper.cxx.
References TOOLS_INFO_EXCEPTION.
bool utl::UCBContentHelper::IsFolder | ( | OUString const & | url | ) |
Definition at line 161 of file ucbhelper.cxx.
References TOOLS_INFO_EXCEPTION.
bool utl::UCBContentHelper::IsSubPath | ( | OUString const & | parent, |
OUString const & | child | ||
) |
Definition at line 326 of file ucbhelper.cxx.
References INetURLObject::GetProtocol(), INetURLObject::removeSegment(), and TOOLS_INFO_EXCEPTION.
Referenced by SvtSecurityOptions::isTrustedLocationUri().
bool utl::UCBContentHelper::IsYounger | ( | OUString const & | younger, |
OUString const & | older | ||
) |
Definition at line 264 of file ucbhelper.cxx.
References getPropertyValue(), and TOOLS_INFO_EXCEPTION.
bool utl::UCBContentHelper::Kill | ( | OUString const & | url | ) |
Definition at line 192 of file ucbhelper.cxx.
References TOOLS_INFO_EXCEPTION.
bool utl::UCBContentHelper::MakeFolder | ( | ucbhelper::Content & | parent, |
OUString const & | title, | ||
ucbhelper::Content & | result | ||
) |
Definition at line 209 of file ucbhelper.cxx.
References INetURLObject::Append(), ucbhelper::Content::getURL(), ucbhelper::Content::insertNewContent(), ucbhelper::Content::queryCreatableContentsInfo(), result, and TOOLS_INFO_EXCEPTION.
Referenced by ensureFolder().