From a8aea0dca07a1f167c4510aadee2927cdc9e3074 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 12 Jul 2012 12:51:21 +0000 Subject: [PATCH] Fixed change bar location on figure. Also ro for figure was not found - fixed this. --- PROMS/Volian.Print.Library/vlnParagraph.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index aa564f81..ce75eed3 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -802,11 +802,13 @@ namespace Volian.Print.Library ROFstInfo rofst = dvi.DocVersionAssociations[0].MyROFst; ROFSTLookup lookup = rofst.ROFSTLookup; string linkInfoText = itemInfo.MyContent.Text.Replace(@"\v ", ""); - if (linkInfoText.Contains("?")) + Match m = Regex.Match(linkInfoText, @"(.*)[#]Link:([A-Za-z]*):(.*)"); + if (m.Groups.Count < 4) + { erMsg = "RO was not found during data migration."; + } else { - Match m = Regex.Match(linkInfoText, @"(.*)[#]Link:([A-Za-z]*):(.*)"); string[] subs = m.Groups[3].Value.Split(" ".ToCharArray()); string roid = subs[1]; string val = lookup.GetRoValue(subs[1]); @@ -1265,7 +1267,9 @@ namespace Volian.Print.Library if (myPageHelper.ChangeBarDefinition.MyChangeBarLoc == PrintChangeBarLoc.LeftOfText || (myPageHelper.ChangeBarDefinition.MyChangeBarLoc == PrintChangeBarLoc.AERleftRNOright && !itemInfo.IsInRNO)) msgAlign = Element.ALIGN_RIGHT; - return new vlnChangeBar(cb, this, (float)itemInfo.MyDocStyle.Layout.LeftMargin + (col * itemInfo.FormatStepData.Font.CharsToTwips), yoff, msgAlign); + float coltotwips = col * itemInfo.FormatStepData.Font.CharsToTwips; + if (itemInfo.IsFigure) coltotwips = col * itemInfo.ActiveFormat.PlantFormat.FormatData.Font.CharsToTwips; + return new vlnChangeBar(cb, this, (float)itemInfo.MyDocStyle.Layout.LeftMargin + coltotwips, yoff, msgAlign); } private int ChangeBarLocation(float c, vlnParagraph paragraph, FormatInfo formatInfo, int maxRNO) @@ -1577,7 +1581,7 @@ namespace Volian.Print.Library if (level==1) XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (level * (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos); else - XOffset = (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[level].ColSByLevel; + XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (float)formatInfo.PlantFormat.FormatData.SectData.MetaSectionList[level].ColSByLevel; } return; }