Пример #1
0
        private double GetStartSize()
        {
            MapSizeRule        mapSizeRule = (MapSizeRule)base.m_mapRule;
            ReportSizeProperty startSize   = mapSizeRule.StartSize;
            ReportSize         size        = startSize.IsExpression ? mapSizeRule.Instance.StartSize : startSize.Value;

            return(MappingHelper.ToPixels(size, base.m_mapMapper.DpiX));
        }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_text             = null;
     this.m_textEvaluated    = false;
     this.m_angle            = null;
     this.m_textShadowOffset = null;
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_hueColor     = null;
     this.m_transparency = null;
     this.m_offsetX      = null;
     this.m_offsetY      = null;
 }
Пример #4
0
 public void SetCachedHeight(double sizeDelta)
 {
     if (base.m_isOldSnapshot)
     {
         double sizeInMM = this.RenderReportItem.Height.ToMillimeters() + sizeDelta;
         string size     = sizeInMM.ToString("f5", CultureInfo.InvariantCulture) + "mm";
         this.m_cachedHeight = new ReportSize(size, sizeInMM);
     }
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_textResult       = null;
     this.m_formattedText    = null;
     this.m_angle            = null;
     this.m_resizeMode       = null;
     this.m_textShadowOffset = null;
     this.m_useFontPercent   = null;
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_leftIndent    = null;
     this.m_rightIndent   = null;
     this.m_hangingIndent = null;
     this.m_spaceBefore   = null;
     this.m_spaceAfter    = null;
     this.m_listStyle     = null;
     this.m_listLevel     = null;
 }
Пример #7
0
 protected override void ResetInstanceCache()
 {
     this.m_colorEvaluated = false;
     this.m_colorAssigned  = false;
     this.m_color          = null;
     this.m_styleEvaluated = false;
     this.m_styleAssigned  = false;
     this.m_widthEvaluated = false;
     this.m_widthAssigned  = false;
     this.m_width          = null;
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_layout = null;
     this.m_autoFitTextDisabled = null;
     this.m_minFontSize         = null;
     this.m_interlacedRows      = null;
     this.m_interlacedRowsColor = null;
     this.m_equallySpacedItems  = null;
     this.m_textWrapThreshold   = null;
 }
Пример #9
0
        public static bool TryParse(string value, bool allowNegative, out ReportSize reportSize)
        {
            double sizeInMM = default(double);

            if (AspNetCore.ReportingServices.ReportPublishing.Validator.ValidateSize(value, allowNegative, out sizeInMM))
            {
                reportSize = new ReportSize(value, sizeInMM);
                return(true);
            }
            reportSize = null;
            return(false);
        }
Пример #10
0
        public ReportSize DeepClone()
        {
            ReportSize reportSize = new ReportSize();

            if (this.m_size != null)
            {
                reportSize.m_size = string.Copy(this.m_size);
            }
            reportSize.m_parsed   = this.m_parsed;
            reportSize.m_sizeInMM = this.m_sizeInMM;
            return(reportSize);
        }
Пример #11
0
 public ReportSizeProperty(bool isExpression, string expressionString, ReportSize value, ReportSize defaultValue)
     : base(isExpression, expressionString)
 {
     if (!isExpression)
     {
         this.m_value = value;
     }
     else
     {
         this.m_value = defaultValue;
     }
 }
Пример #12
0
 public ReportSizeProperty(ExpressionInfo expressionInfo, ReportSize defaultValue)
     : base(expressionInfo != null && expressionInfo.IsExpression, (expressionInfo == null) ? defaultValue.ToString() : expressionInfo.OriginalText)
 {
     if (expressionInfo != null && !expressionInfo.IsExpression)
     {
         this.m_value = new ReportSize(expressionInfo.StringValue);
     }
     else
     {
         this.m_value = defaultValue;
     }
 }
Пример #13
0
 private ReportSize GetOrEvaluateMarginProperty(ref ReportSize property, AspNetCore.ReportingServices.ReportIntermediateFormat.Tablix.MarginPosition marginPosition)
 {
     if (this.m_owner.IsOldSnapshot)
     {
         return(null);
     }
     if (property == null)
     {
         property = new ReportSize(this.m_owner.TablixDef.EvaluateTablixMargin(this.ReportScopeInstance, marginPosition, base.m_reportElementDef.RenderingContext.OdpContext));
     }
     return(property);
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_tickMarkLength      = null;
     this.m_colorBarBorderColor = null;
     this.m_labelInterval       = null;
     this.m_labelFormat         = null;
     this.m_labelPlacement      = null;
     this.m_labelBehavior       = null;
     this.m_hideEndLabels       = null;
     this.m_rangeGapColor       = null;
     this.m_noDataText          = null;
 }
Пример #15
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_mapCoordinateSystem      = null;
     this.m_mapProjection            = null;
     this.m_projectionCenterX        = null;
     this.m_projectionCenterY        = null;
     this.m_maximumZoom              = null;
     this.m_minimumZoom              = null;
     this.m_contentMargin            = null;
     this.m_gridUnderContent         = null;
     this.m_simplificationResolution = null;
 }
