コード例 #1
0
ファイル: Footnote.cs プロジェクト: zhaoyin/officeOBA
        /// <summary>
        /// Initializes a new instance of the <see cref="Footnote"/> class.
        /// </summary>
        /// <param name="document">The text document.</param>
        /// <param name="notetext">The notetext.</param>
        /// <param name="id">The id.</param>
        /// <param name="type">The type.</param>
        public Footnote(IDocument document, string notetext, string id, FootnoteType type)
        {
            Document = document;
            Node     = new XElement(Ns.Text + "note");

            XAttribute xa = new XAttribute(Ns.Text + "id", "ftn" + id);

            Node.Add(xa);

            xa = new XAttribute(Ns.Text + "note-class", type.ToString());
            Node.Add(xa);

            //Node citation
            XElement node = new XElement(Ns.Text + "note-citation", id);

            Node.Add(node);

            //Node Footnode body
            XElement nodebody = new XElement(Ns.Text + "note-body");

            //Node Footnode text
            node = new XElement(Ns.Text + "p", notetext);

            xa = new XAttribute(Ns.Text + "style-name", (type == FootnoteType.Footnode) ? "Footnote" : "Endnote");
            node.Add(xa);

            nodebody.Add(node);

            Node.Add(nodebody);
            InitStandards();
        }
コード例 #2
0
    internal static void smethod_0(Class421 A_0, FootnoteType A_1, AttrCollection A_2, bool A_3)
    {
        int    num  = 0;
        bool   flag = A_1 == FootnoteType.Endnote;
        object obj2 = A_2.method_31(2);
        object obj3 = A_2.method_31(1);
        object obj4 = A_2.method_31(4);
        object obj5 = A_2.method_31(3);

        if ((((obj2 != null) || (obj3 != null)) || ((obj4 != null) || (obj5 != null))) || A_3)
        {
            Class398 class2 = A_0.Interface52.imethod_1();
            class2.method_4(flag ? BookmarkStart.b("儥ሧ伩䈫䨭帯崱䀳匵样䠹", num) : BookmarkStart.b("儥ሧ䰩䌫䄭䐯就嬳䈵崷樹主", num));
            if (obj2 != null)
            {
                class2.method_24(BookmarkStart.b("儥ሧ娩䌫崭", num), Class339.smethod_7((FootnotePosition)obj2, false));
            }
            class2.method_24(BookmarkStart.b("儥ሧ䐩夫䌭瘯弱䀳", num), Class911.smethod_3(Class911.smethod_12((FootnoteNumberFormat)obj3)));
            if (obj4 != null)
            {
                class2.method_32(BookmarkStart.b("儥ሧ䐩夫䌭振䘱唳䐵䰷", num), (int)obj4, 1);
            }
            if (obj5 != null)
            {
                class2.method_24(BookmarkStart.b("儥ሧ䐩夫䌭戯圱䜳䈵夷䠹䠻", num), Class339.smethod_1((FootnoteRestartRule)obj5, false));
            }
            if (A_3)
            {
                smethod_1(A_0, flag, flag ? FootnoteSeparatorType.EndnoteSeparator : FootnoteSeparatorType.FootnoteSeparator);
                smethod_1(A_0, flag, flag ? FootnoteSeparatorType.EndnoteContinuation : FootnoteSeparatorType.FootnoteContinuation);
            }
            class2.method_5();
        }
    }
コード例 #3
0
    private bool method_26(Class762 A_0, FootnoteType A_1, Class537 A_2, int A_3, int A_4, Class1107 A_5, CharacterFormat A_6)
    {
        int num = 0;

        A_0.bool_0 = A_2.method_2()[A_3] == '\x0002';
        if (A_0.bool_0 && !A_5.bool_0)
        {
            return(false);
        }
        string str = null;

        if (!A_0.bool_0)
        {
            str = new string(A_2.method_2(), A_3, A_4 - A_3);
            if ((A_5.bool_0 && (A_5.char_0 != '\0')) && (str == BookmarkStart.b("ล", num)))
            {
                if (A_5.string_0 != null)
                {
                    A_6.FontName = A_5.string_0;
                }
                str = new string(new char[] { Class742.smethod_2(A_5.char_0) });
            }
        }
        this.class764_0.method_43().imethod_23(A_1, A_0.bool_0, str, A_6);
        new Class1108(this.class764_0, Class700.smethod_0(A_1)).method_4(A_0.method_2(), A_0.method_6());
        this.class764_0.method_43().imethod_24();
        return(true);
    }
