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 2008/10/16 13:43:44 UTC

DO NOT REPLY [Bug 46021] New: Basic non-destructive modification breaks powerpoint file

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

           Summary: Basic non-destructive modification breaks powerpoint
                    file
           Product: POI
           Version: 3.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P1
         Component: HSLF
        AssignedTo: dev@poi.apache.org
        ReportedBy: reggie.carey@gmail.com


The following code snippet will cause exceptions and errors on many powerpoint
documents and will generally result in corrupted file output:

Exception handling, imports removed for clarity.

public class TestPowerPoint
{

 public static void main(String[] args)
 {
  new TestPowerPoint(args[0]);
 }

 public TestPowerPoint(String fileToTest)
 {
  SlideShow ppt = new SlideShow(new FileInputStream(fileToTest));
  for (Slide slide : ppt.getSlides())
  {
   for (TextRun textRun : slide.getTextRuns())
   {
    for (RichTextRun richTextRun : textRun.getRichTextRuns())
    {
    String text = richTextRun.getText();
    richTextRun.setText(text);
    }
   }
  }
  ppt.write(new FileOutputStream("new"+fileToTest));
 }

}


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


DO NOT REPLY [Bug 46021] Basic non-destructive modification breaks powerpoint file

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


Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #1 from Yegor Kozlov <ye...@dinom.ru>  2008-10-17 08:21:26 PST ---
Please attach the template ppt. Without it, it's hard to tell what is wrong.

Yegor


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