示例#1
0
 public static bool ValidateEmbeddedImageName(AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo embeddedImageName, Dictionary <string, AspNetCore.ReportingServices.ReportIntermediateFormat.ImageInfo> embeddedImages, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext)
 {
     Global.Tracer.Assert(null != embeddedImageName);
     if (!embeddedImageName.IsExpression)
     {
         return(PublishingValidator.ValidateEmbeddedImageName(embeddedImageName.Value, embeddedImages, objectType, objectName, propertyName, errorContext));
     }
     return(true);
 }
示例#2
0
        public static void ValidateBorderColorNotTransparent(ObjectType objectType, string objectName, AspNetCore.ReportingServices.ReportIntermediateFormat.Style styleClass, string styleName, ErrorContext errorContext)
        {
            ReportColor reportColor = default(ReportColor);

            AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo attributeInfo = default(AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo);
            if (styleClass.GetAttributeInfo(styleName, out attributeInfo) && !attributeInfo.IsExpression && ReportColor.TryParse(attributeInfo.Value, true, out reportColor) && reportColor.ToColor().A != 255)
            {
                errorContext.Register(ProcessingErrorCode.rsInvalidColor, Severity.Error, objectType, objectName, styleName, attributeInfo.Value);
            }
        }
示例#3
0
        private void CreateAndValidateCalendar(int languageState, CultureInfo formattingCulture)
        {
            AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo attributeInfo = null;
            Calendars calendars = Calendars.Default;
            bool      flag      = false;

            if (this.m_styleClass.GetAttributeInfo("Calendar", out attributeInfo))
            {
                if (attributeInfo.IsExpression)
                {
                    flag      = true;
                    calendars = (Calendars)this.m_styleClass.EvaluateStyle(this.m_objectType, this.m_objectName, attributeInfo, AspNetCore.ReportingServices.ReportIntermediateFormat.Style.StyleId.Calendar, this.m_context);
                    this.m_sharedFormatSettings = false;
                }
                else
                {
                    calendars = StyleTranslator.TranslateCalendar(attributeInfo.Value, this.m_context.ReportRuntime);
                    switch (languageState)
                    {
                    case 1:
                        flag = true;
                        break;

                    default:
                        if (this.m_calendarValidated)
                        {
                            break;
                        }
                        this.m_calendarValidated  = true;
                        this.m_formattingCalendar = ProcessingValidator.CreateCalendar(calendars);
                        return;

                    case 0:
                        break;
                    }
                }
            }
            if (!flag && this.m_calendarValidated)
            {
                return;
            }
            if (calendars != 0 && ProcessingValidator.ValidateCalendar(formattingCulture, calendars, this.m_objectType, this.m_objectName, "Calendar", this.m_context.ErrorContext))
            {
                this.m_formattingCalendar = ProcessingValidator.CreateCalendar(calendars);
            }
            if (!flag)
            {
                this.m_calendarValidated = true;
            }
        }
示例#4
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;
            }
        }