コード例 #4
0
ファイル: Footnote.cs プロジェクト: smallkid/aodl
        /// <summary>
        /// News the XML node.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="notetext">The notetext.</param>
        /// <param name="type">The type.</param>
        private void NewXmlNode(string id, string notetext, FootnoteType type)
        {
            this.Node = this.Document.CreateNode("note", "text");

            XmlAttribute xa = this.Document.CreateAttribute("id", "text");

            xa.Value = "ftn" + id;
            this.Node.Attributes.Append(xa);

            xa       = this.Document.CreateAttribute("note-class", "text");
            xa.Value = type.ToString();
            this.Node.Attributes.Append(xa);

            //Node citation
            XmlNode node = this.Document.CreateNode("not-citation", "text");

            node.InnerText = id;

            this._node.AppendChild(node);

            //Node Footnode body
            XmlNode nodebody = this.Document.CreateNode("note-body", "text");

            //Node Footnode text
            node          = this.Document.CreateNode("p", "text");
            node.InnerXml = notetext;

            xa       = this.Document.CreateAttribute("style-name", "text");
            xa.Value = (type == FootnoteType.footnode)?"Footnote":"Endnote";
            node.Attributes.Append(xa);

            nodebody.AppendChild(node);

            this._node.AppendChild(nodebody);
        }
コード例 #5
0
 private static void smethod_19(Class857 A_0, Paragraph A_1, CharacterFormat A_2)
 {
     int num = 0x11;
     Class396 class2 = A_0.method_11();
     FootnoteType type = (class2.method_12(BookmarkStart.b("夶嘸伺堼ሾ≀⽂⑄㑆㩈", 0x11), BookmarkStart.b("制圸强匼倾㕀♂", 0x11)) == BookmarkStart.b("制圸强匼倾㕀♂", 0x11)) ? FootnoteType.Endnote : FootnoteType.Footnote;
     Footnote footnote = new Footnote(A_0.method_9()) {
         FootnoteType = type,
         IsAutoNumbered = true,
         CustomMarker = null
     };
     if (A_2 == null)
     {
         throw new ArgumentNullException(BookmarkStart.b("䔶䰸唺洼䴾", num));
     }
     A_2.method_37(footnote.CharacterFormat);
     while (class2.method_9(BookmarkStart.b("夶嘸伺堼", num)))
     {
         string str2 = class2.method_1();
         if (str2 != null)
         {
             if (!(str2 == BookmarkStart.b("夶嘸伺堼ሾ≀⩂ㅄ♆㵈≊≌ⅎ", num)))
             {
                 if (!(str2 == BookmarkStart.b("夶嘸伺堼ሾ⍀ⱂ⅄㹆", num)))
                 {
                     goto Label_0110;
                 }
                 A_0.method_56(true);
                 Class574.smethod_0(A_0, BookmarkStart.b("夶嘸伺堼ሾ⍀ⱂ⅄㹆", num), footnote);
                 Class857.string_4 = "";
                 A_0.method_56(false);
             }
             else
             {
                 string str = class2.method_12(BookmarkStart.b("嬶堸夺堼匾", num), null);
                 if (str != null)
                 {
                     footnote.IsAutoNumbered = false;
                     footnote.CustomMarker = str;
                 }
             }
             continue;
         }
     Label_0110:
         class2.vmethod_1();
     }
     Paragraph paragraph = smethod_20(footnote.TextBody.ChildObjects);
     if (paragraph != null)
     {
         if (footnote.IsAutoNumbered)
         {
             new Class818();
         }
         else
         {
             paragraph.method_18(new TextRange(A_0.method_9(), footnote.CustomMarker, A_2), paragraph.FirstChild);
         }
     }
     A_1.method_13(footnote);
 }
