diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-03-07 21:52:20 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-08 15:35:54 +0000 |
commit | 16fb0d3d0f68708c183c53bd18660a23970b77fe (patch) | |
tree | 8e86df69dcf4ab52368a0a1d767dff62930549fd /include/osl/security.hxx | |
parent | f9ddda353851b019c2eb8a427ee9f8042f8107b0 (diff) |
tdf#98407 PathSubstitution: Add substitution for $(username)
This allows to use the username as a placeholder in the config paths (Autotext, Gallery, etc)
Change-Id: I76434e980cd8ec8785a5587d0bc5fdd67dc42de2
Reviewed-on: https://gerrit.libreoffice.org/22901
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/osl/security.hxx')
-rw-r--r-- | include/osl/security.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/osl/security.hxx b/include/osl/security.hxx index 57ab17de4c46..a1a905ee888a 100644 --- a/include/osl/security.hxx +++ b/include/osl/security.hxx @@ -69,9 +69,11 @@ inline bool Security::getUserIdent( rtl::OUString& strIdent) const } -inline bool Security::getUserName( rtl::OUString& strName ) const +inline bool Security::getUserName( rtl::OUString& strName, bool bIncludeDomain ) const { - return osl_getUserName( m_handle, &strName.pData ); + if (bIncludeDomain) + return osl_getUserName( m_handle, &strName.pData ); + return osl_getShortUserName( m_handle, &strName.pData ); } |