Esempio n. 1
0
        private double GetStartSize()
        {
            MapSizeRule        mapSizeRule = (MapSizeRule)m_mapRule;
            ReportSizeProperty startSize   = mapSizeRule.StartSize;
            ReportSize         size        = startSize.IsExpression ? mapSizeRule.Instance.StartSize : startSize.Value;

            return(MappingHelper.ToPixels(size, m_mapMapper.DpiX));
        }
Esempio n. 2
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_text             = null;
     m_textEvaluated    = false;
     m_angle            = null;
     m_textShadowOffset = null;
 }
Esempio n. 3
0
 internal ReportSizeProperty(ExpressionInfo expressionInfo)
     : base(expressionInfo?.IsExpression ?? false, expressionInfo?.OriginalText)
 {
     if (expressionInfo != null && !expressionInfo.IsExpression)
     {
         m_value = new ReportSize(expressionInfo.StringValue);
     }
 }
Esempio n. 4
0
 internal ReportSizeProperty(ExpressionInfo expressionInfo, bool allowNegative)
     : base(expressionInfo?.IsExpression ?? false, expressionInfo?.OriginalText)
 {
     if (expressionInfo != null && !expressionInfo.IsExpression)
     {
         m_value = new ReportSize(expressionInfo.StringValue, validate: true, allowNegative);
     }
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_hueColor     = null;
     m_transparency = null;
     m_offsetX      = null;
     m_offsetY      = null;
 }
Esempio n. 6
0
 internal void SetCachedHeight(double sizeDelta)
 {
     if (m_isOldSnapshot)
     {
         double sizeInMM = RenderReportItem.Height.ToMillimeters() + sizeDelta;
         string size     = sizeInMM.ToString("f5", CultureInfo.InvariantCulture) + "mm";
         m_cachedHeight = new ReportSize(size, sizeInMM);
     }
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_textResult       = null;
     m_formattedText    = null;
     m_angle            = null;
     m_resizeMode       = null;
     m_textShadowOffset = null;
     m_useFontPercent   = null;
 }
Esempio n. 8
0
 public static bool TryParse(string value, bool allowNegative, out ReportSize reportSize)
 {
     if (Microsoft.ReportingServices.ReportPublishing.Validator.ValidateSize(value, allowNegative, out double sizeInMM))
     {
         reportSize = new ReportSize(value, sizeInMM);
         return(true);
     }
     reportSize = null;
     return(false);
 }
 protected override void ResetInstanceCache()
 {
     m_colorEvaluated = false;
     m_colorAssigned  = false;
     m_color          = null;
     m_styleEvaluated = false;
     m_styleAssigned  = false;
     m_widthEvaluated = false;
     m_widthAssigned  = false;
     m_width          = null;
 }
Esempio n. 10
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_layout = null;
     m_autoFitTextDisabled = null;
     m_minFontSize         = null;
     m_interlacedRows      = null;
     m_interlacedRowsColor = null;
     m_equallySpacedItems  = null;
     m_textWrapThreshold   = null;
 }
Esempio n. 11
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_leftIndent    = null;
     m_rightIndent   = null;
     m_hangingIndent = null;
     m_spaceBefore   = null;
     m_spaceAfter    = null;
     m_listStyle     = null;
     m_listLevel     = null;
 }
Esempio n. 12
0
 public static ReportSize SumSizes(ReportSize size1, ReportSize size2)
 {
     if (size1 == null)
     {
         return(size2);
     }
     if (size2 == null)
     {
         return(size1);
     }
     return(FromMillimeters(size1.ToMillimeters() + size2.ToMillimeters()));
 }
Esempio n. 13
0
 internal ReportSizeProperty(ExpressionInfo expressionInfo, ReportSize defaultValue)
     : base(expressionInfo?.IsExpression ?? false, (expressionInfo == null) ? defaultValue.ToString() : expressionInfo.OriginalText)
 {
     if (expressionInfo != null && !expressionInfo.IsExpression)
     {
         m_value = new ReportSize(expressionInfo.StringValue);
     }
     else
     {
         m_value = defaultValue;
     }
 }
Esempio n. 14
0
 internal ReportSizeProperty(bool isExpression, string expressionString, ReportSize value, ReportSize defaultValue)
     : base(isExpression, expressionString)
 {
     if (!isExpression)
     {
         m_value = value;
     }
     else
     {
         m_value = defaultValue;
     }
 }
