[Libreoffice-commits] core.git: filter/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 5 20:41:10 UTC 2020
filter/source/t602/t602filter.cxx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 0f323c534fdfe511deb5a4d2ed15bc789475d904
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Sep 5 21:36:00 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Sep 5 22:40:33 2020 +0200
Simplify construction of a single-character OUString
(This change is a prerequisite for making the OUString ctor taking a raw pointer
explicit.)
Change-Id: Ifc7450591c723223e8c696110866e8ee5e2900e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102087
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 19500d6093a5..13a1841f7f7e 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -472,9 +472,7 @@ void T602ImportFilter::Reset602()
void T602ImportFilter::inschrdef(unsigned char ch)
{
- static sal_Unicode xch[2];
-
- xch[1] = 0;
+ sal_Unicode xch;
if(ch > 127) {
@@ -486,15 +484,15 @@ void T602ImportFilter::inschrdef(unsigned char ch)
}
if(ini.ruscode)
- xch[0] = (rus2UNC[(ch-128)*2] << 8) + rus2UNC[(ch-128)*2+1];
+ xch = (rus2UNC[(ch-128)*2] << 8) + rus2UNC[(ch-128)*2+1];
else
- xch[0] = (lat2UNC[(ch-128)*2] << 8) + lat2UNC[(ch-128)*2+1];
+ xch = (lat2UNC[(ch-128)*2] << 8) + lat2UNC[(ch-128)*2+1];
} else
- xch[0] = ch;
+ xch = ch;
pst.waspar = false;
if (mxHandler.is())
- mxHandler->characters(xch);
+ mxHandler->characters(OUString(xch));
}
void T602ImportFilter::wrtfnt()
More information about the Libreoffice-commits
mailing list