|
@@ -0,0 +1,768 @@
|
|
|
+{
|
|
|
+ "cells": [
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 2,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "import json\n",
|
|
|
+ "from collections import OrderedDict"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 3,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "# Fib"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 4,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "fib = OrderedDict({\n",
|
|
|
+ " \"wIdent\":[\"An unsigned integer that specifies that this is a Word Binary File. This value MUST be 0xA5EC\",2],\n",
|
|
|
+ " \"nFib\":[\"An unsigned integer that specifies the version number of the file format used. Superseded by FibRgCswNew.nFibNewif it is present. This value SHOULD<12>be 0x00C1.\", 2],\n",
|
|
|
+ " \"ununsed\":[\"This value is undefined and MUST be ignore\", 2],\n",
|
|
|
+ " \"lid\":[\"A LIDthat specifies the install language of the application that is producing the document. If nFibis 0x00D9 or greater, then any East Asian install lid or any install lid with a base language of Spanish, German or French MUST be recorded as lidAmerican. If the nFibis 0x0101 or greater, then any install lid with a base language of Vietnamese, Thai, or Hindi MUST be recorded as lidAmerican.\",2],\n",
|
|
|
+ " \"pnNext\":[\"An unsigned integer that specifies the offset in the WordDocument streamof the FIBfor the document which contains all the AutoTextitems. If this value is 0, there are no AutoText items attached. Otherwise the FIBis found at file location pnNext×512. If fGlsyis 1 or fDotis 0, this value MUST be 0. If pnNextis not 0, each FIBMUST share the same values for FibRgFcLcb97.fcPlcBteChpx, FibRgFcLcb97.lcbPlcBteChpx, FibRgFcLcb97.fcPlcBtePapx, FibRgFcLcb97.lcbPlcBtePapx, andFibRgLw97.cbMac.\", 2],\n",
|
|
|
+ " \"flag1\":[\"Flag\", 2, \"bits\", [\"fDot\",\"fGlsy\",\"fComplex\",\"fHasPic\",\"cQuickSaves\",\"fEncrypted\",\"fWhichTblStm\",\"fReadOnlyRecommended\",\"fWriteReservation\",\"fExtChar\",\"fLoadOverride\",\"fFarEast\",\"fObfuscated\"], [1,1,1,1,4,1,1,1,1,1,1,1,1]],\n",
|
|
|
+ " \"nFibBack\":[\"This value SHOULD<14>be 0x00BF. This value MUST be 0x00BF or 0x00C\", 2],\n",
|
|
|
+ " \"lKey\":[\" If fEncryptedis 1 and fObfuscationis 1, this value specifies the XOR obfuscation (section 2.2.6.1) password verifier. If fEncryptedis 1 and fObfuscationis 0, this value specifies the size of the EncryptionHeaderthat is stored at the beginning of the Table stream as described in Encryption and Obfuscation. Otherwise, this value MUST be 0\", 4],\n",
|
|
|
+ " \"envr\":[\"This value MUST be 0, and MUST be ignored\", 1],\n",
|
|
|
+ " \"flag2\":[\"Flag\", 1, \"bits\", [\"fMac\",\"fEmptySpecial\",\"fLoadOverridePage\",\"reserved1\",\"reserved2\",\"fSpare0\"], [1,1,1,1,1,3]],\n",
|
|
|
+ " \"reserved3\":[\"This value MUST be 0 and MUST be ignore\", 2],\n",
|
|
|
+ " \"reserved4\":[\"This value MUST be 0 and MUST be ignore\", 2],\n",
|
|
|
+ " \"reserved5\":[\"This value is undefined and MUST be ignore\", 4],\n",
|
|
|
+ " \"reserved6\":[\"This value is undefined and MUST be ignore\", 4]\n",
|
|
|
+ "})"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 5,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "with open(\"../doc2pythondata/FibBase.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(fib))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 134,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "clw = {\n",
|
|
|
+ " \"clw\":[\"\",2]\n",
|
|
|
+ "}\n",
|
|
|
+ "\n",
|
|
|
+ "with open(\"../doc2python/data/clw.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(clw))\n",
|
|
|
+ " \n",
|
|
|
+ "cslw = {\n",
|
|
|
+ " \"cslw\":[\"\",2]\n",
|
|
|
+ "}\n",
|
|
|
+ "\n",
|
|
|
+ "with open(\"../doc2python/data/cslw.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(cslw))\n",
|
|
|
+ " \n",
|
|
|
+ "cbRgFcLcb = {\n",
|
|
|
+ " \"cbRgFcLcb\":[\"\",2]\n",
|
|
|
+ "}\n",
|
|
|
+ "\n",
|
|
|
+ "with open(\"../doc2python/data/cbRgFcLcb.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(cbRgFcLcb))\n",
|
|
|
+ "\n",
|
|
|
+ "cswNew = {\n",
|
|
|
+ " \"cswNew\":[\"\",2]\n",
|
|
|
+ "}\n",
|
|
|
+ "\n",
|
|
|
+ "with open(\"../doc2python/data/cswNew.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(cswNew))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 41,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "# FibRgW97"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 42,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "FibRgW97 = OrderedDict({\n",
|
|
|
+ " \"reserved1\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved2\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved3\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved4\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved5\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved6\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved7\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved8\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved9\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved10\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved11\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved12\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"reserved13\":[\"This value is undefined and MUST be ignored.\", 2],\n",
|
|
|
+ " \"lidFE\":[\"A LID whose meaning depends on the nFib value, which is one of the following.\", 2]\n",
|
|
|
+ "})"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 50,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "with open(\"../doc2python/data/FibRgW97.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(FibRgW97))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 33,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "# FibRgLw97"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 34,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "FibRgLw97_list = [\"cbMac\",\n",
|
|
|
+ " \"reserved1\",\n",
|
|
|
+ " \"reserved2\",\n",
|
|
|
+ " \"ccpText\",\n",
|
|
|
+ " \"ccpFtn\",\n",
|
|
|
+ " \"ccpHdd\",\n",
|
|
|
+ " \"reserved3\",\n",
|
|
|
+ " \"ccpAtn\",\n",
|
|
|
+ " \"ccpEdn\",\n",
|
|
|
+ " \"ccpTxbx\",\n",
|
|
|
+ " \"ccpHdrTxbx\",\n",
|
|
|
+ " \"reserved4\",\n",
|
|
|
+ " \"reserved5\",\n",
|
|
|
+ " \"reserved6\",\n",
|
|
|
+ " \"reserved7\",\n",
|
|
|
+ " \"reserved8\",\n",
|
|
|
+ " \"reserved9\",\n",
|
|
|
+ " \"reserved10\",\n",
|
|
|
+ " \"reserved11\",\n",
|
|
|
+ " \"reserved12\",\n",
|
|
|
+ " \"reserved13\",\n",
|
|
|
+ " \"reserved14\"\n",
|
|
|
+ "]\n",
|
|
|
+ "\n",
|
|
|
+ "FibRgLw97 = OrderedDict(zip(FibRgLw97_list, [[\"\",4] for y in range(len(FibRgLw97_list))]))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 35,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "with open(\"../doc2python/data/FibRgLw97.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(FibRgLw97))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 118,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "# FibRgFcLcb97"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 119,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "data": {
|
|
|
+ "text/plain": [
|
|
|
+ "744"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "execution_count": 119,
|
|
|
+ "metadata": {},
|
|
|
+ "output_type": "execute_result"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "FibRgFcLcb97_list = [\n",
|
|
|
+ " \"fcStshfOrig\",\n",
|
|
|
+ " \"lcbStshfOrig\",\n",
|
|
|
+ " \"fcStshf\",\n",
|
|
|
+ " \"lcbStshf\",\n",
|
|
|
+ " \"fcPlcffndRef\",\n",
|
|
|
+ " \"lcbPlcffndRef\",\n",
|
|
|
+ " \"fcPlcffndTxt\",\n",
|
|
|
+ " \"lcbPlcffndTxt\",\n",
|
|
|
+ " \"fcPlcfandRef\",\n",
|
|
|
+ " \"lcbPlcfandRef\",\n",
|
|
|
+ " \"fcPlcfandTxt\",\n",
|
|
|
+ " \"lcbPlcfandTxt\",\n",
|
|
|
+ " \"fcPlcfSed\",\n",
|
|
|
+ " \"lcbPlcfSed\",\n",
|
|
|
+ " \"fcPlcPad\",\n",
|
|
|
+ " \"lcbPlcPad\",\n",
|
|
|
+ " \"fcPlcfPhe\",\n",
|
|
|
+ " \"lcbPlcfPhe\",\n",
|
|
|
+ " \"fcSttbfGlsy\",\n",
|
|
|
+ " \"lcbSttbfGlsy\",\n",
|
|
|
+ " \"fcPlcfGlsy\",\n",
|
|
|
+ " \"lcbPlcfGlsy\",\n",
|
|
|
+ " \"fcPlcfHdd\",\n",
|
|
|
+ " \"lcbPlcfHdd\",\n",
|
|
|
+ " \"fcPlcfBteChpx\",\n",
|
|
|
+ " \"lcbPlcfBteChpx\",\n",
|
|
|
+ " \"fcPlcfBtePapx\",\n",
|
|
|
+ " \"lcbPlcfBtePapx\",\n",
|
|
|
+ " \"fcPlcfSea\",\n",
|
|
|
+ " \"lcbPlcfSea\",\n",
|
|
|
+ " \"fcSttbfFfn\",\n",
|
|
|
+ " \"lcbSttbfFfn\",\n",
|
|
|
+ " \"fcPlcfFldMom\",\n",
|
|
|
+ " \"lcbPlcfFldMom\",\n",
|
|
|
+ " \"fcPlcfFldHdr\",\n",
|
|
|
+ " \"lcbPlcfFldHdr\",\n",
|
|
|
+ " \"fcPlcfFldFtn\",\n",
|
|
|
+ " \"lcbPlcfFldFtn\",\n",
|
|
|
+ " \"fcPlcfFldAtn\",\n",
|
|
|
+ " \"lcbPlcfFldAtn\",\n",
|
|
|
+ " \"fcPlcfFldMcr\",\n",
|
|
|
+ " \"lcbPlcfFldMcr\",\n",
|
|
|
+ " \"fcSttbfBkmk\",\n",
|
|
|
+ " \"lcbSttbfBkmk\",\n",
|
|
|
+ " \"fcPlcfBkf\",\n",
|
|
|
+ " \"lcbPlcfBkf\",\n",
|
|
|
+ " \"fcPlcfBkl\",\n",
|
|
|
+ " \"lcbPlcfBkl\",\n",
|
|
|
+ " \"fcCmds\",\n",
|
|
|
+ " \"lcbCmds\",\n",
|
|
|
+ " \"fcUnused1_old_old\",\n",
|
|
|
+ " \"lcbUnused1_old_old\",\n",
|
|
|
+ " \"fcSttbfMcr\",\n",
|
|
|
+ " \"lcbSttbfMcr\",\n",
|
|
|
+ " \"fcPrDrvr\",\n",
|
|
|
+ " \"lcbPrDrvr\",\n",
|
|
|
+ " \"fcPrEnvPort\",\n",
|
|
|
+ " \"lcbPrEnvPort\",\n",
|
|
|
+ " \"fcPrEnvLand\",\n",
|
|
|
+ " \"lcbPrEnvLand\",\n",
|
|
|
+ " \"fcWss\",\n",
|
|
|
+ " \"lcbWss\",\n",
|
|
|
+ " \"fcDop\",\n",
|
|
|
+ " \"lcbDop\",\n",
|
|
|
+ " \"fcSttbfAssoc\",\n",
|
|
|
+ " \"lcbSttbfAssoc\",\n",
|
|
|
+ " \"fcClx\",\n",
|
|
|
+ " \"lcbClx\",\n",
|
|
|
+ " \"fcPlcfPgdFtn\",\n",
|
|
|
+ " \"lcbPlcfPgdFtn\",\n",
|
|
|
+ " \"fcAutosaveSource\",\n",
|
|
|
+ " \"lcbAutosaveSource\",\n",
|
|
|
+ " \"fcGrpXstAtnOwners\",\n",
|
|
|
+ " \"lcbGrpXstAtnOwners\",\n",
|
|
|
+ " \"fcSttbfAtnBkmk\",\n",
|
|
|
+ " \"lcbSttbfAtnBkmk\",\n",
|
|
|
+ " \"fcUnused2_old_old\",\n",
|
|
|
+ " \"lcbUnused2_old_old\",\n",
|
|
|
+ " \"fcUnused3_old\",\n",
|
|
|
+ " \"lcbUnused3_old\",\n",
|
|
|
+ " \"fcPlcSpaMom\",\n",
|
|
|
+ " \"lcbPlcSpaMom\",\n",
|
|
|
+ " \"fcPlcSpaHdr\",\n",
|
|
|
+ " \"lcbPlcSpaHdr\",\n",
|
|
|
+ " \"fcPlcfAtnBkf\",\n",
|
|
|
+ " \"lcbPlcfAtnBkf\",\n",
|
|
|
+ " \"fcPlcfAtnBkl\",\n",
|
|
|
+ " \"lcbPlcfAtnBkl\",\n",
|
|
|
+ " \"fcPms\",\n",
|
|
|
+ " \"lcbPms\",\n",
|
|
|
+ " \"fcFormFldSttbs\",\n",
|
|
|
+ " \"lcbFormFldSttbs\",\n",
|
|
|
+ " \"fcPlcfendRef\",\n",
|
|
|
+ " \"lcbPlcfendRef\",\n",
|
|
|
+ " \"fcPlcfendTxt\",\n",
|
|
|
+ " \"lcbPlcfendTxt\",\n",
|
|
|
+ " \"fcPlcfFldEdn\",\n",
|
|
|
+ " \"lcbPlcfFldEdn\",\n",
|
|
|
+ " \"fcUnused4_old\",\n",
|
|
|
+ " \"lcbUnused4_old\",\n",
|
|
|
+ " \"fcDggInfo\",\n",
|
|
|
+ " \"lcbDggInfo\",\n",
|
|
|
+ " \"fcSttbfRMark\",\n",
|
|
|
+ " \"lcbSttbfRMark\",\n",
|
|
|
+ " \"fcSttbfCaption\",\n",
|
|
|
+ " \"lcbSttbfCaption\",\n",
|
|
|
+ " \"fcSttbfAutoCaption\",\n",
|
|
|
+ " \"lcbSttbfAutoCaption\",\n",
|
|
|
+ " \"fcPlcfWkb\",\n",
|
|
|
+ " \"lcbPlcfWkb\",\n",
|
|
|
+ " \"fcPlcfSpl\",\n",
|
|
|
+ " \"lcbPlcfSpl\",\n",
|
|
|
+ " \"fcPlcftxbxTxt\",\n",
|
|
|
+ " \"lcbPlcftxbxTxt\",\n",
|
|
|
+ " \"fcPlcfFldTxbx\",\n",
|
|
|
+ " \"lcbPlcfFldTxbx\",\n",
|
|
|
+ " \"fcPlcfHdrtxbxTxt\",\n",
|
|
|
+ " \"lcbPlcfHdrtxbxTxt\",\n",
|
|
|
+ " \"fcPlcffldHdrTxbx\",\n",
|
|
|
+ " \"lcbPlcffldHdrTxbx\",\n",
|
|
|
+ " \"fcStwUser\",\n",
|
|
|
+ " \"lcbStwUser\",\n",
|
|
|
+ " \"fcSttbTtmbd\",\n",
|
|
|
+ " \"lcbSttbTtmbd\",\n",
|
|
|
+ " \"fcCookieData\",\n",
|
|
|
+ " \"lcbCookieData\",\n",
|
|
|
+ " \"fcPgdMotherOldOld\",\n",
|
|
|
+ " \"lcbPgdMotherOldOld\",\n",
|
|
|
+ " \"fcBkdMotherOldOld\",\n",
|
|
|
+ " \"lcbBkdMotherOldOld\",\n",
|
|
|
+ " \"fcPgdFtnOldOld\",\n",
|
|
|
+ " \"lcbPgdFtnOldOld\",\n",
|
|
|
+ " \"fcBkdFtnOldOld\",\n",
|
|
|
+ " \"lcbBkdFtnOldOld\",\n",
|
|
|
+ " \"fcPgdEdnOldOld\",\n",
|
|
|
+ " \"lcbPgdEdnOldOld\",\n",
|
|
|
+ " \"fcBkdEdnOldOld\",\n",
|
|
|
+ " \"lcbBkdEdnOldOld\",\n",
|
|
|
+ " \"fcSttbfIntlFld\",\n",
|
|
|
+ " \"lcbSttbfIntlFld\",\n",
|
|
|
+ " \"fcRouteSlip\",\n",
|
|
|
+ " \"lcbRouteSlip\",\n",
|
|
|
+ " \"fcSttbSavedBy\",\n",
|
|
|
+ " \"lcbSttbSavedBy\",\n",
|
|
|
+ " \"fcSttbFnm\",\n",
|
|
|
+ " \"lcbSttbFnm\",\n",
|
|
|
+ " \"fcPlfLst\",\n",
|
|
|
+ " \"lcbPlfLst\",\n",
|
|
|
+ " \"fcPlfLfo\",\n",
|
|
|
+ " \"lcbPlfLfo\",\n",
|
|
|
+ " \"fcPlcfTxbxBkd\",\n",
|
|
|
+ " \"lcbPlcfTxbxBkd\",\n",
|
|
|
+ " \"fcPlcfTxbxHdrBkd\",\n",
|
|
|
+ " \"lcbPlcfTxbxHdrBkd\",\n",
|
|
|
+ " \"fcDocUndoWord9\",\n",
|
|
|
+ " \"lcbDocUndoWord9\",\n",
|
|
|
+ " \"fcRgbUse\",\n",
|
|
|
+ " \"lcbRgbUse\",\n",
|
|
|
+ " \"fcUsp\",\n",
|
|
|
+ " \"lcbUsp\",\n",
|
|
|
+ " \"fcUskf\",\n",
|
|
|
+ " \"lcbUskf\",\n",
|
|
|
+ " \"fcPlcupcRgbUse\",\n",
|
|
|
+ " \"lcbPlcupcRgbUse\",\n",
|
|
|
+ " \"fcPlcupcUsp\",\n",
|
|
|
+ " \"lcbPlcupcUsp\",\n",
|
|
|
+ " \"fcSttbGlsyStyle\",\n",
|
|
|
+ " \"lcbSttbGlsyStyle\",\n",
|
|
|
+ " \"fcPlgosl\",\n",
|
|
|
+ " \"lcbPlgosl\",\n",
|
|
|
+ " \"fcPlcocx\",\n",
|
|
|
+ " \"lcbPlcocx\",\n",
|
|
|
+ " \"fcPlcfBteLvc\",\n",
|
|
|
+ " \"lcbPlcfBteLvc\",\n",
|
|
|
+ " \"dwLowDateTime\",\n",
|
|
|
+ " \"dwHighDateTime\",\n",
|
|
|
+ " \"fcPlcfLvcPre10\",\n",
|
|
|
+ " \"lcbPlcfLvcPre10\",\n",
|
|
|
+ " \"fcPlcfAsumy\",\n",
|
|
|
+ " \"lcbPlcfAsumy\",\n",
|
|
|
+ " \"fcPlcfGram\",\n",
|
|
|
+ " \"lcbPlcfGram\",\n",
|
|
|
+ " \"fcSttbListNames\",\n",
|
|
|
+ " \"lcbSttbListNames\",\n",
|
|
|
+ " \"fcSttbfUssr\",\n",
|
|
|
+ " \"lcbSttbfUssr\"]\n",
|
|
|
+ "len(FibRgFcLcb97_list)*4"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 120,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "120\n",
|
|
|
+ "864\n"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "FibRgFcLcb00_list = [\n",
|
|
|
+ " \"fcPlcfTch\",\n",
|
|
|
+ " \"lcbPlcfTch\",\n",
|
|
|
+ " \"fcRmdThreading\",\n",
|
|
|
+ " \"lcbRmdThreading\",\n",
|
|
|
+ " \"fcMid\",\n",
|
|
|
+ " \"lcbMid\",\n",
|
|
|
+ " \"fcSttbRgtplc\",\n",
|
|
|
+ " \"lcbSttbRgtplc\",\n",
|
|
|
+ " \"fcMsoEnvelope\",\n",
|
|
|
+ " \"lcbMsoEnvelope\",\n",
|
|
|
+ " \"fcPlcfLad\",\n",
|
|
|
+ " \"lcbPlcfLad\",\n",
|
|
|
+ " \"fcRgDofr\",\n",
|
|
|
+ " \"lcbRgDofr\",\n",
|
|
|
+ " \"fcPlcosl\",\n",
|
|
|
+ " \"lcbPlcosl\",\n",
|
|
|
+ " \"fcPlcfCookieOld\",\n",
|
|
|
+ " \"lcbPlcfCookieOld\",\n",
|
|
|
+ " \"fcPgdMotherOld\",\n",
|
|
|
+ " \"lcbPgdMotherOld\",\n",
|
|
|
+ " \"fcBkdMotherOld\",\n",
|
|
|
+ " \"lcbBkdMotherOld\",\n",
|
|
|
+ " \"fcPgdFtnOld\",\n",
|
|
|
+ " \"lcbPgdFtnOld\",\n",
|
|
|
+ " \"fcBkdFtnOld\",\n",
|
|
|
+ " \"lcbBkdFtnOld\",\n",
|
|
|
+ " \"fcPgdEdnOld\",\n",
|
|
|
+ " \"lcbPgdEdnOld\",\n",
|
|
|
+ " \"fcBkdEdnOld\",\n",
|
|
|
+ " \"lcbBkdEdnOld\"\n",
|
|
|
+ "]\n",
|
|
|
+ "print(len(FibRgFcLcb00_list)*4)\n",
|
|
|
+ "print(len(FibRgFcLcb97_list)*4+len(FibRgFcLcb00_list)*4)"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 121,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "224\n",
|
|
|
+ "1088\n"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "FibRgFcLcb02_list =[\n",
|
|
|
+ " \"fcUnused1_old\",\n",
|
|
|
+ " \"lcbUnused1_old\",\n",
|
|
|
+ " \"fcPlcfPgp\",\n",
|
|
|
+ " \"lcbPlcfPgp\",\n",
|
|
|
+ " \"fcPlcfuim\",\n",
|
|
|
+ " \"lcbPlcfuim\",\n",
|
|
|
+ " \"fcPlfguidUim\",\n",
|
|
|
+ " \"lcbPlfguidUim\",\n",
|
|
|
+ " \"fcAtrdExtra\",\n",
|
|
|
+ " \"lcbAtrdExtra\",\n",
|
|
|
+ " \"fcPlrsid\",\n",
|
|
|
+ " \"lcbPlrsid\",\n",
|
|
|
+ " \"fcSttbfBkmkFactoid\",\n",
|
|
|
+ " \"lcbSttbfBkmkFactoid\",\n",
|
|
|
+ " \"fcPlcfBkfFactoid\",\n",
|
|
|
+ " \"lcbPlcfBkfFactoid\",\n",
|
|
|
+ " \"fcPlcfcookie\",\n",
|
|
|
+ " \"lcbPlcfcookie\",\n",
|
|
|
+ " \"fcPlcfBklFactoid\",\n",
|
|
|
+ " \"lcbPlcfBklFactoid\",\n",
|
|
|
+ " \"fcFactoidData\",\n",
|
|
|
+ " \"lcbFactoidData\",\n",
|
|
|
+ " \"fcDocUndo\",\n",
|
|
|
+ " \"lcbDocUndo\",\n",
|
|
|
+ " \"fcSttbfBkmkFcc\",\n",
|
|
|
+ " \"lcbSttbfBkmkFcc\",\n",
|
|
|
+ " \"fcPlcfBkfFcc\",\n",
|
|
|
+ " \"lcbPlcfBkfFcc\",\n",
|
|
|
+ " \"fcPlcfBklFcc\",\n",
|
|
|
+ " \"lcbPlcfBklFcc\",\n",
|
|
|
+ " \"fcSttbfbkmkBPRepairs\",\n",
|
|
|
+ " \"lcbSttbfbkmkBPRepairs\",\n",
|
|
|
+ " \"fcPlcfbkfBPRepairs\",\n",
|
|
|
+ " \"lcbPlcfbkfBPRepairs\",\n",
|
|
|
+ " \"fcPlcfbklBPRepairs\",\n",
|
|
|
+ " \"lcbPlcfbklBPRepairs\",\n",
|
|
|
+ " \"fcPmsNew\",\n",
|
|
|
+ " \"lcbPmsNew\",\n",
|
|
|
+ " \"fcODSO\",\n",
|
|
|
+ " \"lcbODSO\",\n",
|
|
|
+ " \"fcPlcfpmiOldXP\",\n",
|
|
|
+ " \"lcbPlcfpmiOldXP\",\n",
|
|
|
+ " \"fcPlcfpmiNewXP\",\n",
|
|
|
+ " \"lcbPlcfpmiNewXP\",\n",
|
|
|
+ " \"fcPlcfpmiMixedXP\",\n",
|
|
|
+ " \"lcbPlcfpmiMixedXP\",\n",
|
|
|
+ " \"fcUnused2_old\",\n",
|
|
|
+ " \"lcbUnused2_old\",\n",
|
|
|
+ " \"fcPlcffactoid\",\n",
|
|
|
+ " \"lcbPlcffactoid\",\n",
|
|
|
+ " \"fcPlcflvcOldXP\",\n",
|
|
|
+ " \"lcbPlcflvcOldXP\",\n",
|
|
|
+ " \"fcPlcflvcNewXP\",\n",
|
|
|
+ " \"lcbPlcflvcNewXP\",\n",
|
|
|
+ " \"fcPlcflvcMixedXP\",\n",
|
|
|
+ " \"lcbPlcflvcMixedXP\"\n",
|
|
|
+ "] \n",
|
|
|
+ "\n",
|
|
|
+ "print(len(FibRgFcLcb02_list)*4)\n",
|
|
|
+ "print(len(FibRgFcLcb97_list)*4+len(FibRgFcLcb00_list)*4+len(FibRgFcLcb02_list)*4)"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 122,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "data": {
|
|
|
+ "text/plain": [
|
|
|
+ "224"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "execution_count": 122,
|
|
|
+ "metadata": {},
|
|
|
+ "output_type": "execute_result"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "FibRgFcLcb03_list = [\"fcHplxsdr\",\n",
|
|
|
+ " \"lcbHplxsdr\",\n",
|
|
|
+ " \"fcSttbfBkmkSdt\",\n",
|
|
|
+ " \"lcbSttbfBkmkSdt\",\n",
|
|
|
+ " \"fcPlcfBkfSdt\",\n",
|
|
|
+ " \"lcbPlcfBkfSdt\",\n",
|
|
|
+ " \"fcPlcfBklSdt\",\n",
|
|
|
+ " \"lcbPlcfBklSdt\",\n",
|
|
|
+ " \"fcCustomXForm\",\n",
|
|
|
+ " \"lcbCustomXForm\",\n",
|
|
|
+ " \"fcSttbfBkmkProt\",\n",
|
|
|
+ " \"lcbSttbfBkmkProt\",\n",
|
|
|
+ " \"fcPlcfBkfProt\",\n",
|
|
|
+ " \"lcbPlcfBkfProt\",\n",
|
|
|
+ " \"fcPlcfBklProt\",\n",
|
|
|
+ " \"lcbPlcfBklProt\",\n",
|
|
|
+ " \"fcSttbProtUser\",\n",
|
|
|
+ " \"lcbSttbProtUser\",\n",
|
|
|
+ " \"fcUnused\",\n",
|
|
|
+ " \"lcbUnused\",\n",
|
|
|
+ " \"fcPlcfpmiOld\",\n",
|
|
|
+ " \"lcbPlcfpmiOld\",\n",
|
|
|
+ " \"fcPlcfpmiOldInline\",\n",
|
|
|
+ " \"lcbPlcfpmiOldInline\",\n",
|
|
|
+ " \"fcPlcfpmiNew\",\n",
|
|
|
+ " \"lcbPlcfpmiNew\",\n",
|
|
|
+ " \"fcPlcfpmiNewInline\",\n",
|
|
|
+ " \"lcbPlcfpmiNewInline\",\n",
|
|
|
+ " \"fcPlcflvcOld\",\n",
|
|
|
+ " \"lcbPlcflvcOld\",\n",
|
|
|
+ " \"fcPlcflvcOldInline\",\n",
|
|
|
+ " \"lcbPlcflvcOldInline\",\n",
|
|
|
+ " \"fcPlcflvcNew\",\n",
|
|
|
+ " \"lcbPlcflvcNew\",\n",
|
|
|
+ " \"fcPlcflvcNewInline\",\n",
|
|
|
+ " \"lcbPlcflvcNewInline\",\n",
|
|
|
+ " \"fcPgdMother\",\n",
|
|
|
+ " \"lcbPgdMother\",\n",
|
|
|
+ " \"fcBkdMother\",\n",
|
|
|
+ " \"lcbBkdMother\",\n",
|
|
|
+ " \"fcAfdMother\",\n",
|
|
|
+ " \"lcbAfdMother\",\n",
|
|
|
+ " \"fcPgdFtn\",\n",
|
|
|
+ " \"lcbPgdFtn\",\n",
|
|
|
+ " \"fcBkdFtn\",\n",
|
|
|
+ " \"lcbBkdFtn\",\n",
|
|
|
+ " \"fcAfdFtn\",\n",
|
|
|
+ " \"lcbAfdFtn\",\n",
|
|
|
+ " \"fcPgdEdn\",\n",
|
|
|
+ " \"lcbPgdEdn\",\n",
|
|
|
+ " \"fcBkdEdn\",\n",
|
|
|
+ " \"lcbBkdEdn\",\n",
|
|
|
+ " \"fcAfdEdn\",\n",
|
|
|
+ " \"lcbAfdEdn\",\n",
|
|
|
+ " \"fcAfd\",\n",
|
|
|
+ " \"lcbAfd\"\n",
|
|
|
+ "]\n",
|
|
|
+ "len(FibRgFcLcb03_list)*4"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 123,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "152\n"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "source": [
|
|
|
+ "FibRgFcLcb07_list = [\n",
|
|
|
+ " \"fcPlcfmthd\",\n",
|
|
|
+ " \"lcbPlcfmthd\",\n",
|
|
|
+ " \"fcSttbfBkmkMoveFrom\",\n",
|
|
|
+ " \"lcbSttbfBkmkMoveFrom\",\n",
|
|
|
+ " \"fcPlcfBkfMoveFrom\",\n",
|
|
|
+ " \"lcbPlcfBkfMoveFrom\",\n",
|
|
|
+ " \"fcPlcfBklMoveFrom\",\n",
|
|
|
+ " \"lcbPlcfBklMoveFrom\",\n",
|
|
|
+ " \"fcSttbfBkmkMoveTo\",\n",
|
|
|
+ " \"lcbSttbfBkmkMoveTo\",\n",
|
|
|
+ " \"fcPlcfBkfMoveTo\",\n",
|
|
|
+ " \"lcbPlcfBkfMoveTo\",\n",
|
|
|
+ " \"fcPlcfBklMoveTo\",\n",
|
|
|
+ " \"lcbPlcfBklMoveTo\",\n",
|
|
|
+ " \"fcUnused1\",\n",
|
|
|
+ " \"lcbUnused1\",\n",
|
|
|
+ " \"fcUnused2\",\n",
|
|
|
+ " \"lcbUnused2\",\n",
|
|
|
+ " \"fcUnused3\",\n",
|
|
|
+ " \"lcbUnused3\",\n",
|
|
|
+ " \"fcSttbfBkmkArto\",\n",
|
|
|
+ " \"lcbSttbfBkmkArto\",\n",
|
|
|
+ " \"fcPlcfBkfArto\",\n",
|
|
|
+ " \"lcbPlcfBkfArto\",\n",
|
|
|
+ " \"fcPlcfBklArto\",\n",
|
|
|
+ " \"lcbPlcfBklArto\",\n",
|
|
|
+ " \"fcArtoData\",\n",
|
|
|
+ " \"lcbArtoData\",\n",
|
|
|
+ " \"fcUnused4\",\n",
|
|
|
+ " \"lcbUnused4\",\n",
|
|
|
+ " \"fcUnused5\",\n",
|
|
|
+ " \"lcbUnused5\",\n",
|
|
|
+ " \"fcUnused6\",\n",
|
|
|
+ " \"lcbUnused6\",\n",
|
|
|
+ " \"fcOssTheme\",\n",
|
|
|
+ " \"lcbOssTheme\",\n",
|
|
|
+ " \"fcColorSchemeMapping\",\n",
|
|
|
+ " \"lcbColorSchemeMapping\"\n",
|
|
|
+ "]\n",
|
|
|
+ "print(len(FibRgFcLcb07_list)*4)"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 129,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "FibRgFcLcb_list = FibRgFcLcb97_list+FibRgFcLcb00_list+FibRgFcLcb02_list+FibRgFcLcb03_list+FibRgFcLcb07_list\n",
|
|
|
+ "\n",
|
|
|
+ "FibRgFcLcb = OrderedDict(zip(FibRgFcLcb_list, [[\"\",4] for y in range(len(FibRgFcLcb_list))]))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 130,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "with open(\"../doc2python/data/FibRgFcLcb.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(FibRgFcLcb))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 55,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "# FibRgCswNew\n",
|
|
|
+ "FibRgCswNew = OrderedDict({\n",
|
|
|
+ " \"nFibNew\":[\"An unsigned integer that specifies the version number of the file format that is used. This value MUST be one of the following : 0x00D9, 0x0101, 0x010C, 0x0112\",2],\n",
|
|
|
+ " \"rgCswNewData\":[\"Depending on the value of nFibNew this is one of the following : 0x00D9, 0x0101, 0x010C\", 2],\n",
|
|
|
+ " \"rgCswNewData_extend\":[\"Extension of rgCswNewData if nFibNew is 0x0112, you have to reconstitute rgCswNewData in that case\", 6]\n",
|
|
|
+ "})"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 57,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "with open(\"../doc2python/data/FibRgCswNew.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(FibRgCswNew))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 8,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "pcd = OrderedDict({\n",
|
|
|
+ " \"flag1\":[\"\",2, \"bits\", [\"fNoParaLast\",\"fR1\",\"fDirty\", \"fR2\"], [1,1,1,13]],\n",
|
|
|
+ " \"fc\":[\"An FcCompressed structure that specifies the location of the text in the WordDocument Stream.\", 4],\n",
|
|
|
+ " \"prm\":[\"A Prm structure that specifies additional properties for this text. These properties are used as part of the algorithms in sections 2.4.6.1 (Direct Paragraph Formatting) and 2.4.6.2 (Direct Character Formatting).\", 2]\n",
|
|
|
+ "})\n",
|
|
|
+ "\n",
|
|
|
+ "with open(\"../doc2python/data/pcd.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(pcd))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": 9,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": [
|
|
|
+ "fc = OrderedDict({\n",
|
|
|
+ " \"flag1\":[\"\",4, \"bits\", [\"fc\",\"fCompressed\",\"r1\"], [30,1,1]]})\n",
|
|
|
+ "\n",
|
|
|
+ "with open(\"../doc2python/data/fc.json\", \"w\") as file:\n",
|
|
|
+ " file.write(json.dumps(fc))"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "cell_type": "code",
|
|
|
+ "execution_count": null,
|
|
|
+ "metadata": {},
|
|
|
+ "outputs": [],
|
|
|
+ "source": []
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "metadata": {
|
|
|
+ "kernelspec": {
|
|
|
+ "display_name": "Python 3",
|
|
|
+ "language": "python",
|
|
|
+ "name": "python3"
|
|
|
+ },
|
|
|
+ "language_info": {
|
|
|
+ "codemirror_mode": {
|
|
|
+ "name": "ipython",
|
|
|
+ "version": 3
|
|
|
+ },
|
|
|
+ "file_extension": ".py",
|
|
|
+ "mimetype": "text/x-python",
|
|
|
+ "name": "python",
|
|
|
+ "nbconvert_exporter": "python",
|
|
|
+ "pygments_lexer": "ipython3",
|
|
|
+ "version": "3.8.3"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "nbformat": 4,
|
|
|
+ "nbformat_minor": 5
|
|
|
+}
|