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/06/03 20:29:55 UTC
DO NOT REPLY [Bug 45124] New: inserting text or images wipes out
boldness and makes everything italic
https://issues.apache.org/bugzilla/show_bug.cgi?id=45124
Summary: inserting text or images wipes out boldness and makes
everything italic
Product: POI
Version: 3.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: HSLF
AssignedTo: dev@poi.apache.org
ReportedBy: eric.hamacher@enetrix.com
Created an attachment (id=22064)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22064)
The input ppt -- see slide 1 before running
Hello:
If you run the code below:
------------------------------------------
package hslf;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.hslf.HSLFSlideShow;
import org.apache.poi.hslf.model.Shape;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.model.TextBox;
import org.apache.poi.hslf.usermodel.RichTextRun;
import org.apache.poi.hslf.usermodel.SlideShow;
public class InsertText {
public InsertText() {
}
public static void main(String[] args) throws IOException {
InsertText insertText = new InsertText();
insertText.insertText();
}
public void insertText() throws IOException {
SlideShow ppt = new SlideShow(new HSLFSlideShow("c:/test/bug2.ppt"));
Slide slide1 = ppt.getSlides()[1];
TextBox res = new TextBox();
res.setAnchor(new java.awt.Rectangle(60, 150, 700, 100));
res.setText("I am italic-false, bold-true inserted text");
res.setHorizontalAlignment(TextBox.AlignLeft);
res.setVerticalAlignment(TextBox.AlignCenter);
RichTextRun rt2 = res.getTextRun().getRichTextRuns()[0];
rt2.setFontSize(32);
rt2.setItalic(false);
rt2.setBulletOffset(0);
rt2.setBold(true);
rt2.setBullet(true);
rt2.setBulletChar('\u00B7');
rt2.setFontName("Arial Narrow");
slide1.addShape(res);
FileOutputStream out = new FileOutputStream("c:/test/bug2.ppt");
ppt.write(out);
out.close();
}
}
--------------------------------
the inserted text will not be bold and will be italic. In addition, all text
on every slide that was bold and not italic loses its boldness and becomes
italic.
For example, the text on slide 1 in bug.ppt reacts this way when text is
inserted on slide 2.
Eric Hamacher
--
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 45124] inserting text or images wipes out boldness
and makes everything italic
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45124
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2008-09-03 11:05:12 PST ---
Partially fixed.
Styles are now preserved across read/write.
The inserted text still has wrong styles. Actually, HSLF sets the style bytes
correctly. It is PowerPoint who has special master-level style info which
causes the text style to be inverted. setBold(false) causes the text to be bold
and setBold(true) to be not-bold.
Which version of PowerPoint was used to create/edit this ppt?
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
DO NOT REPLY [Bug 45124] inserting text or images wipes out boldness
and makes everything italic
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45124
shafiexp@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |JDK1.5
Priority|P2 |P1
Component|HSLF |HSSF
Version|3.0 |3.7
--- Comment #4 from shafiexp@gmail.com 2011-05-28 08:38:27 UTC ---
Hi,
when adding new image to the existing excel file(which contains already
pictures) the previous pictures are not visisble.
Please give me the solution
Thanks,
Shafiulla
--
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 45124] inserting text or images wipes out boldness
and makes everything italic
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45124
--- Comment #1 from Eric Hamacher <er...@enetrix.com> 2008-06-04 13:15:23 PST ---
when inserting images the following message is generated:
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4006
--
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 45124] inserting text or images wipes out boldness
and makes everything italic
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45124
Eric Hamacher <er...@enetrix.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eric.hamacher@enetrix.com
--- Comment #2 from Eric Hamacher <er...@enetrix.com> 2008-06-11 08:36:05 PST ---
Just a note: The input file is uploaded to a web app by a user, altered, then
downloaded to the user.
--
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