Пример #1
0
 private static void smethod_2(Class581 A_0, CharacterFormat A_1)
 {
     if ((A_0.imethod_1().method_52().Count <= 0) || (A_0.imethod_1().method_53() != FieldCharType.Seperate))
     {
         bool flag = A_0.imethod_1().method_53() == FieldCharType.Begin;
         fieldCharType_0 = FieldCharType.Seperate;
         A_0.imethod_1().method_52().Push(fieldCharType_0);
         ParagraphBase lastChild = A_0.method_13().LastChild as ParagraphBase;
         if (A_0.imethod_1().method_57() != null)
         {
             lastChild = A_0.imethod_1().method_57();
         }
         else if (flag)
         {
             lastChild = new Field(A_0.Interface50.imethod_0());
             A_0.imethod_1().method_54().Push(lastChild as Field);
             A_0.method_9(lastChild);
         }
         if (((lastChild is Field) || (lastChild is TextRange)) && !(lastChild is MergeField))
         {
             if ((lastChild is Field) ? ((lastChild as Field).Type == FieldType.FieldTOC) : false)
             {
                 if (lastChild.Owner == null)
                 {
                     return;
                 }
                 (lastChild as Field).ParseFieldCode((lastChild as Field).Code);
                 TableOfContent content          = new TableOfContent(A_0.Interface50.imethod_0(), A_0.imethod_1().method_57().FormattingString);
                 A_0.Interface50.imethod_0().TOC = content;
                 content.FormattingString = A_0.imethod_1().method_57().FormattingString;
                 A_0.method_13().ChildObjects.Remove(lastChild);
                 A_0.method_9(content);
                 if (A_0.method_13() is Paragraph)
                 {
                     (A_0.method_13() as Paragraph).IsTOCPara = true;
                 }
                 else
                 {
                     (A_0.method_13() as ParagraphBase).OwnerParagraph.IsTOCPara = true;
                 }
                 lastChild = content.TOCField;
             }
             FieldMark mark = new FieldMark(A_0.Interface50.imethod_0(), A_1, FieldMarkType.FieldSeparator);
             A_0.method_9(mark);
             if (lastChild is Field)
             {
                 (lastChild as Field).Separator = mark;
             }
         }
     }
 }
Пример #2
0
    private void imethod_15(CharacterFormat A_0, FieldType A_1)
    {
        Field     field;
        FieldType type = A_1;

        if (type <= FieldType.FieldMergeField)
        {
            if (type != FieldType.FieldIf)
            {
                if (type != FieldType.FieldMergeField)
                {
                    goto Label_0044;
                }
                field = new MergeField(this.document_0);
            }
            else
            {
                field = new IfField(this.document_0);
            }
            goto Label_007A;
        }
        switch (type)
        {
        case FieldType.FieldFormTextInput:
            field = new TextFormField(this.document_0);
            goto Label_007A;

        case FieldType.FieldFormCheckBox:
            field = new CheckBoxFormField(this.document_0);
            goto Label_007A;

        case FieldType.FieldFormDropDown:
            field = new DropDownFormField(this.document_0);
            goto Label_007A;
        }
Label_0044:
        field = new Field(this.document_0);
Label_007A:
        this.fieldCharType_0  = FieldCharType.Begin;
        field.Type            = A_1;
        field.CharacterFormat = (CharacterFormat)A_0.Clone();
        this.documentObject_0.method_13(field);
        if (A_1 == FieldType.FieldTOC)
        {
            (this.documentObject_0 as Paragraph).IsTOCPara = true;
        }
        this.stack_0.Push(field);
    }
Пример #3
0
    private void imethod_16(CharacterFormat A_0, Class454 A_1)
    {
        Field field = this.stack_0.Peek() as Field;

        if ((field.Type == FieldType.FieldEmbed) || (field.Type == FieldType.FieldLink))
        {
            this.stack_1.Push(A_1);
        }
        field.UpdateFieldCode(field.Code);
        if (field.Type != FieldType.FieldMergeField)
        {
            FieldMark mark = new FieldMark(this.document_0, A_0, FieldMarkType.FieldSeparator);
            this.documentObject_0.method_13(mark);
            field.Separator = mark;
        }
        this.fieldCharType_0 = FieldCharType.Seperate;
    }
Пример #4
0
 private static void smethod_1(Class581 A_0, CharacterFormat A_1)
 {
     A_0.imethod_1().bool_0 = true;
     fieldCharType_0 = FieldCharType.Begin;
     A_0.imethod_1().method_52().Push(fieldCharType_0);
 }
Пример #5
0
    private void imethod_17(CharacterFormat A_0, bool A_1, bool A_2)
    {
        Field field = this.stack_0.Peek() as Field;

        if (field.IsRuby)
        {
            Class2 class2 = new Class2(this.documentObject_0.Document);
            class2.method_60(field.Code);
            if ((this.documentObject_0.LastChild is Field) && (this.documentObject_0.LastChild as Field).IsRuby)
            {
                this.documentObject_0.method_20(this.documentObject_0.LastChild);
            }
            this.documentObject_0.method_13(class2);
            class2.ApplyCharacterFormat(A_0);
            this.stack_0.Pop();
        }
        else
        {
            field.IsLocked = A_1;
            field.IsDirty  = A_2;
            FieldType type = Class819.smethod_2(field.Code);
            if (type != FieldType.FieldUnknown)
            {
                field.Type = type;
            }
            if (((field.Type == FieldType.FieldNumPages) || (field.Type == FieldType.FieldPage)) && ((this.documentObject_0.ChildObjects.Count > 0) && (this.documentObject_0.LastChild == field)))
            {
                this.class764_0.method_43().imethod_16(A_0, null);
                TextRange range = new TextRange(this.documentObject_0.Document)
                {
                    Text = string.Empty
                };
                range.ApplyCharacterFormat(field.CharacterFormat);
                this.documentObject_0.method_13(range);
            }
            if (field.Type != FieldType.FieldMergeField)
            {
                FieldMark mark = new FieldMark(this.document_0, A_0, FieldMarkType.FieldEnd);
                this.documentObject_0.method_13(mark);
                field.End = mark;
            }
            field.UpdateFieldCode(field.Code);
            if ((field.Type == FieldType.FieldDate) || (field.Type == FieldType.FieldTime))
            {
                field.method_49();
            }
            this.stack_0.Pop();
            this.fieldCharType_0 = FieldCharType.End;
            Class454 class3 = null;
            if (((field.Type == FieldType.FieldEmbed) || (field.Type == FieldType.FieldLink)) && (this.stack_2.Count > 0))
            {
                if (this.stack_1.Count > 0)
                {
                    class3 = this.stack_1.Pop();
                }
                this.method_6(field, class3);
            }
            if (field.Type == FieldType.FieldShape)
            {
                this.method_5(field);
            }
        }
    }