예제 #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));
        }
예제 #2
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_text             = null;
     m_textEvaluated    = false;
     m_angle            = null;
     m_textShadowOffset = null;
 }
예제 #3
0
 internal ReportSizeProperty(ExpressionInfo expressionInfo)
     : base(expressionInfo?.IsExpression ?? false, expressionInfo?.OriginalText)
 {
     if (expressionInfo != null && !expressionInfo.IsExpression)
     {
         m_value = new ReportSize(expressionInfo.StringValue);
     }
 }
예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #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()));
 }
예제 #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;
     }
 }
예제 #14
0
 internal ReportSizeProperty(bool isExpression, string expressionString, ReportSize value, ReportSize defaultValue)
     : base(isExpression, expressionString)
 {
     if (!isExpression)
     {
         m_value = value;
     }
     else
     {
         m_value = defaultValue;
     }
 }
예제 #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);
        }
예제 #16
0
 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);
 }
예제 #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;
 }
예제 #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;
 }
예제 #19
0
        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);
        }
예제 #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);
 }
예제 #21
0
        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;
            }
        }
예제 #22
0
        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);
        }
예제 #23
0
        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);
        }
예제 #24
0
 internal static int ToIntPixels(ReportSize size, float dpi)
 {
     return(Convert.ToInt32(ToPixels(size, dpi)));
 }
예제 #25
0
 internal static double ToPixels(ReportSize size, float dpi)
 {
     return(size.ToInches() * (double)dpi);
 }
예제 #26
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_width          = null;
     m_labelPlacement = null;
 }
예제 #27
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_startSize = null;
     m_endSize   = null;
 }
예제 #28
0
 internal ReportSizeProperty(bool isExpression, string expressionString, ReportSize value)
     : this(isExpression, expressionString, value, null)
 {
 }
예제 #29
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     m_dynamicHeight = null;
     m_dynamicWidth  = null;
 }
예제 #30
0
 internal override void SetNewContext()
 {
     m_topMargin = (m_bottomMargin = (m_leftMargin = (m_rightMargin = null)));
     base.SetNewContext();
 }