Пример #1
0
        public void TestSetGetIndentation()
        {
            XWPFDocument  doc = new XWPFDocument();
            XWPFParagraph p   = doc.CreateParagraph();

            Assert.AreEqual(-1, p.GetIndentationLeft());

            CT_P   ctp = p.GetCTP();
            CT_PPr ppr = ctp.pPr == null?ctp.AddNewPPr() : ctp.pPr;

            Assert.AreEqual(-1, p.GetIndentationLeft());

            CT_Ind ind = ppr.AddNewInd();

            ind.left = "10";
            Assert.AreEqual(10, p.GetIndentationLeft());

            p.SetIndentationLeft(100);
            Assert.AreEqual(100, int.Parse(ind.left));
        }