You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/06/07 11:39:14 UTC

[Bug 53378] New: When a new para is added to the attached document and saved, document is corrupted.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53378

          Priority: P2
            Bug ID: 53378
          Assignee: dev@poi.apache.org
           Summary: When a new para is added to the attached document and
                    saved, document is corrupted.
          Severity: major
    Classification: Unclassified
                OS: Windows XP
          Reporter: kaushalc@yahoo.com
          Hardware: PC
            Status: NEW
           Version: 3.8
         Component: HWPF
           Product: POI

I opened the attached document "tutorial.doc" and added a new para and saved
the document (attached as tutorialop.doc). When I open tutorialop.doc in MS
Word, MS word shows an error on document open saying some tables in the
document have been corrupted and asks me to use the repair document option.

-- 
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


[Bug 53378] When a new para is added to the attached document and saved, document is corrupted.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53378

--- Comment #2 from Kaushal <ka...@yahoo.com> ---
The code i used to do the changes is as below: I have added this to the main in
QuickTest.java that comes with the POI HWPF source code.

HWPFDocument doc = new HWPFDocument (new FileInputStream ("C:/tutorial.doc"));
Range r = doc.getRange();

     System.out.println("Example you supplied:");
      System.out.println("---------------------");
      Section s = r.getSection(0);
      Paragraph p = s.getParagraph(1);

      p.insertAfter("KC KC KC");

      OutputStream out = new FileOutputStream("C:/tutorialOp.doc");

      doc.write(out);
      out.close();

-- 
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


[Bug 53378] When a new para is added to the attached document and saved, document is corrupted.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53378

--- Comment #1 from Kaushal <ka...@yahoo.com> ---
The document can be got from 

https://docs.google.com/open?id=0B1wVJ9Jz7lCeYTdESk5wM2RNOFU


The output that got generated can be got from 
https://docs.google.com/open?id=0B1wVJ9Jz7lCeUVk0NGt3aWZHMmM

-- 
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