[Libreoffice-commits] core.git: extensions/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 17 09:46:10 UTC 2019
extensions/source/config/WinUserInfo/WinUserInfoBe.cxx | 38 ++++++-----------
1 file changed, 15 insertions(+), 23 deletions(-)
New commits:
commit d550caa333328d98587b7c269a580b400238dc2b
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Sep 17 10:05:14 2019 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Sep 17 11:45:08 2019 +0200
No need for the string buffer here
Change-Id: I196dc9c50169108ca72f7b5e06d0bf2c2bb446d9
Reviewed-on: https://gerrit.libreoffice.org/79044
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
index 8fcc5dfcf5ca..a34ca11c662d 100644
--- a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
+++ b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx
@@ -217,29 +217,21 @@ private:
{
try
{
- const OUString sNul('\0');
- OUStringBuffer sCachedData(200);
- sCachedData.append("user=").append(m_sUserDN);
- sCachedData.append(sNul).append(givenname).append("=").append(GetGivenName());
- sCachedData.append(sNul).append(sn).append("=").append(GetSn());
- sCachedData.append(sNul).append(initials).append("=").append(GetInitials());
- sCachedData.append(sNul).append(street).append("=").append(GetStreet());
- sCachedData.append(sNul).append(l).append("=").append(GetCity());
- sCachedData.append(sNul).append(st).append("=").append(GetState());
- sCachedData.append(sNul).append(postalcode).append("=").append(GetPostalCode());
- sCachedData.append(sNul).append(c).append("=").append(GetCountry());
- sCachedData.append(sNul).append(o).append("=").append(GetOrganization());
- sCachedData.append(sNul).append(title).append("=").append(GetTitle());
- sCachedData.append(sNul).append(homephone).append("=").append(GetHomePhone());
- sCachedData.append(sNul)
- .append(telephonenumber)
- .append("=")
- .append(GetTelephoneNumber());
- sCachedData.append(sNul)
- .append(facsimiletelephonenumber)
- .append("=")
- .append(GetFaxNumber());
- sCachedData.append(sNul).append(mail).append("=").append(GetMail());
+ OUString sCachedData = "user=" + m_sUserDN // user DN
+ + "\0" + givenname + "=" + GetGivenName() // 1st name
+ + "\0" + sn + "=" + GetSn() // sn
+ + "\0" + initials + "=" + GetInitials() // initials
+ + "\0" + street + "=" + GetStreet() // street
+ + "\0" + l + "=" + GetCity() // l
+ + "\0" + st + "=" + GetState() // st
+ + "\0" + postalcode + "=" + GetPostalCode() // p.code
+ + "\0" + c + "=" + GetCountry() // c
+ + "\0" + o + "=" + GetOrganization() // o
+ + "\0" + title + "=" + GetTitle() // title
+ + "\0" + homephone + "=" + GetHomePhone() // h.phone
+ + "\0" + telephonenumber + "=" + GetTelephoneNumber() // tel
+ + "\0" + facsimiletelephonenumber + "=" + GetFaxNumber() // fax
+ + "\0" + mail + "=" + GetMail(); // mail
const css::uno::Sequence<sal_Int8> seqCachedData(
reinterpret_cast<const sal_Int8*>(sCachedData.getStr()),
sCachedData.getLength() * sizeof(sal_Unicode));
More information about the Libreoffice-commits
mailing list