From 209959629010a5e99c25002ce621becc5627a38d Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 20 Jul 2016 12:43:40 +0000 Subject: [PATCH] B2015-134 Hanging Indent with Hard Returns was not being saved --- PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs | 5 +++-- PROMS/Volian.Controls.Library/StepRTB.cs | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs index 84783e43..c448d2a3 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs @@ -337,8 +337,9 @@ namespace VEPROMS.CSLA.Library //text = text.Replace(@"\'99", @"\u8482?"); text = RtfTools.RTFConvertedSymbolsToUnicode(text); text = text.Replace("\r\n", @"\line "); // replace a \r\n with a \line instead of a \par - text = text.Replace(@"\line", @"\pard\line"); - text = text.Replace(@"\pard\pard\line", @"\pard\line"); + // B2015-134 Hanging Indent with Hard Returns was not being saved + //text = text.Replace(@"\line", @"\pard\line"); + //text = text.Replace(@"\pard\pard\line", @"\pard\line"); //if (text.IndexOf(@"\line") > -1) // MessageBox.Show("Found rtf line"); //text = text.Replace(@"\line", @"\par"); // we don't want to replace the \line part of bug fix B2015-140 diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 8545e3cb..59e9a4dc 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -1096,7 +1096,7 @@ namespace Volian.Controls.Library { this.Invalidate(); base.WndProc(ref m); - // B2016-135 Don't Show Hanging Indent if MyItemInfo is null + // B2015-135 Don't Show Hanging Indent if MyItemInfo is null if (MyItemInfo == null) return; if ((FieldToEdit == E_FieldToEdit.StepText) && (SelectionHangingIndent > 0 || SelectionIndent > 0) && (ActiveMode || MyItemInfo.IsTable)) { @@ -1141,7 +1141,9 @@ namespace Volian.Controls.Library selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing selectedRtfSB.Append("\r\n"); // use styles to construct rtf commands to insert into next line (where \b, etc is) - selectedRtfSB.Append(@"\viewkind4\uc1\pard\sl-240\slmult0" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(myFont.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}"; + // B2015-134 Hanging Indent with Hard Returns was not being saved- removed \sl-240\slmult0 + selectedRtfSB.Append(@"\viewkind4\uc1\pard" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(myFont.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}"; + //selectedRtfSB.Append(@"\viewkind4\uc1\pard\sl-240\slmult0" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(myFont.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}"; } private bool FontIsFixed(Font myFont)