Artifact
2f4721c17ad8685c1ad40a08ac740a4a7b3a3672:
0000: 2f 2f 20 64 6f 63 68 65 61 64 65 72 73 2e 63 70 // docheaders.cp
0010: 70 0d 0a 23 69 6e 63 6c 75 64 65 20 22 53 74 64 p..#include "Std
0020: 41 66 78 2e 68 22 0d 0a 23 69 6e 63 6c 75 64 65 Afx.h"..#include
0030: 20 22 64 6f 63 68 65 61 64 65 72 73 2e 68 22 0d "docheaders.h".
0040: 0a 0d 0a 43 44 48 54 61 62 49 6e 66 6f 3a 3a 43 ...CDHTabInfo::C
0050: 44 48 54 61 62 49 6e 66 6f 28 43 53 74 72 69 6e DHTabInfo(CStrin
0060: 67 41 72 72 61 79 26 20 61 72 72 4f 66 4e 61 6d gArray& arrOfNam
0070: 65 73 29 0d 0a 7b 0d 0a 09 43 44 6f 63 44 65 66 es)..{...CDocDef
0080: 2a 20 70 44 6f 63 44 65 66 20 3d 20 70 4d 65 74 * pDocDef = pMet
0090: 61 44 61 74 61 43 6f 6e 74 2d 3e 47 65 74 44 6f aDataCont->GetDo
00a0: 63 44 65 66 28 61 72 72 4f 66 4e 61 6d 65 73 5b cDef(arrOfNames[
00b0: 31 5d 29 3b 0d 0a 09 69 66 28 21 70 44 6f 63 44 1]);...if(!pDocD
00c0: 65 66 29 0d 0a 09 7b 0d 0a 09 09 73 65 74 45 72 ef)...{....setEr
00d0: 72 6f 72 28 22 c4 ee ea f3 ec e5 ed f2 20 25 73 ror("........ %s
00e0: 20 ed e5 20 ed e0 e9 e4 e5 ed 2e 22 2c 20 28 4c .. .......", (L
00f0: 50 43 53 54 52 29 61 72 72 4f 66 4e 61 6d 65 73 PCSTR)arrOfNames
0100: 5b 31 5d 29 3b 0d 0a 09 09 72 65 74 75 72 6e 3b [1]);....return;
0110: 0d 0a 09 7d 0d 0a 09 6d 5f 73 74 72 54 61 62 6c ...}...m_strTabl
0120: 65 4e 61 6d 65 20 3d 20 70 44 6f 63 44 65 66 2d eName = pDocDef-
0130: 3e 47 65 74 48 65 61 64 54 61 62 6c 65 4e 61 6d >GetHeadTableNam
0140: 65 28 29 3b 0d 0a 09 6d 5f 70 54 61 62 6c 65 20 e();...m_pTable
0150: 3d 20 73 74 61 74 69 63 5f 63 61 73 74 3c 43 54 = static_cast<CT
0160: 61 62 6c 65 45 78 2a 3e 28 70 44 61 74 61 44 69 ableEx*>(pDataDi
0170: 63 74 2d 3e 47 65 74 54 61 62 6c 65 28 6d 5f 73 ct->GetTable(m_s
0180: 74 72 54 61 62 6c 65 4e 61 6d 65 29 29 3b 0d 0a trTableName));..
0190: 09 69 66 28 21 6d 5f 70 54 61 62 6c 65 29 0d 0a .if(!m_pTable)..
01a0: 09 7b 0d 0a 09 09 73 65 74 45 72 72 6f 72 28 22 .{....setError("
01b0: c4 ee ea f3 ec e5 ed f2 20 25 73 20 ed e5 20 e8 ........ %s .. .
01c0: ec e5 e5 f2 20 f8 e0 ef ea e8 2e 22 2c 20 28 4c .... ......", (L
01d0: 50 43 53 54 52 29 61 72 72 4f 66 4e 61 6d 65 73 PCSTR)arrOfNames
01e0: 5b 31 5d 29 3b 0d 0a 09 09 72 65 74 75 72 6e 3b [1]);....return;
01f0: 0d 0a 09 7d 0d 0a 09 0d 0a 09 43 4e 6f 43 61 73 ...}......CNoCas
0200: 65 4d 61 70 3c 43 53 74 72 69 6e 67 3e 20 61 6c eMap<CString> al
0210: 69 61 63 65 73 3b 0d 0a 09 43 44 57 6f 72 64 41 iaces;...CDWordA
0220: 72 72 61 79 20 6c 6f 6e 67 53 74 72 3b 0d 0a 09 rray longStr;...
0230: 66 69 6c 6c 4e 61 6d 65 73 46 72 6f 6d 4f 62 6a fillNamesFromObj
0240: 73 28 70 44 6f 63 44 65 66 2d 3e 47 65 74 48 65 s(pDocDef->GetHe
0250: 61 64 73 28 29 2c 20 61 6c 69 61 63 65 73 2c 20 ads(), aliaces,
0260: 26 6c 6f 6e 67 53 74 72 29 3b 0d 0a 09 66 69 6c &longStr);...fil
0270: 6c 4e 61 6d 65 73 46 72 6f 6d 4f 62 6a 73 28 70 lNamesFromObjs(p
0280: 44 6f 63 44 65 66 2d 3e 47 65 74 54 61 62 6c 65 DocDef->GetTable
0290: 73 28 29 2c 20 61 6c 69 61 63 65 73 29 3b 09 2f s(), aliaces);./
02a0: 2f 20 d2 e0 ec 20 ec ee e3 f3 f2 20 e1 fb f2 fc / ... ..... ....
02b0: 20 ef ee eb ff 20 f1 20 22 e8 f2 ee e3 20 ef ee .... . ".... ..
02c0: 20 ea ee eb ee ed ea e5 22 0d 0a 09 66 69 6c 6c ......."...fill
02d0: 4e 61 6d 65 73 46 72 6f 6d 4f 62 6a 73 28 70 4d NamesFromObjs(pM
02e0: 65 74 61 44 61 74 61 43 6f 6e 74 2d 3e 47 65 74 etaDataCont->Get
02f0: 47 65 6e 4a 72 6e 6c 46 6c 64 73 28 29 2c 20 61 GenJrnlFlds(), a
0300: 6c 69 61 63 65 73 2c 20 26 6c 6f 6e 67 53 74 72 liaces, &longStr
0310: 29 3b 0d 0a 09 66 69 6c 6c 54 61 62 49 6e 66 6f );...fillTabInfo
0320: 28 61 6c 69 61 63 65 73 2c 20 26 6c 6f 6e 67 53 (aliaces, &longS
0330: 74 72 29 3b 0d 0a 7d 0d 0a tr);..}..