From: Avik Sengupta Date: Thu, 28 Apr 2005 14:04:22 +0000 (+0000) Subject: bug 34007 - DBCS cell format, patch by Alexander Litvinov X-Git-Tag: BEFORE_RICHTEXT~110 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=90b0251134d7be9a5e3d806db65f1c0c2d892438;p=poi.git bug 34007 - DBCS cell format, patch by Alexander Litvinov git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353657 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/hssf/model/Workbook.java b/src/java/org/apache/poi/hssf/model/Workbook.java index d435a052a8..c7d4ae1fd6 100644 --- a/src/java/org/apache/poi/hssf/model/Workbook.java +++ b/src/java/org/apache/poi/hssf/model/Workbook.java @@ -23,11 +23,13 @@ import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.hssf.util.SheetReferences; import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogger; +import org.apache.poi.util.StringUtil; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Locale; +import java.io.UnsupportedEncodingException; /** * Low level model implementation of a Workbook. Provides creational methods @@ -1989,6 +1991,7 @@ public class Workbook implements Model maxformatid = maxformatid >= (short) 0xa4 ? (short) ( maxformatid + 1 ) : (short) 0xa4; //Starting value from M$ empiracle study. rec.setIndexCode( maxformatid ); rec.setFormatStringLength( (byte) format.length() ); + rec.setUnicodeFlag(StringUtil.isUnicodeFormat(format)); rec.setFormatString( format ); int pos = 0; @@ -2000,6 +2003,7 @@ public class Workbook implements Model return maxformatid; } + /** * Returns the first occurance of a record matching a particular sid.