From 8b20b4a4db3e71fea2714d302069907039645849 Mon Sep 17 00:00:00 2001 From: Avik Sengupta Date: Thu, 28 Apr 2005 14:04:22 +0000 Subject: [PATCH] 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 --- src/java/org/apache/poi/hssf/model/Workbook.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/java/org/apache/poi/hssf/model/Workbook.java b/src/java/org/apache/poi/hssf/model/Workbook.java index d435a052a..c7d4ae1fd 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.