Changed an Error Message to provide the location where the error occured.
Changed StepLevel property for Cautions and Notes to reduce the probability that notes or cautions will be split over a page break. Added IsNumbered Property to aid in pagination.
This commit is contained in:
parent
06990b5c13
commit
944868a0b4
@ -505,8 +505,10 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return MSWordToPDF._FormForPlotGraphics; }
|
||||
set { MSWordToPDF._FormForPlotGraphics = value; }
|
||||
}
|
||||
private static SectionInfo _MySection;
|
||||
public static string GetDocPdf(SectionInfo sect, Color overrideColor)
|
||||
{
|
||||
_MySection = sect;
|
||||
DocumentInfo mydoc = sect.MyContent.MyEntry.MyDocument;
|
||||
UpdateDocPdf(mydoc, overrideColor,sect);
|
||||
string fileName = GetFileName(sect);
|
||||
@ -884,7 +886,13 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_MyLog.Error("Could not set margins", ex);
|
||||
if (_MySection != null)
|
||||
{
|
||||
_MyLog.ErrorFormat("<<< ERROR >>> MSWord could not set margins\r\n==>'MSWord could not set margins',{0},'{1}','{2}'"
|
||||
, _MySection.ItemID, _MySection.MyDocVersion.MyFolder.Name, _MySection.ShortPath);
|
||||
}
|
||||
else
|
||||
_MyLog.Error("Could not set margins", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -677,14 +677,14 @@ namespace VEPROMS.CSLA.Library
|
||||
else if (item.IsCautionPart)
|
||||
{
|
||||
if (item.MyPrevious == null) level-=(1 + firstInc);
|
||||
else level++;
|
||||
else level+=3;
|
||||
}
|
||||
// Paginate before first note, if the step does not have a caution.
|
||||
// Otherwise, try to keep the notes together.
|
||||
else if (item.IsNotePart)
|
||||
{
|
||||
if (parent.Cautions == null && item.MyPrevious == null) level-=(1 + firstInc);
|
||||
else level++;
|
||||
else level+=3;
|
||||
}
|
||||
// Try not to paginate on a table.
|
||||
else if (item.IsTablePart)
|
||||
@ -1103,6 +1103,19 @@ namespace VEPROMS.CSLA.Library
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public bool IsNumbered
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((MyContent.Type / 10000) != 2) return true;
|
||||
string tabstr = FormatStepData.TabData.IdentPrint;
|
||||
if (tabstr.Contains("{seq}")) return true;
|
||||
if (tabstr.Contains("{ALPHA}")) return true;
|
||||
if (tabstr.Contains("{ROMAN}")) return true;
|
||||
if (tabstr.Contains("{numeric}")) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public bool IsTablePart
|
||||
{
|
||||
get
|
||||
@ -2395,7 +2408,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_MyTab.Text = "";
|
||||
_MyTab.CleanText = "";
|
||||
return;
|
||||
}
|
||||
}
|
||||
int stepType = (int)(MyContent.Type % 10000);
|
||||
string tbformat = IsInRNO ? FormatStepData.TabData.RNOIdentPrint : FormatStepData.TabData.IdentPrint;
|
||||
if (ActiveFormat.Name.ToUpper() == "WCNCKL" || ActiveFormat.Name.ToUpper() == "WSTCKL")
|
||||
@ -2718,9 +2731,9 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
SectionConfig sc = new SectionConfig(si);
|
||||
//SectionConfig sc = ii.MyConfig as SectionConfig;
|
||||
if (sc != null && sc.SubSection_AutoIndent == "Y")
|
||||
countlev++;
|
||||
}
|
||||
if (sc != null && sc.SubSection_AutoIndent == "Y")
|
||||
countlev++;
|
||||
}
|
||||
}
|
||||
ii = ii.MyParent;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user