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/03/01 15:50:56 UTC

DO NOT REPLY [Bug 50847] New: XSSFFont.setCharSet(int charset) allows to set only 3 charsets from FontCharset (ANSI, SYMBOL and DEFAULT)

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

           Summary: XSSFFont.setCharSet(int charset) allows to set only 3
                    charsets from FontCharset (ANSI, SYMBOL and DEFAULT)
           Product: POI
           Version: 3.7
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: andrei.astrouski@gmail.com


Try to set FontCharset.MAC value to font via setCharSet(int) method.

Actual: POIXMLException exception

-- 
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 50847] XSSFFont.setCharSet(int charset) allows to set only 3 charsets from FontCharset (ANSI, SYMBOL and DEFAULT)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50847

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ni...@alfresco.com> 2011-03-01 11:05:42 EST ---
Is that one of the allowed values in .xlsx?

-- 
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 50847] XSSFFont.setCharSet(int charset) allows to set only 3 charsets from FontCharset (ANSI, SYMBOL and DEFAULT)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50847

--- Comment #3 from Nick Burch <ni...@alfresco.com> 2011-03-01 11:55:01 EST ---
Any chance you could dig into the Microsoft specs, and check what they say?

-- 
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 50847] XSSFFont.setCharSet(int charset) allows to set only 3 charsets from FontCharset (ANSI, SYMBOL and DEFAULT)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50847

Nick Burch <ni...@alfresco.com> changed:

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

--- Comment #6 from Nick Burch <ni...@alfresco.com> 2011-03-04 09:02:24 EST ---
Thanks for the patch. As we already had a setter which took a FontCharset
object, I flipped it around a little bit, so we didn't need to do charset ->
int -> charset. Fix and unit test committed in 1077950.

-- 
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 50847] XSSFFont.setCharSet(int charset) allows to set only 3 charsets from FontCharset (ANSI, SYMBOL and DEFAULT)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50847

--- Comment #2 from andrei <an...@gmail.com> 2011-03-01 11:48:55 EST ---
Probably but i'm not sure. For my locale font.getCharSet() returns
FontCharset.RUSSIAN.

-- 
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 50847] XSSFFont.setCharSet(int charset) allows to set only 3 charsets from FontCharset (ANSI, SYMBOL and DEFAULT)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50847

--- Comment #4 from andrei <an...@gmail.com> 2011-03-02 10:08:47 EST ---
I found in the specification (Excel 2007 Binary File Format specification) font
character set.
0= Ansi 
1= Default 
2= Symbol 
77= Mac 
128= Japanese 
129= Korean 
130= Johab 
134= GB2312 
136= Chinese Big 5 
161= Greek 
162= Turkish 
163= Vietnamese 
177= Hebrew 
178= Arabic 
186= Baltic 
204= Russian 
222= Thai 
238= East Europe 
255= Oem

Ie the same as FontCharset has.

-- 
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 50847] XSSFFont.setCharSet(int charset) allows to set only 3 charsets from FontCharset (ANSI, SYMBOL and DEFAULT)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50847

--- Comment #5 from andrei <an...@gmail.com> 2011-03-02 10:18:20 EST ---
Patch:

public void setCharSet(int charset) {
        CTIntProperty charsetProperty = _ctFont.sizeOfCharsetArray() == 0 ?
_ctFont.addNewCharset() : _ctFont.getCharsetArray(0);
        FontCharset fontCharset = FontCharset.valueOf(charset);
        if (fontCharset != null) {
            charsetProperty.setVal(fontCharset.getValue());
        } else {
            throw new POIXMLException("Attention: an attempt to set a type of
unknow charset and charset");
        }
    }

-- 
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