Added an ‘InsertSymbol’ method for Word interface

Support for toggle of underlining for RO’s when used in Word documents
Fixed access of column mode for subsections
Improve table layout on screen (was overlaying table on text or another table)
Fixed problem where RNO text was printing past right margin. Print was using incorrect columnmode for subsection
This commit is contained in:
2013-12-09 14:09:35 +00:00
parent 69fbd162ce
commit 03311ab658
5 changed files with 30 additions and 3 deletions
+9
View File
@@ -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() { }
@@ -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;
}
}
@@ -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)
+1 -1
View File
@@ -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
@@ -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;