summaryrefslogtreecommitdiff
path: root/src/rtfparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtfparser.cpp')
-rw-r--r--src/rtfparser.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/rtfparser.cpp b/src/rtfparser.cpp
index 31e5971..7e70fe5 100644
--- a/src/rtfparser.cpp
+++ b/src/rtfparser.cpp
@@ -363,6 +363,10 @@ bool RtfParser::parseControlWord()
else if(ch >= '0' && ch <= '9')
param.append(1, (char)ch);
+ // Hyphens are part of the parameter of a control word
+ else if(ch == '-' && !controlword.empty())
+ param.append(1, (char)ch);
+
// Now handle escapes and other special types of
// control words. These are all only valid at beginning
// of the "control word"
@@ -475,16 +479,11 @@ bool RtfParser::parseControlWord()
else if(m_parseUnicode && flags & RtfHandler::kHasParam &&
controlword == "u" )
{
- sendData(numPar);
+ // RTF plays hokey and uses negative values in unicode
+ sendData((unsigned short)((short)numPar));
m_uniEat = m_uniEatStack.top();
}
- // Unicode destination
- else if(m_parseUnicode && controlword == "ud")
- {
-
- }
-
// Skip value for unicode characters
else if(m_parseUnicode && controlword == "uc")
{