mirror of https://github.com/apache/poi.git
backed out the code it caused this problem http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10393
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352814 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4756c85ce8
commit
7c96ffd3b9
|
@ -70,7 +70,6 @@ import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -83,7 +82,6 @@ import java.util.List;
|
||||||
* @see org.apache.poi.hssf.usermodel.HSSFSheet
|
* @see org.apache.poi.hssf.usermodel.HSSFSheet
|
||||||
* @author Andrew C. Oliver (acoliver at apache dot org)
|
* @author Andrew C. Oliver (acoliver at apache dot org)
|
||||||
* @author Glen Stampoultzis (glens at apache.org)
|
* @author Glen Stampoultzis (glens at apache.org)
|
||||||
* @author Sergei Kozello (sergeikozello at mail.ru)
|
|
||||||
* @version 2.0-pre
|
* @version 2.0-pre
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -202,11 +200,7 @@ public class HSSFWorkbook
|
||||||
|
|
||||||
// none currently
|
// none currently
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public final static byte ENCODING_COMPRESSED_UNICODE = 0;
|
|
||||||
public final static byte ENCODING_UTF_16 = 1;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the sheet name.
|
* set the sheet name.
|
||||||
* @param sheet number (0 based)
|
* @param sheet number (0 based)
|
||||||
|
@ -214,30 +208,14 @@ public class HSSFWorkbook
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void setSheetName(int sheet, String name)
|
public void setSheetName(int sheet, String name)
|
||||||
{
|
|
||||||
workbook.setSheetName( sheet, name, ENCODING_COMPRESSED_UNICODE );
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSheetName( int sheet, String name, short encoding )
|
|
||||||
{
|
{
|
||||||
if (sheet > (sheets.size() - 1))
|
if (sheet > (sheets.size() - 1))
|
||||||
{
|
{
|
||||||
throw new RuntimeException("Sheet out of bounds");
|
throw new RuntimeException("Sheet out of bounds");
|
||||||
}
|
}
|
||||||
|
workbook.setSheetName(sheet, name);
|
||||||
switch ( encoding ) {
|
|
||||||
case ENCODING_COMPRESSED_UNICODE:
|
|
||||||
case ENCODING_UTF_16:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// TODO java.io.UnsupportedEncodingException
|
|
||||||
throw new RuntimeException( "Unsupported encoding" );
|
|
||||||
}
|
|
||||||
|
|
||||||
workbook.setSheetName( sheet, name, encoding );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get the sheet name
|
* get the sheet name
|
||||||
* @param sheet Number
|
* @param sheet Number
|
||||||
|
|
Loading…
Reference in New Issue