Пример #16
0
 public ReportSize(string size, double sizeInMM)
 {
     this.m_sizeInMM = sizeInMM;
     this.m_parsed   = true;
     if (string.IsNullOrEmpty(size))
     {
         this.m_size = ReportSize.ConvertToMM(this.m_sizeInMM);
     }
     else
     {
         this.m_size = size;
     }
 }
Пример #17
0
        public static ReportSize SumSizes(ReportSize size1, ReportSize size2)
        {
            if (size1 == null)
            {
                return(size2);
            }
            if (size2 == null)
            {
                return(size1);
            }
            double millimeters = size1.ToMillimeters() + size2.ToMillimeters();

            return(ReportSize.FromMillimeters(millimeters));
        }
Пример #18
0
        public static int GetStyleShadowOffset(Style style, StyleInstance styleInstance, float dpi)
        {
            ReportSizeProperty shadowOffset = style.ShadowOffset;

            if (!shadowOffset.IsExpression)
            {
                return(MappingHelper.ToIntPixels(shadowOffset.Value, dpi));
            }
            ReportSize shadowOffset2 = styleInstance.ShadowOffset;

            if (shadowOffset2 != null)
            {
                return(MappingHelper.ToIntPixels(shadowOffset2, dpi));
            }
            return(0);
        }
Пример #19
0
        public void SetAssignedDynamicValue(BorderStyleProperty prop, AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo value, bool allowTransparency)
        {
            switch (prop)
            {
            case BorderStyleProperty.Color:
                this.m_colorEvaluated = true;
                this.m_color          = new ReportColor(value.Value, allowTransparency);
                break;

            case BorderStyleProperty.Style:
                this.m_styleEvaluated = true;
                this.m_style          = (BorderStyles)value.IntValue;
                break;

            case BorderStyleProperty.Width:
                this.m_widthEvaluated = true;
                this.m_width          = new ReportSize(value.Value);
                break;
            }
        }
Пример #20
0
        public static float GetStyleFontSize(Style style, StyleInstance styleInstance)
        {
            ReportSizeProperty fontSize = style.FontSize;

            if (MappingHelper.IsStylePropertyDefined(fontSize))
            {
                if (!fontSize.IsExpression)
                {
                    return((float)fontSize.Value.ToPoints());
                }
                if (styleInstance.FontSize != null)
                {
                    ReportSize fontSize2 = styleInstance.FontSize;
                    if (fontSize2 != null)
                    {
                        return((float)fontSize2.ToPoints());
                    }
                }
            }
            return(MappingHelper.DefaultFontSize);
        }
Пример #21
0
        public static int GetStyleBorderWidth(Border border, float dpi)
        {
            ReportSizeProperty width = border.Width;
            int result = MappingHelper.GetDefaultBorderWidth(dpi);

            if (!width.IsExpression)
            {
                if (width.Value != null)
                {
                    result = MappingHelper.ToIntPixels(width.Value, dpi);
                }
            }
            else
            {
                ReportSize width2 = border.Instance.Width;
                if (width2 != null)
                {
                    result = MappingHelper.ToIntPixels(width2, dpi);
                }
            }
            return(result);
        }
Пример #22
0
        private bool HasPaddingValue(string attrName, ReportSize generalPadding, out ReportSize effectivePadding)
        {
            string value = default(string);

            if (this.m_currentHtmlElement.CssStyle.TryGetValue(attrName, out value))
            {
                ReportSize reportSize = default(ReportSize);
                if (ReportSize.TryParse(value, out reportSize))
                {
                    effectivePadding = reportSize;
                    return(true);
                }
                base.m_richTextLogger.RegisterInvalidSizeWarning("padding", value, this.m_currentHtmlElement.CharacterPosition);
            }
            if (generalPadding != null)
            {
                effectivePadding = generalPadding;
                return(true);
            }
            effectivePadding = null;
            return(false);
        }
Пример #23
0
        public ShimTableRow(Tablix owner, int rowIndex, AspNetCore.ReportingServices.ReportRendering.TableRow renderRow)
            : base(owner, rowIndex)
        {
            this.m_cells  = new List <ShimTableCell>();
            this.m_height = new ReportSize(renderRow.Height);
            TableCellCollection tableCellCollection = renderRow.TableCellCollection;

            if (tableCellCollection != null)
            {
                int count = tableCellCollection.Count;
                this.m_rowCellDefinitionMapping = new int[owner.RenderTable.Columns.Count];
                int num = 0;
                for (int i = 0; i < count; i++)
                {
                    int colSpan = tableCellCollection[i].ColSpan;
                    for (int j = 0; j < colSpan; j++)
                    {
                        this.m_rowCellDefinitionMapping[num] = ((j == 0) ? i : (-1));
                        num++;
                    }
                    this.m_cells.Add(new ShimTableCell(owner, rowIndex, i, colSpan, tableCellCollection[i].ReportItem));
                }
            }
        }
