57#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
114 ":HighlightRefColour",
130 ":InitiallyAvailable",
131 ":ProgramConnectionTag",
137 ":NoTokenActionSlots",
140 ":MultipleSelection",
149 ":OrigRefLineColour",
150 ":OrigRefFillColour",
203 ":GetAvailabilityStatus",
206 ":GetCursorPosition",
211 ":GetHighlightStatus",
212 ":GetInteractionStatus",
215 ":GetLastAnchorFired",
225 ":GetSelectionStatus",
253 ":SetCounterEndPosition",
254 ":SetCounterPosition",
255 ":SetCounterTrigger",
256 ":SetCursorPosition",
263 ":SetHighlightStatus",
264 ":SetInteractionStatus",
296 ":NewAbsoluteColour",
303 ":SetBackgroundColour",
307 ":SetFontAttributes",
308 ":SetVideoDecodeOffset",
309 ":GetVideoDecodeOffset",
312 ":SetBitmapDecodeOffset",
313 ":GetBitmapDecodeOffset",
314 ":SetSliderParameters",
330 { .
m_name=
"black", .m_r=0, .m_g=0, .m_b=0, .m_t=0 },
331 { .m_name=
"transparent", .m_r=0, .m_g=0, .m_b=0, .m_t=255 },
332 { .m_name=
"gray", .m_r=128, .m_g=128, .m_b=128, .m_t=0 },
333 { .m_name=
"darkgray", .m_r=192, .m_g=192, .m_b=192, .m_t=0 },
334 { .m_name=
"red", .m_r=255, .m_g=0, .m_b=0, .m_t=0 },
335 { .m_name=
"darkred", .m_r=128, .m_g=0, .m_b=0, .m_t=0 },
336 { .m_name=
"blue", .m_r=0, .m_g=0, .m_b=255, .m_t=0 },
337 { .m_name=
"darkblue", .m_r=0, .m_g=0, .m_b=128, .m_t=0 },
338 { .m_name=
"green", .m_r=0, .m_g=255, .m_b=0, .m_t=0 },
339 { .m_name=
"darkgreen", .m_r=0, .m_g=128, .m_b=0, .m_t=0 },
340 { .m_name=
"yellow", .m_r=255, .m_g=255, .m_b=0, .m_t=0 },
341 { .m_name=
"cyan", .m_r=0, .m_g=255, .m_b=255, .m_t=0 },
342 { .m_name=
"magenta", .m_r=255, .m_g=0, .m_b=255, .m_t=0 }
351 if (str.compare(
rchTagNames[i], Qt::CaseInsensitive) == 0)
362#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
363static constexpr int MAX_ENUM { 30 };
399 Error(
"Malformed comment");
433 Error(
"Unrecognised tag");
458 Error(
"Unterminated string");
489 Error(
"Unterminated string");
504 Error(
"Malformed quoted printable string");
519 else if (
m_ch >=
'A' &&
m_ch <=
'F')
521 byte =
m_ch -
'A' + 10;
523 else if (
m_ch >=
'a' &&
m_ch <=
'f')
525 byte =
m_ch -
'a' + 10;
529 Error(
"Malformed quoted printable string");
539 else if (
m_ch >=
'A' &&
m_ch <=
'F')
541 byte +=
m_ch -
'A' + 10;
543 else if (
m_ch >=
'a' &&
m_ch <=
'f')
545 byte +=
m_ch -
'a' + 10;
549 Error(
"Malformed quoted printable string");
566 MHERROR(
"Base 64 string is not implemented");
570 MHERROR(
"3-byte hex constant is not implemented");
586 bool negative =
m_ch ==
'-';
592 if (m_ch < '0' || m_ch >
'9')
594 Error(
"Expected digit after '-'");
605 MHERROR(
"Hex constant is not implemented");
683 while ((isalpha(
m_ch) ||
m_ch ==
'-')
690 if (buff.compare(
"NULL", Qt::CaseInsensitive) == 0)
696 if (buff.compare(
"true", Qt::CaseInsensitive) == 0)
703 if (buff.compare(
"false", Qt::CaseInsensitive) == 0)
757 if (buff.compare(colour.m_name, Qt::CaseInsensitive) == 0)
769 Error(
"Unrecognised enumeration");
800 Error(
"Unknown character");
821 Error(
"Expected ':' after '{'");
968 Error(
"Expected '('");
1061 Error(
"Unexpected symbol");
@ C_NEW_GENERIC_OCTETSTRING
@ C_SET_COUNTER_END_POSITION
@ C_GET_LAST_ANCHOR_FIRED
@ C_NEW_GENERIC_CONTENT_REF
@ C_GET_INTERACTION_STATUS
@ C_SET_INTERACTION_STATUS
@ C_NEW_GENERIC_OBJECT_REF
@ C_GET_AVAILABILITY_STATUS
static constexpr ssize_t MAX_TAG_LENGTH
const std::array< const QString, 253 > rchTagNames
static int FindTag(const QString &str)
static constexpr ssize_t MAX_ENUM
static int GetEventType(const QString &str)
void Copy(const MHOctetString &str)
std::vector< uint8_t > m_string
MHParseNode * Parse() override
void Error(const char *str) const
static int GetStyle(const QString &str)
static int GetOrientation(const QString &str)
static int GetStartCorner(const QString &str)
static int GetLineOrientation(const QString &str)
static int GetJustification(const QString &str)