For Calvert, section/subsection xoffset was not considering autoindent flag setting on section property when printing section/subsection numbers and titles.

This commit is contained in:
Kathy Ruffing 2014-11-07 16:51:38 +00:00
parent b52c7098f9
commit 4fea758321

View File

@ -2238,23 +2238,37 @@ namespace Volian.Print.Library
MetaLevel++;
iilvl = iilvl.MyParent;
}
MetaLevel = MetaLevel <= 2 ? 1 : MetaLevel - 1;
if (MetaLevel == 1)
offset += (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos;
else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
offset = MyParent.XOffset;
if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
{
if (MetaLevel == 1)
offset += (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos;
else
{
float autoIndent = 0;
SectionConfig sc = itemInfo.MyParent.MyConfig as SectionConfig;
offset = (sc != null && sc.SubSection_AutoIndent == "Y") ? MyParent.XOffset : MyParent.MyTab.XOffset;
}
}
else
{
xMetaAdj = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[0].ColSByLevel;
for (int i = 0; i < MetaLevel; i++)
{
xMetaAdj += (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos - (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos;
xMetaAdj += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[i].SecNumPositionAdj;
MetaLevel = MetaLevel <= 2 ? 1 : MetaLevel - 1;
if (MetaLevel == 1)
offset += (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos;
else
{
xMetaAdj = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[0].ColSByLevel;
for (int i = 0; i < MetaLevel; i++)
{
xMetaAdj += (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos - (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos;
xMetaAdj += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[i].SecNumPositionAdj;
}
offset += xMetaAdj;
itemInfo.MyTab.Text = itemInfo.MyTab.Text.TrimEnd(" ".ToCharArray());
itemInfo.MyTab.CleanText = itemInfo.MyTab.CleanText.TrimEnd(" ".ToCharArray());
}
offset += xMetaAdj;
itemInfo.MyTab.Text = itemInfo.MyTab.Text.TrimEnd(" ".ToCharArray());
itemInfo.MyTab.CleanText = itemInfo.MyTab.CleanText.TrimEnd(" ".ToCharArray());
}
}
localXOffset = offset;
@ -2927,7 +2941,7 @@ namespace Volian.Print.Library
if (loadChildren) yoff = ChildrenBelow.Add(cb, itemInfo.Steps, XOffset, yoff, yOffRight, rnoLevel, maxRNO, formatInfo);
}
if (itemInfo.Sections != null)
if (loadChildren)
if (loadChildren)
yoff = ChildrenBelow.Add(cb, itemInfo.Sections, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo, pp);
if (itemInfo.Procedures != null)
if (loadChildren)
@ -3827,16 +3841,23 @@ namespace Volian.Print.Library
level++;
iilvl = iilvl.MyParent;
}
level = level <= 2 ? 1 : level - 1;
if (level == 1)
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (level * (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos);
else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
{
XOffset = (myTab == null ? 0 : myTab.XOffset) + ((float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos - (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos);
}
else
{
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[level].ColSByLevel;
XOffset += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[level].SecTitlePositionAdj;
XOffset -= xMetaAdj;
level = level <= 2 ? 1 : level - 1;
if (level == 1)
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (level * (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos);
else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
XOffset = (myTab == null ? 0 : myTab.XOffset) + ((float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos - (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos);
else
{
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[level].ColSByLevel;
XOffset += (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[level].SecTitlePositionAdj;
XOffset -= xMetaAdj;
}
}
}
else if (formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Just == "PSCenter")