// SPDX-FileCopyrightText: 2008, 2011 Brad Hards <bradh@frogmouth.net>
// SPDX-License-Identifier: BSD-2-Clause

#include "ControlWord_p.h"

#include <QGlobalStatic>
#include <QHash>
#include <QSet>
#include <QString>
#include <QtTypes>

using namespace Qt::Literals::StringLiterals;

enum control_word_types : quint8 {
    Symbol,
    Flag,
    Value,
    Toggle,
    Destination,
};

using KnownControlWordsTable = QHash<QString, control_word_types>;
using SupportedDestinationsSet = QSet<QString>;

static KnownControlWordsTable initKnownControlWords()
{
    return {
        {u"\'"_s, Symbol},
        {u"-"_s, Symbol},
        {u"*"_s, Symbol},
        {u":"_s, Symbol},
        {u"\\"_s, Symbol},
        {u"_"_s, Symbol},
        {u"{u"_s, Symbol},
        {u"|"_s, Symbol},
        {u"_s}"_s, Symbol},
        {u"~"_s, Symbol},
        {u"ab"_s, Toggle},
        {u"absh"_s, Value},
        {u"abslock"_s, Flag},
        {u"absnoovrlp"_s, Toggle},
        {u"absw"_s, Value},
        {u"acaps"_s, Toggle},
        {u"acccircle"_s, Toggle},
        {u"acccomma"_s, Toggle},
        {u"accdot"_s, Toggle},
        {u"accnone"_s, Toggle},
        {u"accunderdot"_s, Toggle},
        {u"acf"_s, Value},
        {u"adeff"_s, Value},
        {u"additive"_s, Flag},
        {u"adeflang"_s, Value},
        {u"adjustright"_s, Flag},
        {u"adn"_s, Value},
        {u"aenddoc"_s, Flag},
        {u"aendnotes"_s, Flag},
        {u"aexpnd"_s, Value},
        {u"af"_s, Value},
        {u"afelev"_s, Flag},
        {u"afs"_s, Value},
        {u"aftnbj"_s, Flag},
        {u"aftncn"_s, Destination},
        {u"aftnnalc"_s, Flag},
        {u"aftnnar"_s, Flag},
        {u"aftnnauc"_s, Flag},
        {u"aftnnchi"_s, Flag},
        {u"aftnnchosung"_s, Flag},
        {u"aftnncnum"_s, Flag},
        {u"aftnndbar"_s, Flag},
        {u"aftnndbnum"_s, Flag},
        {u"aftnndbnumd"_s, Flag},
        {u"aftnndbnumk"_s, Flag},
        {u"aftnndbnumt"_s, Flag},
        {u"aftnnganada"_s, Flag},
        {u"aftnngbnum"_s, Flag},
        {u"aftnngbnumd"_s, Flag},
        {u"aftnngbnumk"_s, Flag},
        {u"aftnngbnuml"_s, Flag},
        {u"aftnnrlc"_s, Flag},
        {u"aftnnruc"_s, Flag},
        {u"aftnnzodiac"_s, Flag},
        {u"aftnnzodiacd"_s, Flag},
        {u"aftnnzodiacl"_s, Flag},
        {u"aftnrestart"_s, Flag},
        {u"aftnrstcont"_s, Flag},
        {u"aftnsep"_s, Destination},
        {u"aftnsepc"_s, Destination},
        {u"aftnstart"_s, Value},
        {u"aftntj"_s, Flag},
        {u"ai"_s, Toggle},
        {u"alang"_s, Value},
        {u"allowfieldendsel"_s, Flag},
        {u"allprot"_s, Flag},
        {u"alntblind"_s, Flag},
        {u"alt"_s, Flag},
        {u"animtext"_s, Value},
        {u"annotation"_s, Destination},
        {u"annotprot"_s, Flag},
        {u"ansi"_s, Flag},
        {u"ansicpg"_s, Value},
        {u"aoutl"_s, Toggle},
        {u"ApplyBrkRules"_s, Flag},
        {u"ascaps"_s, Toggle},
        {u"ashad"_s, Toggle},
        {u"asianbrkrule"_s, Flag},
        {u"aspalpha"_s, Toggle},
        {u"aspnum"_s, Toggle},
        {u"astrike"_s, Toggle},
        {u"atnauthor"_s, Destination},
        {u"atndate"_s, Destination},
        {u"atnicn"_s, Destination},
        {u"atnid"_s, Destination},
        {u"atnparent"_s, Destination},
        {u"atnref"_s, Destination},
        {u"atntime"_s, Destination},
        {u"atrfend"_s, Destination},
        {u"atrfstart"_s, Destination},
        {u"aul"_s, Toggle},
        {u"auld"_s, Toggle},
        {u"auldb"_s, Toggle},
        {u"aulnone"_s, Toggle},
        {u"aulw"_s, Toggle},
        {u"aup"_s, Value},
        {u"author"_s, Destination},
        {u"autofmtoverride"_s, Flag},
        {u"b"_s, Toggle},
        {u"background"_s, Destination},
        {u"bdbfhdr"_s, Flag},
        {u"bdrrlswsix"_s, Flag},
        {u"bgbdiag"_s, Flag},
        {u"bgcross"_s, Flag},
        {u"bgdcross"_s, Flag},
        {u"bgdkbdiag"_s, Flag},
        {u"bgdkcross"_s, Flag},
        {u"bgdkdcross"_s, Flag},
        {u"bgdkfdiag"_s, Flag},
        {u"bgdkhoriz"_s, Flag},
        {u"bgdkvert"_s, Flag},
        {u"bgfdiag"_s, Flag},
        {u"bghoriz"_s, Flag},
        {u"bgvert"_s, Flag},
        {u"bin"_s, Value},
        {u"binfsxn"_s, Value},
        {u"binsxn"_s, Value},
        {u"bkmkcolf"_s, Value},
        {u"bkmkcoll"_s, Value},
        {u"bkmkend"_s, Destination},
        {u"bkmkpub"_s, Flag},
        {u"bkmkstart"_s, Destination},
        {u"bliptag"_s, Value},
        {u"blipuid"_s, Destination},
        {u"blipupi"_s, Value},
        {u"blue"_s, Value},
        {u"bookfold"_s, Flag},
        {u"bookfoldrev"_s, Flag},
        {u"bookfoldsheets"_s, Value},
        {u"box"_s, Flag},
        {u"brdrart"_s, Value},
        {u"brdrb"_s, Flag},
        {u"brdrbar"_s, Flag},
        {u"brdrbtw"_s, Flag},
        {u"brdrcf"_s, Value},
        {u"brdrdash"_s, Flag},
        {u"brdrdashd"_s, Flag},
        {u"brdrdashdd"_s, Flag},
        {u"brdrdashdot"_s, Flag},
        {u"brdrdashdotdot"_s, Flag},
        {u"brdrdashdotstr"_s, Flag},
        {u"brdrdashsm"_s, Flag},
        {u"brdrdb"_s, Flag},
        {u"brdrdot"_s, Flag},
        {u"brdremboss"_s, Flag},
        {u"brdrengrave"_s, Flag},
        {u"brdrframe"_s, Flag},
        {u"brdrhair"_s, Flag},
        {u"brdrinset"_s, Flag},
        {u"brdrl"_s, Flag},
        {u"brdrnil"_s, Flag},
        {u"brdrnone"_s, Flag},
        {u"brdroutset"_s, Flag},
        {u"brdrr"_s, Flag},
        {u"brdrs"_s, Flag},
        {u"brdrsh"_s, Flag},
        {u"brdrt"_s, Flag},
        {u"brdrtbl"_s, Flag},
        {u"brdrth"_s, Flag},
        {u"brdrthtnlg"_s, Flag},
        {u"brdrthtnmg"_s, Flag},
        {u"brdrthtnsg"_s, Flag},
        {u"brdrtnthlg"_s, Flag},
        {u"brdrtnthmg"_s, Flag},
        {u"brdrtnthsg"_s, Flag},
        {u"brdrtnthtnlg"_s, Flag},
        {u"brdrtnthtnmg"_s, Flag},
        {u"brdrtnthtnsg"_s, Flag},
        {u"brdrtriple"_s, Flag},
        {u"brdrw"_s, Value},
        {u"brdrwavy"_s, Flag},
        {u"brdrwavydb"_s, Flag},
        {u"brkfrm"_s, Flag},
        {u"brsp"_s, Value},
        {u"bullet"_s, Symbol},
        {u"buptim"_s, Destination},
        {u"bxe"_s, Flag},
        {u"caccentfive"_s, Flag},
        {u"caccentfour"_s, Flag},
        {u"caccentone"_s, Flag},
        {u"caccentsix"_s, Flag},
        {u"caccentthree"_s, Flag},
        {u"caccenttwo"_s, Flag},
        {u"cachedcolbal"_s, Flag},
        {u"caps"_s, Toggle},
        {u"category"_s, Destination},
        {u"cb"_s, Value},
        {u"cbackgroundone"_s, Flag},
        {u"cbackgroundtwo"_s, Flag},
        {u"cbpat"_s, Value},
        {u"cchs"_s, Value},
        {u"cell"_s, Symbol},
        {u"cellx"_s, Value},
        {u"cf"_s, Value},
        {u"cfollowedhyperlink"_s, Flag},
        {u"cfpat"_s, Value},
        {u"cgrid"_s, Value},
        {u"charrsid"_s, Value},
        {u"charscalex"_s, Value},
        {u"chatn"_s, Symbol},
        {u"chbgbdiag"_s, Flag},
        {u"chbgcross"_s, Flag},
        {u"chbgdcross"_s, Flag},
        {u"chbgdkbdiag"_s, Flag},
        {u"chbgdkcross"_s, Flag},
        {u"chbgdkdcross"_s, Flag},
        {u"chbgdkfdiag"_s, Flag},
        {u"chbgdkhoriz"_s, Flag},
        {u"chbgdkvert"_s, Flag},
        {u"chbgfdiag"_s, Flag},
        {u"chbghoriz"_s, Flag},
        {u"chbgvert"_s, Flag},
        {u"chbrdr"_s, Flag},
        {u"chcbpat"_s, Value},
        {u"chcfpat"_s, Value},
        {u"chdate"_s, Symbol},
        {u"chdpa"_s, Symbol},
        {u"chdpl"_s, Symbol},
        {u"chftn"_s, Symbol},
        {u"chftnsep"_s, Symbol},
        {u"chftnsepc"_s, Symbol},
        {u"chpgn"_s, Symbol},
        {u"chhres"_s, Value},
        {u"chshdng"_s, Value},
        {u"chtime"_s, Symbol},
        {u"chyperlink"_s, Flag},
        {u"clbgbdiag"_s, Flag},
        {u"clbgcross"_s, Flag},
        {u"clbgdcross"_s, Flag},
        {u"clbgdkbdiag"_s, Flag},
        {u"clbgdkcross"_s, Flag},
        {u"clbgdkdcross"_s, Flag},
        {u"clbgdkfdiag"_s, Flag},
        {u"clbgdkhor"_s, Flag},
        {u"clbgdkvert"_s, Flag},
        {u"clbgfdiag"_s, Flag},
        {u"clbghoriz"_s, Flag},
        {u"clbgvert"_s, Flag},
        {u"clbrdrb"_s, Flag},
        {u"clbrdrl"_s, Flag},
        {u"clbrdrr"_s, Flag},
        {u"clbrdrt"_s, Flag},
        {u"clcbpat"_s, Value},
        {u"clcbpatraw"_s, Value},
        {u"clcfpat"_s, Value},
        {u"clcfpatraw"_s, Value},
        {u"cldel"_s, Flag},
        {u"cldelauth"_s, Value},
        {u"cldeldttm"_s, Value},
        {u"cldgll"_s, Flag},
        {u"cldglu"_s, Flag},
        {u"clFitText"_s, Flag},
        {u"clftsWidth"_s, Value},
        {u"clhidemark"_s, Flag},
        {u"clins"_s, Flag},
        {u"clinsauth"_s, Value},
        {u"clinsdttm"_s, Value},
        {u"clmgf"_s, Flag},
        {u"clmrg"_s, Flag},
        {u"clmrgd"_s, Flag},
        {u"clmrgdauth"_s, Value},
        {u"clmrgddttm"_s, Value},
        {u"clmrgdr"_s, Flag},
        {u"clNoWrap"_s, Flag},
        {u"clpadb"_s, Value},
        {u"clpadfb"_s, Value},
        {u"clpadfl"_s, Value},
        {u"clpadfr"_s, Value},
        {u"clpadft"_s, Value},
        {u"clpadl"_s, Value},
        {u"clpadr"_s, Value},
        {u"clpadt"_s, Value},
        {u"clspb"_s, Value},
        {u"clspfb"_s, Value},
        {u"clspfl"_s, Value},
        {u"clspfr"_s, Value},
        {u"clspft"_s, Value},
        {u"clspl"_s, Value},
        {u"clspr"_s, Value},
        {u"clspt"_s, Value},
        {u"clshdng"_s, Value},
        {u"clshdngraw"_s, Value},
        {u"clshdrawnil"_s, Flag},
        {u"clsplit"_s, Flag},
        {u"clsplitr"_s, Flag},
        {u"cltxbtlr"_s, Flag},
        {u"cltxlrtb"_s, Flag},
        {u"cltxlrtbv"_s, Flag},
        {u"cltxtbrl"_s, Flag},
        {u"cltxtbrlv"_s, Flag},
        {u"clvertalb"_s, Flag},
        {u"clvertalc"_s, Flag},
        {u"clvertalt"_s, Flag},
        {u"clvmgf"_s, Flag},
        {u"clvmrg"_s, Flag},
        {u"clwWidth"_s, Value},
        {u"cmaindarkone"_s, Flag},
        {u"cmaindarktwo"_s, Flag},
        {u"cmainlightone"_s, Flag},
        {u"cmainlighttwo"_s, Flag},
        {u"collapsed"_s, Flag},
        {u"colno"_s, Value},
        {u"colorschememapping"_s, Destination},
        {u"colortbl"_s, Destination},
        {u"cols"_s, Value},
        {u"colsr"_s, Value},
        {u"colsx"_s, Value},
        {u"column"_s, Symbol},
        {u"colw"_s, Value},
        {u"comment"_s, Destination},
        {u"company"_s, Destination},
        {u"contextualspace"_s, Flag},
        {u"cpg"_s, Value},
        {u"crauth"_s, Value},
        {u"crdate"_s, Value},
        {u"creatim"_s, Destination},
        {u"cs"_s, Value},
        {u"cshade"_s, Value},
        {u"ctextone"_s, Flag},
        {u"ctexttwo"_s, Flag},
        {u"ctint"_s, Value},
        {u"ctrl"_s, Flag},
        {u"cts"_s, Value},
        {u"cufi"_s, Value},
        {u"culi"_s, Value},
        {u"curi"_s, Value},
        {u"cvmme"_s, Flag},
        {u"datafield"_s, Destination},
        {u"datastore"_s, Destination},
        {u"date"_s, Flag},
        {u"dbch"_s, Flag},
        {u"defchp"_s, Destination},
        {u"deff"_s, Value},
        {u"defformat"_s, Flag},
        {u"deflang"_s, Value},
        {u"deflangfe"_s, Value},
        {u"defpap"_s, Destination},
        {u"defshp"_s, Flag},
        {u"deftab"_s, Value},
        {u"deleted"_s, Toggle},
        {u"delrsid"_s, Value},
        {u"dfrauth"_s, Value},
        {u"dfrdate"_s, Value},
        {u"dfrmtxtx"_s, Value},
        {u"dfrmtxty"_s, Value},
        {u"dfrstart"_s, Value},
        {u"dfrstop"_s, Value},
        {u"dfrxst"_s, Value},
        {u"dghorigin"_s, Value},
        {u"dghshow"_s, Value},
        {u"dghspace"_s, Value},
        {u"dgmargin"_s, Flag},
        {u"dgsnap"_s, Flag},
        {u"dgvorigin"_s, Value},
        {u"dgvshow"_s, Value},
        {u"dgvspace"_s, Value},
        {u"dibitmap"_s, Value},
        {u"disabled"_s, Toggle},
        {u"dn"_s, Value},
        {u"dntblnsbdb"_s, Flag},
        {u"do"_s, Destination},
        {u"dobxcolumn"_s, Flag},
        {u"dobxmargin"_s, Flag},
        {u"dobxpage"_s, Flag},
        {u"dobymargin"_s, Flag},
        {u"dobypage"_s, Flag},
        {u"dobypara"_s, Flag},
        {u"doccomm"_s, Destination},
        {u"doctemp"_s, Flag},
        {u"doctype"_s, Value},
        {u"docvar"_s, Destination},
        {u"dodhgt"_s, Value},
        {u"dolock"_s, Flag},
        {u"donotembedlingdata"_s, Value},
        {u"donotembedsysfont"_s, Value},
        {u"donotshowcomments"_s, Flag},
        {u"donotshowinsdel"_s, Flag},
        {u"donotshowmarkup"_s, Flag},
        {u"donotshowprops"_s, Flag},
        {u"dpaendhol"_s, Flag},
        {u"dpaendl"_s, Value},
        {u"dpaendsol"_s, Flag},
        {u"dpaendw"_s, Value},
        {u"dparc"_s, Flag},
        {u"dparcflipx"_s, Flag},
        {u"dparcflipy"_s, Flag},
        {u"dpastarthol"_s, Flag},
        {u"dpastartl"_s, Value},
        {u"dpastartsol"_s, Flag},
        {u"dpastartw"_s, Value},
        {u"dpcallout"_s, Flag},
        {u"dpcoa"_s, Value},
        {u"dpcoaccent"_s, Flag},
        {u"dpcobestfit"_s, Flag},
        {u"dpcoborder"_s, Flag},
        {u"dpcodabs"_s, Flag},
        {u"dpcodbottom"_s, Flag},
        {u"dpcodcenter"_s, Flag},
        {u"dpcodescent"_s, Value},
        {u"dpcodtop"_s, Flag},
        {u"dpcolength"_s, Value},
        {u"dpcominusx"_s, Flag},
        {u"dpcominusy"_s, Flag},
        {u"dpcooffset"_s, Value},
        {u"dpcosmarta"_s, Flag},
        {u"dpcotdouble"_s, Flag},
        {u"dpcotright"_s, Flag},
        {u"dpcotsingle"_s, Flag},
        {u"dpcottriple"_s, Flag},
        {u"dpcount"_s, Value},
        {u"dpellipse"_s, Flag},
        {u"dpendgroup"_s, Flag},
        {u"dpfillbgcb"_s, Value},
        {u"dpfillbgcg"_s, Value},
        {u"dpfillbgcr"_s, Value},
        {u"dpfillbggray"_s, Value},
        {u"dpfillbgpal"_s, Flag},
        {u"dpfillfgcb"_s, Value},
        {u"dpfillfgcg"_s, Value},
        {u"dpfillfgcr"_s, Value},
        {u"dpfillfggray"_s, Value},
        {u"dpfillfgpal"_s, Flag},
        {u"dpfillpat"_s, Value},
        {u"dpgroup"_s, Flag},
        {u"dpline"_s, Flag},
        {u"dplinecob"_s, Value},
        {u"dplinecog"_s, Value},
        {u"dplinecor"_s, Value},
        {u"dplinedado"_s, Flag},
        {u"dplinedadodo"_s, Flag},
        {u"dplinedash"_s, Flag},
        {u"dplinedot"_s, Flag},
        {u"dplinegray"_s, Value},
        {u"dplinehollow"_s, Flag},
        {u"dplinepal"_s, Flag},
        {u"dplinesolid"_s, Flag},
        {u"dplinew"_s, Value},
        {u"dppolycount"_s, Value},
        {u"dppolygon"_s, Flag},
        {u"dppolyline"_s, Flag},
        {u"dpptx"_s, Value},
        {u"dppty"_s, Value},
        {u"dprect"_s, Flag},
        {u"dproundr"_s, Flag},
        {u"dpshadow"_s, Flag},
        {u"dpshadx"_s, Value},
        {u"dpshady"_s, Value},
        {u"dptxbtlr"_s, Flag},
        {u"dptxbx"_s, Flag},
        {u"dptxbxmar"_s, Value},
        {u"dptxbxtext"_s, Destination},
        {u"dptxlrtb"_s, Flag},
        {u"dptxlrtbv"_s, Flag},
        {u"dptxtbrl"_s, Flag},
        {u"dptxtbrlv"_s, Flag},
        {u"dpx"_s, Value},
        {u"dpxsize"_s, Value},
        {u"dpy"_s, Value},
        {u"dpysize"_s, Value},
        {u"dropcapli"_s, Value},
        {u"dropcapt"_s, Value},
        {u"ds"_s, Value},
        {u"dxfrtext"_s, Value},
        {u"dy"_s, Value},
        {u"ebcend"_s, Destination},
        {u"ebcstart"_s, Destination},
        {u"edmins"_s, Value},
        {u"embo"_s, Toggle},
        {u"emdash"_s, Symbol},
        {u"emfblip"_s, Flag},
        {u"emspace"_s, Symbol},
        {u"endash"_s, Symbol},
        {u"enddoc"_s, Flag},
        {u"endnhere"_s, Flag},
        {u"endnotes"_s, Flag},
        {u"enforceprot"_s, Value},
        {u"enspace"_s, Symbol},
        {u"expnd"_s, Value},
        {u"expndtw"_s, Value},
        {u"expshrtn"_s, Flag},
        {u"f"_s, Value},
        {u"faauto"_s, Flag},
        {u"facenter"_s, Flag},
        {u"facingp"_s, Flag},
        {u"factoidname"_s, Destination},
        {u"fafixed"_s, Flag},
        {u"fahang"_s, Flag},
        {u"falt"_s, Destination},
        {u"faroman"_s, Flag},
        {u"favar"_s, Flag},
        {u"fbias"_s, Value},
        {u"fbidi"_s, Flag},
        {u"fbidis"_s, Flag},
        {u"fbimajor"_s, Flag},
        {u"fbiminor"_s, Flag},
        {u"fchars"_s, Destination},
        {u"fcharset"_s, Value},
        {u"fcs"_s, Value},
        {u"fdbmajor"_s, Flag},
        {u"fdbminor"_s, Flag},
        {u"fdecor"_s, Flag},
        {u"felnbrelev"_s, Flag},
        {u"fet"_s, Value},
        {u"fetch"_s, Flag},
        {u"ffdefres"_s, Value},
        {u"ffdeftext"_s, Destination},
        {u"ffentrymcr"_s, Destination},
        {u"ffexitmcr"_s, Destination},
        {u"ffformat"_s, Destination},
        {u"ffhaslistbox"_s, Value},
        {u"ffhelptext"_s, Destination},
        {u"ffhps"_s, Value},
        {u"ffl"_s, Destination},
        {u"ffmaxlen"_s, Value},
        {u"ffname"_s, Destination},
        {u"ffownhelp"_s, Value},
        {u"ffownstat"_s, Value},
        {u"ffprot"_s, Value},
        {u"ffrecalc"_s, Value},
        {u"ffres"_s, Value},
        {u"ffsize"_s, Value},
        {u"ffstattext"_s, Destination},
        {u"fftype"_s, Value},
        {u"fftypetxt"_s, Value},
        {u"fhimajor"_s, Flag},
        {u"fhiminor"_s, Flag},
        {u"fi"_s, Value},
        {u"fid"_s, Value},
        {u"field"_s, Destination},
        {u"file"_s, Destination},
        {u"filetbl"_s, Destination},
        {u"fittext"_s, Value},
        {u"fjgothic"_s, Flag},
        {u"fjminchou"_s, Flag},
        {u"fldalt"_s, Flag},
        {u"flddirty"_s, Flag},
        {u"fldedit"_s, Flag},
        {u"fldinst"_s, Destination},
        {u"fldlock"_s, Flag},
        {u"fldpriv"_s, Flag},
        {u"fldrslt"_s, Destination},
        {u"fldtype"_s, Destination},
        {u"flomajor"_s, Flag},
        {u"flominor"_s, Flag},
        {u"fmodern"_s, Flag},
        {u"fn"_s, Value},
        {u"fname"_s, Destination},
        {u"fnetwork"_s, Flag},
        {u"fnil"_s, Flag},
        {u"fnonfilesys"_s, Flag},
        {u"fontemb"_s, Destination},
        {u"fontfile"_s, Destination},
        {u"fonttbl"_s, Destination},
        {u"footer"_s, Destination},
        {u"footerf"_s, Destination},
        {u"footerl"_s, Destination},
        {u"footerr"_s, Destination},
        {u"footery"_s, Value},
        {u"footnote"_s, Destination},
        {u"forceupgrade"_s, Flag},
        {u"formdisp"_s, Flag},
        {u"formfield"_s, Destination},
        {u"formprot"_s, Flag},
        {u"formshade"_s, Flag},
        {u"fosnum"_s, Value},
        {u"fprq"_s, Value},
        {u"fracwidth"_s, Flag},
        {u"frelative"_s, Value},
        {u"frmtxbtlr"_s, Flag},
        {u"frmtxlrtb"_s, Flag},
        {u"frmtxlrtbv"_s, Flag},
        {u"frmtxtbrl"_s, Flag},
        {u"frmtxtbrlv"_s, Flag},
        {u"froman"_s, Flag},
        {u"fromhtml"_s, Value},
        {u"fromtext"_s, Flag},
        {u"fs"_s, Value},
        {u"fscript"_s, Flag},
        {u"fswiss"_s, Flag},
        {u"ftech"_s, Flag},
        {u"ftnalt"_s, Flag},
        {u"ftnbj"_s, Flag},
        {u"ftncn"_s, Destination},
        {u"ftnil"_s, Flag},
        {u"ftnlytwnine"_s, Flag},
        {u"ftnnalc"_s, Flag},
        {u"ftnnar"_s, Flag},
        {u"ftnnauc"_s, Flag},
        {u"ftnnchi"_s, Flag},
        {u"ftnnchosung"_s, Flag},
        {u"ftnncnum"_s, Flag},
        {u"ftnndbar"_s, Flag},
        {u"ftnndbnum"_s, Flag},
        {u"ftnndbnumd"_s, Flag},
        {u"ftnndbnumk"_s, Flag},
        {u"ftnndbnumt"_s, Flag},
        {u"ftnnganada"_s, Flag},
        {u"ftnngbnum"_s, Flag},
        {u"ftnngbnumd"_s, Flag},
        {u"ftnngbnumk"_s, Flag},
        {u"ftnngbnuml"_s, Flag},
        {u"ftnnrlc"_s, Flag},
        {u"ftnnruc"_s, Flag},
        {u"ftnnzodiac"_s, Flag},
        {u"ftnnzodiacd"_s, Flag},
        {u"ftnnzodiacl"_s, Flag},
        {u"ftnrestart"_s, Flag},
        {u"ftnrstcont"_s, Flag},
        {u"ftnrstpg"_s, Flag},
        {u"ftnsep"_s, Destination},
        {u"ftnsepc"_s, Destination},
        {u"ftnstart"_s, Value},
        {u"ftntj"_s, Flag},
        {u"fttruetype"_s, Flag},
        {u"fvaliddos"_s, Flag},
        {u"fvalidhpfs"_s, Flag},
        {u"fvalidmac"_s, Flag},
        {u"fvalidntfs"_s, Flag},
        {u"g"_s, Destination},
        {u"gcw"_s, Value},
        {u"generator"_s, Destination},
        {u"green"_s, Value},
        {u"grfdocevents"_s, Value},
        {u"gridtbl"_s, Destination},
        {u"gutter"_s, Value},
        {u"gutterprl"_s, Flag},
        {u"guttersxn"_s, Value},
        {u"header"_s, Destination},
        {u"headerf"_s, Destination},
        {u"headerl"_s, Destination},
        {u"headerr"_s, Destination},
        {u"headery"_s, Value},
        {u"hich"_s, Flag},
        {u"highlight"_s, Value},
        {u"hl"_s, Destination},
        {u"hlfr"_s, Destination},
        {u"hlinkbase"_s, Destination},
        {u"hlloc"_s, Destination},
        {u"hlsrc"_s, Destination},
        {u"horzdoc"_s, Flag},
        {u"horzsect"_s, Flag},
        {u"horzvert"_s, Value},
        {u"hr"_s, Value},
        {u"hres"_s, Value},
        {u"hrule"_s, Flag},
        {u"hsv"_s, Destination},
        {u"htmautsp"_s, Flag},
        {u"htmlbase"_s, Flag},
        {u"htmlrtf"_s, Toggle},
        {u"htmltag"_s, Destination},
        {u"hwelev"_s, Flag},
        {u"hyphauto"_s, Toggle},
        {u"hyphcaps"_s, Toggle},
        {u"hyphconsec"_s, Value},
        {u"hyphhotz"_s, Value},
        {u"hyphpar"_s, Toggle},
        {u"i"_s, Toggle},
        {u"id"_s, Value},
        {u"ignoremixedcontent"_s, Value},
        {u"ilfomacatclnup"_s, Value},
        {u"ilvl"_s, Value},
        {u"impr"_s, Toggle},
        {u"indmirror"_s, Flag},
        {u"indrlsweleven"_s, Flag},
        {u"info"_s, Destination},
        {u"insrsid"_s, Value},
        {u"intbl"_s, Flag},
        {u"ipgp"_s, Value},
        {u"irowband"_s, Value},
        {u"irow"_s, Value},
        {u"itap"_s, Value},
        {u"ixe"_s, Flag},
        {u"jcompress"_s, Flag},
        {u"jexpand"_s, Flag},
        {u"jis"_s, Flag},
        {u"jpegblip"_s, Flag},
        {u"jsksu"_s, Flag},
        {u"keep"_s, Flag},
        {u"keepn"_s, Flag},
        {u"kerning"_s, Value},
        {u"keycode"_s, Destination},
        {u"keywords"_s, Destination},
        {u"krnprsnet"_s, Flag},
        {u"ksulang"_s, Value},
        {u"jclisttab"_s, Flag},
        {u"landscape"_s, Flag},
        {u"lang"_s, Value},
        {u"langfe"_s, Value},
        {u"langfenp"_s, Value},
        {u"langnp"_s, Value},
        {u"lastrow"_s, Flag},
        {u"latentstyles"_s, Destination},
        {u"lbr"_s, Value},
        {u"lchars"_s, Destination},
        {u"ldblquote"_s, Symbol},
        {u"level"_s, Value},
        {u"levelfollow"_s, Value},
        {u"levelindent"_s, Value},
        {u"leveljc"_s, Value},
        {u"leveljcn"_s, Value},
        {u"levellegal"_s, Value},
        {u"levelnfc"_s, Value},
        {u"levelnfcn"_s, Value},
        {u"levelnorestart"_s, Value},
        {u"levelnumbers"_s, Destination},
        {u"levelold"_s, Value},
        {u"levelpicture"_s, Value},
        {u"levelpicturenosize"_s, Flag},
        {u"levelprev"_s, Value},
        {u"levelprevspace"_s, Value},
        {u"levelspace"_s, Value},
        {u"levelstartat"_s, Value},
        {u"leveltemplateid"_s, Value},
        {u"leveltext"_s, Destination},
        {u"lfolevel"_s, Destination},
        {u"li"_s, Value},
        {u"line"_s, Symbol},
        {u"linebetcol"_s, Flag},
        {u"linecont"_s, Flag},
        {u"linemod"_s, Value},
        {u"lineppage"_s, Flag},
        {u"linerestart"_s, Flag},
        {u"linestart"_s, Value},
        {u"linestarts"_s, Value},
        {u"linex"_s, Value},
        {u"linkself"_s, Flag},
        {u"linkstyles"_s, Flag},
        {u"linkval"_s, Destination},
        {u"lin"_s, Value},
        {u"lisa"_s, Value},
        {u"lisb"_s, Value},
        {u"list"_s, Destination},
        {u"listhybrid"_s, Flag},
        {u"listid"_s, Value},
        {u"listlevel"_s, Destination},
        {u"listname"_s, Destination},
        {u"listoverride"_s, Destination},
        {u"listoverridecount"_s, Value},
        {u"listoverrideformat"_s, Value},
        {u"listoverridestartat"_s, Flag},
        {u"listoverridetable"_s, Destination},
        {u"listpicture"_s, Destination},
        {u"listrestarthdn"_s, Value},
        {u"listsimple"_s, Value},
        {u"liststyleid"_s, Value},
        {u"liststylename"_s, Destination},
        {u"listtable"_s, Destination},
        {u"listtemplateid"_s, Value},
        {u"listtext"_s, Destination},
        {u"lnbrkrule"_s, Flag},
        {u"lndscpsxn"_s, Flag},
        {u"lnongrid"_s, Flag},
        {u"loch"_s, Flag},
        {u"lquote"_s, Symbol},
        {u"ls"_s, Value},
        {u"lsdlocked"_s, Value},
        {u"lsdlockeddef"_s, Value},
        {u"lsdlockedexcept"_s, Destination},
        {u"lsdpriority"_s, Value},
        {u"lsdprioritydef"_s, Value},
        {u"lsdqformat"_s, Value},
        {u"lsdqformatdef"_s, Value},
        {u"lsdsemihidden"_s, Value},
        {u"lsdsemihiddendef"_s, Value},
        {u"lsdstimax"_s, Value},
        {u"lsdunhideused"_s, Value},
        {u"lsdunhideuseddef"_s, Value},
        {u"ltrch"_s, Flag},
        {u"ltrdoc"_s, Flag},
        {u"ltrmark"_s, Symbol},
        {u"ltrpar"_s, Flag},
        {u"ltrrow"_s, Flag},
        {u"ltrsect"_s, Flag},
        {u"lvltentative"_s, Flag},
        {u"lytcalctblwd"_s, Flag},
        {u"lytexcttp"_s, Flag},
        {u"lytprtmet"_s, Flag},
        {u"lyttblrtgr"_s, Flag},
        {u"mac"_s, Flag},
        {u"macc"_s, Destination},
        {u"maccPr"_s, Destination},
        {u"macpict"_s, Flag},
        {u"mailmerge"_s, Destination},
        {u"makebackup"_s, Flag},
        {u"maln"_s, Destination},
        {u"malnScr"_s, Destination},
        {u"manager"_s, Destination},
        {u"margb"_s, Value},
        {u"margbsxn"_s, Value},
        {u"margl"_s, Value},
        {u"marglsxn"_s, Value},
        {u"margmirror"_s, Flag},
        {u"margmirsxn"_s, Flag},
        {u"margPr"_s, Destination},
        {u"margr"_s, Value},
        {u"margrsxn"_s, Value},
        {u"margSz"_s, Value},
        {u"margt"_s, Value},
        {u"margtsxn"_s, Value},
        {u"mbar"_s, Destination},
        {u"mbarPr"_s, Destination},
        {u"mbaseJc"_s, Destination},
        {u"mbegChr"_s, Destination},
        {u"mborderBox"_s, Destination},
        {u"mborderBoxPr"_s, Destination},
        {u"mbox"_s, Destination},
        {u"mboxPr"_s, Destination},
        {u"mbrk"_s, Value},
        {u"mbrkBin"_s, Value},
        {u"mbrkBinSub"_s, Value},
        {u"mcGp"_s, Value},
        {u"mcGpRule"_s, Value},
        {u"mchr"_s, Destination},
        {u"mcount"_s, Destination},
        {u"mcSp"_s, Value},
        {u"mctrlPr"_s, Destination},
        {u"md"_s, Destination},
        {u"mdefJc"_s, Value},
        {u"mdeg"_s, Destination},
        {u"mdegHide"_s, Destination},
        {u"mden"_s, Destination},
        {u"mdiff"_s, Destination},
        {u"mdiffSty"_s, Value},
        {u"mdispdef"_s, Value},
        {u"mdPr"_s, Destination},
        {u"me"_s, Destination},
        {u"mendChr"_s, Destination},
        {u"meqArr"_s, Destination},
        {u"meqArrPr"_s, Destination},
        {u"mf"_s, Destination},
        {u"mfName"_s, Destination},
        {u"mfPr"_s, Destination},
        {u"mfunc"_s, Destination},
        {u"mfuncPr"_s, Destination},
        {u"mgroupChr"_s, Destination},
        {u"mgroupChrPr"_s, Destination},
        {u"mgrow"_s, Destination},
        {u"mhideBot"_s, Destination},
        {u"mhideLeft"_s, Destination},
        {u"mhideRight"_s, Destination},
        {u"mhideTop"_s, Destination},
        {u"mhtmltag"_s, Destination},
        {u"min"_s, Value},
        {u"minterSp"_s, Value},
        {u"mintLim"_s, Value},
        {u"mintraSp"_s, Value},
        {u"mjc"_s, Value},
        {u"mlim"_s, Destination},
        {u"mlimloc"_s, Destination},
        {u"mlimlow"_s, Destination},
        {u"mlimlowPr"_s, Destination},
        {u"mlimupp"_s, Destination},
        {u"mlimuppPr"_s, Destination},
        {u"mlit"_s, Flag},
        {u"mlMargin"_s, Value},
        {u"mm"_s, Destination},
        {u"mmaddfieldname"_s, Destination},
        {u"mmath"_s, Destination},
        {u"mmathFont"_s, Value},
        {u"mmathPict"_s, Destination},
        {u"mmathPr"_s, Destination},
        {u"mmattach"_s, Flag},
        {u"mmaxdist"_s, Destination},
        {u"mmblanklines"_s, Flag},
        {u"mmc"_s, Destination},
        {u"mmcJc"_s, Destination},
        {u"mmconnectstr"_s, Destination},
        {u"mmconnectstrdata"_s, Destination},
        {u"mmcPr"_s, Destination},
        {u"mmcs"_s, Destination},
        {u"mmdatasource"_s, Destination},
        {u"mmdatatypeaccess"_s, Flag},
        {u"mmdatatypeexcel"_s, Flag},
        {u"mmdatatypefile"_s, Flag},
        {u"mmdatatypeodbc"_s, Flag},
        {u"mmdatatypeodso"_s, Flag},
        {u"mmdatatypeqt"_s, Flag},
        {u"mmdefaultsql"_s, Flag},
        {u"mmdestemail"_s, Flag},
        {u"mmdestfax"_s, Flag},
        {u"mmdestnewdoc"_s, Flag},
        {u"mmdestprinter"_s, Flag},
        {u"mmerrors"_s, Value},
        {u"mmfttypeaddress"_s, Flag},
        {u"mmfttypebarcode"_s, Flag},
        {u"mmfttypedbcolumn"_s, Flag},
        {u"mmfttypemapped"_s, Flag},
        {u"mmfttypenull"_s, Flag},
        {u"mmfttypesalutation"_s, Flag},
        {u"mmheadersource"_s, Destination},
        {u"mmjdsotype"_s, Value},
        {u"mmlinktoquery"_s, Flag},
        {u"mmmailsubject"_s, Destination},
        {u"mmmaintypecatalog"_s, Flag},
        {u"mmmaintypeemail"_s, Flag},
        {u"mmmaintypeenvelopes"_s, Flag},
        {u"mmmaintypefax"_s, Flag},
        {u"mmmaintypelabels"_s, Flag},
        {u"mmmaintypeletters"_s, Flag},
        {u"mmodso"_s, Destination},
        {u"mmodsoactive"_s, Value},
        {u"mmodsocoldelim"_s, Value},
        {u"mmodsocolumn"_s, Value},
        {u"mmodsodynaddr"_s, Value},
        {u"mmodsofhdr"_s, Value},
        {u"mmodsofilter"_s, Destination},
        {u"mmodsofldmpdata"_s, Destination},
        {u"mmodsofmcolumn"_s, Value},
        {u"mmodsohash"_s, Value},
        {u"mmodsolid"_s, Value},
        {u"mmodsomappedname"_s, Destination},
        {u"mmodsoname"_s, Destination},
        {u"mmodsorecipdata"_s, Destination},
        {u"mmodsosort"_s, Destination},
        {u"mmodsosrc"_s, Destination},
        {u"mmodsotable"_s, Destination},
        {u"mmodsoudl"_s, Destination},
        {u"mmodsoudldata"_s, Destination},
        {u"mmodsouniquetag"_s, Destination},
        {u"mmPr"_s, Destination},
        {u"mmquery"_s, Destination},
        {u"mmr"_s, Destination},
        {u"mmreccur"_s, Value},
        {u"mmshowdata"_s, Flag},
        {u"mnary"_s, Destination},
        {u"mnaryLim"_s, Value},
        {u"mnaryPr"_s, Destination},
        {u"mnoBreak"_s, Destination},
        {u"mnor"_s, Flag},
        {u"mnum"_s, Destination},
        {u"mo"_s, Value},
        {u"mobjDist"_s, Destination},
        {u"moMath"_s, Destination},
        {u"moMathPara"_s, Destination},
        {u"moMathParaPr"_s, Destination},
        {u"mopEmu"_s, Destination},
        {u"mphant"_s, Destination},
        {u"mphantPr"_s, Destination},
        {u"mplcHide"_s, Destination},
        {u"mpos"_s, Destination},
        {u"mpostSp"_s, Value},
        {u"mpreSp"_s, Value},
        {u"mr"_s, Destination},
        {u"mrad"_s, Destination},
        {u"mradPr"_s, Destination},
        {u"mrMargin"_s, Value},
        {u"mrPr"_s, Destination},
        {u"mrSp"_s, Value},
        {u"mrSpRule"_s, Value},
        {u"mscr"_s, Value},
        {u"msepChr"_s, Destination},
        {u"mshow"_s, Destination},
        {u"mshp"_s, Destination},
        {u"msmallFrac"_s, Value},
        {u"msmcap"_s, Flag},
        {u"msPre"_s, Destination},
        {u"msPrePr"_s, Destination},
        {u"msSub"_s, Destination},
        {u"msSubPr"_s, Destination},
        {u"msSubSup"_s, Destination},
        {u"msSubSupPr"_s, Destination},
        {u"msSup"_s, Destination},
        {u"msSupPr"_s, Destination},
        {u"mstrikeBLTR"_s, Destination},
        {u"mstrikeH"_s, Destination},
        {u"mstrikeTLBR"_s, Destination},
        {u"mstrikeV"_s, Destination},
        {u"msty"_s, Value},
        {u"msub"_s, Destination},
        {u"msubHide"_s, Destination},
        {u"msup"_s, Destination},
        {u"msupHide"_s, Destination},
        {u"mtransp"_s, Destination},
        {u"mtype"_s, Destination},
        {u"muser"_s, Flag},
        {u"mvauth"_s, Value},
        {u"mvdate"_s, Value},
        {u"mvertJc"_s, Destination},
        {u"mvf"_s, Flag},
        {u"mvfmf"_s, Destination},
        {u"mvfml"_s, Destination},
        {u"mvt"_s, Flag},
        {u"mvtof"_s, Destination},
        {u"mvtol"_s, Destination},
        {u"mwrapIndent"_s, Value},
        {u"mwrapRight"_s, Value},
        {u"mzeroAsc"_s, Destination},
        {u"mzeroDesc"_s, Destination},
        {u"mzeroWid"_s, Destination},
        {u"nestcell"_s, Symbol},
        {u"nestrow"_s, Symbol},
        {u"nesttableprops"_s, Destination},
        {u"newtblstyruls"_s, Flag},
        {u"nextfile"_s, Destination},
        {u"noafcnsttbl"_s, Flag},
        {u"nobrkwrptbl"_s, Flag},
        {u"nocolbal"_s, Flag},
        {u"nocompatoptions"_s, Flag},
        {u"nocwrap"_s, Flag},
        {u"nocxsptable"_s, Flag},
        {u"noextrasprl"_s, Flag},
        {u"nofchars"_s, Value},
        {u"nofcharsws"_s, Value},
        {u"nofeaturethrottle"_s, Flag},
        {u"nofpages"_s, Value},
        {u"nofwords"_s, Value},
        {u"nogrowautofit"_s, Flag},
        {u"noindnmbrts"_s, Flag},
        {u"nojkernpunct"_s, Flag},
        {u"nolead"_s, Flag},
        {u"noline"_s, Flag},
        {u"nolnhtadjtbl"_s, Flag},
        {u"nonesttables"_s, Destination},
        {u"nonshppict"_s, Flag},
        {u"nooverflow"_s, Flag},
        {u"noproof"_s, Flag},
        {u"noqfpromote"_s, Flag},
        {u"nosectexpand"_s, Flag},
        {u"nosnaplinegrid"_s, Flag},
        {u"nospaceforul"_s, Flag},
        {u"nosupersub"_s, Flag},
        {u"notabind"_s, Flag},
        {u"notbrkcnstfrctbl"_s, Flag},
        {u"notcvasp"_s, Flag},
        {u"notvatxbx"_s, Flag},
        {u"nouicompat"_s, Flag},
        {u"noultrlspc"_s, Flag},
        {u"nowidctlpar"_s, Flag},
        {u"nowrap"_s, Flag},
        {u"nowwrap"_s, Flag},
        {u"noxlattoyen"_s, Flag},
        {u"objalias"_s, Destination},
        {u"objalign"_s, Value},
        {u"objattph"_s, Flag},
        {u"objautlink"_s, Flag},
        {u"objclass"_s, Destination},
        {u"objcropb"_s, Value},
        {u"objcropl"_s, Value},
        {u"objcropr"_s, Value},
        {u"objcropt"_s, Value},
        {u"objdata"_s, Destination},
        {u"object"_s, Destination},
        {u"objemb"_s, Flag},
        {u"objh"_s, Value},
        {u"objhtml"_s, Flag},
        {u"objicemb"_s, Flag},
        {u"objlink"_s, Flag},
        {u"objlock"_s, Flag},
        {u"objname"_s, Destination},
        {u"objocx"_s, Flag},
        {u"objpub"_s, Flag},
        {u"objscalex"_s, Value},
        {u"objscaley"_s, Value},
        {u"objsect"_s, Destination},
        {u"objsetsize"_s, Flag},
        {u"objsub"_s, Flag},
        {u"objtime"_s, Destination},
        {u"objtransy"_s, Value},
        {u"objupdate"_s, Flag},
        {u"objw"_s, Value},
        {u"ogutter"_s, Value},
        {u"oldas"_s, Flag},
        {u"oldcprops"_s, Destination},
        {u"oldlinewrap"_s, Flag},
        {u"oldpprops"_s, Destination},
        {u"oldsprops"_s, Destination},
        {u"oldtprops"_s, Destination},
        {u"oleclsid"_s, Destination},
        {u"operator"_s, Destination},
        {u"otblrul"_s, Flag},
        {u"outl"_s, Toggle},
        {u"outlinelevel"_s, Value},
        {u"overlay"_s, Flag},
        {u"page"_s, Symbol},
        {u"pagebb"_s, Flag},
        {u"panose"_s, Destination},
        {u"paperh"_s, Value},
        {u"paperw"_s, Value},
        {u"par"_s, Symbol},
        {u"pararsid"_s, Value},
        {u"pard"_s, Flag},
        {u"password"_s, Destination},
        {u"passwordhash"_s, Destination},
        {u"pc"_s, Flag},
        {u"pca"_s, Flag},
        {u"pgbrdrb"_s, Flag},
        {u"pgbrdrfoot"_s, Flag},
        {u"pgbrdrhead"_s, Flag},
        {u"pgbrdrl"_s, Flag},
        {u"pgbrdropt"_s, Value},
        {u"pgbrdrr"_s, Flag},
        {u"pgbrdrsnap"_s, Flag},
        {u"pgbrdrt"_s, Flag},
        {u"pgdsc"_s, Destination}, /* OpenOffice / LibreOffice */
        {u"pgdsctbl"_s, Destination}, /* OpenOffice / LibreOffice */
        {u"pghsxn"_s, Value},
        {u"pgnbidia"_s, Flag},
        {u"pgnbidib"_s, Flag},
        {u"pgnchosung"_s, Flag},
        {u"pgncnum"_s, Flag},
        {u"pgncont"_s, Flag},
        {u"pgndbnum"_s, Flag},
        {u"pgndbnumd"_s, Flag},
        {u"pgndbnumk"_s, Flag},
        {u"pgndbnumt"_s, Flag},
        {u"pgndec"_s, Flag},
        {u"pgndecd"_s, Flag},
        {u"pgnganada"_s, Flag},
        {u"pgngbnum"_s, Flag},
        {u"pgngbnumd"_s, Flag},
        {u"pgngbnumk"_s, Flag},
        {u"pgngbnuml"_s, Flag},
        {u"pgnhindia"_s, Flag},
        {u"pgnhindib"_s, Flag},
        {u"pgnhindic"_s, Flag},
        {u"pgnhindid"_s, Flag},
        {u"pgnhn"_s, Value},
        {u"pgnhnsc"_s, Flag},
        {u"pgnhnsh"_s, Flag},
        {u"pgnhnsm"_s, Flag},
        {u"pgnhnsn"_s, Flag},
        {u"pgnhnsp"_s, Flag},
        {u"pgnid"_s, Flag},
        {u"pgnlcltr"_s, Flag},
        {u"pgnlcrm"_s, Flag},
        {u"pgnrestart"_s, Flag},
        {u"pgnstart"_s, Value},
        {u"pgnstarts"_s, Value},
        {u"pgnthaia"_s, Flag},
        {u"pgnthaib"_s, Flag},
        {u"pgnthaic"_s, Flag},
        {u"pgnucltr"_s, Flag},
        {u"pgnucrm"_s, Flag},
        {u"pgnvieta"_s, Flag},
        {u"pgnx"_s, Value},
        {u"pgny"_s, Value},
        {u"pgnzodiac"_s, Flag},
        {u"pgnzodiacd"_s, Flag},
        {u"pgnzodiacl"_s, Flag},
        {u"pgp"_s, Destination},
        {u"pgptbl"_s, Destination},
        {u"pgwsxn"_s, Value},
        {u"phcol"_s, Flag},
        {u"phmrg"_s, Flag},
        {u"phpg"_s, Flag},
        {u"picbmp"_s, Flag},
        {u"picbpp"_s, Value},
        {u"piccropb"_s, Value},
        {u"piccropl"_s, Value},
        {u"piccropr"_s, Value},
        {u"piccropt"_s, Value},
        {u"pich"_s, Value},
        {u"pichgoal"_s, Value},
        {u"picprop"_s, Destination},
        {u"picscaled"_s, Flag},
        {u"picscalex"_s, Value},
        {u"picscaley"_s, Value},
        {u"pict"_s, Destination},
        {u"picw"_s, Value},
        {u"picwgoal"_s, Value},
        {u"pindtabqc"_s, Flag},
        {u"pindtabql"_s, Flag},
        {u"pindtabqr"_s, Flag},
        {u"plain"_s, Flag},
        {u"pmartabqc"_s, Flag},
        {u"pmartabql"_s, Flag},
        {u"pmartabqr"_s, Flag},
        {u"pmmetafile"_s, Value},
        {u"pn"_s, Destination},
        {u"pnacross"_s, Flag},
        {u"pnaiu"_s, Flag},
        {u"pnaiud"_s, Flag},
        {u"pnaiueo"_s, Flag},
        {u"pnaiueod"_s, Flag},
        {u"pnb"_s, Toggle},
        {u"pnbidia"_s, Flag},
        {u"pnbidib"_s, Flag},
        {u"pncaps"_s, Toggle},
        {u"pncard"_s, Flag},
        {u"pncf"_s, Value},
        {u"pnchosung"_s, Flag},
        {u"pncnum"_s, Flag},
        {u"pndbnum"_s, Flag},
        {u"pndbnumd"_s, Flag},
        {u"pndbnumk"_s, Flag},
        {u"pndbnuml"_s, Flag},
        {u"pndbnumt"_s, Flag},
        {u"pndec"_s, Flag},
        {u"pndecd"_s, Flag},
        {u"pnf"_s, Value},
        {u"pnfs"_s, Value},
        {u"pnganada"_s, Flag},
        {u"pngblip"_s, Flag},
        {u"pngbnum"_s, Flag},
        {u"pngbnumd"_s, Flag},
        {u"pngbnumk"_s, Flag},
        {u"pngbnuml"_s, Flag},
        {u"pnhang"_s, Flag},
        {u"pni"_s, Toggle},
        {u"pnindent"_s, Value},
        {u"pniroha"_s, Flag},
        {u"pnirohad"_s, Flag},
        {u"pnlcltr"_s, Flag},
        {u"pnlcrm"_s, Flag},
        {u"pnlvl"_s, Value},
        {u"pnlvlblt"_s, Flag},
        {u"pnlvlbody"_s, Flag},
        {u"pnlvlcont"_s, Flag},
        {u"pnnumonce"_s, Flag},
        {u"pnord"_s, Flag},
        {u"pnordt"_s, Flag},
        {u"pnprev"_s, Flag},
        {u"pnqc"_s, Flag},
        {u"pnql"_s, Flag},
        {u"pnqr"_s, Flag},
        {u"pnrauth"_s, Value},
        {u"pnrdate"_s, Value},
        {u"pnrestart"_s, Flag},
        {u"pnrnfc"_s, Value},
        {u"pnrnot"_s, Flag},
        {u"pnrpnbr"_s, Value},
        {u"pnrrgb"_s, Value},
        {u"pnrstart"_s, Value},
        {u"pnrstop"_s, Value},
        {u"pnrxst"_s, Value},
        {u"pnscaps"_s, Toggle},
        {u"pnseclvl"_s, Destination},
        {u"pnsp"_s, Value},
        {u"pnstart"_s, Value},
        {u"pnstrike"_s, Toggle},
        {u"pntext"_s, Destination},
        {u"pntxta"_s, Destination},
        {u"pntxtb"_s, Destination},
        {u"pnucltr"_s, Flag},
        {u"pnucrm"_s, Flag},
        {u"pnul"_s, Toggle},
        {u"pnuld"_s, Flag},
        {u"pnuldash"_s, Flag},
        {u"pnuldashd"_s, Flag},
        {u"pnuldashdd"_s, Flag},
        {u"pnuldb"_s, Flag},
        {u"pnulhair"_s, Flag},
        {u"pnulnone"_s, Flag},
        {u"pnulth"_s, Flag},
        {u"pnulw"_s, Flag},
        {u"pnulwave"_s, Flag},
        {u"pnzodiac"_s, Flag},
        {u"pnzodiacd"_s, Flag},
        {u"pnzodiacl"_s, Flag},
        {u"posnegx"_s, Value},
        {u"posnegy"_s, Value},
        {u"posx"_s, Value},
        {u"posxc"_s, Flag},
        {u"posxi"_s, Flag},
        {u"posxl"_s, Flag},
        {u"posxo"_s, Flag},
        {u"posxr"_s, Flag},
        {u"posy"_s, Value},
        {u"posyb"_s, Flag},
        {u"posyc"_s, Flag},
        {u"posyil"_s, Flag},
        {u"posyin"_s, Flag},
        {u"posyout"_s, Flag},
        {u"posyt"_s, Flag},
        {u"prauth"_s, Value},
        {u"prcolbl"_s, Flag},
        {u"prdate"_s, Value},
        {u"printdata"_s, Flag},
        {u"printim"_s, Destination},
        {u"private"_s, Destination},
        {u"propname"_s, Destination},
        {u"proptype"_s, Value},
        {u"protect"_s, Toggle},
        {u"protend"_s, Destination},
        {u"protlevel"_s, Value},
        {u"protstart"_s, Destination},
        {u"protusertbl"_s, Destination},
        {u"psover"_s, Flag},
        {u"psz"_s, Value},
        {u"ptabldot"_s, Flag},
        {u"ptablmdot"_s, Flag},
        {u"ptablminus"_s, Flag},
        {u"ptablnone"_s, Flag},
        {u"ptabluscore"_s, Flag},
        {u"pubauto"_s, Flag},
        {u"pvmrg"_s, Flag},
        {u"pvpara"_s, Flag},
        {u"pvpg"_s, Flag},
        {u"pwd"_s, Value},
        {u"pxe"_s, Destination},
        {u"qc"_s, Flag},
        {u"qd"_s, Flag},
        {u"qj"_s, Flag},
        {u"qk"_s, Value},
        {u"ql"_s, Flag},
        {u"qmspace"_s, Symbol},
        {u"qr"_s, Flag},
        {u"qt"_s, Flag},
        {u"rawclbgdkbdiag"_s, Flag},
        {u"rawclbgbdiag"_s, Flag},
        {u"rawclbgcross"_s, Flag},
        {u"rawclbgdcross"_s, Flag},
        {u"rawclbgdkcross"_s, Flag},
        {u"rawclbgdkdcross"_s, Flag},
        {u"rawclbgdkfdiag"_s, Flag},
        {u"rawclbgdkhor"_s, Flag},
        {u"rawclbgdkvert"_s, Flag},
        {u"rawclbgfdiag"_s, Flag},
        {u"rawclbghoriz"_s, Flag},
        {u"rawclbgvert"_s, Flag},
        {u"rdblquote"_s, Symbol},
        {u"readonlyrecommended"_s, Flag},
        {u"readprot"_s, Flag},
        {u"red"_s, Value},
        {u"relyonvml"_s, Value},
        {u"remdttm"_s, Flag},
        {u"rempersonalinfo"_s, Flag},
        {u"result"_s, Destination},
        {u"revauth"_s, Value},
        {u"revauthdel"_s, Value},
        {u"revbar"_s, Value},
        {u"revdttm"_s, Value},
        {u"revdttmdel"_s, Value},
        {u"revised"_s, Toggle},
        {u"revisions"_s, Flag},
        {u"revprop"_s, Value},
        {u"revprot"_s, Flag},
        {u"revtbl"_s, Destination},
        {u"revtim"_s, Destination},
        {u"ri"_s, Value},
        {u"rin"_s, Value},
        {u"row"_s, Symbol},
        {u"rquote"_s, Symbol},
        {u"rsid"_s, Value},
        {u"rsidroot"_s, Value},
        {u"rsidtbl"_s, Destination},
        {u"rsltbmp"_s, Flag},
        {u"rslthtml"_s, Flag},
        {u"rsltmerge"_s, Flag},
        {u"rsltpict"_s, Flag},
        {u"rsltrtf"_s, Flag},
        {u"rslttxt"_s, Flag},
        {u"rtf"_s, Destination},
        {u"rtlch"_s, Flag},
        {u"rtldoc"_s, Flag},
        {u"rtlgutter"_s, Flag},
        {u"rtlmark"_s, Symbol},
        {u"rtlpar"_s, Flag},
        {u"rtlrow"_s, Flag},
        {u"rtlsect"_s, Flag},
        {u"rxe"_s, Destination},
        {u"s"_s, Value},
        {u"sa"_s, Value},
        {u"saauto"_s, Toggle},
        {u"saftnnalc"_s, Flag},
        {u"saftnnar"_s, Flag},
        {u"saftnnauc"_s, Flag},
        {u"saftnnchi"_s, Flag},
        {u"saftnnchosung"_s, Flag},
        {u"saftnncnum"_s, Flag},
        {u"saftnndbar"_s, Flag},
        {u"saftnndbnum"_s, Flag},
        {u"saftnndbnumd"_s, Flag},
        {u"saftnndbnumk"_s, Flag},
        {u"saftnndbnumt"_s, Flag},
        {u"saftnnganada"_s, Flag},
        {u"saftnngbnum"_s, Flag},
        {u"saftnngbnumd"_s, Flag},
        {u"saftnngbnumk"_s, Flag},
        {u"saftnngbnuml"_s, Flag},
        {u"saftnnrlc"_s, Flag},
        {u"saftnnruc"_s, Flag},
        {u"saftnnzodiac"_s, Flag},
        {u"saftnnzodiacd"_s, Flag},
        {u"saftnnzodiacl"_s, Flag},
        {u"saftnrestart"_s, Flag},
        {u"saftnrstcont"_s, Flag},
        {u"saftnstart"_s, Value},
        {u"sautoupd"_s, Flag},
        {u"saveinvalidxml"_s, Flag},
        {u"saveprevpict"_s, Flag},
        {u"sb"_s, Value},
        {u"sbasedon"_s, Value},
        {u"sbauto"_s, Toggle},
        {u"sbkcol"_s, Flag},
        {u"sbkeven"_s, Flag},
        {u"sbknone"_s, Flag},
        {u"sbkodd"_s, Flag},
        {u"sbkpage"_s, Flag},
        {u"sbys"_s, Flag},
        {u"scaps"_s, Toggle},
        {u"scompose"_s, Flag},
        {u"sec"_s, Value},
        {u"sect"_s, Symbol},
        {u"sectd"_s, Flag},
        {u"sectdefaultcl"_s, Flag},
        {u"sectexpand"_s, Value},
        {u"sectlinegrid"_s, Value},
        {u"sectnum"_s, Symbol},
        {u"sectrsid"_s, Value},
        {u"sectspecifycl"_s, Flag},
        {u"sectspecifygen"_s, Flag},
        {u"sectspecifyl"_s, Flag},
        {u"sectunlocked"_s, Flag},
        {u"sftnbj"_s, Flag},
        {u"sftnnalc"_s, Flag},
        {u"sftnnar"_s, Flag},
        {u"sftnnauc"_s, Flag},
        {u"sftnnchi"_s, Flag},
        {u"sftnnchosung"_s, Flag},
        {u"sftnncnum"_s, Flag},
        {u"sftnndbar"_s, Flag},
        {u"sftnndbnum"_s, Flag},
        {u"sftnndbnumd"_s, Flag},
        {u"sftnndbnumk"_s, Flag},
        {u"sftnndbnumt"_s, Flag},
        {u"sftnnganada"_s, Flag},
        {u"sftnngbnum"_s, Flag},
        {u"sftnngbnumd"_s, Flag},
        {u"sftnngbnumk"_s, Flag},
        {u"sftnngbnuml"_s, Flag},
        {u"sftnnrlc"_s, Flag},
        {u"sftnnruc"_s, Flag},
        {u"sftnnzodiac"_s, Flag},
        {u"sftnnzodiacd"_s, Flag},
        {u"sftnnzodiacl"_s, Flag},
        {u"sftnrestart"_s, Flag},
        {u"sftnrstcont"_s, Flag},
        {u"sftnrstpg"_s, Flag},
        {u"sftnstart"_s, Value},
        {u"sftntj"_s, Flag},
        {u"shad"_s, Toggle},
        {u"shading"_s, Value},
        {u"shidden"_s, Flag},
        {u"shift"_s, Flag},
        {u"showplaceholdtext"_s, Value},
        {u"showxmlerrors"_s, Value},
        {u"shp"_s, Destination},
        {u"shpbottom"_s, Value},
        {u"shpbxcolumn"_s, Flag},
        {u"shpbxignore"_s, Flag},
        {u"shpbxmargin"_s, Flag},
        {u"shpbxpage"_s, Flag},
        {u"shpbyignore"_s, Flag},
        {u"shpbymargin"_s, Flag},
        {u"shpbypage"_s, Flag},
        {u"shpbypara"_s, Flag},
        {u"shpfblwtxt"_s, Value},
        {u"shpfhdr"_s, Value},
        {u"shpgrp"_s, Destination},
        {u"shpinst"_s, Destination},
        {u"shpleft"_s, Value},
        {u"shplid"_s, Value},
        {u"shplockanchor"_s, Flag},
        {u"shppict"_s, Destination},
        {u"shpright"_s, Value},
        {u"shprslt"_s, Destination},
        {u"shptop"_s, Value},
        {u"shptxt"_s, Destination},
        {u"shpwrk"_s, Value},
        {u"shpwr"_s, Value},
        {u"shpz"_s, Value},
        {u"sl"_s, Value},
        {u"slink"_s, Value},
        {u"slmult"_s, Value},
        {u"slocked"_s, Flag},
        {u"sn"_s, Destination},
        {u"snaptogridincell"_s, Flag},
        {u"snext"_s, Value},
        {u"softcol"_s, Flag},
        {u"softlheight"_s, Value},
        {u"softline"_s, Flag},
        {u"softpage"_s, Flag},
        {u"sp"_s, Destination},
        {u"spersonal"_s, Flag},
        {u"spltpgpar"_s, Flag},
        {u"splytwnine"_s, Flag},
        {u"spriority"_s, Value},
        {u"sprsbsp"_s, Flag},
        {u"sprslnsp"_s, Flag},
        {u"sprsspbf"_s, Flag},
        {u"sprstsm"_s, Flag},
        {u"sprstsp"_s, Flag},
        {u"spv"_s, Flag},
        {u"sqformat"_s, Flag},
        {u"srauth"_s, Value},
        {u"srdate"_s, Value},
        {u"sreply"_s, Flag},
        {u"ssemihidden"_s, Value},
        {u"staticval"_s, Destination},
        {u"stextflow"_s, Value},
        {u"strike"_s, Toggle},
        {u"striked1"_s, Toggle},
        {u"stshfbi"_s, Value},
        {u"stshfdbch"_s, Value},
        {u"stshfhich"_s, Value},
        {u"stshfloch"_s, Value},
        {u"stylelock"_s, Flag},
        {u"stylelockbackcomp"_s, Flag},
        {u"stylelockenforced"_s, Flag},
        {u"stylelockqfset"_s, Flag},
        {u"stylelocktheme"_s, Flag},
        {u"stylesheet"_s, Destination},
        {u"stylesortmethod"_s, Value},
        {u"styrsid"_s, Value},
        {u"sub"_s, Flag},
        {u"subdocument"_s, Value},
        {u"subfontbysize"_s, Flag},
        {u"subject"_s, Destination},
        {u"sunhideused"_s, Value},
        {u"super"_s, Flag},
        {u"sv"_s, Destination},
        {u"svb"_s, Destination},
        {u"swpbdr"_s, Flag},
        {u"tab"_s, Symbol},
        {u"tabsnoovrlp"_s, Flag},
        {u"taprtl"_s, Flag},
        {u"tb"_s, Value},
        {u"tblind"_s, Value},
        {u"tblindtype"_s, Value},
        {u"tbllkbestfit"_s, Flag},
        {u"tbllkborder"_s, Flag},
        {u"tbllkcolor"_s, Flag},
        {u"tbllkfont"_s, Flag},
        {u"tbllkhdrcols"_s, Flag},
        {u"tbllkhdrrows"_s, Flag},
        {u"tbllklastcol"_s, Flag},
        {u"tbllklastrow"_s, Flag},
        {u"tbllknocolband"_s, Flag},
        {u"tbllknorowband"_s, Flag},
        {u"tbllkshading"_s, Flag},
        {u"tblrsid"_s, Value},
        {u"tc"_s, Destination},
        {u"tcelld"_s, Flag},
        {u"tcf"_s, Value},
        {u"tcl"_s, Value},
        {u"tcn"_s, Flag},
        {u"tdfrmtxtBottom"_s, Value},
        {u"tdfrmtxtLeft"_s, Value},
        {u"tdfrmtxtRight"_s, Value},
        {u"tdfrmtxtTop"_s, Value},
        {u"template"_s, Destination},
        {u"themedata"_s, Destination},
        {u"themelang"_s, Value},
        {u"themelangcs"_s, Value},
        {u"themelangfe"_s, Value},
        {u"time"_s, Flag},
        {u"title"_s, Destination},
        {u"titlepg"_s, Flag},
        {u"tldot"_s, Flag},
        {u"tleq"_s, Flag},
        {u"tlhyph"_s, Flag},
        {u"tlmdot"_s, Flag},
        {u"tlth"_s, Flag},
        {u"tlul"_s, Flag},
        {u"toplinepunct"_s, Flag},
        {u"tphcol"_s, Flag},
        {u"tphmrg"_s, Flag},
        {u"tphpg"_s, Flag},
        {u"tposnegx"_s, Value},
        {u"tposnegy"_s, Value},
        {u"tposxc"_s, Flag},
        {u"tposxi"_s, Flag},
        {u"tposxl"_s, Flag},
        {u"tposx"_s, Value},
        {u"tposxo"_s, Flag},
        {u"tposxr"_s, Flag},
        {u"tposy"_s, Value},
        {u"tposyb"_s, Flag},
        {u"tposyc"_s, Flag},
        {u"tposyil"_s, Flag},
        {u"tposyin"_s, Flag},
        {u"tposyout"_s, Flag},
        {u"tposyt"_s, Flag},
        {u"tpvmrg"_s, Flag},
        {u"tpvpara"_s, Flag},
        {u"tpvpg"_s, Flag},
        {u"tqc"_s, Flag},
        {u"tqdec"_s, Flag},
        {u"tqr"_s, Flag},
        {u"trackformatting"_s, Value},
        {u"trackmoves"_s, Value},
        {u"transmf"_s, Flag},
        {u"trauth"_s, Value},
        {u"trautofit"_s, Toggle},
        {u"trbgbdiag"_s, Flag},
        {u"trbgcross"_s, Flag},
        {u"trbgdcross"_s, Flag},
        {u"trbgdkbdiag"_s, Flag},
        {u"trbgdkcross"_s, Flag},
        {u"trbgdkdcross"_s, Flag},
        {u"trbgdkfdiag"_s, Flag},
        {u"trbgdkhor"_s, Flag},
        {u"trbgdkvert"_s, Flag},
        {u"trbgfdiag"_s, Flag},
        {u"trbghoriz"_s, Flag},
        {u"trbgvert"_s, Flag},
        {u"trbrdrb"_s, Flag},
        {u"trbrdrh"_s, Flag},
        {u"trbrdrl"_s, Flag},
        {u"trbrdrr"_s, Flag},
        {u"trbrdrt"_s, Flag},
        {u"trbrdrv"_s, Flag},
        {u"trcbpat"_s, Value},
        {u"trcfpat"_s, Value},
        {u"trdate"_s, Value},
        {u"trftsWidthA"_s, Value},
        {u"trftsWidthB"_s, Value},
        {u"trftsWidth"_s, Value},
        {u"trgaph"_s, Value},
        {u"trhdr"_s, Flag},
        {u"trkeep"_s, Flag},
        {u"trkeepfollow"_s, Flag},
        {u"trleft"_s, Value},
        {u"trowd"_s, Flag},
        {u"trpaddb"_s, Value},
        {u"trpaddfb"_s, Value},
        {u"trpaddfl"_s, Value},
        {u"trpaddfr"_s, Value},
        {u"trpaddft"_s, Value},
        {u"trpaddl"_s, Value},
        {u"trpaddr"_s, Value},
        {u"trpaddt"_s, Value},
        {u"trpadob"_s, Value},
        {u"trpadofb"_s, Value},
        {u"trpadofl"_s, Value},
        {u"trpadofr"_s, Value},
        {u"trpadoft"_s, Value},
        {u"trpadol"_s, Value},
        {u"trpador"_s, Value},
        {u"trpadot"_s, Value},
        {u"trpat"_s, Value},
        {u"trqc"_s, Flag},
        {u"trql"_s, Flag},
        {u"trqr"_s, Flag},
        {u"trrh"_s, Value},
        {u"trshdng"_s, Value},
        {u"trspdb"_s, Value},
        {u"trspdfb"_s, Value},
        {u"trspdfl"_s, Value},
        {u"trspdfr"_s, Value},
        {u"trspdft"_s, Value},
        {u"trspdl"_s, Value},
        {u"trspdr"_s, Value},
        {u"trspdt"_s, Value},
        {u"trspob"_s, Value},
        {u"trspofb"_s, Value},
        {u"trspofl"_s, Value},
        {u"trspofr"_s, Value},
        {u"trspoft"_s, Value},
        {u"trspol"_s, Value},
        {u"trspor"_s, Value},
        {u"trspot"_s, Value},
        {u"truncatefontheight"_s, Flag},
        {u"truncex"_s, Flag},
        {u"trwWidthA"_s, Value},
        {u"trwWidthB"_s, Value},
        {u"trwWidth"_s, Value},
        {u"ts"_s, Value},
        {u"tsbgbdiag"_s, Flag},
        {u"tsbgcross"_s, Flag},
        {u"tsbgdcross"_s, Flag},
        {u"tsbgdkbdiag"_s, Flag},
        {u"tsbgdkcross"_s, Flag},
        {u"tsbgdkdcross"_s, Flag},
        {u"tsbgdkfdiag"_s, Flag},
        {u"tsbgdkhor"_s, Flag},
        {u"tsbgdkvert"_s, Flag},
        {u"tsbgfdiag"_s, Flag},
        {u"tsbghoriz"_s, Flag},
        {u"tsbgvert"_s, Flag},
        {u"tsbrdrb"_s, Flag},
        {u"tsbrdrdgl"_s, Flag},
        {u"tsbrdrdgr"_s, Flag},
        {u"tsbrdrh"_s, Flag},
        {u"tsbrdrl"_s, Flag},
        {u"tsbrdrr"_s, Flag},
        {u"tsbrdrr"_s, Flag},
        {u"tsbrdrt"_s, Flag},
        {u"tsbrdrv"_s, Flag},
        {u"tscbandhorzeven"_s, Flag},
        {u"tscbandhorzodd"_s, Flag},
        {u"tscbandsh"_s, Value},
        {u"tscbandsv"_s, Value},
        {u"tscbandverteven"_s, Flag},
        {u"tscbandvertodd"_s, Flag},
        {u"tscellcbpat"_s, Value},
        {u"tscellcfpat"_s, Value},
        {u"tscellpaddb"_s, Value},
        {u"tscellpaddfb"_s, Value},
        {u"tscellpaddfl"_s, Value},
        {u"tscellpaddfr"_s, Value},
        {u"tscellpaddft"_s, Value},
        {u"tscellpaddl"_s, Value},
        {u"tscellpaddr"_s, Value},
        {u"tscellpaddt"_s, Value},
        {u"tscellpct"_s, Value},
        {u"tscellwidth"_s, Value},
        {u"tscellwidthfts"_s, Value},
        {u"tscfirstcol"_s, Flag},
        {u"tscfirstrow"_s, Flag},
        {u"tsclastcol"_s, Flag},
        {u"tsclastrow"_s, Flag},
        {u"tscnecell"_s, Flag},
        {u"tscnwcell"_s, Flag},
        {u"tscsecell"_s, Flag},
        {u"tscswcell"_s, Flag},
        {u"tsd"_s, Flag},
        {u"tsnowrap"_s, Flag},
        {u"tsrowd"_s, Flag},
        {u"tsvertalb"_s, Flag},
        {u"tsvertalc"_s, Flag},
        {u"tsvertalt"_s, Flag},
        {u"twoinone"_s, Value},
        {u"twoonone"_s, Flag},
        {u"tx"_s, Value},
        {u"txbxtwalways"_s, Flag},
        {u"txbxtwfirst"_s, Flag},
        {u"txbxtwfirstlast"_s, Flag},
        {u"txbxtwlast"_s, Flag},
        {u"txbxtwno"_s, Flag},
        {u"txe"_s, Destination},
        {u"u"_s, Value},
        {u"uc"_s, Value},
        {u"ud"_s, Destination},
        {u"ul"_s, Toggle},
        {u"ulc"_s, Value},
        {u"uld"_s, Flag},
        {u"uldash"_s, Toggle},
        {u"uldashd"_s, Toggle},
        {u"uldashdd"_s, Toggle},
        {u"uldb"_s, Toggle},
        {u"ulhair"_s, Toggle},
        {u"ulhwave"_s, Toggle},
        {u"ulldash"_s, Toggle},
        {u"ulnone"_s, Flag},
        {u"ulth"_s, Toggle},
        {u"ulth"_s, Toggle},
        {u"ulthd"_s, Toggle},
        {u"ulthdash"_s, Toggle},
        {u"ulthdashd"_s, Toggle},
        {u"ulthdashdd"_s, Toggle},
        {u"ulthldash"_s, Toggle},
        {u"ululdbwave"_s, Toggle},
        {u"ulw"_s, Flag},
        {u"ulwave"_s, Toggle},
        {u"up"_s, Value},
        {u"upr"_s, Destination},
        {u"urtf"_s, Value},
        {u"useltbaln"_s, Flag},
        {u"usenormstyforlist"_s, Flag},
        {u"userprops"_s, Destination},
        {u"usexform"_s, Flag},
        {u"utinl"_s, Flag},
        {u"v"_s, Toggle},
        {u"validatexml"_s, Value},
        {u"vern"_s, Value},
        {u"version"_s, Value},
        {u"vertal"_s, Flag},
        {u"vertalb"_s, Flag},
        {u"vertalc"_s, Flag},
        {u"vertalj"_s, Flag},
        {u"vertalt"_s, Flag},
        {u"vertdoc"_s, Flag},
        {u"vertsect"_s, Flag},
        {u"viewbksp"_s, Value},
        {u"viewkind"_s, Value},
        {u"viewnobound"_s, Flag},
        {u"viewscale"_s, Value},
        {u"viewzk"_s, Value},
        {u"wbitmap"_s, Value},
        {u"wbmbitspixel"_s, Value},
        {u"wbmplanes"_s, Value},
        {u"wbmwidthbyte"_s, Value},
        {u"webhidden"_s, Flag},
        {u"wgrffmtfilter"_s, Destination},
        {u"widctlpar"_s, Flag},
        {u"widowctrl"_s, Flag},
        {u"windowcaption"_s, Destination},
        {u"wmetafile"_s, Value},
        {u"wpeqn"_s, Flag},
        {u"wpjst"_s, Flag},
        {u"wpsp"_s, Flag},
        {u"wraparound"_s, Flag},
        {u"wrapdefault"_s, Flag},
        {u"wrapthrough"_s, Flag},
        {u"wraptight"_s, Flag},
        {u"wraptrsp"_s, Flag},
        {u"writereservation"_s, Destination},
        {u"writereservhash"_s, Destination},
        {u"wrppunct"_s, Flag},
        {u"xe"_s, Destination},
        {u"xef"_s, Value},
        {u"xform"_s, Destination},
        {u"xmlattr"_s, Flag},
        {u"xmlattrname"_s, Destination},
        {u"xmlattrns"_s, Value},
        {u"xmlattrvalue"_s, Destination},
        {u"xmlclose"_s, Destination},
        {u"xmlname"_s, Destination},
        {u"xmlns"_s, Value},
        {u"xmlnstbl"_s, Destination},
        {u"xmlopen"_s, Destination},
        {u"xmlsdttcell"_s, Flag},
        {u"xmlsdttpara"_s, Flag},
        {u"xmlsdttregular"_s, Flag},
        {u"xmlsdttrow"_s, Flag},
        {u"xmlsdttunknown"_s, Flag},
        {u"yr"_s, Value},
        {u"yts"_s, Value},
        {u"yxe"_s, Flag},
        {u"zwbo"_s, Symbol},
        {u"zwj"_s, Symbol},
        {u"zwnbo"_s, Symbol},
        {u"zwnj"_s, Symbol},
    };
}

