This commit is contained in:
2011-06-16 10:39:46 +00:00
parent c37687639d
commit c22b8fd262
3 changed files with 122 additions and 54 deletions

View File

@@ -71,8 +71,13 @@ namespace Volian.Print.Library
int mindx = origTab.IndexOf(@"{!");
int meindx = origTab.IndexOf(@"}", mindx);
string macro = origTab.Substring(mindx, meindx - mindx+1);
MyMacro = new vlnMacro(xoffset - Width, yoffset, macro.Substring(2, macro.Length - 3));
// Width for placement of macro should be position in the string where the macro was located.
float lwidth = MyFont.CharsToTwips * (origTab.Length - meindx);
MyMacro = new vlnMacro(xoffset - lwidth, yoffset, macro.Substring(2, macro.Length - 3));
origTab = origTab.Replace(macro,"");
origTab = origTab + " ";
cleanTab = origTab;
Width = MyFont.CharsToTwips * (cleanTab != null ? cleanTab.Length : origTab.Length);
}
Rtf = GetRtf(origTab, vFont);
// do positioning based on whether format has locations for section 'header'. If it's not centered, treat