Fix page number transition if on first page
This commit is contained in:
		| @@ -929,7 +929,7 @@ namespace VEPROMS.CSLA.Library | |||||||
| 		// dialog box that shows the step that causes the problem & a manual change will be necessary. | 		// dialog box that shows the step that causes the problem & a manual change will be necessary. | ||||||
| 		// This is a rare occurence so it was decided that the amount of coding effort to fix this  | 		// This is a rare occurence so it was decided that the amount of coding effort to fix this  | ||||||
| 		// would be so much in comparison to having the user fix manually (RHM/KBR Feb 2014). | 		// would be so much in comparison to having the user fix manually (RHM/KBR Feb 2014). | ||||||
| 		private int _PageNumber = 0; | 		private int _PageNumber = -1; | ||||||
| 		public int PageNumber | 		public int PageNumber | ||||||
| 		{ | 		{ | ||||||
| 			get { return _PageNumber; } | 			get { return _PageNumber; } | ||||||
|   | |||||||
| @@ -1098,7 +1098,7 @@ namespace VEPROMS.CSLA.Library | |||||||
| 			//At some point, add a property off a section 'IsFoldout' and use the next two lines: | 			//At some point, add a property off a section 'IsFoldout' and use the next two lines: | ||||||
| 			//if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && mySection.MyContent.Number.ToUpper() == "FOLDOUT") | 			//if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && mySection.MyContent.Number.ToUpper() == "FOLDOUT") | ||||||
| 			//|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT"))) | 			//|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT"))) | ||||||
| 			if (tb._ToItem.PageNumber != 0 && (tb._FromItem.PageNumber != 0 || tb._FromItem.ActiveSection.MyContent.Number.ToUpper() == "FOLDOUT"))   | 			if (tb._ToItem.PageNumber != -1 && (tb._FromItem.PageNumber != -1 || tb._FromItem.ActiveSection.MyContent.Number.ToUpper() == "FOLDOUT"))   | ||||||
| 			{ | 			{ | ||||||
| 				int pgoffset = tb._ToItem.PageNumber - tb._FromItem.PageNumber; | 				int pgoffset = tb._ToItem.PageNumber - tb._FromItem.PageNumber; | ||||||
| 				tb._ToItem.PageNumberUsed = tb._ToItem.PageNumber; | 				tb._ToItem.PageNumberUsed = tb._ToItem.PageNumber; | ||||||
|   | |||||||
| @@ -850,7 +850,7 @@ namespace Volian.Print.Library | |||||||
| 		} | 		} | ||||||
| 		public void CreateWordDocPdf(PdfContentByte cb, SectionInfo mySection) | 		public void CreateWordDocPdf(PdfContentByte cb, SectionInfo mySection) | ||||||
| 		{ | 		{ | ||||||
| 			if (mySection.PageNumber == 0)			// If page num transition goes to a section, need the pagenumber of section. | 			if (mySection.PageNumber == -1)			// If page num transition goes to a section, need the pagenumber of section. | ||||||
| 				mySection.PageNumber = _MyHelper.CurrentPageNumber; | 				mySection.PageNumber = _MyHelper.CurrentPageNumber; | ||||||
| 			int profileDepth = ProfileTimer.Push(">>>> CreateWordDocPdf"); | 			int profileDepth = ProfileTimer.Push(">>>> CreateWordDocPdf"); | ||||||
| 			_MyHelper.MySection = mySection; | 			_MyHelper.MySection = mySection; | ||||||
|   | |||||||
| @@ -467,7 +467,7 @@ namespace Volian.Print.Library | |||||||
| 				pagenumTran = MyPageHelper.CurrentPageNumberNoFoldouts; | 				pagenumTran = MyPageHelper.CurrentPageNumberNoFoldouts; | ||||||
| 			else | 			else | ||||||
| 				pagenumTran = MyPageHelper.CurrentPageNumber; | 				pagenumTran = MyPageHelper.CurrentPageNumber; | ||||||
| 			if (MyItemInfo.PageNumber == 0) MyItemInfo.PageNumber = pagenumTran; | 			if (MyItemInfo.PageNumber == -1) MyItemInfo.PageNumber = pagenumTran; | ||||||
| 			else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != pagenumTran) | 			else if (MyItemInfo.PageNumberUsed != 0 && MyItemInfo.PageNumberUsed != pagenumTran) | ||||||
| 			{ | 			{ | ||||||
| 				if (PromsPrinter.TransPageNumProblems == null) PromsPrinter.TransPageNumProblems = new List<string>(); | 				if (PromsPrinter.TransPageNumProblems == null) PromsPrinter.TransPageNumProblems = new List<string>(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user