LibreOffice Module unotools (master) 1
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
utl Namespace Reference

Namespaces

namespace  DesktopTerminationObserver
 a class which allows non-UNO components to observe the desktop (aka application) for its shutdown
 
namespace  detail
 
namespace  UCBContentHelper
 

Classes

class  AccessibleRelationSetHelper
 @descr This base class provides an implementation of the AccessibleRelationSet service. More...
 
class  Bootstrap
 provides configuration information needed for application startup. More...
 
class  CloseableComponent
 is a class which controls lifetime of a UNO component via ->XCloseable::close More...
 
class  CloseableComponentImpl
 
class  CloseVeto
 will add a XCloseListener to a given component, and veto its closing as long as the CloseVeto instance is alive. More...
 
struct  CloseVeto_Data
 
class  ConfigChangeListener_Impl
 
class  ConfigItem
 
class  ConfigManager
 
class  ConfigurationBroadcaster
 
class  ConfigurationListener
 
class  DefaultFontConfiguration
 
class  DigitGroupingIterator
 Iterator to be used with a digit grouping as obtained through LocaleDataWrapper::getDigitGrouping(). More...
 
class  DisposableComponent
 is a class which controls lifetime of a UNO component via ->XComponent::dispose More...
 
class  DocInfoHelper
 
struct  FontNameAttr
 
class  ITerminationListener
 non-UNO version of the com.sun.star.frame::XTerminateListener More...
 
class  LocalFileHelper
 
class  MediaDescriptor
 can be used to work with a css::document::MediaDescriptor struct. More...
 
struct  NodeValueAccessor
 
class  OConfigurationNode
 a small wrapper around a configuration node. More...
 
class  OConfigurationTreeRoot
 a specialized version of an OConfigurationNode, representing the root of a configuration sub treeOnly this class is able to commit any changes made any any OConfigurationNode objects. More...
 
struct  OConfigurationValueContainerImpl
 
class  OEventListenerAdapter
 base class for non-UNO dispose listeners More...
 
struct  OEventListenerAdapterImpl
 
class  OEventListenerImpl
 
class  OInputStreamHelper
 The helper implementation for a using input streams based on SvLockBytes. More...
 
class  OInputStreamWrapper
 helper class for wrapping an SvStream into a com.sun.star.io::XInputStream More...
 
class  OInputStreamWrapper_Base
 
class  OOutputStreamWrapper
 
