[Libreoffice-commits] core.git: svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 20 11:54:12 UTC 2018
svx/source/dialog/charmap.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 0d4d93649ddb9962d877e23cdcc3d73e039d7772
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 19 13:19:56 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Nov 20 12:53:49 2018 +0100
don't need to use a OUStringBuffer for one character
Change-Id: I301a27edf47588d11080b91507b79be177a6f99c
Reviewed-on: https://gerrit.libreoffice.org/63608
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 0d8a869a63d6..a3044f460996 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -532,9 +532,8 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1,
int x = pix.X();
int y = pix.Y();
- OUStringBuffer buf;
- buf.appendUtf32(mxFontCharMap->GetCharFromIndex(i));
- OUString aCharStr(buf.makeStringAndClear());
+ sal_UCS4 nChar = mxFontCharMap->GetCharFromIndex(i);
+ OUString aCharStr(&nChar, 1);
int nTextWidth = rRenderContext.GetTextWidth(aCharStr);
int tx = x + (nX - nTextWidth + 1) / 2;
int ty = y + (nY - nTextHeight + 1) / 2;
More information about the Libreoffice-commits
mailing list