From 03311ab6589ab82ee11419bba7568a5d7b2232ae Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 9 Dec 2013 14:09:35 +0000 Subject: [PATCH] =?UTF-8?q?Added=20an=20=E2=80=98InsertSymbol=E2=80=99=20m?= =?UTF-8?q?ethod=20for=20Word=20interface=20Support=20for=20toggle=20of=20?= =?UTF-8?q?underlining=20for=20RO=E2=80=99s=20when=20used=20in=20Word=20do?= =?UTF-8?q?cuments=20Fixed=20access=20of=20column=20mode=20for=20subsectio?= =?UTF-8?q?ns=20Improve=20table=20layout=20on=20screen=20(was=20overlaying?= =?UTF-8?q?=20table=20on=20text=20or=20another=20table)=20Fixed=20problem?= =?UTF-8?q?=20where=20RNO=20text=20was=20printing=20past=20right=20margin.?= =?UTF-8?q?=20Print=20was=20using=20incorrect=20columnmode=20for=20subsect?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/LBWordLibrary/LBComObject.cs | 9 +++++++++ .../Extension/DocumentExt.cs | 16 +++++++++++++++- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 4 +++- PROMS/Volian.Controls.Library/EditItem.cs | 2 +- PROMS/Volian.Print.Library/vlnParagraph.cs | 2 ++ 5 files changed, 30 insertions(+), 3 deletions(-) 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;