From 37da2787060aa8ec1a87610650bd069c8c38cf2e Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 31 Mar 2004 00:10:49 +0000 Subject: Fixed brace problem. --- src/rtfparser.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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