ASF Bugzilla – Attachment 2947 Details for
Bug 12349
[Patch] DataFormat not cannot return format string for formats not built-in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix this problem
patch.txt (text/plain), 2.02 KB, created by
Shawn Laubach
on 2002-09-06 03:13:00 UTC
(
hide
)
Description:
Patch to fix this problem
Filename:
MIME Type:
Creator:
Shawn Laubach
Created:
2002-09-06 03:13:00 UTC
Size:
2.02 KB
patch
obsolete
>Index: org/apache/poi/hssf/model/Workbook.java >=================================================================== >RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hssf/model/Workbook.java,v >retrieving revision 1.15 >diff -r1.15 Workbook.java >1835a1836,1843 >> * Returns the list of FormatRecords in the workbook. >> * @return ArrayList of FormatRecords in the notebook >> */ >> public ArrayList getFormats() { >> return formats; >> } >> >> /** >cvs server: Diffing org/apache/poi/hssf/record >cvs server: Diffing org/apache/poi/hssf/record/aggregates >cvs server: Diffing org/apache/poi/hssf/record/formula >cvs server: Diffing org/apache/poi/hssf/usermodel >Index: org/apache/poi/hssf/usermodel/HSSFCellStyle.java >=================================================================== >RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java,v >retrieving revision 1.10 >diff -r1.10 HSSFCellStyle.java >288c288 >< * set the data format (only builtin formats are supported) >--- >> * set the data format (must be a valid format) >298c298 >< * get the index of the built in format >--- >> * get the index of the format >Index: org/apache/poi/hssf/usermodel/HSSFDataFormat.java >=================================================================== >RCS file: /home/cvspublic/jakarta-poi/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java,v >retrieving revision 1.2 >diff -r1.2 HSSFDataFormat.java >62a63 >> import java.util.Iterator; >134a136,143 >> Iterator i = workbook.getFormats().iterator(); >> while (i.hasNext()) { >> FormatRecord r = (FormatRecord)i.next(); >> if (formats.size() < r.getIndexCode() + 1) { >> formats.setSize(r.getIndexCode() + 1); >> } >> formats.set(r.getIndexCode(), r.getFormatString()); >> } >279c288 >< return (String) (builtinFormats.get(index) != null ? builtinFormats.get(index) : formats.get(index)); >--- >> return (String) (builtinFormats.size() > index && builtinFormats.get(index) != null ? builtinFormats.get(index) : formats.get(index));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12349
: 2947 |
2974
|
2975
|
2977
|
2992