コード例 #6
0
 internal static SubDocumentType smethod_0(FootnoteType A_0)
 {
     if (A_0 != FootnoteType.Footnote)
     {
         return(SubDocumentType.Endnote);
     }
     return(SubDocumentType.Footnote);
 }
コード例 #7
0
 private void method_49(bool A_0)
 {
     this.bool_2 = A_0;
     if (A_0)
     {
         this.footnoteType_0 = FootnoteType.Footnote;
     }
     else
     {
         this.footnoteType_0 = FootnoteType.Endnote;
     }
 }
コード例 #8
0
    private Class762 method_25(int A_0, out FootnoteType A_1)
    {
        Class762 class2 = null;

        A_1 = FootnoteType.Footnote;
        if (this.subDocumentType_0 == SubDocumentType.Main)
        {
            int num = this.class764_0.method_5().method_6(A_0);
            class2 = this.class764_0.method_10().method_1(num);
            if (class2 == null)
            {
                A_1    = FootnoteType.Endnote;
                class2 = this.class764_0.method_11().method_1(num);
            }
        }
        return(class2);
    }
コード例 #9
0
    private static void smethod_8(Class581 A_0, FootnoteType A_1)
    {
        int num = 9;
        FootnoteSeparatorType normal = FootnoteSeparatorType.Normal;
        Class394 class2 = A_0.imethod_1();

        while (class2.method_19())
        {
            string str;
            if (((str = class2.method_1()) != null) && (str == BookmarkStart.b("嬮䠰䌲倴", num)))
            {
                bool flag = A_1 == FootnoteType.Endnote;
                normal = Class911.smethod_10(class2.method_3(), flag);
            }
        }
        if (normal != FootnoteSeparatorType.Normal)
        {
            Class8 class3 = new Class8(A_0.Interface50.imethod_0(), normal);
            A_0.Interface50.imethod_0().FootnoteSeparators.method_1(normal, class3);
        }
    }
コード例 #10
0
    private void imethod_23(FootnoteType A_0, bool A_1, string A_2, CharacterFormat A_3)
    {
        Footnote footnote = new Footnote(this.document_0, A_2)
        {
            FootnoteType   = A_0,
            IsAutoNumbered = A_1
        };

        if (A_3 != null)
        {
            footnote.MarkerCharacterFormat.ImportContainer(A_3);
        }
        this.method_11(footnote);
        if (footnote.FootnoteType == FootnoteType.Endnote)
        {
            this.document_0.Endnotes.Add(footnote);
        }
        else
        {
            this.document_0.Footnotes.Add(footnote);
        }
    }
コード例 #11
0
    private static void smethod_16(Class581 A_0, CharacterFormat A_1, FootnoteType A_2)
    {
        Footnote footnote;
        int      num = 12;

        smethod_4(A_0, A_1);
        int      num2   = -1;
        bool     flag   = false;
        Class394 class2 = A_0.imethod_1();

        while (class2.method_19())
        {
            string str = class2.method_1();
            if (str != null)
            {
                if (str != BookmarkStart.b("嬱倳", num))
                {
                    if (str != BookmarkStart.b("䘱䴳䘵崷", num))
                    {
                        if (!(str == BookmarkStart.b("儱䄳䔵䰷唹儻猽ℿぁ⽃E❇♉⁋⅍❏⅑", num)))
                        {
                            if (str == BookmarkStart.b("䄱䄳䘵䠷䠹夻䴽㌿၁⅃⁅", num))
                            {
                                flag = class2.method_63();
                            }
                        }
                        else
                        {
                            flag = class2.method_63();
                        }
                    }
                }
                else
                {
                    num2 = class2.method_4();
                }
            }
        }
        if (A_0.vmethod_5())
        {
            footnote = A_0.vmethod_2(A_2, num2);
        }
        else
        {
            footnote = new Footnote(A_0.Interface50.imethod_0())
            {
                FootnoteType = A_2
            };
            Class629.smethod_0(A_0, footnote.TextBody);
        }
        if (footnote != null)
        {
            footnote.IsAutoNumbered = !flag;
            footnote.MarkerCharacterFormat.ImportContainer(A_1);
            if (flag)
            {
                smethod_17(A_0, A_1, class2, footnote);
            }
            A_0.method_9(footnote);
        }
    }
