This commit is contained in:
parent
dbf6f8feee
commit
7427c75caa
@ -138,15 +138,25 @@ namespace Volian.Controls.Library
|
||||
bool ROsShouldBeAdjusted = wordsShouldBeReplaced; // same logical value
|
||||
if (epMode == E_EditPrintMode.Print && _MyItemInfo.IsStep)
|
||||
{
|
||||
// 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
|
||||
// combinations that did not work.
|
||||
if (_MyItemInfo.FormatStepData.Prefix != null && _MyItemInfo.FormatStepData.Prefix != "")
|
||||
text = !_MyItemInfo.FormatStepData.Font.FontIsProportional() ? ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Prefix) + @"\par " + text + @"\par ":
|
||||
@"\par " + text + @"\par ";
|
||||
if (_MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "")
|
||||
text = text + (!_MyItemInfo.FormatStepData.Font.FontIsProportional() ? ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Suffix) :
|
||||
@"\par\par\par ");
|
||||
if (_MyItemInfo.FormatStepData.UseSmartTemplate)
|
||||
{
|
||||
// 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
|
||||
// combinations that did not work.
|
||||
if (_MyItemInfo.FormatStepData.Prefix != null && _MyItemInfo.FormatStepData.Prefix != "")
|
||||
text = !_MyItemInfo.FormatStepData.Font.FontIsProportional() ? ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Prefix) + @"\par " + text + @"\par " :
|
||||
@"\par " + text + @"\par ";
|
||||
if (_MyItemInfo.FormatStepData.Suffix != null && _MyItemInfo.FormatStepData.Suffix != "")
|
||||
text = text + (!_MyItemInfo.FormatStepData.Font.FontIsProportional() ? ReplaceLinesWithUnicode(_MyItemInfo.FormatStepData.Suffix) :
|
||||
@"\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);
|
||||
StartText = text;
|
||||
|
Loading…
x
Reference in New Issue
Block a user