summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-07-10 12:12:55 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-07-10 14:02:54 +0000
commitddf26c41c8af7d8b50784ee01df6f8319f9c0bb5 (patch)
tree7e1efdb41ccf7b85384deba1b664b00d00b88051 /writerfilter/source
parentd9b36d3623ce5d88bfaca7a31426fa126a6ce4ac (diff)
fdo#66682 RTF export: fix level text of SVX_NUM_ARABIC
Even if level text is not ASCII, we should just write the placeholder values (0x00, 0x01, etc.) in a hex encoded form, without Unicode. Regression from 07d01742c69f1c0335bc7e1b57abd8341ce255e7. Also, fix the import side, so the previous bad output now looks bad in Writer as well. (cherry picked from commit 8422d1f5042de08e8b090a907889b41e133bda40) Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: I2f93892006c07eec243ec7dfcb23372d243a2db4 Reviewed-on: https://gerrit.libreoffice.org/4809 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 12fb5ecb8331..8bf0e0690408 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1691,7 +1691,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
{
if (nKeyword != RTF_HEXCHAR)
- checkUnicode();
+ checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true);
+ else
+ checkUnicode(/*bUnicode =*/ true, /*bHex =*/ false);
setNeedSect();
RTFSkipDestination aSkip(*this);
@@ -3076,7 +3078,8 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
if ((SAL_MIN_INT16 <= nParam) && (nParam <= SAL_MAX_UINT16))
{
m_aUnicodeBuffer.append(static_cast<sal_Unicode>(nParam));
- m_aStates.top().nCharsToSkip = m_aStates.top().nUc;
+ if (m_aStates.top().nDestinationState != DESTINATION_LEVELTEXT)
+ m_aStates.top().nCharsToSkip = m_aStates.top().nUc;
}
break;
case RTF_LEVELFOLLOW: