From 056b081e34d5b495eba3d813f2dc20dfeb34bc22 Mon Sep 17 00:00:00 2001 From: Stef Date: Wed, 31 Mar 2004 00:10:49 +0000 Subject: Fixed brace problem. --- src/rtfparser.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/rtfparser.cpp') diff --git a/src/rtfparser.cpp b/src/rtfparser.cpp index 2928aa7..f2379b3 100644 --- a/src/rtfparser.cpp +++ b/src/rtfparser.cpp @@ -177,6 +177,17 @@ bool RtfReader::parseControlWord(RtfContext& cx) break; } + // Escaped braces + else if(empty && ch == '{') + { + sendData(cx, L'{'); + } + + else if(empty && ch == '}') + { + sendData(cx, L'}'); + } + // Non breaking space else if(empty && ch == '~') { @@ -389,7 +400,6 @@ done: if(m_depth != 0) m_parseErrors.append("unmatched braces\n"); - // TODO: Check depth and give errors if screwy if(m_handler) m_handler->endDocument(); -- cgit v1.2.3