Merge from 1.5 branch
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352479 13f79535-47bb-0310-9956-ffa450edef68
BIN
src/documentation/images/logoRaPiGmbH1.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
src/documentation/images/logoRaPiGmbH2.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
src/documentation/images/logoRaPiGmbH3.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
src/documentation/images/logoRaPiGmbH4.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src/documentation/images/logoRaPiGmbH5.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
src/documentation/images/logoRaPiGmbH6.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
src/documentation/images/logoRaPiGmbH7.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
<menu label="Get Involved">
|
<menu label="Get Involved">
|
||||||
<menu-item label="Contributing" href="contrib.html"/>
|
<menu-item label="Contributing" href="contrib.html"/>
|
||||||
|
<menu-item label="Branching" href="branching.html"/>
|
||||||
<menu-item label="Bug Database" href="http://nagoya.apache.org/bugzilla/buglist.cgi?product=POI"/>
|
<menu-item label="Bug Database" href="http://nagoya.apache.org/bugzilla/buglist.cgi?product=POI"/>
|
||||||
<menu-item label="CVS" href="http://jakarta.apache.org/site/cvsindex.html"/>
|
<menu-item label="CVS" href="http://jakarta.apache.org/site/cvsindex.html"/>
|
||||||
<menu-item label="Mail Lists" href="http://jakarta.apache.org/site/mail.html"/>
|
<menu-item label="Mail Lists" href="http://jakarta.apache.org/site/mail.html"/>
|
||||||
|
97
src/documentation/xdocs/branching.xml
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "./dtd/document-v11.dtd">
|
||||||
|
|
||||||
|
<document>
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<title>Branching</title>
|
||||||
|
<authors>
|
||||||
|
<person id="GJS" name="Glen Stampoultzis" email="glens@apache.org"/>
|
||||||
|
</authors>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<section title="Branching Conventions">
|
||||||
|
<p>
|
||||||
|
Branches are tagged in the following way:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>REL_1_5_BRANCH</li>
|
||||||
|
<li>REL_2_0_BRANCH</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Merge points should be tagged as follows:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>REL_1_5_BRANCH_MERGE1</li>
|
||||||
|
<li>REL_1_5_BRANCH_MERGE2</li>
|
||||||
|
<li>etc...</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Releases should be tagged as:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>REL_1_5</li>
|
||||||
|
<li>REL_1_5_1</li>
|
||||||
|
<li>REL_1_5_2</li>
|
||||||
|
<li>etc...</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<section title="Branching Advise">
|
||||||
|
<p>
|
||||||
|
Don't forget which branch you are currently on. This is critically
|
||||||
|
important. Committing stuff to the wrong branch causes all sorts of
|
||||||
|
headaches. Best to name your checkout after the branch you are on.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<section title="Who Manages Branching?">
|
||||||
|
<p>
|
||||||
|
All branching is currently managed by Glen Stampoultzis. If you wish
|
||||||
|
to create your own branch please let him know. Merging is also
|
||||||
|
handled by Glen. Just pop him a mail if you feel it's necessary to
|
||||||
|
create a branch or perform a merge.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The reason to go through a single point for branching is that it can be
|
||||||
|
an easy thing to get wrong. Having a single person managing branches
|
||||||
|
means there is less chance of getting getting our wires crossed with this
|
||||||
|
difficult area of CVS.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<section title="Currently Active Branches">
|
||||||
|
<p>
|
||||||
|
The following branches are currently active:
|
||||||
|
</p>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<b>Branch</b>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<b>Description</b>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
HEAD
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
This is the trunk and is always active. Currently it is being used to continue development
|
||||||
|
of the 2.0 release.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
REL_1_5_BRANCH
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
All bug fixes not specifically relevant to the 2.0 work should be placed in this branch.
|
||||||
|
From here they will merged back to the trunk and the merge point marked.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</document>
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<document>
|
<document>
|
||||||
<header>
|
<header>
|
||||||
<title></title>
|
<title>Project History</title>
|
||||||
<authors>
|
<authors>
|
||||||
<person id="AO" name="Andrew C. Oliver" email="acoliver@apache.org"/>
|
<person id="AO" name="Andrew C. Oliver" email="acoliver@apache.org"/>
|
||||||
</authors>
|
</authors>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<title></title>
|
<title></title>
|
||||||
<authors>
|
<authors>
|
||||||
<person id="AO" name="Andrew C. Oliver" email="acoliver@apache.org"/>
|
<person id="AO" name="Andrew C. Oliver" email="acoliver@apache.org"/>
|
||||||
|
<person id="GS" name="Glen Stampoultzis" email="glens@apache.org"/>
|
||||||
</authors>
|
</authors>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@ -103,6 +104,30 @@
|
|||||||
<img src="images/logoJanssen2.png"/>
|
<img src="images/logoJanssen2.png"/>
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
<section title="RaPi GmbH">
|
||||||
|
<p>
|
||||||
|
Contact Person: Fancy at: fancy at my-feiqi.com
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img src="images/logoRaPiGmbH1.png"/>
|
||||||
|
<img src="images/logoRaPiGmbH2.png"/>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img src="images/logoRaPiGmbH3.png"/>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img src="images/logoRaPiGmbH4.png"/>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img src="images/logoRaPiGmbH5.png"/>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img src="images/logoRaPiGmbH6.png"/>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<img src="images/logoRaPiGmbH7.png"/>
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
|
@ -452,8 +452,8 @@ public class RowRecord
|
|||||||
LittleEndian.putShort(data, 0 + offset, sid);
|
LittleEndian.putShort(data, 0 + offset, sid);
|
||||||
LittleEndian.putShort(data, 2 + offset, ( short ) 16);
|
LittleEndian.putShort(data, 2 + offset, ( short ) 16);
|
||||||
LittleEndian.putShort(data, 4 + offset, getRowNumber());
|
LittleEndian.putShort(data, 4 + offset, getRowNumber());
|
||||||
LittleEndian.putShort(data, 6 + offset, getFirstCol());
|
LittleEndian.putShort(data, 6 + offset, getFirstCol() == -1 ? (short)0 : getFirstCol());
|
||||||
LittleEndian.putShort(data, 8 + offset, getLastCol());
|
LittleEndian.putShort(data, 8 + offset, getLastCol() == -1 ? (short)0 : getLastCol());
|
||||||
LittleEndian.putShort(data, 10 + offset, getHeight());
|
LittleEndian.putShort(data, 10 + offset, getHeight());
|
||||||
LittleEndian.putShort(data, 12 + offset, getOptimize());
|
LittleEndian.putShort(data, 12 + offset, getOptimize());
|
||||||
LittleEndian.putShort(data, 14 + offset, field_6_reserved);
|
LittleEndian.putShort(data, 14 + offset, field_6_reserved);
|
||||||
|
@ -292,8 +292,8 @@ public class HSSFRow
|
|||||||
* get the hssfcell representing a given column (logical cell) 0-based. If you
|
* get the hssfcell representing a given column (logical cell) 0-based. If you
|
||||||
* ask for a cell that is not defined....you get a null.
|
* ask for a cell that is not defined....you get a null.
|
||||||
*
|
*
|
||||||
* @param cellnum - 0 based column number
|
* @param cellnum 0 based column number
|
||||||
* @returns HSSFCell representing that column or null if undefined.
|
* @return HSSFCell representing that column or null if undefined.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public HSSFCell getCell(short cellnum)
|
public HSSFCell getCell(short cellnum)
|
||||||
@ -441,7 +441,7 @@ public class HSSFRow
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns cell iterator of the physically defined cells. Note element 4 may
|
* @return cell iterator of the physically defined cells. Note element 4 may
|
||||||
* actually be row cell depending on how many are defined!
|
* actually be row cell depending on how many are defined!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* The Apache Software License, Version 1.1
|
* The Apache Software License, Version 1.1
|
||||||
*
|
*
|
||||||
@ -60,11 +59,14 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.poi.hssf.usermodel;
|
package org.apache.poi.hssf.usermodel;
|
||||||
|
|
||||||
import org.apache.poi.util.POILogFactory;
|
|
||||||
import org.apache.poi.hssf.model.Sheet;
|
import org.apache.poi.hssf.model.Sheet;
|
||||||
import org.apache.poi.hssf.model.Workbook;
|
import org.apache.poi.hssf.model.Workbook;
|
||||||
import org.apache.poi.hssf.record.*;
|
import org.apache.poi.hssf.record.CellValueRecordInterface;
|
||||||
|
import org.apache.poi.hssf.record.RowRecord;
|
||||||
|
import org.apache.poi.hssf.record.VCenterRecord;
|
||||||
|
import org.apache.poi.hssf.record.WSBoolRecord;
|
||||||
import org.apache.poi.hssf.util.Region;
|
import org.apache.poi.hssf.util.Region;
|
||||||
|
import org.apache.poi.util.POILogFactory;
|
||||||
import org.apache.poi.util.POILogger;
|
import org.apache.poi.util.POILogger;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -74,7 +76,7 @@ import java.util.TreeMap;
|
|||||||
* High level representation of a worksheet.
|
* High level representation of a worksheet.
|
||||||
* @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)
|
||||||
* @version 1.0-pre
|
* @author Libin Roman (romal at vistaportal.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class HSSFSheet
|
public class HSSFSheet
|
||||||
@ -132,11 +134,6 @@ public class HSSFSheet
|
|||||||
setPropertiesFromSheet(sheet);
|
setPropertiesFromSheet(sheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** private default constructor prevents bogus initializationless construction */
|
|
||||||
|
|
||||||
private HSSFSheet()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* used internally to set the properties given a Sheet object
|
* used internally to set the properties given a Sheet object
|
||||||
@ -236,7 +233,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
while (iter.hasNext())
|
while (iter.hasNext())
|
||||||
{
|
{
|
||||||
HSSFCell cell = ( HSSFCell ) iter.next();
|
HSSFCell cell = (HSSFCell) iter.next();
|
||||||
|
|
||||||
sheet.removeValueRecord(row.getRowNum(),
|
sheet.removeValueRecord(row.getRowNum(),
|
||||||
cell.getCellValueRecord());
|
cell.getCellValueRecord());
|
||||||
@ -254,7 +251,7 @@ public class HSSFSheet
|
|||||||
int rownum = lastrow - 1;
|
int rownum = lastrow - 1;
|
||||||
HSSFRow r = getRow(rownum);
|
HSSFRow r = getRow(rownum);
|
||||||
|
|
||||||
while (r == null)
|
while (r == null && rownum >= 0)
|
||||||
{
|
{
|
||||||
r = getRow(--rownum);
|
r = getRow(--rownum);
|
||||||
}
|
}
|
||||||
@ -270,10 +267,14 @@ public class HSSFSheet
|
|||||||
int rownum = firstrow + 1;
|
int rownum = firstrow + 1;
|
||||||
HSSFRow r = getRow(rownum);
|
HSSFRow r = getRow(rownum);
|
||||||
|
|
||||||
while (r == null)
|
while (r == null && rownum <= getLastRowNum())
|
||||||
{
|
{
|
||||||
r = getRow(++rownum);
|
r = getRow(++rownum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rownum > getLastRowNum())
|
||||||
|
return -1;
|
||||||
|
|
||||||
return rownum;
|
return rownum;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,8 +312,8 @@ public class HSSFSheet
|
|||||||
{
|
{
|
||||||
HSSFRow row = new HSSFRow();
|
HSSFRow row = new HSSFRow();
|
||||||
|
|
||||||
row.setRowNum(( short ) rownum);
|
row.setRowNum((short) rownum);
|
||||||
return ( HSSFRow ) rows.get(row);
|
return (HSSFRow) rows.get(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -344,26 +345,6 @@ public class HSSFSheet
|
|||||||
return lastrow;
|
return lastrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Seems to be unused (gjs)
|
|
||||||
*
|
|
||||||
* used internally to add cells from a high level row to the low level model
|
|
||||||
* @param row the row object to represent in low level RowRecord.
|
|
||||||
*/
|
|
||||||
private void addCellsFromRow(HSSFRow row)
|
|
||||||
{
|
|
||||||
Iterator iter = row.cellIterator();
|
|
||||||
|
|
||||||
// for (int k = 0; k < row.getPhysicalNumberOfCells(); k++)
|
|
||||||
while (iter.hasNext())
|
|
||||||
{
|
|
||||||
HSSFCell cell =
|
|
||||||
( HSSFCell ) iter.next(); // row.getPhysicalCellAt(k);
|
|
||||||
|
|
||||||
sheet.addValueRecord(row.getRowNum(), cell.getCellValueRecord());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set the width (in units of 1/256th of a character width)
|
* set the width (in units of 1/256th of a character width)
|
||||||
* @param column - the column to set (0-based)
|
* @param column - the column to set (0-based)
|
||||||
@ -400,7 +381,7 @@ public class HSSFSheet
|
|||||||
/**
|
/**
|
||||||
* get the default row height for the sheet (if the rows do not define their own height) in
|
* get the default row height for the sheet (if the rows do not define their own height) in
|
||||||
* twips (1/20 of a point)
|
* twips (1/20 of a point)
|
||||||
* @retun default row height
|
* @return default row height
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public short getDefaultRowHeight()
|
public short getDefaultRowHeight()
|
||||||
@ -449,7 +430,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public void setDefaultRowHeightInPoints(float height)
|
public void setDefaultRowHeightInPoints(float height)
|
||||||
{
|
{
|
||||||
sheet.setDefaultRowHeight(( short ) (height * 20));
|
sheet.setDefaultRowHeight((short) (height * 20));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -480,9 +461,9 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public int addMergedRegion(Region region)
|
public int addMergedRegion(Region region)
|
||||||
{
|
{
|
||||||
return sheet.addMergedRegion(( short ) region.getRowFrom(),
|
return sheet.addMergedRegion((short) region.getRowFrom(),
|
||||||
region.getColumnFrom(),
|
region.getColumnFrom(),
|
||||||
( short ) region.getRowTo(),
|
(short) region.getRowTo(),
|
||||||
region.getColumnTo());
|
region.getColumnTo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -494,7 +475,7 @@ public class HSSFSheet
|
|||||||
public void setVerticallyCenter(boolean value)
|
public void setVerticallyCenter(boolean value)
|
||||||
{
|
{
|
||||||
VCenterRecord record =
|
VCenterRecord record =
|
||||||
( VCenterRecord ) sheet.findFirstRecordBySid(VCenterRecord.sid);
|
(VCenterRecord) sheet.findFirstRecordBySid(VCenterRecord.sid);
|
||||||
|
|
||||||
record.setVCenter(value);
|
record.setVCenter(value);
|
||||||
}
|
}
|
||||||
@ -506,7 +487,7 @@ public class HSSFSheet
|
|||||||
public boolean getVerticallyCenter(boolean value)
|
public boolean getVerticallyCenter(boolean value)
|
||||||
{
|
{
|
||||||
VCenterRecord record =
|
VCenterRecord record =
|
||||||
( VCenterRecord ) sheet.findFirstRecordBySid(VCenterRecord.sid);
|
(VCenterRecord) sheet.findFirstRecordBySid(VCenterRecord.sid);
|
||||||
|
|
||||||
return record.getVCenter();
|
return record.getVCenter();
|
||||||
}
|
}
|
||||||
@ -543,7 +524,7 @@ public class HSSFSheet
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns an iterator of the PHYSICAL rows. Meaning the 3rd element may not
|
* @return an iterator of the PHYSICAL rows. Meaning the 3rd element may not
|
||||||
* be the third row if say for instance the second row is undefined.
|
* be the third row if say for instance the second row is undefined.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -571,7 +552,7 @@ public class HSSFSheet
|
|||||||
public void setAlternativeExpression(boolean b)
|
public void setAlternativeExpression(boolean b)
|
||||||
{
|
{
|
||||||
WSBoolRecord record =
|
WSBoolRecord record =
|
||||||
( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
(WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
||||||
|
|
||||||
record.setAlternateExpression(b);
|
record.setAlternateExpression(b);
|
||||||
}
|
}
|
||||||
@ -584,7 +565,7 @@ public class HSSFSheet
|
|||||||
public void setAlternativeFormula(boolean b)
|
public void setAlternativeFormula(boolean b)
|
||||||
{
|
{
|
||||||
WSBoolRecord record =
|
WSBoolRecord record =
|
||||||
( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
(WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
||||||
|
|
||||||
record.setAlternateFormula(b);
|
record.setAlternateFormula(b);
|
||||||
}
|
}
|
||||||
@ -597,7 +578,7 @@ public class HSSFSheet
|
|||||||
public void setAutobreaks(boolean b)
|
public void setAutobreaks(boolean b)
|
||||||
{
|
{
|
||||||
WSBoolRecord record =
|
WSBoolRecord record =
|
||||||
( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
(WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
||||||
|
|
||||||
record.setAutobreaks(b);
|
record.setAutobreaks(b);
|
||||||
}
|
}
|
||||||
@ -610,7 +591,7 @@ public class HSSFSheet
|
|||||||
public void setDialog(boolean b)
|
public void setDialog(boolean b)
|
||||||
{
|
{
|
||||||
WSBoolRecord record =
|
WSBoolRecord record =
|
||||||
( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
(WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
||||||
|
|
||||||
record.setDialog(b);
|
record.setDialog(b);
|
||||||
}
|
}
|
||||||
@ -624,7 +605,7 @@ public class HSSFSheet
|
|||||||
public void setDisplayGuts(boolean b)
|
public void setDisplayGuts(boolean b)
|
||||||
{
|
{
|
||||||
WSBoolRecord record =
|
WSBoolRecord record =
|
||||||
( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
(WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
||||||
|
|
||||||
record.setDisplayGuts(b);
|
record.setDisplayGuts(b);
|
||||||
}
|
}
|
||||||
@ -637,7 +618,7 @@ public class HSSFSheet
|
|||||||
public void setFitToPage(boolean b)
|
public void setFitToPage(boolean b)
|
||||||
{
|
{
|
||||||
WSBoolRecord record =
|
WSBoolRecord record =
|
||||||
( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
(WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
||||||
|
|
||||||
record.setFitToPage(b);
|
record.setFitToPage(b);
|
||||||
}
|
}
|
||||||
@ -650,7 +631,7 @@ public class HSSFSheet
|
|||||||
public void setRowSumsBelow(boolean b)
|
public void setRowSumsBelow(boolean b)
|
||||||
{
|
{
|
||||||
WSBoolRecord record =
|
WSBoolRecord record =
|
||||||
( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
(WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
||||||
|
|
||||||
record.setRowSumsBelow(b);
|
record.setRowSumsBelow(b);
|
||||||
}
|
}
|
||||||
@ -663,7 +644,7 @@ public class HSSFSheet
|
|||||||
public void setRowSumsRight(boolean b)
|
public void setRowSumsRight(boolean b)
|
||||||
{
|
{
|
||||||
WSBoolRecord record =
|
WSBoolRecord record =
|
||||||
( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
(WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);
|
||||||
|
|
||||||
record.setRowSumsRight(b);
|
record.setRowSumsRight(b);
|
||||||
}
|
}
|
||||||
@ -675,7 +656,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public boolean getAlternateExpression()
|
public boolean getAlternateExpression()
|
||||||
{
|
{
|
||||||
return (( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
return ((WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
||||||
.getAlternateExpression();
|
.getAlternateExpression();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,7 +667,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public boolean getAlternateFormula()
|
public boolean getAlternateFormula()
|
||||||
{
|
{
|
||||||
return (( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
return ((WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
||||||
.getAlternateFormula();
|
.getAlternateFormula();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,7 +678,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public boolean getAutobreaks()
|
public boolean getAutobreaks()
|
||||||
{
|
{
|
||||||
return (( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
return ((WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
||||||
.getAutobreaks();
|
.getAutobreaks();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -708,7 +689,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public boolean getDialog()
|
public boolean getDialog()
|
||||||
{
|
{
|
||||||
return (( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
return ((WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
||||||
.getDialog();
|
.getDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -720,7 +701,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public boolean getDisplayGuts()
|
public boolean getDisplayGuts()
|
||||||
{
|
{
|
||||||
return (( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
return ((WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
||||||
.getDisplayGuts();
|
.getDisplayGuts();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -731,7 +712,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public boolean getFitToPage()
|
public boolean getFitToPage()
|
||||||
{
|
{
|
||||||
return (( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
return ((WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
||||||
.getFitToPage();
|
.getFitToPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,7 +723,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public boolean getRowSumsBelow()
|
public boolean getRowSumsBelow()
|
||||||
{
|
{
|
||||||
return (( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
return ((WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
||||||
.getRowSumsBelow();
|
.getRowSumsBelow();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -753,7 +734,7 @@ public class HSSFSheet
|
|||||||
|
|
||||||
public boolean getRowSumsRight()
|
public boolean getRowSumsRight()
|
||||||
{
|
{
|
||||||
return (( WSBoolRecord ) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
return ((WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid))
|
||||||
.getRowSumsRight();
|
.getRowSumsRight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,5 +115,11 @@ public class TestHSSFRow
|
|||||||
assertEquals(-1, row.getLastCellNum());
|
assertEquals(-1, row.getLastCellNum());
|
||||||
assertEquals(-1, row.getFirstCellNum());
|
assertEquals(-1, row.getFirstCellNum());
|
||||||
|
|
||||||
|
// check the row record actually writes it out as 0's
|
||||||
|
byte[] data = new byte[100];
|
||||||
|
row.getRowRecord().serialize(0, data);
|
||||||
|
assertEquals(0, data[6]);
|
||||||
|
assertEquals(0, data[8]);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,6 @@ import junit.framework.TestCase;
|
|||||||
import org.apache.poi.hssf.model.Sheet;
|
import org.apache.poi.hssf.model.Sheet;
|
||||||
import org.apache.poi.hssf.record.VCenterRecord;
|
import org.apache.poi.hssf.record.VCenterRecord;
|
||||||
import org.apache.poi.hssf.record.WSBoolRecord;
|
import org.apache.poi.hssf.record.WSBoolRecord;
|
||||||
import org.apache.poi.hssf.dev.BiffViewer;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
@ -190,7 +189,14 @@ public class TestHSSFSheet
|
|||||||
tempFile.delete();
|
tempFile.delete();
|
||||||
assertNotNull(row);
|
assertNotNull(row);
|
||||||
assertEquals(2, row.getPhysicalNumberOfCells());
|
assertEquals(2, row.getPhysicalNumberOfCells());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testRemoveRow()
|
||||||
|
{
|
||||||
|
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||||
|
HSSFSheet sheet = workbook.createSheet("Test boolean");
|
||||||
|
HSSFRow row = sheet.createRow((short) 2);
|
||||||
|
sheet.removeRow(row);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|