コード例 #1
0
        public void TestGetSetKeywords()
        {
            XWPFDocument doc      = XWPFTestDataSamples.OpenSampleDocument("TestPoiXMLDocumentCorePropertiesGetKeywords.docx");
            String       keywords = doc.GetProperties().CoreProperties.Keywords;

            Assert.AreEqual("extractor, test, rdf", keywords);

            doc.GetProperties().CoreProperties.Keywords = ("test, keywords");
            doc      = XWPFTestDataSamples.WriteOutAndReadBack(doc);
            keywords = doc.GetProperties().CoreProperties.Keywords;
            Assert.AreEqual("test, keywords", keywords);
        }
コード例 #2
0
ファイル: TestXWPFBugs.cs プロジェクト: piaoye2019/npoi
        public void Test59378()
        {
            XWPFDocument          doc  = XWPFTestDataSamples.OpenSampleDocument("59378.docx");
            ByteArrayOutputStream out1 = new ByteArrayOutputStream();

            doc.Write(out1);
            out1.Close();
            XWPFDocument doc2 = new XWPFDocument(new ByteArrayInputStream(out1.ToByteArray()));

            doc2.Close();
            XWPFDocument docBack = XWPFTestDataSamples.WriteOutAndReadBack(doc);

            docBack.Close();
        }