Esempio n. 15
0
        internal ReportSize DeepClone()
        {
            ReportSize reportSize = new ReportSize();

            if (m_size != null)
            {
                reportSize.m_size = string.Copy(m_size);
            }
            reportSize.m_parsed   = m_parsed;
            reportSize.m_sizeInMM = m_sizeInMM;
            return(reportSize);
        }
 private ReportSize GetOrEvaluateMarginProperty(ref ReportSize property, Microsoft.ReportingServices.ReportIntermediateFormat.Tablix.MarginPosition marginPosition)
 {
     if (m_owner.IsOldSnapshot)
     {
         return(null);
     }
     if (property == null)
     {
         property = new ReportSize(m_owner.TablixDef.EvaluateTablixMargin(ReportScopeInstance, marginPosition, m_reportElementDef.RenderingContext.OdpContext));
     }
     return(property);
 }
Esempio n. 17
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_tickMarkLength      = null;
     m_colorBarBorderColor = null;
     m_labelInterval       = null;
     m_labelFormat         = null;
     m_labelPlacement      = null;
     m_labelBehavior       = null;
     m_hideEndLabels       = null;
     m_rangeGapColor       = null;
     m_noDataText          = null;
 }
Esempio n. 18
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_mapCoordinateSystem      = null;
     m_mapProjection            = null;
     m_projectionCenterX        = null;
     m_projectionCenterY        = null;
     m_maximumZoom              = null;
     m_minimumZoom              = null;
     m_contentMargin            = null;
     m_gridUnderContent         = null;
     m_simplificationResolution = null;
 }
        internal static int GetStyleShadowOffset(Style style, StyleInstance styleInstance, float dpi)
        {
            ReportSizeProperty shadowOffset = style.ShadowOffset;

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

            if (shadowOffset2 != null)
            {
                return(ToIntPixels(shadowOffset2, dpi));
            }
            return(0);
        }
Esempio n. 20
0
 private bool HasPaddingValue(string attrName, ReportSize generalPadding, out ReportSize effectivePadding)
 {
     if (m_currentHtmlElement.CssStyle.TryGetValue(attrName, out string value))
     {
         if (ReportSize.TryParse(value, out ReportSize reportSize))
         {
             effectivePadding = reportSize;
             return(true);
         }
         m_richTextLogger.RegisterInvalidSizeWarning("padding", value, m_currentHtmlElement.CharacterPosition);
     }
     if (generalPadding != null)
     {
         effectivePadding = generalPadding;
         return(true);
     }
     effectivePadding = null;
     return(false);
 }
        internal void SetAssignedDynamicValue(BorderStyleProperty prop, Microsoft.ReportingServices.ReportIntermediateFormat.AttributeInfo value, bool allowTransparency)
        {
            switch (prop)
            {
            case BorderStyleProperty.Color:
                m_colorEvaluated = true;
                m_color          = new ReportColor(value.Value, allowTransparency);
                break;

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

            case BorderStyleProperty.Width:
                m_widthEvaluated = true;
                m_width          = new ReportSize(value.Value);
                break;
            }
        }
        internal static float GetStyleFontSize(Style style, StyleInstance styleInstance)
        {
            ReportSizeProperty fontSize = style.FontSize;

            if (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(DefaultFontSize);
        }
        internal static int GetStyleBorderWidth(Border border, float dpi)
        {
            ReportSizeProperty width = border.Width;
            int result = GetDefaultBorderWidth(dpi);

            if (!width.IsExpression)
            {
                if (width.Value != null)
                {
                    result = ToIntPixels(width.Value, dpi);
                }
            }
            else
            {
                ReportSize width2 = border.Instance.Width;
                if (width2 != null)
                {
                    result = ToIntPixels(width2, dpi);
                }
            }
            return(result);
        }
 internal static int ToIntPixels(ReportSize size, float dpi)
 {
     return(Convert.ToInt32(ToPixels(size, dpi)));
 }
 internal static double ToPixels(ReportSize size, float dpi)
 {
     return(size.ToInches() * (double)dpi);
 }
Esempio n. 26
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_width          = null;
     m_labelPlacement = null;
 }
Esempio n. 27
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_startSize = null;
     m_endSize   = null;
 }
Esempio n. 28
0
 internal ReportSizeProperty(bool isExpression, string expressionString, ReportSize value)
     : this(isExpression, expressionString, value, null)
 {
 }
Esempio n. 29
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_dynamicHeight = null;
     m_dynamicWidth  = null;
 }
 internal override void SetNewContext()
 {
     m_topMargin = (m_bottomMargin = (m_leftMargin = (m_rightMargin = null)));
     base.SetNewContext();
 }