private PlaceholderFontData FromLayoutMasterElement(P.Shape sdkShape) { var placeholderFontData = _placeholderService.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> ParseFontHeights(P.Presentation xmlPresentation) { var lvlFontHeights = new Dictionary <int, int>(); // from presentation default text settings if (xmlPresentation.DefaultTextStyle != null) { lvlFontHeights = FontHeightParser.FromCompositeElement(xmlPresentation.DefaultTextStyle); } // from theme default text settings if (!lvlFontHeights.Any()) { var themeTextDefault = xmlPresentation.PresentationPart.ThemePart.Theme.ObjectDefaults.TextDefault; if (themeTextDefault != null) { lvlFontHeights = FontHeightParser.FromCompositeElement(themeTextDefault.ListStyle); } } return(lvlFontHeights); }
private static Dictionary <int, int> InitBodyTypePlaceholder(SlidePart sdkSldPart) { return(FontHeightParser.FromCompositeElement(sdkSldPart.SlideLayoutPart.SlideMasterPart.SlideMaster.TextStyles.BodyStyle)); }
private Dictionary <int, int> InitMasterOtherFonts() { var result = FontHeightParser.FromCompositeElement(SkdSlidePart.SlideLayoutPart.SlideMasterPart.SlideMaster.TextStyles.OtherStyle); return(result); }