summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-07-01 16:56:23 +0200
committerMiklos Vajna <vmiklos@frugalware.org>2011-07-01 16:56:23 +0200
commit4f17810e9b3d46b90ca76462912dd1b300ca7648 (patch)
tree5cace0e57a3956e9e8d657fbde136fd51a72beb0
parentde429ef373a23a3a95d770a3d1075e54be9e7990 (diff)
resolveChars: make calling text() the default
Ideally we should always call that, since that handles unicode characters.
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 2dcd97b39bf0..1a9821a3daad 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -566,13 +566,7 @@ int RTFDocumentImpl::resolveChars(char ch)
OUString aOUStr(OStringToOUString(aStr, m_aStates.top().nCurrentEncoding));
- if (m_aStates.top().nDestinationState == DESTINATION_NORMAL
- || m_aStates.top().nDestinationState == DESTINATION_FIELDINSTRUCTION
- || m_aStates.top().nDestinationState == DESTINATION_FIELDRESULT
- || m_aStates.top().nDestinationState == DESTINATION_LEVELTEXT || m_aStates.top().nDestinationState == DESTINATION_BOOKMARKSTART
- || m_aStates.top().nDestinationState == DESTINATION_BOOKMARKEND)
- text(aOUStr);
- else if (m_aStates.top().nDestinationState == DESTINATION_FONTENTRY)
+ if (m_aStates.top().nDestinationState == DESTINATION_FONTENTRY)
{
// this is a font name, drop the ; at the end if it's there
if (aOUStr.endsWithAsciiL(";", 1))
@@ -614,6 +608,8 @@ int RTFDocumentImpl::resolveChars(char ch)
}
m_aAuthors[m_aAuthors.size()] = aOUStr;
}
+ else
+ text(aOUStr);
return 0;
}