private static PlaceholderFontData FromLayoutMasterElement(P.Shape xmlShape)
        {
            var ph = FromSlideXmlElement(xmlShape);

            ph.LvlFontHeights = FontHeightParser.FromCompositeElement(xmlShape.TextBody.ListStyle);

            if (!ph.LvlFontHeights.Any()) // font height is still not known
            {
                var endParaRunPrFs = xmlShape.TextBody.GetFirstChild <A.Paragraph>().GetFirstChild <A.EndParagraphRunProperties>()?.FontSize;
                if (endParaRunPrFs != null)
                {
                    ph.LvlFontHeights.Add(1, endParaRunPrFs.Value);
                }
            }

            return(ph);
        }
Exemplo n.º 2
0
        private static PlaceholderFontData FromLayoutMasterElement(P.Shape sdkShape)
        {
            var placeholderFontData = PlaceholderLocationService.PlaceholderFontDataFromCompositeElement(sdkShape);

            placeholderFontData.LvlFontHeights = FontHeightParser.FromCompositeElement(sdkShape.TextBody.ListStyle);

            if (!placeholderFontData.LvlFontHeights.Any()) // font height is still not known
            {
                var endParaRunPrFs = sdkShape.TextBody.GetFirstChild <A.Paragraph>().GetFirstChild <A.EndParagraphRunProperties>()?.FontSize;
                if (endParaRunPrFs != null)
                {
                    placeholderFontData.LvlFontHeights.Add(1, endParaRunPrFs.Value);
                }
            }

            return(placeholderFontData);
        }
 private static Dictionary <int, int> InitBodyTypePlaceholder(SlidePart xmlSldPart)
 {
     return(FontHeightParser.FromCompositeElement(xmlSldPart.SlideLayoutPart.SlideMasterPart.SlideMaster.TextStyles.BodyStyle));
 }