44#define stricmp strcasecmp
68#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
125 ":HighlightRefColour",
141 ":InitiallyAvailable",
142 ":ProgramConnectionTag",
148 ":NoTokenActionSlots",
151 ":MultipleSelection",
160 ":OrigRefLineColour",
161 ":OrigRefFillColour",
214 ":GetAvailabilityStatus",
217 ":GetCursorPosition",
222 ":GetHighlightStatus",
223 ":GetInteractionStatus",
226 ":GetLastAnchorFired",
236 ":GetSelectionStatus",
264 ":SetCounterEndPosition",
265 ":SetCounterPosition",
266 ":SetCounterTrigger",
267 ":SetCursorPosition",
274 ":SetHighlightStatus",
275 ":SetInteractionStatus",
307 ":NewAbsoluteColour",
314 ":SetBackgroundColour",
318 ":SetFontAttributes",
319 ":SetVideoDecodeOffset",
320 ":GetVideoDecodeOffset",
323 ":SetBitmapDecodeOffset",
324 ":GetBitmapDecodeOffset",
325 ":SetSliderParameters",
341 {
"black", 0, 0, 0, 0 },
342 {
"transparent", 0, 0, 0, 255 },
343 {
"gray", 128, 128, 128, 0 },
344 {
"darkgray", 192, 192, 192, 0 },
345 {
"red", 255, 0, 0, 0 },
346 {
"darkred", 128, 0, 0, 0 },
347 {
"blue", 0, 0, 255, 0 },
348 {
"darkblue", 0, 0, 128, 0 },
349 {
"green", 0, 255, 0, 0 },
350 {
"darkgreen", 0, 128, 0, 0 },
351 {
"yellow", 255, 255, 0, 0 },
352 {
"cyan", 0, 255, 255, 0 },
353 {
"magenta", 255, 0, 255, 0 }
362 if (str.compare(
rchTagNames[i], Qt::CaseInsensitive) == 0)
373#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
374static constexpr int MAX_ENUM { 30 };
410 Error(
"Malformed comment");
444 Error(
"Unrecognised tag");
471 Error(
"Unterminated string");
479 Error(
"Insufficient memory");
510 Error(
"Unterminated string");
525 Error(
"Malformed quoted printable string");
540 else if (
m_ch >=
'A' &&
m_ch <=
'F')
542 byte =
m_ch -
'A' + 10;
544 else if (
m_ch >=
'a' &&
m_ch <=
'f')
546 byte =
m_ch -
'a' + 10;
550 Error(
"Malformed quoted printable string");
560 else if (
m_ch >=
'A' &&
m_ch <=
'F')
562 byte +=
m_ch -
'A' + 10;
564 else if (
m_ch >=
'a' &&
m_ch <=
'f')
566 byte +=
m_ch -
'a' + 10;
570 Error(
"Malformed quoted printable string");
581 Error(
"Insufficient memory");
595 MHERROR(
"Base 64 string is not implemented");
599 MHERROR(
"3-byte hex constant is not implemented");
615 bool negative =
m_ch ==
'-';
621 if (m_ch < '0' || m_ch >
'9')
623 Error(
"Expected digit after '-'");
634 MHERROR(
"Hex constant is not implemented");
712 while ((isalpha(
m_ch) ||
m_ch ==
'-')
719 if (buff.compare(
"NULL", Qt::CaseInsensitive) == 0)
725 if (buff.compare(
"true", Qt::CaseInsensitive) == 0)
732 if (buff.compare(
"false", Qt::CaseInsensitive) == 0)
786 if (buff.compare(colour.m_name, Qt::CaseInsensitive) == 0)
789 auto *str = (
unsigned char *)realloc(
m_string, 4 + 1);
793 Error(
"Insufficient memory");
807 Error(
"Unrecognised enumeration");
838 Error(
"Unknown character");
859 Error(
"Expected ':' after '{'");
1006 Error(
"Expected '('");
1099 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
const std::array< const QString, 253 > rchTagNames
static constexpr size_t MAX_ENUM
static constexpr size_t MAX_TAG_LENGTH
static int FindTag(const QString &str)
static int GetEventType(const QString &str)
void Copy(const MHOctetString &str)
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)