From d4e80da296fe9a8c07999f8295a18b0142bf664c Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 12 Feb 2014 15:19:26 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20underline=20bullets=20for=20Cau?= =?UTF-8?q?tions/Notes=20Don=E2=80=99t=20stop=20underlining=20in=20middle?= =?UTF-8?q?=20of=20step=20if=20document=20style=20has=20=E2=80=98UndSpecia?= =?UTF-8?q?lStepsFoldout=E2=80=99=20and=20there=20is=20a=20replace=20word?= =?UTF-8?q?=20that=20turns=20off=20underlining?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 11 +++++++---- PROMS/Volian.Print.Library/vlnParagraph.cs | 10 ++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index beeacd42..b4690d41 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -3182,10 +3182,13 @@ namespace VEPROMS.CSLA.Library { if ((FormatStepData.TabData.Font.Style & E_Style.Underline) > 0) { - FontStyle style = FontStyle.Regular; - if ((FormatStepData.TabData.Font.Style & E_Style.Bold) > 0) style |= FontStyle.Bold; - if ((FormatStepData.TabData.Font.Style & E_Style.Italics) > 0) style |= FontStyle.Italic; - _MyTab.MyFont.WindowsFont = new Font(FormatStepData.TabData.Font.WindowsFont.FontFamily, FormatStepData.TabData.Font.WindowsFont.Size, style); + //FontStyle style = FontStyle.Regular; + //if ((FormatStepData.TabData.Font.Style & E_Style.Bold) > 0) style |= FontStyle.Bold; + //if ((FormatStepData.TabData.Font.Style & E_Style.Italics) > 0) style |= FontStyle.Italic; + //_MyTab.MyFont.WindowsFont = new Font(FormatStepData.TabData.Font.WindowsFont.FontFamily, FormatStepData.TabData.Font.WindowsFont.Size, style); + // clear the underlining for this tab's font: + E_Style es = ((E_Style)_MyTab.MyFont.Style) &~ E_Style.Underline; + _MyTab.MyFont = new VE_Font(_MyTab.MyFont.Family, (int)_MyTab.MyFont.Size, es, (float)_MyTab.MyFont.CPI); return true; } return false; diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index e537c687..991dd3d7 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2459,9 +2459,15 @@ namespace Volian.Print.Library if (!itemInfo.IsTable && StepRTB.MyFontFamily != null) myFont = new System.Drawing.Font(StepRTB.MyFontFamily, myFont.Size, myFont.Style); - if (itemInfo.IsHigh && itemInfo.MyDocStyle.UndSpecialStepsFoldout) myFont = new System.Drawing.Font(myFont.FontFamily, myFont.Size, myFont.Style | FontStyle.Underline); + string stText = vlntxt.StartText; + if (itemInfo.IsHigh && itemInfo.MyDocStyle.UndSpecialStepsFoldout) + { + myFont = new System.Drawing.Font(myFont.FontFamily, myFont.Size, myFont.Style | FontStyle.Underline); + stText = stText.Replace(@"\ulnone ", ""); + stText = stText.Replace(@"\ulnone", ""); + } _RtfSB.Append(AddFontTable(myFont)); - _RtfSB.Append(vlntxt.StartText); + _RtfSB.Append(stText); if (_MyItemInfo.IsStep && !itemInfo.FormatStepData.UseSmartTemplate && _MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "") _RtfSB.Append(_MyItemInfo.FormatStepData.Suffix.Replace("{ulnone}", @"\ulnone ")); _RtfSB.Append("}");