class  OSeekableInputStreamWrapper
 helper class for wrapping an SvStream into a com.sun.star.io::XInputStream which is seekable (i.e. More...
 
class  OSeekableOutputStreamWrapper
 helper class for wrapping an SvStream into a com.sun.star.io::XOutputStream which is seekable (i.e. More...
 
class  OStreamWrapper
 
class  SearchParam
 
class  SharedUNOComponent
 is a helper class for sharing ownership of a UNO component More...
 
class  TempFileFast
 This is the "fast" temp file. More...
 
class  TempFileFastService
 
class  TempFileNamed
 The class TempFile gives access to temporary files in the local file system. More...
 
class  TextSearch
 
class  TransliterationWrapper
 
class  UcbLockBytes
 
class  UcbStreamHelper
 
class  ZipPackageHelper
 

Typedefs

typedef Bootstrap::PathStatus PathStatus
 
typedef ::cppu::WeakImplHelper< XCloseListener > CloseListener_Base
 
typedef ::cppu::WeakImplHelper< XCloseListener > CloseableComponentImpl_Base
 
typedef tools::SvRef< UcbLockBytesUcbLockBytesRef
 
typedef ::std::vector< ConfigurationListener * > IMPL_ConfigurationListenerList
 
typedef ::cppu::ImplHelper1< css::io::XSeekable > OSeekableOutputStreamWrapper_Base
 
typedef ::cppu::WeakImplHelper< css::io::XStream, css::io::XSeekable, css::io::XInputStream, css::io::XOutputStream, css::io::XTruncate > TempFileFastService_Base
 

Enumerations

enum class  ConfigNameFormat {
  LocalNode ,
  LocalPath
}
 

Functions

static OUString makeImplName ()
 
static PathStatus implCheckStatusOfURL (OUString const &_sURL, osl::DirectoryItem &aDirItem)
 
static bool implNormalizeURL (OUString &_sURL, osl::DirectoryItem &aDirItem)
 
static bool implEnsureAbsolute (OUString &_rsURL)
 
static bool implMakeAbsoluteURL (OUString &_rsPathOrURL)
 
static PathStatus dbgCheckStatusOfURL (OUString const &_sURL)
 
static PathStatus checkStatusAndNormalizeURL (OUString &_sURL)
 
static PathStatus getDerivedPath (OUString &_rURL, OUString const &_aBaseURL, PathStatus _aBaseStatus, std::u16string_view _sRelativeURL, rtl::Bootstrap const &_rData, OUString const &_sBootstrapParameter)
 
static PathStatus getDerivedPath (OUString &_rURL, Bootstrap::Impl::PathData const &_aBaseData, std::u16string_view _sRelativeURL, rtl::Bootstrap const &_rData, OUString const &_sBootstrapParameter)
 
static OUString getExecutableBaseName ()
 
static Bootstrap::PathStatus updateStatus (Bootstrap::Impl::PathData &_rResult)
 
static Bootstrap::PathStatus implGetBootstrapFile (rtl::Bootstrap const &_rData, Bootstrap::Impl::PathData &_rBootstrapFile)
 
static Bootstrap::PathStatus implGetVersionFile (rtl::Bootstrap const &_rData, Bootstrap::Impl::PathData &_rVersionFile)
 
static void addFileError (OUStringBuffer &_rBuf, std::u16string_view _aPath, AsciiString _sWhat)
 
static void addMissingDirectoryError (OUStringBuffer &_rBuf, std::u16string_view _aPath)
 
static void addUnexpectedError (OUStringBuffer &_rBuf, AsciiString _sExtraInfo=nullptr)
 
static Bootstrap::FailureCode describeError (OUStringBuffer &_rBuf, Bootstrap::Impl const &_rData)
 
static void lcl_resolveCharEntities (OUString &aLocalString)
 
bool splitLastFromConfigurationPath (std::u16string_view _sInPath, OUString &_rsOutPath, OUString &_rsLocalName)
 extract the local nodename and the parent nodepath from a configuration path. More...
 
OUString extractFirstFromConfigurationPath (OUString const &_sInPath, OUString *_sOutPath=nullptr)
 extract the first nodename from a configuration path. More...
 
static sal_Int32 lcl_findPrefixEnd (std::u16string_view _sNestedPath, std::u16string_view _sPrefixPath)
 
bool isPrefixOfConfigurationPath (std::u16string_view _sNestedPath, std::u16string_view _sPrefixPath)
 check whether a path is to a nested node with respect to a parent path. More...
 
OUString dropPrefixFromConfigurationPath (OUString const &_sNestedPath, std::u16string_view _sPrefixPath)
 get the relative path to a nested node with respect to a parent path. More...
 
static OUString lcl_wrapName (std::u16string_view _sContent, const OUString &_sType)
 
OUString wrapConfigurationElementName (std::u16string_view _sElementName)
 Create a one-level relative configuration path from a set element name without a known set element type. More...
 
OUString wrapConfigurationElementName (std::u16string_view _sElementName, OUString const &_sTypeName)
 Create a one-level relative configuration path from a set element name and a known set element type. More...
 
static void lcl_copyData (const NodeValueAccessor &_rAccessor, const Any &_rData, std::mutex &_rMutex)
 
static void lcl_copyData (Any &_rData, const NodeValueAccessor &_rAccessor, std::mutex &_rMutex)
 
static bool lcl_Equals (const i18nutil::SearchOptions2 &rSO1, const i18nutil::SearchOptions2 &rSO2)
 
const LocaleDataWrapperGetLocaleData ()
 
DateTime GetDateTime (const css::util::DateTime &_rDT)
 
OUString GetDateTimeString (const css::util::DateTime &_rDT)
 
OUString GetDateTimeString (sal_Int32 _nDate, sal_Int32 _nTime)
 
OUString GetDateString (const css::util::DateTime &_rDT)
 
void typeConvert (const Date &_rDate, css::util::Date &_rOut)
 
void typeConvert (const css::util::Date &_rDate, Date &_rOut)
 
void typeConvert (const DateTime &_rDateTime, css::util::DateTime &_rOut)
 
void typeConvert (const css::util::DateTime &_rDateTime, DateTime &_rOut)
 
OUString toISO8601 (const css::util::DateTime &rDateTime)
 
bool ISO8601parseDateTime (std::u16string_view rString, css::util::DateTime &rDateTime)
 convert ISO8601 DateTime String to util::DateTime More...
 
bool ISO8601parseDate (std::u16string_view aDateStr, css::util::Date &rDate)
 convert ISO8601 Date String to util::Date More...
 
bool ISO8601parseTime (std::u16string_view aTimeStr, css::util::Time &rTime)
 convert ISO8601 Time String to util::Time More...
 
void removeTree (OUString const &url)
 recursively remove directory and all contents More...
 
static bool getStatusFromAny_Impl (const Any &aAny, OUString &aText, sal_Int32 &nNum)
 
static OUString getParentName (std::u16string_view aFileName)
 
static bool ensuredir (const OUString &rUnqPath)
 
static OUString ConstructTempDir_Impl (const OUString *pParent, bool bCreateParentDirs)
 
static OUString lcl_createName (std::u16string_view rLeadingChars, Tokens &tokens, std::u16string_view pExtension, const OUString *pParent, bool bDirectory, bool bKeep, bool bLock, bool bCreateParentDirs)
 
static OUString CreateTempName_Impl (const OUString *pParent, bool bKeep, bool bDir=true)
 
static OUString CreateTempNameFast ()
 
OUString CreateTempName ()
 Only create a "physical" file name for a temporary file that would be valid at that moment. More...
 
OUString CreateTempURL (const OUString *pParent, bool bDirectory)
 
OUString CreateTempURL (std::u16string_view rLeadingChars, bool _bStartWithZero=true, std::u16string_view pExtension={}, const OUString *pParent=nullptr, bool bCreateParentDirs=false)
 Same as above; additionally the name starts with some given characters followed by a counter ( example: rLeadingChars="abc" means "abc0","abc1" and so on, depending on existing files in the folder ). More...
 
OUString SetTempNameBaseDirectory (const OUString &rBaseName)
 The TempNameBaseDirectory is a subfolder in the folder that is passed as a "physical" file name in the SetTempNameBaseDirectory method. More...
 
OUString GetTempNameBaseDirectory ()
 
static bool UCBOpenContentSync_ (const UcbLockBytesRef &xLockBytes, const Reference< XContent > &xContent, const Command &rArg, const Reference< XInterface > &xSink, const Reference< XInteractionHandler > &xInteract)
 Function for opening UCB contents synchronously, but with handled timeout;. More...
 
static bool UCBOpenContentSync (const UcbLockBytesRef &xLockBytes, Reference< XContent > const &xContent, const Command &rArg, const Reference< XInterface > &xSink, Reference< XInteractionHandler > const &xInteract)
 
static std::unique_ptr< SvStreamlcl_CreateStream (const OUString &rFileName, StreamMode eOpenMode, const Reference< XInteractionHandler > &xInteractionHandler, bool bEnsureFileExists)
 
class UNLESS_MERGELIBS (UNOTOOLS_DLLPUBLIC) OConfigurationValueContainer
 allows simple access to static configuration structures. More...
 
void ConnectModelController (const css::uno::Reference< css::frame::XModel > &xModel, const css::uno::Reference< css::frame::XController > &xController)
 
void ConnectFrameControllerModel (const css::uno::Reference< css::frame::XFrame > &xFrame, const css::uno::Reference< css::frame::XController2 > &xController, const css::uno::Reference< css::frame::XModel > &xModel)
 
template<class INTERFACE , class COMPONENT >
bool operator== (const SharedUNOComponent< INTERFACE, COMPONENT > &_rLHS, const css::uno::Reference< INTERFACE > &_rRHS)
 
template<class INTERFACE , class COMPONENT >
css::uno::Any SAL_CALL makeAny (const SharedUNOComponent< INTERFACE, COMPONENT > &value)
 
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< (std::basic_ostream< charT, traits > &stream, const SearchParam::SearchType &eType)
 
static bool isProductVersionUpgraded (bool aUpdateVersion)
 This method is called when there's a need to determine if the current version of LibreOffice has been upgraded to a newer one. More...
 

Variables

sal_Unicode const cURLSeparator = '/'
 
char const IS_MISSING [] = "is missing"
 
char const IS_INVALID [] = "is corrupt"
 
char const PERIOD [] = ". "
 

Typedef Documentation

◆ CloseableComponentImpl_Base

typedef ::cppu::WeakImplHelper< XCloseListener > utl::CloseableComponentImpl_Base

Definition at line 68 of file sharedunocomponent.cxx.

◆ CloseListener_Base

typedef ::cppu::WeakImplHelper< XCloseListener > utl::CloseListener_Base

Definition at line 44 of file closeveto.cxx.

◆ IMPL_ConfigurationListenerList

Definition at line 65 of file options.hxx.

◆ OSeekableOutputStreamWrapper_Base

Definition at line 126 of file streamwrap.hxx.

◆ PathStatus

Definition at line 157 of file bootstrap.cxx.

◆ TempFileFastService_Base

typedef ::cppu::WeakImplHelper< css::io::XStream , css::io::XSeekable , css::io::XInputStream , css::io::XOutputStream , css::io::XTruncate> utl::TempFileFastService_Base

Definition at line 199 of file tempfile.hxx.

◆ UcbLockBytesRef

Definition at line 60 of file ucblockbytes.hxx.

Enumeration Type Documentation

◆ ConfigNameFormat

enum class utl::ConfigNameFormat
strong
Enumerator
LocalNode 
LocalPath 

Definition at line 61 of file configitem.hxx.

Function Documentation

◆ addFileError()

static void utl::addFileError ( OUStringBuffer &  _rBuf,
std::u16string_view  _aPath,
AsciiString  _sWhat 
)
static

Definition at line 416 of file bootstrap.cxx.

References cURLSeparator, and PERIOD.

Referenced by describeError().

◆ addMissingDirectoryError()

static void utl::addMissingDirectoryError ( OUStringBuffer &  _rBuf,
std::u16string_view  _aPath 
)
static

Definition at line 425 of file bootstrap.cxx.

References IS_MISSING, and PERIOD.

Referenced by describeError().

◆ addUnexpectedError()

static void utl::addUnexpectedError ( OUStringBuffer &  _rBuf,
AsciiString  _sExtraInfo = nullptr 
)
static

Definition at line 431 of file bootstrap.cxx.

References PERIOD.

Referenced by describeError().

◆ checkStatusAndNormalizeURL()

static PathStatus utl::checkStatusAndNormalizeURL ( OUString &  _sURL)
static

◆ ConnectFrameControllerModel()

void utl::ConnectFrameControllerModel ( const css::uno::Reference< css::frame::XFrame > &  xFrame,
const css::uno::Reference< css::frame::XController2 > &  xController,
const css::uno::Reference< css::frame::XModel > &  xModel 
)
inline

Definition at line 39 of file fcm.hxx.

References ConnectModelController(), xController, xFrame, and xModel.

◆ ConnectModelController()

void utl::ConnectModelController ( const css::uno::Reference< css::frame::XModel > &  xModel,
const css::uno::Reference< css::frame::XController > &  xController 
)
inline

Definition at line 29 of file fcm.hxx.

References xController, and xModel.

Referenced by ConnectFrameControllerModel().

◆ ConstructTempDir_Impl()

static OUString utl::ConstructTempDir_Impl ( const OUString *  pParent,
bool  bCreateParentDirs 
)
static

Definition at line 118 of file tempfile.cxx.

References aName, DBG_ASSERT, ensuredir(), Translate::get(), and i.

Referenced by CreateTempNameFast(), GetTempNameBaseDirectory(), and lcl_createName().

◆ CreateTempName()

UNOTOOLS_DLLPUBLIC OUString utl::CreateTempName ( )

Only create a "physical" file name for a temporary file that would be valid at that moment.

Should only be used for 3rd party code with a file name interface that wants to create the file by itself. If you want to convert file name into a URL, always use class LocalFileHelper, but never use any conversion functions of osl.

Definition at line 382 of file tempfile.cxx.

References aName, and CreateTempName_Impl().

◆ CreateTempName_Impl()

static OUString utl::CreateTempName_Impl ( const OUString *  pParent,
bool  bKeep,
bool  bDir = true 
)
static

Definition at line 329 of file tempfile.cxx.

References lcl_createName(), t, and u.

Referenced by CreateTempName(), CreateTempURL(), and utl::TempFileNamed::TempFileNamed().

◆ CreateTempNameFast()

static OUString utl::CreateTempNameFast ( )
static

◆ CreateTempURL() [1/2]

UNOTOOLS_DLLPUBLIC OUString utl::CreateTempURL ( const OUString *  pParent,
bool  bDirectory 
)

Definition at line 439 of file tempfile.cxx.

References CreateTempName_Impl().

◆ CreateTempURL() [2/2]

UNOTOOLS_DLLPUBLIC OUString utl::CreateTempURL ( std::u16string_view  rLeadingChars,
bool  _bStartWithZero = true,
std::u16string_view  pExtension = {},
const OUString *  pParent = nullptr,
bool  bCreateParentDirs = false 
)

Same as above; additionally the name starts with some given characters followed by a counter ( example: rLeadingChars="abc" means "abc0","abc1" and so on, depending on existing files in the folder ).

The extension string may be f.e. ".txt" or "", if no extension string is given, ".tmp" is used

Parameters
_bStartWithZeroIf set to false names will be generated like "abc","abc0","abc1"
bCreateParentDirsIf rLeadingChars contains a slash, this will create the required parent directories.

Definition at line 444 of file tempfile.cxx.

References lcl_createName(), and t.

◆ dbgCheckStatusOfURL()

static PathStatus utl::dbgCheckStatusOfURL ( OUString const &  _sURL)
static

Definition at line 275 of file bootstrap.cxx.

References implCheckStatusOfURL().

Referenced by getDerivedPath().

◆ describeError()

static Bootstrap::FailureCode utl::describeError ( OUStringBuffer &  _rBuf,
Bootstrap::Impl const &  _rData 
)
static

◆ dropPrefixFromConfigurationPath()

UNOTOOLS_DLLPUBLIC OUString utl::dropPrefixFromConfigurationPath ( OUString const &  _sNestedPath,
std::u16string_view  _sPrefixPath 
)

get the relative path to a nested node with respect to a parent path.

Parameters
_sNestedPathA configuration path that points to a descendant of the node identified by _sPrefixPath, with both paths starting from the same node (or both being absolute).
_sPrefixPathA configuration path.
If this path is absolute, _sNestedPath must be absolute; If this path is relative, _sNestedPath must be relative; If this path is empty, _sNestedPath may start with a '/', which is stripped.
Returns
The remaining relative path from the target of _sPrefixPath to the target of _sNestedPath.
If _sPrefixPath is not a prefix of _sNestedPath, _sNestedPath is returned unaltered.

Definition at line 241 of file configpaths.cxx.

References lcl_findPrefixEnd().

Referenced by lcl_extractSetPropertyName(), and lcl_extractSetPropertyNames().

◆ ensuredir()

static bool utl::ensuredir ( const OUString &  rUnqPath)
static

Definition at line 74 of file tempfile.cxx.

References ensuredir(), and getParentName().

Referenced by ConstructTempDir_Impl(), and ensuredir().

◆ extractFirstFromConfigurationPath()

UNOTOOLS_DLLPUBLIC OUString utl::extractFirstFromConfigurationPath ( OUString const &  _sInPath,
OUString *  _sOutPath = nullptr 
)

extract the first nodename from a configuration path.

Parameters
_sInPathA relative configuration path that is not empty.
If this is not a valid configuration path, it is interpreted as a single name of a node.
_sOutPathIf non-null, contains the remainder of the path upon return.
Returns
The plain (non-escaped) name of the node that is the first step when traversing _sInPath.
If _sInPath could not be parsed as a valid configuration path, it is returned unaltered.

Definition at line 165 of file configpaths.cxx.

References lcl_resolveCharEntities().

Referenced by lcl_extractSetPropertyName(), and lcl_extractSetPropertyNames().

◆ GetDateString()

UNOTOOLS_DLLPUBLIC OUString utl::GetDateString ( const css::util::DateTime &  _rDT)

Definition at line 229 of file datetime.cxx.

References LocaleDataWrapper::getDate(), GetDateTime(), and GetLocaleData().

◆ GetDateTime()

UNOTOOLS_DLLPUBLIC DateTime utl::GetDateTime ( const css::util::DateTime &  _rDT)

Definition at line 209 of file datetime.cxx.

Referenced by GetDateString(), and GetDateTimeString().

◆ GetDateTimeString() [1/2]

UNOTOOLS_DLLPUBLIC OUString utl::GetDateTimeString ( const css::util::DateTime &  _rDT)

◆ GetDateTimeString() [2/2]

UNOTOOLS_DLLPUBLIC OUString utl::GetDateTimeString ( sal_Int32  _nDate,
sal_Int32  _nTime 
)

◆ getDerivedPath() [1/2]

static PathStatus utl::getDerivedPath ( OUString &  _rURL,
Bootstrap::Impl::PathData const &  _aBaseData,
std::u16string_view  _sRelativeURL,
rtl::Bootstrap const &  _rData,
OUString const &  _sBootstrapParameter 
)
static

◆ getDerivedPath() [2/2]

static PathStatus utl::getDerivedPath ( OUString &  _rURL,
OUString const &  _aBaseURL,
PathStatus  _aBaseStatus,
std::u16string_view  _sRelativeURL,
rtl::Bootstrap const &  _rData,
OUString const &  _sBootstrapParameter 
)
static

◆ getExecutableBaseName()

static OUString utl::getExecutableBaseName ( )
static

Definition at line 365 of file bootstrap.cxx.

References cURLSeparator, and SAL_WARN.

Referenced by utl::Bootstrap::getProductKey().

◆ GetLocaleData()

UNOTOOLS_DLLPUBLIC const LocaleDataWrapper & utl::GetLocaleData ( )

Definition at line 203 of file datetime.cxx.

References SvtSysLocale::GetLocaleData().

Referenced by GetDateString(), and GetDateTimeString().

◆ getParentName()

static OUString utl::getParentName ( std::u16string_view  aFileName)
static

Definition at line 55 of file tempfile.cxx.

Referenced by ensuredir().

◆ getStatusFromAny_Impl()

static bool utl::getStatusFromAny_Impl ( const Any &  aAny,
OUString &  aText,
sal_Int32 &  nNum 
)
static

Definition at line 36 of file progresshandlerwrap.cxx.

References rSet.

◆ GetTempNameBaseDirectory()

UNOTOOLS_DLLPUBLIC OUString utl::GetTempNameBaseDirectory ( )

Definition at line 576 of file tempfile.cxx.

References ConstructTempDir_Impl().

◆ implCheckStatusOfURL()

static PathStatus utl::implCheckStatusOfURL ( OUString const &  _sURL,
osl::DirectoryItem &  aDirItem 
)
static

◆ implEnsureAbsolute()

static bool utl::implEnsureAbsolute ( OUString &  _rsURL)
static

Definition at line 231 of file bootstrap.cxx.

References utl::Bootstrap::getProcessWorkingDir().

Referenced by implMakeAbsoluteURL().

◆ implGetBootstrapFile()

static Bootstrap::PathStatus utl::implGetBootstrapFile ( rtl::Bootstrap const &  _rData,
Bootstrap::Impl::PathData _rBootstrapFile 
)
static

◆ implGetVersionFile()

static Bootstrap::PathStatus utl::implGetVersionFile ( rtl::Bootstrap const &  _rData,
Bootstrap::Impl::PathData _rVersionFile 
)
static

◆ implMakeAbsoluteURL()

static bool utl::implMakeAbsoluteURL ( OUString &  _rsPathOrURL)
static

Definition at line 251 of file bootstrap.cxx.

References implEnsureAbsolute().

Referenced by checkStatusAndNormalizeURL().

◆ implNormalizeURL()

static bool utl::implNormalizeURL ( OUString &  _sURL,
osl::DirectoryItem &  aDirItem 
)
static

Definition at line 203 of file bootstrap.cxx.

References cURLSeparator.

Referenced by checkStatusAndNormalizeURL().

◆ ISO8601parseDate()

UNOTOOLS_DLLPUBLIC bool utl::ISO8601parseDate ( std::u16string_view  aDateStr,
css::util::Date &  rDate 
)

convert ISO8601 Date String to util::Date

Definition at line 341 of file datetime.cxx.

References o3tl::getToken(), and comphelper::string::getTokenCount().

Referenced by ISO8601parseDateTime().

◆ ISO8601parseDateTime()

UNOTOOLS_DLLPUBLIC bool utl::ISO8601parseDateTime ( std::u16string_view  rString,
css::util::DateTime &  rDateTime 
)

convert ISO8601 DateTime String to util::DateTime

Definition at line 305 of file datetime.cxx.

References ISO8601parseDate(), ISO8601parseTime(), and nPos.

◆ ISO8601parseTime()

UNOTOOLS_DLLPUBLIC bool utl::ISO8601parseTime ( std::u16string_view  aTimeStr,
css::util::Time &  rTime 
)

convert ISO8601 Time String to util::Time

Definition at line 381 of file datetime.cxx.

References end, and n.

Referenced by ISO8601parseDateTime().

◆ isPrefixOfConfigurationPath()

bool utl::isPrefixOfConfigurationPath ( std::u16string_view  _sNestedPath,
std::u16string_view  _sPrefixPath 
)

check whether a path is to a nested node with respect to a parent path.

Parameters
_sNestedPathA configuration path that maybe points to a descendant of the node identified by _sPrefixPath, with both paths starting from the same node (or both being absolute).
_sPrefixPathA configuration path.
If this path is absolute, _sNestedPath should be absolute; If this path is relative, _sNestedPath should be relative; If this path is empty, _sNestedPath may start with a '/', which is disregarded.
Returns
<TRUE>, if _sPrefixPath is a prefix of _sNestedPath; <FALSE> otherwise.
If both paths are equal <TRUE> is returned.

Definition at line 235 of file configpaths.cxx.

References lcl_findPrefixEnd().

◆ isProductVersionUpgraded()

static bool utl::isProductVersionUpgraded ( bool  aUpdateVersion)
static

This method is called when there's a need to determine if the current version of LibreOffice has been upgraded to a newer one.

Parameters
aUpdateVersionThis variable is used to determine if LibreOffice's previous version should be updated.

Definition at line 26 of file VersionConfig.hxx.

References comphelper::ConfigurationChanges::create(), Translate::get(), utl::ConfigManager::getProductVersion(), o3tl::getToken(), SAL_WARN, and o3tl::toInt32().

◆ lcl_copyData() [1/2]

static void utl::lcl_copyData ( Any &  _rData,
const NodeValueAccessor _rAccessor,
std::mutex _rMutex 
)
static

◆ lcl_copyData() [2/2]

static void utl::lcl_copyData ( const NodeValueAccessor _rAccessor,
const Any &  _rData,
std::mutex _rMutex 
)
static

◆ lcl_createName()

static OUString utl::lcl_createName ( std::u16string_view  rLeadingChars,
Tokens &  tokens,
std::u16string_view  pExtension,
const OUString *  pParent,
bool  bDirectory,
bool  bKeep,
bool  bLock,
bool  bCreateParentDirs 
)
static

◆ lcl_CreateStream()

static std::unique_ptr< SvStream > utl::lcl_CreateStream ( const OUString &  rFileName,
StreamMode  eOpenMode,
const Reference< XInteractionHandler > &  xInteractionHandler,
bool  bEnsureFileExists 
)
static

◆ lcl_Equals()

static bool utl::lcl_Equals ( const i18nutil::SearchOptions2 rSO1,
const i18nutil::SearchOptions2 rSO2 
)
static

◆ lcl_findPrefixEnd()

static sal_Int32 utl::lcl_findPrefixEnd ( std::u16string_view  _sNestedPath,
std::u16string_view  _sPrefixPath 
)
static

Definition at line 208 of file configpaths.cxx.

References o3tl::starts_with().

Referenced by dropPrefixFromConfigurationPath(), and isPrefixOfConfigurationPath().

◆ lcl_resolveCharEntities()

static void utl::lcl_resolveCharEntities ( OUString &  aLocalString)
static

Definition at line 35 of file configpaths.cxx.

References ch.

Referenced by extractFirstFromConfigurationPath(), and splitLastFromConfigurationPath().

◆ lcl_wrapName()

static OUString utl::lcl_wrapName ( std::u16string_view  _sContent,
const OUString &  _sType 
)
static

Definition at line 257 of file configpaths.cxx.

References u.

Referenced by wrapConfigurationElementName().

◆ makeAny()

template<class INTERFACE , class COMPONENT >
css::uno::Any SAL_CALL utl::makeAny ( const SharedUNOComponent< INTERFACE, COMPONENT > &  value)
inline

Definition at line 233 of file sharedunocomponent.hxx.

References value.

◆ makeImplName()

static OUString utl::makeImplName ( )
static

Definition at line 60 of file bootstrap.cxx.

References Translate::get(), and SAL_CONFIGFILE.

◆ operator<<()

template<typename charT , typename traits >
std::basic_ostream< charT, traits > & utl::operator<< ( std::basic_ostream< charT, traits > &  stream,
const SearchParam::SearchType eType 
)
inline

Definition at line 45 of file textsearch.hxx.

◆ operator==()

template<class INTERFACE , class COMPONENT >
bool utl::operator== ( const SharedUNOComponent< INTERFACE, COMPONENT > &  _rLHS,
const css::uno::Reference< INTERFACE > &  _rRHS 
)

◆ removeTree()

UNOTOOLS_DLLPUBLIC void utl::removeTree ( OUString const &  url)

recursively remove directory and all contents

Definition at line 85 of file localfilehelper.cxx.

References comphelper::DirectoryHelper::deleteDirRecursively(), and SAL_WARN_IF.

◆ SetTempNameBaseDirectory()

UNOTOOLS_DLLPUBLIC OUString utl::SetTempNameBaseDirectory ( const OUString &  rBaseName)

The TempNameBaseDirectory is a subfolder in the folder that is passed as a "physical" file name in the SetTempNameBaseDirectory method.

This subfolder will be used if a TempFile or TempName is created without a parent name or a parent name that does not belong to the local file system. The caller of the SetTempNameBase is responsible for deleting this folder and all temporary files in it. The return value of both methods is the complete "physical" name of the tempname base folder. It is not a URL because all URLs must be "UCB compatible", so there may be no suitable URL at all.

Definition at line 536 of file tempfile.cxx.

◆ splitLastFromConfigurationPath()

UNOTOOLS_DLLPUBLIC bool utl::splitLastFromConfigurationPath ( std::u16string_view  _sInPath,
OUString &  _rsOutPath,
OUString &  _rsLocalName 
)

extract the local nodename and the parent nodepath from a configuration path.

Parameters
_sInPathA configuration path that is not an empty or root path.
If this is not a valid configuration path, it is interpreted as local name of a node.
_rsOutPathOn exit: The configuration path obtained by dropping the last level off _sInPath.
If _sInPath could not be parsed as a valid configuration path, this is set to an empty string.
_rsLocalNameOn exit: The plain (non-escaped) name of the node identified by _sInPath.
If _sInPath could not be parsed as a valid configuration path, this is set to _sInPath.
Returns
<TRUE>, if a parent path could be set <FALSE>, if the path was a one-level path or an invalid path

Definition at line 76 of file configpaths.cxx.

References invalid, lcl_resolveCharEntities(), and nPos.

Referenced by utl::ConfigItem::GetReadOnlyStates().

◆ toISO8601()

UNOTOOLS_DLLPUBLIC OUString utl::toISO8601 ( const css::util::DateTime &  rDateTime)

Definition at line 264 of file datetime.cxx.

◆ typeConvert() [1/4]

UNOTOOLS_DLLPUBLIC void utl::typeConvert ( const css::util::Date &  _rDate,
Date _rOut 
)

Definition at line 241 of file datetime.cxx.

◆ typeConvert() [2/4]

UNOTOOLS_DLLPUBLIC void utl::typeConvert ( const css::util::DateTime &  _rDateTime,
DateTime _rOut 
)

Definition at line 257 of file datetime.cxx.

◆ typeConvert() [3/4]

UNOTOOLS_DLLPUBLIC void utl::typeConvert ( const Date _rDate,
css::util::Date &  _rOut 
)

Definition at line 234 of file datetime.cxx.

References Date::GetDay(), Date::GetMonth(), and Date::GetYear().

◆ typeConvert() [4/4]

UNOTOOLS_DLLPUBLIC void utl::typeConvert ( const DateTime _rDateTime,
css::util::DateTime &  _rOut 
)

◆ UCBOpenContentSync()

static bool utl::UCBOpenContentSync ( const UcbLockBytesRef xLockBytes,
Reference< XContent > const &  xContent,
const Command &  rArg,
const Reference< XInterface > &  xSink,
Reference< XInteractionHandler > const &  xInteract 
)
static

◆ UCBOpenContentSync_()

static bool utl::UCBOpenContentSync_ ( const UcbLockBytesRef xLockBytes,
const Reference< XContent > &  xContent,
const Command &  rArg,
const Reference< XInterface > &  xSink,
const Reference< XInteractionHandler > &  xInteract 
)
static

Function for opening UCB contents synchronously, but with handled timeout;.

Function for opening UCB contents synchronously.

Definition at line 852 of file ucblockbytes.cxx.

References ERRCODE_ABORT, ERRCODE_IO_ACCESSDENIED, ERRCODE_IO_CANTREAD, ERRCODE_IO_GENERAL, ERRCODE_IO_NOTEXISTS, ERRCODE_IO_NOTSUPPORTED, Exception, ucbhelper::Content::executeCommand(), comphelper::getProcessComponentContext(), and xSink.

Referenced by UCBOpenContentSync().

◆ UNLESS_MERGELIBS()

class utl::UNLESS_MERGELIBS ( UNOTOOLS_DLLPUBLIC  )

allows simple access to static configuration structures.

The basic idea of this class is that it's clients (usually derived classes) simply register an address in memory and a node path, and upon explicit request, the configuration value and the memory are synchronized.
This means that when calling <method>read</method>, the current configuration values are copied into the memory registered for them, and upon calling <method>write</method> the current values in memory are set in the configuration nodes.

This way, the usage of this class is pretty straight forward: derive your own class, spend some members to it, and bind these members to configuration node (usually done in the ctor of the derived class).
In the dtor, simply call <method>write</method> and <method>commit</method>.

There is no auto-commit mechanism in the dtor: In the usual scenario, when you derive from this class and bind some members of your derived class to config nodes, this means that your members will be destroyed before your base class' dtor is called, so accessing the memory during such a theoretical auto-commit would yield undefined behaviour.

constructs the object

Parameters
_rxORBspecifies the service factory which should be used to access the configuration
_rAccessSafetyAs this class is intended to manipulate objects it does not hold itself (see the various registerXXX methods), it needs to guard these access for multi threading safety.
The mutex given here is locked whenever such an access occurs.
_pConfigLocationis an ASCII string describing the configurations node path
_nAccessFlagsspecifies different aspects of the configuration aspect to be created, e.g. it's update mode etc.
See the CVC_xxx constants for what you can use here.
_nLevelsspecifies the number of levels to access under the node given by <arg>_pConfigLocation</arg>

dtor

registers a data accessor of an arbitrary type.

Usually, in your derived class you simply add a member of the correct type of the configuration value, and then call this method with the address of this member.

Parameters
_pRelativePathAsciiis a relative (ASCII) path of the node which should be "mirrored" into the accessor.
_pContainerpoints to the accessors location in memory. Usually, this is simply an address of your derived class
_rValueTypeis the type of your accessor. This type must be supported by the configuration.

reads the configuration data

The current values of the nodes bound (using the registerXXX methods) is copied into their respective exchange locations.

Please note that any changes done to your exchange locations are overridden with the current config values.

See also
write

commits any changes done

Note that calling <method>write</method>(<sal_True/) is the same as calling <method>commit</method>(<TRUE>).

The current values in the exchange locations are written to the configuration nodes before the changes are committed.

@precond The access must have been created for update access

implements the ctors

registers a value container

Definition at line 1 of file configvaluecontainer.hxx.

References Reference.

◆ updateStatus()

static Bootstrap::PathStatus utl::updateStatus ( Bootstrap::Impl::PathData _rResult)
static

◆ wrapConfigurationElementName() [1/2]

UNOTOOLS_DLLPUBLIC OUString utl::wrapConfigurationElementName ( std::u16string_view  _sElementName)

Create a one-level relative configuration path from a set element name without a known set element type.

Parameters
_sElementNameAn arbitrary string that is to be interpreted as name of a configuration set element.
Returns
A one-level relative path to the element, of the form "*['<Name>']", where <Name> is properly escaped.

Definition at line 293 of file configpaths.cxx.

References lcl_wrapName().

◆ wrapConfigurationElementName() [2/2]

OUString utl::wrapConfigurationElementName ( std::u16string_view  _sElementName,
OUString const &  _sTypeName 
)

Create a one-level relative configuration path from a set element name and a known set element type.

Parameters
_sElementNameAn arbitrary string that is to be interpreted as name of a configuration set element.
_sTypeNameAn string identifying the type of the element. Usually this is be the name of the element-template of the set.
Returns
A one-level relative path to the element, of the form "<Type>['<Name>']", where <Name> is properly escaped.

Definition at line 298 of file configpaths.cxx.

References lcl_wrapName().

Variable Documentation

◆ cURLSeparator

sal_Unicode const utl::cURLSeparator = '/'

◆ IS_INVALID

char const utl::IS_INVALID[] = "is corrupt"

Definition at line 413 of file bootstrap.cxx.

Referenced by describeError().

◆ IS_MISSING

char const utl::IS_MISSING[] = "is missing"

Definition at line 412 of file bootstrap.cxx.

Referenced by addMissingDirectoryError(), and describeError().

◆ PERIOD

char const utl::PERIOD[] = ". "

Definition at line 414 of file bootstrap.cxx.

Referenced by addFileError(), addMissingDirectoryError(), and addUnexpectedError().