summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-09-25 09:13:58 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-09-25 09:16:59 +0200
commit59ec0fe032badfb9dae59f27e97f842c11c60d98 (patch)
treee5bd3b56defc882de3a2104c088264cab85e9df9 /writerfilter
parent40892cd3311021c55e943228e16bfd36df7b1011 (diff)
RTF import: split this call into simpler ones
Hopefully with this it's easier to see which is the usual and which one is the exceptional case. Change-Id: Iac1b49b2a4f2b909db46155d1ff10d2ba99fd655
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index e8483bb43f2f..575562fb2eca 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3209,11 +3209,10 @@ void RTFDocumentImpl::checkUnicode(bool bUnicode, bool bHex)
}
if (bHex && !m_aHexBuffer.isEmpty())
{
- OUString aString = OStringToOUString(
- m_aHexBuffer.makeStringAndClear(),
- ((m_aStates.top().eDestination == Destination::FONTENTRY
- && m_aStates.top().nCurrentEncoding == RTL_TEXTENCODING_SYMBOL)
- ? RTL_TEXTENCODING_MS_1252 : m_aStates.top().nCurrentEncoding));
+ rtl_TextEncoding nEncoding = m_aStates.top().nCurrentEncoding;
+ if (m_aStates.top().eDestination == Destination::FONTENTRY && m_aStates.top().nCurrentEncoding == RTL_TEXTENCODING_SYMBOL)
+ nEncoding = RTL_TEXTENCODING_MS_1252;
+ OUString aString = OStringToOUString(m_aHexBuffer.makeStringAndClear(), nEncoding);
text(aString);
}
}