static SupportedDestinationsSet initSupportedDestinations()
{
    return {
        u"pict"_s,
        u"fonttbl"_s,
        u"stylesheet"_s,
        u"colortbl"_s,
        u"info"_s,
        u"title"_s,
        u"generator"_s,
        u"company"_s,
        u"creatim"_s,
        u"printim"_s,
        u"revtim"_s,
        u"operator"_s,
        u"comment"_s,
        u"subject"_s,
        u"manager"_s,
        u"category"_s,
        u"doccomm"_s,
        u"keywords"_s,
        u"hlinkbase"_s,
        u"userprops"_s,
        u"author"_s,
        // destinations from here on are marked supported so content like images inside them are handled,
        // but they don't have their own destination class to parse destination specific control words
        u"pgdsc"_s,
        u"pgdsctbl"_s,
        u"shppict"_s,
        u"shp"_s,
        u"shpinst"_s,
        u"pntxta"_s,
        u"pntxtb"_s,
        u"mmathPr"_s,
    };
}

Q_GLOBAL_STATIC(KnownControlWordsTable, s_knownControlWords, initKnownControlWords());
Q_GLOBAL_STATIC(SupportedDestinationsSet, s_supportedDestinations, initSupportedDestinations());

namespace QRtfReader
{
ControlWord::ControlWord(const QString &name)
    : m_name(name)
{
}

bool ControlWord::isSupportedDestination() const
{
    return s_supportedDestinations->contains(m_name);
}

bool ControlWord::isDestination(const QString &controlword)
{
    /* this isn't even a control word we recognise */
    if (!s_knownControlWords->contains(controlword)) {
        return false;
    }

    auto knownControlWord = s_knownControlWords->value(controlword);
    return (knownControlWord == control_word_types::Destination);
}

bool ControlWord::isKnown() const
{
    return s_knownControlWords->contains(m_name);
}
}