コード例 #12
0
 internal void method_13(FootnoteType A_0)
 {
     this.footnoteType_0 = A_0;
 }
コード例 #13
0
 internal Class700(FootnoteType A_0, Class703 A_1, BinaryReader A_2) : this(A_0)
 {
     bool flag = A_0 == FootnoteType.Footnote;
     this.class161_0.method_23(A_2, flag ? A_1.class597_0.class1111_2 : A_1.class597_0.class1111_46);
     this.class151_0.method_23(A_2, flag ? A_1.class597_0.class1111_3 : A_1.class597_0.class1111_47);
 }
コード例 #14
0
 internal Class700(FootnoteType A_0)
 {
     this.footnoteType_0 = A_0;
     this.class161_0     = new Class161();
     this.class151_0     = new Class151();
 }
コード例 #15
0
ファイル: Footnote.cs プロジェクト: stuzzicadenti/aodl
        /// <summary>
        /// News the XML node.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="notetext">The notetext.</param>
        /// <param name="type">The type.</param>
        private void NewXmlNode(string id, string notetext, FootnoteType type)
        {
            this.Node		= this.Document.CreateNode("note", "text");

            XmlAttribute xa = this.Document.CreateAttribute("id", "text");
            xa.Value		= "ftn"+id;
            this.Node.Attributes.Append(xa);

            xa				 = this.Document.CreateAttribute("note-class", "text");
            xa.Value		= type.ToString();
            this.Node.Attributes.Append(xa);

            //Node citation
            XmlNode node	 = this.Document.CreateNode("not-citation", "text");
            node.InnerText	 = id;

            this._node.AppendChild(node);

            //Node Footnode body
            XmlNode nodebody = this.Document.CreateNode("note-body", "text");

            //Node Footnode text
            node			 = this.Document.CreateNode("p", "text");
            node.InnerXml	 = notetext;

            xa				 = this.Document.CreateAttribute("style-name", "text");
            xa.Value		 = (type == FootnoteType.footnode)?"Footnote":"Endnote";
            node.Attributes.Append(xa);

            nodebody.AppendChild(node);

            this._node.AppendChild(nodebody);
        }
コード例 #16
0
ファイル: Footnote.cs プロジェクト: stuzzicadenti/aodl
 /// <summary>
 /// Initializes a new instance of the <see cref="Footnote"/> class.
 /// </summary>
 /// <param name="document">The text document.</param>
 /// <param name="notetext">The notetext.</param>
 /// <param name="id">The id.</param>
 /// <param name="type">The type.</param>
 public Footnote(IDocument document, string notetext, string id, FootnoteType type)
 {
     this.Document		= document;
     this.NewXmlNode(id, notetext, type);
     this.InitStandards();
 }
コード例 #17
0
 internal override Footnote vmethod_2(FootnoteType A_0, int A_1)
 {
     throw new InvalidOperationException(BookmarkStart.b("笴堶䴸ᬺ丼䨾ㅀ㍂⩄㑆ⱈ⽊浌㭎㹐獒㙔㙖㕘㝚絜⭞ॠ੢ᙤ䥦", 15));
 }
コード例 #18
0
ファイル: Footnote.cs プロジェクト: smallkid/aodl
 /// <summary>
 /// Initializes a new instance of the <see cref="Footnote"/> class.
 /// </summary>
 /// <param name="document">The text document.</param>
 /// <param name="notetext">The notetext.</param>
 /// <param name="id">The id.</param>
 /// <param name="type">The type.</param>
 public Footnote(IDocument document, string notetext, string id, FootnoteType type)
 {
     this.Document = document;
     this.NewXmlNode(id, notetext, type);
     this.InitStandards();
 }
コード例 #19
0
 internal abstract Footnote vmethod_2(FootnoteType A_0, int A_1);