tdf#142242 Forename imported with trailing space
Fix the case where there is only a name, and no surname. Change-Id: If11078364924c8332b113e5650e7ea2b262a357a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
93a3e2f86c
commit
07021596ac
1 changed files with 4 additions and 3 deletions
|
@ -222,7 +222,7 @@ OUString SvtUserOptions::Impl::GetFullName () const
|
|||
sFullName += GetToken(UserOptToken::FathersName).trim();
|
||||
if (!sFullName.isEmpty())
|
||||
sFullName += " ";
|
||||
sFullName += GetToken(UserOptToken::LastName).trim();
|
||||
sFullName += GetToken(UserOptToken::LastName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -231,16 +231,17 @@ OUString SvtUserOptions::Impl::GetFullName () const
|
|||
sFullName = GetToken(UserOptToken::LastName).trim();
|
||||
if (!sFullName.isEmpty())
|
||||
sFullName += " ";
|
||||
sFullName += GetToken(UserOptToken::FirstName).trim();
|
||||
sFullName += GetToken(UserOptToken::FirstName);
|
||||
}
|
||||
else
|
||||
{
|
||||
sFullName = GetToken(UserOptToken::FirstName).trim();
|
||||
if (!sFullName.isEmpty())
|
||||
sFullName += " ";
|
||||
sFullName += GetToken(UserOptToken::LastName).trim();
|
||||
sFullName += GetToken(UserOptToken::LastName);
|
||||
}
|
||||
}
|
||||
sFullName = sFullName.trim();
|
||||
|
||||
return sFullName;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue