Beispiel #1
0
        private string FindFirstFontSize(Style style, Styles styles)
        {
            while (true)
            {
                if (style.StyleRunProperties?.FontSize != null)
                {
                    return(style.StyleRunProperties.FontSize.Val);
                }

                if (style.BasedOn != null)
                {
                    var s = styles.FindById(style.BasedOn.Val);
                    if (s != null)
                    {
                        style = s;
                        continue;
                    }

                    return(null);
                }

                return(null);
            }
        }
Beispiel #2
0
        private string FindFirstCsFont(Style style, Styles styles)
        {
            while (true)
            {
                if (style.StyleRunProperties?.RunFonts != null && style.StyleRunProperties.RunFonts.ComplexScript != null)
                {
                    return(style.StyleRunProperties.RunFonts.ComplexScript.Value);
                }

                if (style.BasedOn != null)
                {
                    var s = styles.FindById(style.BasedOn.Val);
                    if (s != null)
                    {
                        style = s;
                        continue;
                    }

                    return(null);
                }

                return(null);
            }
        }