示例#1
0
 private static void smethod_5(Paragraph A_0, Class97 A_1)
 {
     int num = 0x13;
     if ((A_0.Format.method_55(0x5aa) && (A_0.ChildObjects.Count != 0)) && (A_1 != null))
     {
         Paragraph paragraph = (Paragraph) A_0.Clone();
         A_0.Owner.method_18(paragraph, A_0);
         int length = (A_1.method_21() > 1) ? A_1.method_21() : 1;
         if (A_1.method_23())
         {
             length = Regex.Matches(A_0.Text, BookmarkStart.b("攸䰺ᘼ", num))[0].Length;
         }
         int num3 = 0;
         while (num3 < A_0.ChildObjects.Count)
         {
             if (length <= 0)
             {
                 break;
             }
             if (A_0.ChildObjects[num3] is TextRange)
             {
                 TextRange range2 = (TextRange) A_0.ChildObjects[num3];
                 TextRange entity = (TextRange) range2.Clone();
                 if (length >= range2.Text.Length)
                 {
                     range2.method_19();
                     length -= range2.Text.Length;
                 }
                 else
                 {
                     entity.Text = entity.Text.Substring(0, length);
                     range2.Text = range2.Text.Substring(length);
                     length = 0;
                     num3++;
                 }
                 paragraph.ChildObjects.Add(entity);
             }
         }
         paragraph.Format.SetAttr(0x5a0, DropCapPosition.Normal);
         paragraph.Format.SetAttr(0x53c, WrapMode.Square);
         if (A_0.HasChildElements)
         {
             A_0.Format.method_71(0x5aa);
         }
         else
         {
             A_0.method_19();
         }
     }
 }