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

           Summary: TextShape.resizeToFitText() height too small
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows Server 2008 (Longhorn)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


The method TextShape.resizeToFitText() calculates a height that is too small
for the TextShape if the text contains many lines.
I tried poi-versions from 3.1 to 3.5 and java-versions from 1.4 to 1.6


Sample Code:

SlideShow ppt = new SlideShow();
Slide slide = ppt.createSlide();
TextBox txtBox = new TextBox();
slide.addShape(txtBox);
txtBox.setLineColor(Color.BLACK);
txtBox.setText("Line One\nLine Two\nThree\nFour\nFive\nSix\nSeven\Eight");
txtBox.resizeToFitText();

FileOutputStream out = new FileOutputStream("test.ppt");
ppt.write(out);
out.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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to