Пример #24
0
 public override void SetNewContext()
 {
     this.m_topMargin = (this.m_bottomMargin = (this.m_leftMargin = (this.m_rightMargin = null)));
     base.SetNewContext();
 }
Пример #25
0
 public ReportSizeProperty(bool isExpression, string expressionString, ReportSize value)
     : this(isExpression, expressionString, value, null)
 {
 }
Пример #26
0
 public static bool TryParse(string value, out ReportSize reportSize)
 {
     return(ReportSize.TryParse(value, false, out reportSize));
 }
Пример #27
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_width          = null;
     this.m_labelPlacement = null;
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_startSize = null;
     this.m_endSize   = null;
 }
Пример #29
0
 private void SetStyleValues(bool isParagraph)
 {
     if (this.m_currentHtmlElement.CssStyle != null)
     {
         string     text       = default(string);
         ReportSize reportSize = default(ReportSize);
         if (isParagraph && base.m_allowMultipleParagraphs)
         {
             if (this.m_currentHtmlElement.CssStyle.TryGetValue("text-align", out text))
             {
                 TextAlignments textAlign = default(TextAlignments);
                 if (RichTextStyleTranslator.TranslateTextAlign(text, out textAlign))
                 {
                     base.m_currentStyle.TextAlign = textAlign;
                 }
                 else
                 {
                     base.m_richTextLogger.RegisterInvalidValueWarning("text-align", text, this.m_currentHtmlElement.CharacterPosition);
                 }
             }
             if (this.m_currentHtmlElement.CssStyle.TryGetValue("text-indent", out text))
             {
                 if (ReportSize.TryParse(text, true, out reportSize))
                 {
                     base.m_currentParagraph.HangingIndent = reportSize;
                 }
                 else
                 {
                     base.m_richTextLogger.RegisterInvalidSizeWarning("text-indent", text, this.m_currentHtmlElement.CharacterPosition);
                 }
             }
             ReportSize generalPadding = null;
             if (this.m_currentHtmlElement.CssStyle.TryGetValue("padding", out text))
             {
                 if (ReportSize.TryParse(text, out reportSize))
                 {
                     generalPadding = reportSize;
                 }
                 else
                 {
                     base.m_richTextLogger.RegisterInvalidSizeWarning("padding", text, this.m_currentHtmlElement.CharacterPosition);
                 }
             }
             ReportSize size = default(ReportSize);
             if (this.HasPaddingValue("padding-top", generalPadding, out size))
             {
                 base.m_currentParagraph.AddSpaceBefore(size);
             }
             if (this.HasPaddingValue("padding-bottom", generalPadding, out size))
             {
                 base.m_currentParagraph.AddSpaceAfter(size);
             }
             if (this.HasPaddingValue("padding-left", generalPadding, out size))
             {
                 base.m_currentParagraph.AddLeftIndent(size);
             }
             if (this.HasPaddingValue("padding-right", generalPadding, out size))
             {
                 base.m_currentParagraph.AddRightIndent(size);
             }
         }
         if (this.m_currentHtmlElement.CssStyle.TryGetValue("font-family", out text))
         {
             base.m_currentStyle.FontFamily = text;
         }
         if (this.m_currentHtmlElement.CssStyle.TryGetValue("font-size", out text))
         {
             if (ReportSize.TryParse(text, out reportSize))
             {
                 base.m_currentStyle.FontSize = reportSize;
             }
             else
             {
                 base.m_richTextLogger.RegisterInvalidSizeWarning("font-size", text, this.m_currentHtmlElement.CharacterPosition);
             }
         }
         if (this.m_currentHtmlElement.CssStyle.TryGetValue("font-weight", out text))
         {
             FontWeights fontWeight = default(FontWeights);
             if (RichTextStyleTranslator.TranslateFontWeight(text, out fontWeight))
             {
                 base.m_currentStyle.FontWeight = fontWeight;
             }
             else
             {
                 base.m_richTextLogger.RegisterInvalidValueWarning("font-weight", text, this.m_currentHtmlElement.CharacterPosition);
             }
         }
         if (this.m_currentHtmlElement.CssStyle.TryGetValue("color", out text))
         {
             ReportColor color = default(ReportColor);
             if (ReportColor.TryParse(RichTextStyleTranslator.TranslateHtmlColor(text), out color))
             {
                 base.m_currentStyle.Color = color;
             }
             else
             {
                 base.m_richTextLogger.RegisterInvalidColorWarning("color", text, this.m_currentHtmlElement.CharacterPosition);
             }
         }
     }
 }
Пример #30
0
 private void SetMarginTopAndBottom(ReportSize marginValue)
 {
     base.m_currentParagraph.UpdateMarginTop(marginValue);
     base.m_currentParagraph.AddMarginBottom(marginValue);
 }