Beispiel #1
0
 public static void WriteReportSize(BinaryWriter spbifWriter, byte rplid, ReportSize value)
 {
     if (value != null)
     {
         spbifWriter.Write(rplid);
         spbifWriter.Write(value.ToString());
     }
 }
Beispiel #2
0
 public static void WriteReportSize(IntermediateFormatWriter writer, ReportSize reportSize)
 {
     if (reportSize == null)
     {
         writer.WriteNull();
     }
     else
     {
         writer.Write(reportSize.ToString());
     }
 }
Beispiel #3
0
 public static int ReportSizeItemSize(ReportSize reportSize)
 {
     if (reportSize == null)
     {
         return(AspNetCore.ReportingServices.OnDemandProcessing.Scalability.ItemSizes.SizeOf((string)null));
     }
     return(AspNetCore.ReportingServices.OnDemandProcessing.Scalability.ItemSizes.SizeOf(reportSize.ToString()));
 }
Beispiel #4
0
        internal void WriteElementProps(RPLParagraphProps elemProps, PageContext pageContext)
        {
            Hashtable            itemPropsStart       = pageContext.ItemPropsStart;
            RPLParagraphPropsDef rPLParagraphPropsDef = pageContext.Common.GetFromCache <RPLParagraphPropsDef>(m_source.ID, out itemPropsStart);

            if (rPLParagraphPropsDef == null)
            {
                rPLParagraphPropsDef             = new RPLParagraphPropsDef();
                rPLParagraphPropsDef.SharedStyle = new RPLStyleProps();
                WriteSharedStyles(new StyleWriterOM(rPLParagraphPropsDef.SharedStyle), m_source.Style);
                if (m_source.ListLevel != null && !m_source.ListLevel.IsExpression)
                {
                    rPLParagraphPropsDef.ListLevel = m_source.ListLevel.Value;
                }
                if (m_source.ListStyle != null && !m_source.ListStyle.IsExpression)
                {
                    rPLParagraphPropsDef.ListStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(m_source.ListStyle.Value);
                }
                if (m_source.LeftIndent != null && !m_source.LeftIndent.IsExpression)
                {
                    rPLParagraphPropsDef.LeftIndent = new RPLReportSize(m_source.LeftIndent.Value.ToString());
                }
                if (m_source.RightIndent != null && !m_source.RightIndent.IsExpression)
                {
                    rPLParagraphPropsDef.RightIndent = new RPLReportSize(m_source.RightIndent.Value.ToString());
                }
                if (m_source.HangingIndent != null && !m_source.HangingIndent.IsExpression)
                {
                    rPLParagraphPropsDef.HangingIndent = new RPLReportSize(m_source.HangingIndent.Value.ToString());
                }
                if (m_source.SpaceBefore != null && !m_source.SpaceBefore.IsExpression)
                {
                    rPLParagraphPropsDef.SpaceBefore = new RPLReportSize(m_source.SpaceBefore.Value.ToString());
                }
                if (m_source.SpaceAfter != null && !m_source.SpaceAfter.IsExpression)
                {
                    rPLParagraphPropsDef.SpaceAfter = new RPLReportSize(m_source.SpaceAfter.Value.ToString());
                }
                rPLParagraphPropsDef.ID     = m_source.ID;
                itemPropsStart[m_source.ID] = rPLParagraphPropsDef;
            }
            elemProps.Definition = rPLParagraphPropsDef;
            if (m_leftIndent != null)
            {
                elemProps.LeftIndent = new RPLReportSize(m_leftIndent.ToString());
            }
            if (m_rightIndent != null)
            {
                elemProps.RightIndent = new RPLReportSize(m_rightIndent.ToString());
            }
            if (m_hangingIndent != null)
            {
                elemProps.HangingIndent = new RPLReportSize(m_hangingIndent.ToString());
            }
            if (m_listStyle.HasValue)
            {
                elemProps.ListStyle = m_listStyle.Value;
            }
            if (m_listLevel.HasValue)
            {
                elemProps.ListLevel = m_listLevel.Value;
            }
            if (m_spaceBefore != null)
            {
                elemProps.SpaceBefore = new RPLReportSize(m_spaceBefore.ToString());
            }
            if (m_spaceAfter != null)
            {
                elemProps.SpaceAfter = new RPLReportSize(m_spaceAfter.ToString());
            }
            elemProps.ParagraphNumber = m_paragraphNumber;
            elemProps.FirstLine       = m_firstLine;
            elemProps.UniqueName      = m_uniqueName;
            RPLStyleProps rPLStyleProps = null;

            if (m_styles != null)
            {
                rPLStyleProps = new RPLStyleProps();
                ((StyleWriter) new StyleWriterOM(rPLStyleProps)).WriteAll(m_styles);
            }
            elemProps.NonSharedStyle = rPLStyleProps;
        }