private static void MapCommonProperties(this Document document, CharacterPropertiesBase style, IDocumentStyle documentStyle) { style.SetPropertyValue("Name", documentStyle.StyleName); style.AllCaps = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.AllCaps); style.BackColor = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.BackColor); style.ForeColor = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.ForeColor); style.Hidden = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Hidden); style.HighlightColor = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.HighlightColor); #if !XAF191 && !XAF192 style.KerningThreshold = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.KerningThreshold); style.Position = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Position); style.Scale = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Scale); style.SnapToGrid = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.SnapToGrid); style.Spacing = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Spacing); #endif #if !XAF191 style.SmallCaps = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.SmallCaps); #endif style.Strikeout = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Strikeout); style.Subscript = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Subscript); style.Superscript = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Superscript); style.UnderlineColor = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.UnderlineColor); style.Italic = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Italic); style.Bold = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Bold); style.Underline = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Underline); style.FontName = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.FontName); style.FontSize = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.FontSize); style.SetPropertyValue("Parent", documentStyle.Parent?.Get(document)); }
private static void MapParagraphProperties(this Document document, ParagraphStyle style, IDocumentStyle documentStyle) { style.Alignment = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.Alignment); style.RightToLeft = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.RightToLeft); style.LeftIndent = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.LeftIndent); style.RightIndent = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.LeftIndent); style.SpacingBefore = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.LeftIndent); style.SpacingAfter = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.LeftIndent); style.LineSpacingType = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.LineSpacingType); style.LineSpacing = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.LineSpacing); style.LineSpacingMultiplier = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.LineSpacingMultiplier); style.FirstLineIndentType = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.FirstLineIndentType); style.FirstLineIndent = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.FirstLineIndent); style.SuppressHyphenation = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.SuppressHyphenation); style.SuppressLineNumbers = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.SuppressLineNumbers); style.OutlineLevel = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.OutlineLevel); style.WidowOrphanControl = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.WidowOrphanControl); style.KeepWithNext = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.KeepWithNext); style.KeepLinesTogether = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.KeepLinesTogether); style.PageBreakBefore = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.PageBreakBefore); style.ContextualSpacing = documentStyle.GetStylePropertyValue(documentStyle, document, _ => _.ContextualSpacing); }