This commit is contained in:
Kathy Ruffing 2013-05-29 14:56:40 +00:00
parent dbf6f8feee
commit 7427c75caa

View File

@ -137,17 +137,27 @@ namespace Volian.Controls.Library
bool tableHasBorder = tableShouldBeOutlined ? itemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[typ].Type.IndexOf(@"Borderless") < 0 : false; bool tableHasBorder = tableShouldBeOutlined ? itemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[typ].Type.IndexOf(@"Borderless") < 0 : false;
bool ROsShouldBeAdjusted = wordsShouldBeReplaced; // same logical value bool ROsShouldBeAdjusted = wordsShouldBeReplaced; // same logical value
if (epMode == E_EditPrintMode.Print && _MyItemInfo.IsStep) if (epMode == E_EditPrintMode.Print && _MyItemInfo.IsStep)
{
if (_MyItemInfo.FormatStepData.UseSmartTemplate)
{ {
// Add 2 spaces before and 1 after if there is prefix so that wrapping in RTB accounts for vertical // Add 2 spaces before and 1 after if there is prefix so that wrapping in RTB accounts for vertical
// lines (the 2 spaces after the first "\par " command and 1 space before 2nd "\par"). Tried other // lines (the 2 spaces after the first "\par " command and 1 space before 2nd "\par"). Tried other
// combinations that did not work. // combinations that did not work.
if (_MyItemInfo.FormatStepData.Prefix != null && _MyItemInfo.FormatStepData.Prefix != "") if (_MyItemInfo.FormatStepData.Prefix != null && _MyItemInfo.FormatStepData.Prefix != "")
text = !_MyItemInfo.FormatStepData.Font.FontIsProportional() ? ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Prefix) + @"\par " + text + @"\par ": text = !_MyItemInfo.FormatStepData.Font.FontIsProportional() ? ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Prefix) + @"\par " + text + @"\par " :
@"\par " + text + @"\par "; @"\par " + text + @"\par ";
if (_MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "") if (_MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "")
text = text + (!_MyItemInfo.FormatStepData.Font.FontIsProportional() ? ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Suffix) : text = text + (!_MyItemInfo.FormatStepData.Font.FontIsProportional() ? ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Suffix) :
@"\par\par\par "); @"\par\par\par ");
} }
else
{
if (_MyItemInfo.FormatStepData.Prefix != null && _MyItemInfo.FormatStepData.Prefix != "")
text = _MyItemInfo.FormatStepData.Prefix + text;
if (_MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "")
text = text + _MyItemInfo.FormatStepData.Suffix;
}
}
text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted); text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted);
StartText = text; StartText = text;
} }