summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-07-24 11:59:43 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-07-24 14:16:05 +0200
commitfbee23deadd0e168d5b73629e31d317810c88bc9 (patch)
tree9e7c6bd19fa44e11e5bd0304f1f2620fb8c5eae5 /writerfilter
parent8251cd1936af5047c817adf88333fef31031c506 (diff)
escape RTF_LBRACE and RTF_RBRACE inside RTF_MR
Change-Id: I9315da151390ea1b5d56c7e58ac901e3f11dd2a7
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 36b3fa6833fd..8e9d04d672cb 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1507,6 +1507,13 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
if (cCh > 0)
{
OUString aStr(OStringToOUString(OString(cCh), RTL_TEXTENCODING_MS_1252));
+ if ((nKeyword == RTF_LBRACE || nKeyword == RTF_RBRACE) && m_aStates.top().nDestinationState == DESTINATION_MR)
+ {
+ if (nKeyword == RTF_LBRACE)
+ aStr = "\\{";
+ else
+ aStr = "\\}";
+ }
text(aStr);
return 0;
}
@@ -3122,7 +3129,6 @@ int RTFDocumentImpl::pushState()
m_aStates.top().nDestinationState == DESTINATION_SHAPETEXT ||
m_aStates.top().nDestinationState == DESTINATION_FORMFIELD ||
(m_aStates.top().nDestinationState == DESTINATION_FIELDINSTRUCTION && !m_bEq) ||
- m_aStates.top().nDestinationState == DESTINATION_MOMATH ||
m_aStates.top().nDestinationState == DESTINATION_MNUM ||
m_aStates.top().nDestinationState == DESTINATION_MDEN ||
m_aStates.top().nDestinationState == DESTINATION_ME)
@@ -3133,6 +3139,8 @@ int RTFDocumentImpl::pushState()
m_aStates.top().nDestinationState = DESTINATION_REVISIONENTRY;
else if (m_aStates.top().nDestinationState == DESTINATION_EQINSTRUCTION)
m_aStates.top().nDestinationState = DESTINATION_NORMAL;
+ else if (m_aStates.top().nDestinationState == DESTINATION_MOMATH)
+ m_aStates.top().nDestinationState = DESTINATION_MR;
return 0;
}