示例#5
0
        public object EvaluateStyle(AspNetCore.ReportingServices.ReportProcessing.ObjectType objectType, string objectName, AttributeInfo attribute, StyleId styleId, OnDemandProcessingContext context)
        {
            if (attribute != null)
            {
                if (!attribute.IsExpression)
                {
                    if (StyleId.NumeralLanguage != styleId && StyleId.BackgroundImageSource != styleId)
                    {
                        if (attribute.Value != null && attribute.Value.Length != 0)
                        {
                            return(attribute.Value);
                        }
                        return(null);
                    }
                    return(attribute.IntValue);
                }
                switch (styleId)
                {
                case StyleId.BackgroundImageSource:
                    return(null);

                case StyleId.BackgroundImageValue:
                {
                    AttributeInfo attributeInfo = this.m_styleAttributes["BackgroundImageSource"];
                    if (attributeInfo == null)
                    {
                        return(null);
                    }
                    switch (attributeInfo.IntValue)
                    {
                    case 2:
                        return(context.ReportRuntime.EvaluateStyleBackgroundDatabaseImageValue(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                    case 1:
                        return(context.ReportRuntime.EvaluateStyleBackgroundEmbeddedImageValue(this, this.m_expressionList[attribute.IntValue], context.EmbeddedImages, objectType, objectName));

                    case 0:
                        return(context.ReportRuntime.EvaluateStyleBackgroundUrlImageValue(this, this.m_expressionList[attribute.IntValue], objectType, objectName));
                    }
                    break;
                }

                case StyleId.BackgroundImageMimeType:
                    return(context.ReportRuntime.EvaluateStyleBackgroundImageMIMEType(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BackgroundImageRepeat:
                    return(context.ReportRuntime.EvaluateStyleBackgroundRepeat(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BackgroundColor:
                    return(context.ReportRuntime.EvaluateStyleBackgroundColor(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BackgroundGradientType:
                    return(context.ReportRuntime.EvaluateStyleBackgroundGradientType(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BackgroundGradientEndColor:
                    return(context.ReportRuntime.EvaluateStyleBackgroundGradientEndColor(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.Color:
                    return(context.ReportRuntime.EvaluateStyleColor(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.FontSize:
                    return(context.ReportRuntime.EvaluateStyleFontSize(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.FontStyle:
                    return(context.ReportRuntime.EvaluateStyleFontStyle(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.FontFamily:
                    return(context.ReportRuntime.EvaluateStyleFontFamily(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.FontWeight:
                    return(context.ReportRuntime.EvaluateStyleFontWeight(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.Format:
                    return(context.ReportRuntime.EvaluateStyleFormat(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.TextDecoration:
                    return(context.ReportRuntime.EvaluateStyleTextDecoration(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.TextAlign:
                    return(context.ReportRuntime.EvaluateStyleTextAlign(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.VerticalAlign:
                    return(context.ReportRuntime.EvaluateStyleVerticalAlign(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.Direction:
                    return(context.ReportRuntime.EvaluateStyleDirection(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.WritingMode:
                    return(context.ReportRuntime.EvaluateStyleWritingMode(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.Language:
                    return(context.ReportRuntime.EvaluateStyleLanguage(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.UnicodeBiDi:
                    return(context.ReportRuntime.EvaluateStyleUnicodeBiDi(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.Calendar:
                    return(context.ReportRuntime.EvaluateStyleCalendar(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.CurrencyLanguage:
                    return(context.ReportRuntime.EvaluateStyleCurrencyLanguage(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.NumeralLanguage:
                    return(context.ReportRuntime.EvaluateStyleNumeralLanguage(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.LineHeight:
                    return(context.ReportRuntime.EvaluateStyleLineHeight(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.NumeralVariant:
                    return(context.ReportRuntime.EvaluateStyleNumeralVariant(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderColor:
                    return(context.ReportRuntime.EvaluateStyleBorderColor(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderColorBottom:
                    return(context.ReportRuntime.EvaluateStyleBorderColorBottom(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderColorLeft:
                    return(context.ReportRuntime.EvaluateStyleBorderColorLeft(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderColorRight:
                    return(context.ReportRuntime.EvaluateStyleBorderColorRight(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderColorTop:
                    return(context.ReportRuntime.EvaluateStyleBorderColorTop(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderStyle:
                    return(context.ReportRuntime.EvaluateStyleBorderStyle(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderStyleTop:
                    return(context.ReportRuntime.EvaluateStyleBorderStyleTop(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderStyleLeft:
                    return(context.ReportRuntime.EvaluateStyleBorderStyleLeft(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderStyleRight:
                    return(context.ReportRuntime.EvaluateStyleBorderStyleRight(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderStyleBottom:
                    return(context.ReportRuntime.EvaluateStyleBorderStyleBottom(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderWidth:
                    return(context.ReportRuntime.EvaluateStyleBorderWidth(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderWidthTop:
                    return(context.ReportRuntime.EvaluateStyleBorderWidthTop(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderWidthLeft:
                    return(context.ReportRuntime.EvaluateStyleBorderWidthLeft(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderWidthRight:
                    return(context.ReportRuntime.EvaluateStyleBorderWidthRight(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BorderWidthBottom:
                    return(context.ReportRuntime.EvaluateStyleBorderWidthBottom(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.PaddingLeft:
                    return(context.ReportRuntime.EvaluateStylePaddingLeft(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.PaddingRight:
                    return(context.ReportRuntime.EvaluateStylePaddingRight(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.PaddingTop:
                    return(context.ReportRuntime.EvaluateStylePaddingTop(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.PaddingBottom:
                    return(context.ReportRuntime.EvaluateStylePaddingBottom(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.TextEffect:
                    return(context.ReportRuntime.EvaluateStyleTextEffect(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.ShadowColor:
                    return(context.ReportRuntime.EvaluateStyleShadowColor(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.ShadowOffset:
                    return(context.ReportRuntime.EvaluateStyleShadowOffset(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.BackgroundHatchType:
                    return(context.ReportRuntime.EvaluateStyleBackgroundHatchType(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.Position:
                    return(context.ReportRuntime.EvaluatePosition(this, this.m_expressionList[attribute.IntValue], objectType, objectName));

                case StyleId.TransparentColor:
                    return(context.ReportRuntime.EvaluateTransparentColor(this, this.m_expressionList[attribute.IntValue], objectType, objectName));
                }
            }
            return(null);
        }