Exemple #1
0
        public static bool IsImportant(OpenXmlElement c, INodeProvider nodeProvider)
        {
            if (nodeProvider.IsParagraph(c))
            {
                return(true);
            }

            if (nodeProvider.IsRun(c))
            {
                var text = c.ChildElements.Where(a => !nodeProvider.IsRunProperties(a)).Only();

                if (nodeProvider.IsText(text) && string.IsNullOrWhiteSpace(nodeProvider.GetText(text !)))
                {
                    return(false);
                }

                return(true);
            }

            if (c is BaseNode)
            {
                return(true);
            }

            return(false);
        }