예제 #1
0
 public static List<TriggeringNodeDefinition> HiddenSlide(int iSlideNumber)
 {
     List<TriggeringNodeDefinition> results = new List<TriggeringNodeDefinition>();
     {
         EffectDescriptor tdHiddenSlide = new EffectDescriptor();
         tdHiddenSlide.ContentType = ContentType.HiddenSlide;
         tdHiddenSlide.BlockType = Effect.BlockType.Structure;
         AttributeFilter filter = new EqualityAttributeFilter("show", "0");
         tdHiddenSlide.AddAdditionalInfoDescriptor(new AdditionalInfoDescriptor("SlideNumber", iSlideNumber.ToString(), AdditionalInfoDescriptor.MappingType.FixedValue));
         results.Add(new TriggeringNodeDefinition(NamespaceId.p, "sld", filter, tdHiddenSlide));
     }
     return results;
 }
예제 #2
0
 public static List<TriggeringNodeDefinition> SlideComment(Dictionary<string, string> SlideCommentAuthorLookup)
 {
     List<TriggeringNodeDefinition> results = new List<TriggeringNodeDefinition>();
     {
         EffectDescriptor tdComments = new EffectDescriptor();
         tdComments.ContentType = ContentType.Comment;
         tdComments.BlockType = Effect.BlockType.Structure;
         AttributeFilter filter = new NullAttributeFilter();
         tdComments.DictStringToStringLookup = SlideCommentAuthorLookup;
         tdComments.AddAdditionalInfoDescriptor(new AdditionalInfoDescriptor("Author", "authorID", AdditionalInfoDescriptor.MappingType.StringToStringLookup));
         results.Add(new TriggeringNodeDefinition(NamespaceId.p, "cm", filter, tdComments));
     }
     return results;
 }
        private static TriggeringNodeDefinition ConstructBuiltInPropTND(string propName)
        {
            EffectDescriptor td = new EffectDescriptor();
            td.ContentType = ContentType.BuiltInProperty;
            td.AddAdditionalInfoDescriptor(new AdditionalInfoDescriptor("Name", propName, AdditionalInfoDescriptor.MappingType.FixedValue));
            td.BlockType = Effect.BlockType.Structure;
            td.NameForContentProperty = "Value";

            return new TriggeringNodeDefinition(NamespaceId.extProps, propName, null, null, td);
        }
        private static TriggeringNodeDefinition ConstructEditTimeProp()
        {
            EffectDescriptor td = new EffectDescriptor();
            td.ContentType = ContentType.DocumentStatistic;
            td.AddAdditionalInfoDescriptor(new AdditionalInfoDescriptor("Name", "EditTime", AdditionalInfoDescriptor.MappingType.FixedValue));
            td.BlockType = Effect.BlockType.Structure;
            td.NameForContentProperty = "Value";

            return new TriggeringNodeDefinition("TotalTime", td);
        }
        private static TriggeringNodeDefinition ConstructCorePropTND(NamespaceId nsid, string nodename, string propName, ContentType contentType)
        {
            EffectDescriptor td = new EffectDescriptor();
            td.ContentType = contentType;
            td.AddAdditionalInfoDescriptor(new AdditionalInfoDescriptor("Name", propName, AdditionalInfoDescriptor.MappingType.FixedValue));
            td.BlockType = Effect.BlockType.Structure;
            td.NameForContentProperty = "Value";

            return new TriggeringNodeDefinition(nsid, nodename, null, null, td);
        }
예제 #6
0
        private static TriggeringNodeDefinition BuildTrackChangeDef(string typeName, string nodeName, bool bRemoveContent)
        {

            EffectDescriptor td = new EffectDescriptor();
            td.ContentType = ContentType.TrackChange;
            td.AddAdditionalInfoDescriptor(new AdditionalInfoDescriptor("Type", typeName, AdditionalInfoDescriptor.MappingType.FixedValue));
            td.AddAdditionalInfoDescriptor(new AdditionalInfoDescriptor("Author", "author", AdditionalInfoDescriptor.MappingType.AttribValue));
            td.DeleteNodeContent = bRemoveContent;

            TriggeringNodeDefinition result = new TriggeringNodeDefinition(NamespaceId.w, nodeName, null, null, td);
            return result;


        }
예제 #7
0
        public static List<TriggeringNodeDefinition> GetAttachedTemplateDef(PartInfo settingsPart, OpenXmlFormat openXmlFormat)
        {
            List<TriggeringNodeDefinition> results = new List<TriggeringNodeDefinition>();
            EffectDescriptor td = new EffectDescriptor();
            td.ContentType = ContentType.AttachedTemplate;
            td.BlockType = Effect.BlockType.Structure;

            td.DictStringToStringLookup = ConstructTemplateLookup(settingsPart, openXmlFormat);

            AdditionalInfoDescriptor adi = new AdditionalInfoDescriptor("Path", "id", AdditionalInfoDescriptor.MappingType.StringToStringLookup);
            adi.LookupNamespace = NamespaceId.r;
            adi.StringMangler = URLToPath;
            td.AddAdditionalInfoDescriptor(adi);
            adi = new AdditionalInfoDescriptor("Name", "id", AdditionalInfoDescriptor.MappingType.StringToStringLookup);
            adi.LookupNamespace = NamespaceId.r;
            adi.StringMangler = URLToFilename;
            td.AddAdditionalInfoDescriptor(adi);


            results.Add(new TriggeringNodeDefinition(NamespaceId.w, "attachedTemplate", null, null, td));

            return results;
        }
예제 #8
0
        private static TriggeringNodeDefinition BuildTrackChangeReviewerDef(string nodeName)
        {
            EffectDescriptor td = new EffectDescriptor();
            td.ContentType = ContentType.Reviewer;
            td.BlockType = Effect.BlockType.Structure;
            td.AttributeBlockType = Effect.AttributeBlockType.Author;
            td.AddAdditionalInfoDescriptor(new AdditionalInfoDescriptor("author", null, AdditionalInfoDescriptor.MappingType.AttribNameAndValue));
            td.DeleteNode = false;

            AttributeFilter filter = new NullAttributeFilter();
            return new TriggeringNodeDefinition(NamespaceId.w, nodeName, filter, td);
        }