ASF Bugzilla – Attachment 35039 Details for
Bug 61168
Text with newline and wrapping overflows textbox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Java repro case
TextBoxOverflowWithNewLines.java (text/plain), 1.10 KB, created by
François Beaune
on 2017-06-09 09:24:20 UTC
(
hide
)
Description:
Java repro case
Filename:
MIME Type:
Creator:
François Beaune
Created:
2017-06-09 09:24:20 UTC
Size:
1.10 KB
patch
obsolete
>import java.awt.Rectangle; >import java.io.FileOutputStream; > >import org.apache.poi.xslf.usermodel.XMLSlideShow; >import org.apache.poi.xslf.usermodel.XSLFSlide; >import org.apache.poi.xslf.usermodel.XSLFTextBox; >import org.apache.poi.xslf.usermodel.XSLFTextParagraph; >import org.apache.poi.xslf.usermodel.XSLFTextRun; > >public class TextBoxOverflowWithNewLines { > public static void main(String[] args) throws Exception { > > XMLSlideShow slideShow = new XMLSlideShow(); > > XSLFSlide slide = slideShow.createSlide(); > > XSLFTextBox textBox = slide.createTextBox(); > XSLFTextParagraph paragraph = textBox.getTextParagraphs().get(0); > XSLFTextRun textRun = paragraph.addNewTextRun(); > textRun.setText("first line first line first line\nsecond line second line second line second line"); > textBox.setAnchor(new Rectangle(50, 50, 200, 5000)); > textBox.resizeToFitText(); > > FileOutputStream out = new FileOutputStream("TextBoxOverflowWithNewLines.pptx"); > slideShow.write(out); > out.close(); > slideShow.close(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 61168
: 35039 |
35040