poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51604] replace text fails for doc ( poi 3.8 beta release from download site )
Date Wed, 03 Aug 2011 02:54:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51604

sanmoy <sanmoy@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|                            |All

--- Comment #1 from sanmoy <sanmoy@gmail.com> 2011-08-03 02:54:44 UTC ---
One addition, 

fileOutputStream.close() is present in the original code, by mistake, which i
didn't copy while raising the defect. 

Please remember, the following code is working perfectly 

XWPFDocument xwpfDocument = new XWPFDocument(inputStream);

List<XWPFParagraph> paragraphs = xwpfDocument.getParagraphs();
for(XWPFParagraph xParagraph:paragraphs)
{
for(XWPFRun xwpfRun : xParagraph.getRuns())
{
xwpfRun.setText("replace", 0);
}
}
xwpfDocument.write(outputStream);
outputStream.close();

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message