[Libreoffice-commits] core.git: unotools/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jun 13 11:19:36 UTC 2021
unotools/source/config/useroptions.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 07021596acb3d104ba129d371b1ae0b79f67a6a4
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Jun 12 18:57:51 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jun 13 13:18:59 2021 +0200
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 at collabora.co.uk>
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index 66f354ef5ae5..bf877b790392 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -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;
}
More information about the Libreoffice-commits
mailing list