fixes B2016-166: calvert pagination for complicated AER/RNO page break
This commit is contained in:
parent
7bd76400c3
commit
85ea4d6efb
@ -1337,18 +1337,28 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
foreach (int stepLevel in myList.Keys)
|
foreach (int stepLevel in myList.Keys)
|
||||||
foreach (float yLoc in myList[stepLevel].Keys)
|
foreach (float yLoc in myList[stepLevel].Keys)
|
||||||
if (yLocation == yLoc)
|
{
|
||||||
|
vlnParagraph myPara = myList[stepLevel][yLoc];
|
||||||
|
if (Overlap(myPara, myParaBreak))
|
||||||
if (stepLevel > maxLevel)
|
if (stepLevel > maxLevel)
|
||||||
{
|
{
|
||||||
vlnParagraph myPara = myList[stepLevel][yLoc];
|
|
||||||
//DebugPagination.WriteLine("'MaxBreakLevel',{0},{1},'{2}'", myPara.MyItemInfo.ItemID, stepLevel, myPara.MyItemInfo.ShortPath);
|
//DebugPagination.WriteLine("'MaxBreakLevel',{0},{1},'{2}'", myPara.MyItemInfo.ItemID, stepLevel, myPara.MyItemInfo.ShortPath);
|
||||||
//Console.WriteLine("'MaxBreakLevel',{0},{1},'{2}'", myPara.MyItemInfo.ItemID, stepLevel, myPara.MyItemInfo.ShortPath);
|
//Console.WriteLine("'MaxBreakLevel',{0},{1},'{2}'", myPara.MyItemInfo.ItemID, stepLevel, myPara.MyItemInfo.ShortPath);
|
||||||
|
|
||||||
if (!myPara.HasAncestor(myParaBreak))
|
if (!myPara.HasAncestor(myParaBreak))
|
||||||
maxLevel = stepLevel;
|
maxLevel = stepLevel;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return maxLevel;
|
return maxLevel;
|
||||||
}
|
}
|
||||||
|
private static bool Overlap(vlnParagraph myPara, vlnParagraph myParaBreak)
|
||||||
|
{
|
||||||
|
// Fix for B2016-166: Calvert pagination-splitting a Note in AER from its associated step
|
||||||
|
if (myPara.MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertPagination)
|
||||||
|
return (myPara.YOffset <= myParaBreak.YOffset &&
|
||||||
|
(myPara.YOffset + myPara.Height) >= myParaBreak.YOffset);
|
||||||
|
return(myPara.YOffset == myParaBreak.YOffset);
|
||||||
|
}
|
||||||
private bool HasAncestor(vlnParagraph myParaBreak)
|
private bool HasAncestor(vlnParagraph myParaBreak)
|
||||||
{
|
{
|
||||||
if (myParaBreak == MyParent) return true;
|
if (myParaBreak == MyParent) return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user