diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-09-17 10:05:14 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-09-17 11:45:08 +0200 |
commit | d550caa333328d98587b7c269a580b400238dc2b (patch) | |
tree | cb3fb6b232f1ad8a23bb4aaf20016e4d43580bce /extensions | |
parent | f57155ec6a980c6222bde4fdea6ce5a54b49025d (diff) |
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@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/config/WinUserInfo/WinUserInfoBe.cxx | 38 |
1 files changed, 15 insertions, 23 deletions
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)); |