PPTX OpenXML - 项目符号文本中的换行符指示符是什么?

时间:2012-04-25 05:30:01

标签: powerpoint openxml presentationml

你可以帮我确定哪个是项目符号文本中的换行符 PPTX OpenXML?基于此,我想在我的程序中添加换行符

- 谢谢你

1 个答案:

答案 0 :(得分:1)

使用Break Class

因此,下面的幻灯片列表带有换行符指示符:

enter image description here

请参阅从第三个子弹到第四个的以下代码剪切:

        using DocumentFormat.OpenXml.Presentation;
        using DocumentFormat.OpenXml;
        using A = DocumentFormat.OpenXml.Drawing;

...

        A.Run run3 = new A.Run();
        A.RunProperties runProperties3 = new A.RunProperties(){ Language = "en-US", Dirty = false, SpellingError = true, SmartTagClean = false };
        A.Text text3 = new A.Text();
        text3.Text = "Th";

        run3.Append(runProperties3);
        run3.Append(text3);

        A.Run run4 = new A.Run();
        A.RunProperties runProperties4 = new A.RunProperties(){ Language = "en-US", Dirty = false, SmartTagClean = false };
        A.Text text4 = new A.Text();
        text4.Text = "";

        run4.Append(runProperties4);
        run4.Append(text4);

        A.Break break1 = new A.Break();
        A.RunProperties runProperties5 = new A.RunProperties(){ Language = "en-US", Dirty = false, SmartTagClean = false };

        break1.Append(runProperties5);

        A.Run run5 = new A.Run();
        A.RunProperties runProperties6 = new A.RunProperties(){ Language = "en-US", Dirty = false, SpellingError = true, SmartTagClean = false };
        A.Text text5 = new A.Text();
        text5.Text = "ird";

        run5.Append(runProperties6);
        run5.Append(text5);
        A.EndParagraphRunProperties endParagraphRunProperties1 = new A.EndParagraphRunProperties(){ Language = "en-US", Dirty = false, SmartTagClean = false };

        paragraph3.Append(paragraphProperties3);
        paragraph3.Append(run3);
        paragraph3.Append(run4);
        paragraph3.Append(break1);
        paragraph3.Append(run5);
        paragraph3.Append(endParagraphRunProperties1);

此代码是使用Open XML Productivity Tool生成的。我强烈建议您使用它来反向设计在Excel,Word和PowerPoint中编写代码所需的东西。

希望这会有所帮助......