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 2011/11/25 11:03:59 UTC
DO NOT REPLY [Bug 52244] New: The method getFontName() &
getFontSize() returns error value.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52244
Bug #: 52244
Summary: The method getFontName() & getFontSize() returns error
value.
Product: POI
Version: 3.8-dev
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSLF
AssignedTo: dev@poi.apache.org
ReportedBy: andy20050125@163.com
Classification: Unclassified
Created attachment 27984
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27984
Attachment is the template file.
The template font is Arial, but the program says it's Times New Roman.
String url = "D:\\Temp\\template.ppt";
org.apache.poi.hslf.HSLFSlideShow hslf = null;
try {
hslf = new HSLFSlideShow(url);
} catch (IOException e) {
e.printStackTrace();
}
org.apache.poi.hslf.usermodel.SlideShow slidePPT = new
org.apache.poi.hslf.usermodel.SlideShow(hslf);
org.apache.poi.hslf.model.Slide[] slides = slidePPT.getSlides();
for(org.apache.poi.hslf.model.Slide slide: slides){
TextRun[] textRuns = slide.getTextRuns();
for(TextRun rt : textRuns){
RichTextRun[] rtrs = rt.getRichTextRuns();
for(RichTextRun rtr : rtrs){
System.out.println("Text: " + rtr.getText());
System.out.println("Color: " + rtr.getFontColor());
System.out.println("FontName: " + rtr.getFontName());
System.out.println("FontSize: " + rtr.getFontSize());
System.out.println("Alignment: " + rtr.getAlignment());
System.out.println();
}
}
}
--
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 52244] The method getFontName() & getFontSize()
returns error value.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52244
--- Comment #1 from Andrew <an...@163.com> 2011-11-28 02:41:48 UTC ---
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4002
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4002
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4002
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4002
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4002
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4002
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4002
Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom:
Followed by 4002
com.open.framework.exception.BaseException:
java.lang.ArrayIndexOutOfBoundsException: 36
at
com.open.framework.view.DispatchAction.dispatchMethod(DispatchAction.java:286)
at
com.open.framework.view.DispatchAction.executeAct(DispatchAction.java:195)
at com.open.framework.view.BaseAction.execute(BaseAction.java:467)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.open.security.authority.AuthorityFilter.doFilter(AuthorityFilter.java:137)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.open.framework.view.contoller.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:121)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 36
at org.apache.poi.util.LittleEndian.getInt(LittleEndian.java:95)
at
org.apache.poi.hslf.record.StyleTextPropAtom.setParentTextSize(StyleTextPropAtom.java:323)
at org.apache.poi.hslf.model.TextRun.<init>(TextRun.java:100)
at org.apache.poi.hslf.model.TextRun.<init>(TextRun.java:77)
at org.apache.poi.hslf.model.Sheet.findTextRuns(Sheet.java:175)
at org.apache.poi.hslf.model.Sheet.findTextRuns(Sheet.java:132)
at org.apache.poi.hslf.model.Slide.<init>(Slide.java:70)
at
org.apache.poi.hslf.usermodel.SlideShow.buildSlidesAndNotes(SlideShow.java:411)
at org.apache.poi.hslf.usermodel.SlideShow.<init>(SlideShow.java:109)
at com.open.common.ppt.ReportUtility.writePPT(ReportUtility.java:1689)
at
com.auchan.crs.service.report.templatemgt.ReportAjaxService.ajaxCreateReportNew(ReportAjaxService.java:716)
at
com.auchan.crs.view.action.report.templatemgt.ReportAjaxAction.ajaxCreateReportNew(ReportAjaxAction.java:789)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.open.framework.view.DispatchAction.dispatchMethod(DispatchAction.java:264)
... 26 more
--
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 52244] The method getFontName() & getFontSize()
returns error value.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52244
Andrew <an...@163.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andy20050125@163.com
OS/Version| |All
--
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 52244] The method getFontName() & getFontSize()
returns error value.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52244
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2012-03-01 09:07:28 UTC ---
The problem with incorrect font name and size should be fixed in r1295478
The attached document has colliding master styles. Strictly speaking it is a
violation of the format, but PowerPoint resolves such cases OK and I fixed POI
to do so.
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 52244] The method getFontName() & getFontSize()
returns error value.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52244
--- Comment #2 from Andrew <an...@163.com> 2011-11-28 02:43:14 UTC ---
There is also have this bug in POI 3.7
--
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