internal static void ValidateBorderColorNotTransparent(ObjectType objectType, string objectName, Microsoft.ReportingServices.ReportIntermediateFormat.Style styleClass, string styleName, ErrorContext errorContext) { if (styleClass.GetAttributeInfo(styleName, out Microsoft.ReportingServices.ReportIntermediateFormat.AttributeInfo styleAttribute) && !styleAttribute.IsExpression && ReportColor.TryParse(styleAttribute.Value, allowTransparency: true, out ReportColor reportColor) && reportColor.ToColor().A != byte.MaxValue) { errorContext.Register(ProcessingErrorCode.rsInvalidColor, Severity.Error, objectType, objectName, styleName, styleAttribute.Value); } }
private bool StyleAttributeExpressionBased(Microsoft.ReportingServices.ReportIntermediateFormat.Style style, string styleName) { if (style.GetAttributeInfo(styleName, out AttributeInfo styleAttribute)) { return(styleAttribute.IsExpression); } return(false); }
private void AddAttribute(AutomaticSubtotalContext context, Style originalStyle, Style newStyle, string name, ExpressionInfo meDotValueExpression) { if (originalStyle.GetAttributeInfo(name, out AttributeInfo styleAttribute)) { if (styleAttribute.IsExpression) { newStyle.AddAttribute(name, (ExpressionInfo)originalStyle.ExpressionList[styleAttribute.IntValue].PublishClone(context)); } else { newStyle.StyleAttributes.Add(name, styleAttribute.PublishClone(context)); } } }
private void CreateAndValidateCalendar(int languageState, CultureInfo formattingCulture) { Microsoft.ReportingServices.ReportIntermediateFormat.AttributeInfo styleAttribute = null; Calendars calendars = Calendars.Default; bool flag = false; if (m_styleClass.GetAttributeInfo("Calendar", out styleAttribute)) { if (styleAttribute.IsExpression) { flag = true; calendars = (Calendars)m_styleClass.EvaluateStyle(m_objectType, m_objectName, styleAttribute, Microsoft.ReportingServices.ReportIntermediateFormat.Style.StyleId.Calendar, m_context); m_sharedFormatSettings = false; } else { calendars = StyleTranslator.TranslateCalendar(styleAttribute.Value, m_context.ReportRuntime); switch (languageState) { case 1: flag = true; break; default: if (!m_calendarValidated) { m_calendarValidated = true; m_formattingCalendar = ProcessingValidator.CreateCalendar(calendars); return; } break; case 0: break; } } } if (flag || !m_calendarValidated) { if (calendars != 0 && ProcessingValidator.ValidateCalendar(formattingCulture, calendars, m_objectType, m_objectName, "Calendar", m_context.ErrorContext)) { m_formattingCalendar = ProcessingValidator.CreateCalendar(calendars); } if (!flag) { m_calendarValidated = true; } } }