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 2007/08/09 15:46:01 UTC

DO NOT REPLY [Bug 43073] New: - Exception when modifying font in a EscherGraphics2d

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43073>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43073

           Summary: Exception when modifying font in a EscherGraphics2d
           Product: POI
           Version: 3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: david.bourgais@bioxpr.be


Code:
EscherGraphics g = new EscherGraphics(group2, wb, Color.white,
verticalPointsPerPixel );
	    EscherGraphics2d g2d = new EscherGraphics2d(g);
Font font = new Font("Dialog", Font.PLAIN, 12);
g2d.setFont(font);
g2d.drawString("Hello World !", 0, 0);

This raises the exception:
java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Integer.java:415)
	at java.lang.Integer.parseInt(Integer.java:497)
	at org.apache.poi.hssf.usermodel.FontDetails.create(FontDetails.java:98)
	at
org.apache.poi.hssf.usermodel.StaticFontMetrics.getFontDetails(StaticFontMetrics.java:88)
	at org.apache.poi.hssf.usermodel.EscherGraphics.drawString(EscherGraphics.java:285)
	at
org.apache.poi.hssf.usermodel.EscherGraphics2d.drawString(EscherGraphics2d.java:298)

This appears in poi-3.0.1-FINAL-20070705

Thank you very much

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 43073] - Exception when modifying font in a EscherGraphics2d

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43073>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43073


nick@torchbox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From nick@torchbox.com  2007-08-09 07:28 -------
I've committed a fix to SVN which means you now get a much more helpful
exception in this situation.

(The problem is that you're requesting an unknown font, so we can't get the
properties for it. I think you actually want "dialog", with a lower case d, as
that does properties defined for it)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org