Пример #1
0
    internal static string smethod_3(DropCapPosition A_0)
    {
        int num = 5;

        switch (A_0)
        {
        case DropCapPosition.None:
            return(BookmarkStart.b("䔪䈬䄮吰", num));

        case DropCapPosition.Normal:
            return(BookmarkStart.b("伪弬䀮䄰", num));

        case DropCapPosition.Margin:
            return(BookmarkStart.b("䘪䰬崮嘰娲嬴", num));
        }
        return("");
    }
Пример #2
0
    protected void method_29(object A_0)
    {
        Class14 class2 = (Class14)A_0;

        if (class2.HasKey(6))
        {
            int num = class2.method_92();
            if (class2.method_95() == FrameSizeRule.AtLeast)
            {
                num |= 0x8000;
            }
            this.class345_0.method_1(SprmCode.PWHeightAbs, num);
        }
        if (class2.HasKey(14))
        {
            this.method_16(SprmCode.PFrameTextFlow, class2.method_32(14));
        }
        if (class2.HasKey(0x10))
        {
            this.method_16(SprmCode.PDyaFromText, class2.method_32(0x10));
        }
        if (class2.HasKey(9))
        {
            this.method_16(SprmCode.PDxaFromText, class2.method_32(9));
        }
        if (class2.HasKey(5))
        {
            this.method_4(SprmCode.PFLockAnchor, class2.method_32(5));
        }
        if (class2.HasKey(13))
        {
            this.method_4(SprmCode.PFNoAllowOverlap, class2.method_32(13));
        }
        if (class2.HasKey(20))
        {
            DropCapPosition position = class2.method_108();
            int             num2     = class2.method_110();
            int             num3     = ((int)position) | (num2 << 3);
            this.class345_0.method_1(SprmCode.PDcs, num3);
        }
    }
Пример #3
0
        public void DropCap(DropCapPosition dropCapPosition)
        {
            //ExStart
            //ExFor:DropCapPosition
            //ExSummary:Shows how to create a drop cap.
            Document        doc     = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            // Insert one paragraph with a large letter that the text in the second and third paragraphs begins with.
            builder.Font.Size = 54;
            builder.Writeln("L");

            builder.Font.Size = 18;
            builder.Writeln("orem ipsum dolor sit amet, consectetur adipiscing elit, " +
                            "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ");
            builder.Writeln("Ut enim ad minim veniam, quis nostrud exercitation " +
                            "ullamco laboris nisi ut aliquip ex ea commodo consequat.");

            // Currently, the second and third paragraphs will appear underneath the first.
            // We can convert the first paragraph as a drop cap for the other paragraphs via its "ParagraphFormat" object.
            // Set the "DropCapPosition" property to "DropCapPosition.Margin" to place the drop cap
            // outside the left-hand side page margin if our text is left-to-right.
            // Set the "DropCapPosition" property to "DropCapPosition.Normal" to place the drop cap within the page margins
            // and to wrap the rest of the text around it.
            // "DropCapPosition.None" is the default state for all paragraphs.
            ParagraphFormat format = doc.FirstSection.Body.FirstParagraph.ParagraphFormat;

            format.DropCapPosition = dropCapPosition;

            doc.Save(ArtifactsDir + "ParagraphFormat.DropCap.docx");
            //ExEnd

            doc = new Document(ArtifactsDir + "ParagraphFormat.DropCap.docx");

            Assert.AreEqual(dropCapPosition, doc.FirstSection.Body.Paragraphs[0].ParagraphFormat.DropCapPosition);
            Assert.AreEqual(DropCapPosition.None, doc.FirstSection.Body.Paragraphs[1].ParagraphFormat.DropCapPosition);
        }
Пример #4
0
 internal void method_109(DropCapPosition A_0)
 {
     base[20] = A_0;
 }