summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef <stef@ws.local>2004-03-31 00:10:49 +0000
committerStef <stef@ws.local>2004-03-31 00:10:49 +0000
commit056b081e34d5b495eba3d813f2dc20dfeb34bc22 (patch)
treeeafa30d650d67b589b2d5a63f593523ec6137520
parent53914f770f1e1dc1ab4342c64846fd995825b7e6 (diff)
Fixed brace problem.
-rw-r--r--src/rtfparser.cpp12
1 files changed, 11 insertions, 1 deletions
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();