Used landscape parameter in call to SaveWordDoc in MigrateLibDoc method

Added new table function vefn_GetVersionFormatItems
Used comparison of DocStyle PageWidth to PageLength to determine value for landscape parameter in call to SaveSectionDocument
Added ability to disable checkoffs for a section based on 16-bit data
This commit is contained in:
Rich
2013-06-11 18:39:39 +00:00
parent d099c1a881
commit 4885c21734
3 changed files with 65 additions and 3 deletions

View File

@@ -52,7 +52,8 @@ namespace DataLoader
int tmpE2 = LookupOldToNew(dstyleindx);
//int docstyleindx = GetDocStyleIndx(dstyleindx, format, procitem, docver,Number,Title);
int docstyleindx = GetDocStyleIndx(dstyleindx, format, procitem, Number, Title);
DocStyle myDocStyle = format.PlantFormat.DocStyles.DocStyleList[docstyleindx];
bool isLandscape = myDocStyle.Layout.PageWidth > myDocStyle.Layout.PageLength;
// Adjust the section number. The 16bit vfw code was sometimes printing section numbers
// differently than what was stored as data. For example VEWCNOFN: OFN MA-001, the section
// number was '1.' and 16bit printed it as '1.0'. The flag that caused this was (surprisingly),
@@ -129,7 +130,7 @@ namespace DataLoader
string procnum = "";
using (ItemInfo ii = ItemInfo.Get(procitem.ItemID))
procnum = ii.DisplayNumber;
SaveSectionDocument(fname, stpseq, SecType, ref Documentid, procnum + ":" + (Number == string.Empty ? Title : Number));
SaveSectionDocument(fname, stpseq, SecType, ref Documentid, procnum + ":" + (Number == string.Empty ? Title : Number), isLandscape);
if (Documentid == 0)
{
if (MissingDocument == null)
@@ -536,6 +537,8 @@ namespace DataLoader
}
// Save section level Checkoff information
int chkOffType = (rid[0] & 0x007F) - '0';
if (rid[0] == '\u2591') //for SUM,CAT,MCG with only 2 checkoff options and default checkoff is enabled
chkOffType = 1; //this diables checkoffs for this section
if (chkOffType > 0)
ci.AddItem("Section", "CheckoffSelection", chkOffType.ToString());