diff --git a/PROMS/LBWordLibrary/LBComObject.cs b/PROMS/LBWordLibrary/LBComObject.cs index d4822fcc..8b39ec90 100644 --- a/PROMS/LBWordLibrary/LBComObject.cs +++ b/PROMS/LBWordLibrary/LBComObject.cs @@ -279,7 +279,16 @@ namespace LBWordLibrary { return new LBRange(InvokeMethod("GoTo", What, Which, Count, Name)); } + public void InsertSymbol(int CharacterNumber) + { + InvokeMethod("InsertSymbol", CharacterNumber, Missing.Value, Missing.Value, Missing.Value); + } + public void InsertSymbol(int CharacterNumber, object Font, object Unicode, object Bias) + { + InvokeMethod("InsertSymbol", CharacterNumber, Font, Unicode, Bias); + } } + public partial class LBDocumentClass : LBComObject { public LBDocumentClass() { } diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index 7c00871c..71676dbc 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -1065,7 +1065,19 @@ namespace VEPROMS.CSLA.Library } else // put out each part of the split text and toggle the underline on/off { - sel.TypeText(part); + // Farley had a case where the underlining of text with spaces at end of line was + // not underlining the spaces. To fix this, test for spaces at the end of text + // and ireplace last space with a hard space. Note that the underlying issue + // existed in MS Word, so this is a work around from our code to make MS Word work. + // The problem was in Farley's FNP-1-ECP-3.1, Table 1 - 'ro': W.4T. + if (part.EndsWith(" ")) + { + sel.TypeText(part.Substring(0,part.Length-1)); + sel.InsertSymbol(160); + } + else + sel.TypeText(part); + if (sel.Font.Underline == LBWdUnderline.wdUnderlineNone) sel.Font.Underline = LBWdUnderline.wdUnderlineSingle; else @@ -1291,6 +1303,8 @@ namespace VEPROMS.CSLA.Library roValue = roValue.Replace(@"[xB3]", "\xB3"); roValue = roValue.Replace(@"[XB3]", "\xB3"); sel.Text = roValue; + // look for toggling of '_' to turn underlining on/off: + AddPrecedingText(sel, roValue); // parse underlining sel.Font.Color = LBWdColor.wdColorRed; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 9cdc4558..5788085a 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1190,7 +1190,9 @@ namespace VEPROMS.CSLA.Library // check config value on my section, if null/default use Pmode of active format if (ActiveSection != null) { - SectionInfo si = ActiveSection as SectionInfo; + SectionInfo si = null; + if (IsSection) si = (SectionInfo) this; + else si = ActiveSection as SectionInfo; if(si == null) si = SectionInfo.Get(ActiveSection.ItemID); //ActiveSection as SectionInfo; if (si != null) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index 080ec279..e516dbc8 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -2217,7 +2217,7 @@ namespace Volian.Controls.Library } else if (value.MyItemInfo.IsTablePart) { - ItemLocation = new Point(value.MyParentEditItem.ContentLeft, value.MyParentEditItem.Bottom); + ItemLocation = new Point(value.MyParentEditItem.ContentLeft, value.Bottom); ItemWidth = value.MyParentEditItem.ContentWidth; } else diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 0e7eda33..fe346e96 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -72,6 +72,8 @@ namespace Volian.Print.Library foreach (ItemInfo iChildItemInfo in itemInfoList) { + if (iChildItemInfo.IsSection && (iChildItemInfo as SectionInfo).ColumnMode != maxRNO) + maxRNO = (iChildItemInfo as SectionInfo).ColumnMode; ItemInfo childItemInfo = iChildItemInfo; int? bxIndx = childItemInfo.FormatStepData == null ? -1 : childItemInfo.FormatStepData.StepLayoutData.STBoxindex;