FNP: Fix alignment difference for Roman numeral type numbering, improve xoffset (still needs work) and wrote method ‘IsSeparatePagination’
This commit is contained in:
parent
8c0540ead9
commit
da8999727c
@ -2559,6 +2559,21 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
if (useSubStepTabs || tbformat.IndexOf("{seq}") > -1)
|
||||
{
|
||||
// If the document style has the flag DSS_UnNumLikeRoman, don't do the normal tab, change to alpha
|
||||
// and adjust level in certain conditions as shown below:
|
||||
if (!IsHigh && (MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_UnNumLikeRoman) == E_DocStructStyle.DSS_UnNumLikeRoman)
|
||||
{
|
||||
string myParentIdent = MyParent.FormatStepData.TabData.IdentPrint;
|
||||
// If there is a tab string for this step and it includes the HLS/parent tab. The HLS is numbered
|
||||
// with roman numerals, so don't want to continue using the roman numeral concatenated with substep tabs.
|
||||
// the parent has to have a roman numeral as its tab.
|
||||
if (myParentIdent.ToUpper().Contains("ROMAN") &&
|
||||
tbformat != null && tbformat != "" && tbformat.ToUpper().Contains("SEQ"))
|
||||
localPrintLevel += 5; // tbformat = "{alpha}. ";
|
||||
// If the parent has no tab, adjust the level by 5 (this is taken directly from 16bit logic & is needed by FNP AOPs, U1 AOP14.0 for example)
|
||||
else if (tbformat != null && tbformat != "" && myParentIdent == "")
|
||||
localPrintLevel += 5;
|
||||
}
|
||||
int itmp = (localPrintLevel + PrintBias + OffsetTab) % seqtabs.Count;
|
||||
if (!tbformat.Contains(@"{!C"))
|
||||
tbformat = seqtabs[itmp].PrintTabFormat; // seqtab in 16bit, i.e. '. or )' etc.
|
||||
@ -2607,16 +2622,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (tbformat.EndsWith(" ")) tbformat = tbformat.Substring(0, tbformat.Length - 1);
|
||||
}
|
||||
}
|
||||
// If the document style has the flag DSS_UnNumLikeRoman, don't do the normal tab, change to alpha,
|
||||
// but only if there is a tab string for this step and it includes the HLS/parent tab. The HLS is numbered
|
||||
// with roman numerals, so don't want to continue using the roman numeral concatenated with substep tabs.
|
||||
if (!IsHigh && (MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_UnNumLikeRoman) == E_DocStructStyle.DSS_UnNumLikeRoman)
|
||||
{
|
||||
// the parent has to have a roman numeral as its tab.
|
||||
if (MyParent.FormatStepData.TabData.IdentPrint.ToUpper().Contains("ROMAN") &&
|
||||
tbformat != null && tbformat != "" && tbformat.ToUpper().Contains("WPAR"))
|
||||
tbformat = "{alpha}. ";
|
||||
}
|
||||
|
||||
|
||||
if (tbformat.IndexOf("#2#") > -1 || tbformat.IndexOf("#1#") > -1)
|
||||
{
|
||||
@ -2626,7 +2632,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
int indxlb = tbformat.IndexOf("#");
|
||||
string ofst = tbformat.Substring(indxlb + 1, 3);
|
||||
_MyTab.Offset = Convert.ToInt32(ofst.Substring(0, 1)) * (int)FormatStepData.TabData.Font.CPI;
|
||||
_MyTab.Offset = Convert.ToInt32(ofst.Substring(0, 1)) * (int)FormatStepData.TabData.Font.CharsToTwips;
|
||||
}
|
||||
tbformat = tbformat.Replace("#2#", "").Replace("#1#", "");
|
||||
}
|
||||
@ -2665,7 +2671,7 @@ namespace VEPROMS.CSLA.Library
|
||||
tbformat = tbformat.Replace("{ROMAN}", roman);
|
||||
tbformat = tbformat.Substring(0, tbformat.Length - ((roman.Length - 1)>0?(roman.Length - 1):0));
|
||||
}
|
||||
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.VirtualDotInHLSTab && tbformat.Contains("numeric") & ordinal > 9) MyTab.AdjustTabSpace = true;
|
||||
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.VirtualDotInHLSTab && tbformat.Contains("numeric") & ordinal > 9) _MyTab.AdjustTabSpace = true;
|
||||
if (tbformat.Contains("{numeric}") && ((MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_AddDotZeroStdHLS) == E_DocStructStyle.DSS_AddDotZeroStdHLS) && MyContent.Type == 20002)
|
||||
{
|
||||
tbformat = tbformat.Replace("{numeric}", ordinal.ToString().PadLeft(2) + ".0");
|
||||
@ -2796,7 +2802,7 @@ namespace VEPROMS.CSLA.Library
|
||||
OffsetTab = TopRNO.FormatStepData.NumberHighLevel?1:0;
|
||||
_PrintBias = 0;
|
||||
if (par.FormatStepData != null && par.FormatStepData.TabData.IdentPrint.Contains("{ALPHA}"))
|
||||
level--;
|
||||
level--;
|
||||
|
||||
// ImperfectStructure is used so that the sequential numbering for substeps under an RNO is not same
|
||||
// numbering (alpha vs numeric), if the HLS has substeps - WCN uses this, as well as other plants.
|
||||
@ -3276,7 +3282,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (sc.Section_CheckoffHeaderSelection < 0) return false;
|
||||
return true;
|
||||
}
|
||||
private int CheckOffIndex()
|
||||
public int CheckOffIndex()
|
||||
{
|
||||
StepConfig stc = MyConfig as StepConfig;
|
||||
if (stc == null) return 0; //section default.
|
||||
@ -4907,6 +4913,20 @@ namespace VEPROMS.CSLA.Library
|
||||
if (sc == null) return -1;
|
||||
return sc.Section_CheckoffHeaderSelection;
|
||||
}
|
||||
public bool IsSeparatePagination()
|
||||
{
|
||||
VEPROMS.CSLA.Library.SectionConfig.SectionPagination sp = VEPROMS.CSLA.Library.SectionConfig.SectionPagination.Separate;
|
||||
try
|
||||
{
|
||||
if (SectionConfig != null) sp = SectionConfig.Section_Pagination;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
sp = VEPROMS.CSLA.Library.SectionConfig.SectionPagination.Separate;
|
||||
}
|
||||
if (sp == VEPROMS.CSLA.Library.SectionConfig.SectionPagination.Separate) return true;
|
||||
return false;
|
||||
}
|
||||
protected override void RefreshFields(Item tmp)
|
||||
{
|
||||
base.RefreshFields(tmp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user