summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-09-05 21:36:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-09-05 22:40:33 +0200
commit0f323c534fdfe511deb5a4d2ed15bc789475d904 (patch)
treeff9e667d3f5572058ee7700bd1b78412db5574fe /filter
parentd211909bb95f99b5adc6d49f60610f4d0676afbd (diff)
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@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/t602/t602filter.cxx12
1 files changed, 5 insertions, 7 deletions
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()