Esempio n. 1
0
 private void AddNumberingProps(CssClass cssClass, RunClassParam param)
 {
     if (!param.NumberingId.HasValue || !param.NumberingLevel.HasValue)
     {
         return;
     }
     cssClass.Props.AddMany(_numPropsCache.Get(param.NumberingId.Value, param.NumberingLevel.Value));
 }
Esempio n. 2
0
        public CssClass Build(RunClassParam param)
        {
            var cssClass = new CssClass {
                Name = GenerageDynamicName()
            };
            var inline = BuildInline(param.InlineProperties);

            // This is according to me
            cssClass.Props.AddMany(inline);
            AddRunStyle(cssClass, param.RunStyleId);
            AddNumberingProps(cssClass, param);
            AddParagraphStyle(cssClass, param.ParagraphStyleId);
            AddTableStyle(cssClass, param.TableProperties);
            AddDefaults(cssClass);
            return(cssClass);
        }
Esempio n. 3
0
 private static bool WillBeEmptyClass(RunClassParam param, CssPropertiesSet inline) =>
 inline.Count == 0 &&
 param.RunStyleId == null &&
 param.ParagraphStyleId == null &&
 (!param.NumberingId.HasValue || !param.NumberingLevel.HasValue);
Esempio n. 4
0
        public CssClass RegisterRun(RunClassParam param)
        {
            var cssClass = _runClassFactory.Build(param);

            return(AddOrSet(cssClass));
        }