public override void WriteBorderProps(RPLStyleProps rplStyleProps, Style style) { if (!this.SpecialBorderHandling) { base.WriteBorderProps(rplStyleProps, style); } }
internal override void WriteItemNonSharedStyleProps(RPLStyleProps styleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAtt, PageContext pageContext) { if (styleAtt == StyleAttributeNames.BackgroundColor) { WriteStyleProp(styleDef, style, styleProps, StyleAttributeNames.BackgroundColor, 34); } }
public override void WriteItemNonSharedStyleProp(RPLStyleProps rplStyleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAttribute, PageContext pageContext) { if (styleAttribute == StyleAttributeNames.BackgroundColor) { base.WriteStyleProp(styleDef, style, rplStyleProps, StyleAttributeNames.BackgroundColor, 34); } }
public override void WriteItemSharedStyleProps(RPLStyleProps rplStyleProps, Style style, PageContext pageContext) { PageItem.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.PaddingBottom, 18); PageItem.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.PaddingLeft, 15); PageItem.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.PaddingRight, 16); PageItem.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.PaddingTop, 17); }
internal override void WriteBorderProps(RPLStyleProps rplStyleProps, Style style) { if (!SpecialBorderHandling) { base.WriteBorderProps(rplStyleProps, style); } }
private static void FillBottomBorderProperties(RPLStyleProps style, IExcelGenerator excel, ref BorderProperties bottomBorder) { BorderProperties currBorder = FillBorderProperties(excel, null, bottomBorder, ExcelBorderPart.Bottom, style[5], style[10], style[0]); currBorder = FillBorderProperties(excel, currBorder, bottomBorder, ExcelBorderPart.Bottom, style[9], style[14], style[4]); if (currBorder != null) { bottomBorder = currBorder; } }
private static void FillRightBorderProperties(RPLStyleProps style, IExcelGenerator excel, ref BorderProperties rightBorder) { BorderProperties currBorder = FillBorderProperties(excel, null, rightBorder, ExcelBorderPart.Right, style[5], style[10], style[0]); currBorder = FillBorderProperties(excel, currBorder, rightBorder, ExcelBorderPart.Right, style[7], style[12], style[2]); if (currBorder != null) { rightBorder = currBorder; } }
private static void FillTopBorderProperties(RPLStyleProps style, IExcelGenerator excel, ref BorderProperties topBorder) { BorderProperties currBorder = FillBorderProperties(excel, null, topBorder, ExcelBorderPart.Top, style[5], style[10], style[0]); currBorder = FillBorderProperties(excel, currBorder, topBorder, ExcelBorderPart.Top, style[8], style[13], style[3]); if (currBorder != null) { topBorder = currBorder; } }
private static void FillLeftBorderProperties(RPLStyleProps style, IExcelGenerator excel, ref BorderProperties leftBorder) { BorderProperties currBorder = FillBorderProperties(excel, null, leftBorder, ExcelBorderPart.Left, style[5], style[10], style[0]); currBorder = FillBorderProperties(excel, currBorder, leftBorder, ExcelBorderPart.Left, style[6], style[11], style[1]); if (currBorder != null) { leftBorder = currBorder; } }
internal static void FillAllBorders(RPLStyleProps style, ref BorderProperties leftBorder, ref BorderProperties rightBorder, ref BorderProperties topBorder, ref BorderProperties bottomBorder, ref IColor backgroundColor, IExcelGenerator excel) { if (style[34] != null && !style[34].Equals("Transparent")) { backgroundColor = excel.AddColor((string)style[34]); } FillLeftBorderProperties(style, excel, ref leftBorder); FillRightBorderProperties(style, excel, ref rightBorder); FillTopBorderProperties(style, excel, ref topBorder); FillBottomBorderProperties(style, excel, ref bottomBorder); }
public override void WriteNonSharedStyleProp(RPLStyleProps rplStyleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAttribute, PageContext pageContext) { if (!this.SpecialBorderHandling) { base.WriteNonSharedStyleProp(rplStyleProps, styleDef, style, styleAttribute, pageContext); } else { this.WriteItemNonSharedStyleProp(rplStyleProps, styleDef, style, styleAttribute, pageContext); } }
internal override void WriteItemNonSharedStyleProps(RPLStyleProps rplStyleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAtt, PageContext pageContext) { switch (styleAtt) { case StyleAttributeNames.BackgroundColor: WriteStyleProp(styleDef, style, rplStyleProps, StyleAttributeNames.BackgroundColor, 34); break; case StyleAttributeNames.BackgroundImage: WriteBackgroundImage(styleDef, writeShared: false, rplStyleProps, pageContext); break; } }
public override void WriteItemNonSharedStyleProp(RPLStyleProps rplStyleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAtt, PageContext pageContext) { switch (styleAtt) { case StyleAttributeNames.BackgroundColor: base.WriteStyleProp(styleDef, style, rplStyleProps, StyleAttributeNames.BackgroundColor, 34); break; case StyleAttributeNames.BackgroundImage: this.WriteBackgroundImage(rplStyleProps, styleDef, false, pageContext); break; } }
internal override void WriteNonSharedStyleProp(RPLStyleProps rplStyleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAttribute, PageContext pageContext) { switch (styleAttribute) { case StyleAttributeNames.TextAlign: WriteStyleProp(styleDef, style, rplStyleProps, styleAttribute, 25); break; case StyleAttributeNames.LineHeight: WriteStyleProp(styleDef, style, rplStyleProps, styleAttribute, 28); break; } }
public override void WriteItemSharedStyleProps(RPLStyleProps rplStyleProps, Style style, PageContext pageContext) { base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.FontStyle, 19); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.FontFamily, 20); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.FontSize, 21); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.FontWeight, 22); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.Format, 23); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.TextDecoration, 24); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.Color, 27); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.Language, 32); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.Calendar, 38); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.NumeralLanguage, 36); base.WriteStyleProp(style, rplStyleProps, StyleAttributeNames.NumeralVariant, 37); }
public override bool NeedsToWriteNullStyle(StyleWriterMode mode) { RPLParagraph paragraph = this.m_paragraph; switch (mode) { case StyleWriterMode.NonShared: { RPLParagraphProps rPLParagraphProps = paragraph.ElementProps as RPLParagraphProps; if (rPLParagraphProps.LeftIndent == null && rPLParagraphProps.RightIndent == null && rPLParagraphProps.SpaceBefore == null && rPLParagraphProps.SpaceAfter == null && rPLParagraphProps.HangingIndent == null) { RPLStyleProps nonSharedStyle = this.m_textBox.ElementProps.NonSharedStyle; if (!this.m_outputSharedInNonShared) { break; } return(true); } return(true); } case StyleWriterMode.Shared: { if (this.m_outputSharedInNonShared) { return(false); } RPLParagraphPropsDef rPLParagraphPropsDef = paragraph.ElementProps.Definition as RPLParagraphPropsDef; if (rPLParagraphPropsDef.LeftIndent == null && rPLParagraphPropsDef.RightIndent == null && rPLParagraphPropsDef.SpaceBefore == null && rPLParagraphPropsDef.SpaceAfter == null && rPLParagraphPropsDef.HangingIndent == null) { IRPLStyle sharedStyle = this.m_textBox.ElementPropsDef.SharedStyle; if (sharedStyle == null) { break; } if (!HTML5Renderer.IsDirectionRTL(sharedStyle)) { break; } return(true); } return(true); } } return(false); }
internal void WriteItemStyle(RPLWriter rplWriter, PageContext pageContext) { if (rplWriter == null) { return; } Style style = m_source.Style; if (style == null) { return; } BinaryWriter binaryWriter = rplWriter.BinaryWriter; if (binaryWriter != null) { WriteSharedStyle(binaryWriter, style, pageContext); StyleInstance style2 = m_source.Instance.Style; if (style2 != null) { WriteNonSharedStyleWithoutTag(binaryWriter, style, style2, pageContext); } binaryWriter.Write(byte.MaxValue); return; } RPLPageLayout pageLayout = m_pageLayout; if (pageLayout != null) { RPLStyleProps rPLStyleProps = WriteSharedStyle(style, pageContext); RPLStyleProps rPLStyleProps2 = null; StyleInstance style3 = m_source.Instance.Style; if (style3 != null) { rPLStyleProps2 = WriteNonSharedStyle(style, style3, pageContext); } if (rPLStyleProps != null || rPLStyleProps2 != null) { pageLayout.Style = new RPLElementStyle(rPLStyleProps2, rPLStyleProps); } } }
public override void WriteItemNonSharedStyleProps(RPLStyleProps rplStyleProps, Style styleDef, StyleInstance style, StyleAttributeNames styleAtt, PageContext pageContext) { switch (styleAtt) { case StyleAttributeNames.PaddingBottom: base.WriteStyleProp(styleDef, style, rplStyleProps, StyleAttributeNames.PaddingBottom, 18); break; case StyleAttributeNames.PaddingLeft: base.WriteStyleProp(styleDef, style, rplStyleProps, StyleAttributeNames.PaddingLeft, 15); break; case StyleAttributeNames.PaddingRight: base.WriteStyleProp(styleDef, style, rplStyleProps, StyleAttributeNames.PaddingRight, 16); break; case StyleAttributeNames.PaddingTop: base.WriteStyleProp(styleDef, style, rplStyleProps, StyleAttributeNames.PaddingTop, 17); break; } }
public void WriteItemStyle(RPLWriter rplWriter, PageContext pageContext) { if (rplWriter != null) { Style style = this.m_source.Style; if (style != null) { BinaryWriter binaryWriter = rplWriter.BinaryWriter; if (binaryWriter != null) { base.WriteSharedStyle(binaryWriter, style, pageContext); StyleInstance style2 = this.m_source.Instance.Style; if (style2 != null) { this.WriteNonSharedStyleWithoutTag(binaryWriter, style, style2, pageContext); } binaryWriter.Write((byte)255); } else { RPLPageLayout pageLayout = this.m_pageLayout; if (pageLayout != null) { RPLStyleProps rPLStyleProps = base.WriteSharedStyle(style, pageContext); RPLStyleProps rPLStyleProps2 = null; StyleInstance style3 = this.m_source.Instance.Style; if (style3 != null) { rPLStyleProps2 = this.WriteNonSharedStyle(style, style3, pageContext); } if (rPLStyleProps == null && rPLStyleProps2 == null) { return; } pageLayout.Style = new RPLElementStyle(rPLStyleProps2, rPLStyleProps); } } } } }
internal void WriteElementStyle(RPLWriter rplWriter, PageContext pageContext) { if (rplWriter == null) { return; } Style style = m_source.Style; if (style == null) { return; } BinaryWriter binaryWriter = rplWriter.BinaryWriter; if (binaryWriter != null) { WriteSharedStyle(binaryWriter, style, pageContext, 6); StyleInstance styleInstance = GetStyleInstance(m_source, null); if (styleInstance != null) { WriteNonSharedStyle(binaryWriter, style, styleInstance, pageContext, null, null); } binaryWriter.Write(byte.MaxValue); return; } RPLPageLayout pageLayout = rplWriter.Report.RPLPaginatedPages[0].PageLayout; RPLStyleProps rPLStyleProps = WriteSharedStyle(style, pageContext); RPLStyleProps rPLStyleProps2 = null; StyleInstance styleInstance2 = GetStyleInstance(m_source, null); if (styleInstance2 != null) { rPLStyleProps2 = WriteNonSharedStyle(style, styleInstance2, pageContext, null); } if (rPLStyleProps != null || rPLStyleProps2 != null) { pageLayout.Style = new RPLElementStyle(rPLStyleProps2, rPLStyleProps); } }
public void WriteElementStyle(RPLWriter rplWriter, PageContext pageContext) { if (rplWriter != null) { Style style = base.m_source.Style; if (style != null) { BinaryWriter binaryWriter = rplWriter.BinaryWriter; if (binaryWriter != null) { this.WriteSharedStyle(binaryWriter, style, pageContext, 6); StyleInstance styleInstance = base.GetStyleInstance(base.m_source, null); if (styleInstance != null) { this.WriteNonSharedStyle(binaryWriter, style, styleInstance, pageContext, null, null); } binaryWriter.Write((byte)255); } else { RPLPageLayout pageLayout = rplWriter.Report.RPLPaginatedPages[0].PageLayout; RPLStyleProps rPLStyleProps = this.WriteSharedStyle(style, pageContext); RPLStyleProps rPLStyleProps2 = null; StyleInstance styleInstance2 = base.GetStyleInstance(base.m_source, null); if (styleInstance2 != null) { rPLStyleProps2 = this.WriteNonSharedStyle(style, styleInstance2, pageContext, null); } if (rPLStyleProps == null && rPLStyleProps2 == null) { return; } pageLayout.Style = new RPLElementStyle(rPLStyleProps2, rPLStyleProps); } } } }
public BorderInfo(RPLStyleProps style, bool omitBorderTop, bool omitBorderBottom, IExcelGenerator excel) { this.m_omitBorderTop = omitBorderTop; this.m_omitBorderBottom = omitBorderBottom; BorderInfo.FillAllBorders(style, ref this.m_leftBorder, ref this.m_rightBorder, ref this.m_topBorder, ref this.m_bottomBorder, ref this.m_backgroundColor, excel); }
internal BorderInfo(RPLStyleProps style, bool omitBorderTop, bool omitBorderBottom, IExcelGenerator excel) { m_omitBorderTop = omitBorderTop; m_omitBorderBottom = omitBorderBottom; FillAllBorders(style, ref m_leftBorder, ref m_rightBorder, ref m_topBorder, ref m_bottomBorder, ref m_backgroundColor, excel); }
public override void WriteItemSharedStyleProps(RPLStyleProps styleProps, Style style, PageContext pageContext) { base.WriteStyleProp(style, styleProps, StyleAttributeNames.BackgroundColor, 34); }
public void WriteElementProps(RPLParagraphProps elemProps, PageContext pageContext) { Hashtable itemPropsStart = pageContext.ItemPropsStart; RPLParagraphPropsDef rPLParagraphPropsDef = pageContext.Common.GetFromCache <RPLParagraphPropsDef>(this.m_source.ID, out itemPropsStart); if (rPLParagraphPropsDef == null) { rPLParagraphPropsDef = new RPLParagraphPropsDef(); rPLParagraphPropsDef.SharedStyle = new RPLStyleProps(); this.WriteSharedStyles(new StyleWriterOM(rPLParagraphPropsDef.SharedStyle), this.m_source.Style); if (this.m_source.ListLevel != null && !this.m_source.ListLevel.IsExpression) { rPLParagraphPropsDef.ListLevel = this.m_source.ListLevel.Value; } if (this.m_source.ListStyle != null && !this.m_source.ListStyle.IsExpression) { rPLParagraphPropsDef.ListStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(this.m_source.ListStyle.Value); } if (this.m_source.LeftIndent != null && !this.m_source.LeftIndent.IsExpression) { rPLParagraphPropsDef.LeftIndent = new RPLReportSize(this.m_source.LeftIndent.Value.ToString()); } if (this.m_source.RightIndent != null && !this.m_source.RightIndent.IsExpression) { rPLParagraphPropsDef.RightIndent = new RPLReportSize(this.m_source.RightIndent.Value.ToString()); } if (this.m_source.HangingIndent != null && !this.m_source.HangingIndent.IsExpression) { rPLParagraphPropsDef.HangingIndent = new RPLReportSize(this.m_source.HangingIndent.Value.ToString()); } if (this.m_source.SpaceBefore != null && !this.m_source.SpaceBefore.IsExpression) { rPLParagraphPropsDef.SpaceBefore = new RPLReportSize(this.m_source.SpaceBefore.Value.ToString()); } if (this.m_source.SpaceAfter != null && !this.m_source.SpaceAfter.IsExpression) { rPLParagraphPropsDef.SpaceAfter = new RPLReportSize(this.m_source.SpaceAfter.Value.ToString()); } rPLParagraphPropsDef.ID = this.m_source.ID; itemPropsStart[this.m_source.ID] = rPLParagraphPropsDef; } elemProps.Definition = rPLParagraphPropsDef; if (this.m_leftIndent != null) { elemProps.LeftIndent = new RPLReportSize(this.m_leftIndent.ToString()); } if (this.m_rightIndent != null) { elemProps.RightIndent = new RPLReportSize(this.m_rightIndent.ToString()); } if (this.m_hangingIndent != null) { elemProps.HangingIndent = new RPLReportSize(this.m_hangingIndent.ToString()); } if (this.m_listStyle.HasValue) { elemProps.ListStyle = this.m_listStyle.Value; } if (this.m_listLevel.HasValue) { elemProps.ListLevel = this.m_listLevel.Value; } if (this.m_spaceBefore != null) { elemProps.SpaceBefore = new RPLReportSize(this.m_spaceBefore.ToString()); } if (this.m_spaceAfter != null) { elemProps.SpaceAfter = new RPLReportSize(this.m_spaceAfter.ToString()); } elemProps.ParagraphNumber = this.m_paragraphNumber; elemProps.FirstLine = this.m_firstLine; elemProps.UniqueName = this.m_uniqueName; RPLStyleProps rPLStyleProps = null; if (this.m_styles != null) { rPLStyleProps = new RPLStyleProps(); StyleWriter styleWriter = new StyleWriterOM(rPLStyleProps); styleWriter.WriteAll(this.m_styles); } elemProps.NonSharedStyle = rPLStyleProps; }
internal override void WriteItemSharedStyleProps(RPLStyleProps rplStyleProps, Style style, PageContext pageContext) { WriteStyleProp(style, rplStyleProps, StyleAttributeNames.BackgroundColor, 34); WriteBackgroundImage(rplStyleProps, style, writeShared: true, pageContext); }
internal override void WriteBorderProps(RPLStyleProps rplStyleProps, Style style) { }
internal override void WriteBackgroundImage(RPLStyleProps rplStyleProps, Style style, bool writeShared, PageContext pageContext) { }
public override void WriteBorderProps(RPLStyleProps rplStyleProps, Style style) { }
internal override void WriteItemSharedStyleProps(RPLStyleProps rplStyleProps, Style style, PageContext pageContext) { WriteStyleProp(style, rplStyleProps, StyleAttributeNames.TextAlign, 25); WriteStyleProp(style, rplStyleProps, StyleAttributeNames.LineHeight, 28); }