int b3 = (v >>> 24) & 0xFF;
int b2 = (v >>> 16) & 0xFF;
int b1 = (v >>> 8) & 0xFF;
- int b0 = (v >>> 0) & 0xFF;
+ int b0 = (v/* >>> 0*/) & 0xFF;
try {
out.write(b0);
out.write(b1);
@Override
public void writeLong(long v) {
- writeInt((int)(v >> 0));
+ writeInt((int)(v/* >> 0*/));
writeInt((int)(v >> 32));
}
@Override
public void writeShort(int v) {
int b1 = (v >>> 8) & 0xFF;
- int b0 = (v >>> 0) & 0xFF;
+ int b0 = (v/* >>> 0*/) & 0xFF;
try {
out.write(b0);
out.write(b1);
/**
* cached instance of XSSFCreationHelper for this workbook
- * @see {@link #getCreationHelper()}
+ * @see #getCreationHelper()
*/
private XSSFCreationHelper _creationHelper;
// Load individual sheets. The order of sheets is defined by the order
// of CTSheet elements in the workbook
sheets = new ArrayList<XSSFSheet>(shIdMap.size());
+ //noinspection deprecation
for (CTSheet ctSheet : this.workbook.getSheets().getSheetArray()) {
parseSheet(shIdMap, ctSheet);
}
// copy sheet's relations
List<RelationPart> rels = srcSheet.getRelationParts();
- // if the sheet being cloned has a drawing then rememebr it and re-create it too
+ // if the sheet being cloned has a drawing then remember it and re-create it too
XSSFDrawing dg = null;
for(RelationPart rp : rels) {
POIXMLDocumentPart r = rp.getDocumentPart();
clonedSheet.setSelected(false);
- // clone the sheet drawing alongs with its relationships
+ // clone the sheet drawing along with its relationships
if (dg != null) {
if(ct.isSetDrawing()) {
// unset the existing reference to the drawing,
newcts.set(cts);
//notify sheets
+ //noinspection deprecation
CTSheet[] sheetArray = ct.getSheetArray();
for(int i=0; i < sheetArray.length; i++) {
sheets.get(i).sheet = sheetArray[i];
* @return true if the sheet contains the name, false otherwise.
*/
private boolean containsSheet(String name, int excludeSheetIdx) {
+ //noinspection deprecation
CTSheet[] ctSheetArray = workbook.getSheets().getSheetArray();
if (name.length() > MAX_SENSITIVE_SHEET_NAME_LEN) {
* Adds a vbaProject.bin file to the workbook. This will change the workbook
* type if necessary.
*
- * @throws IOException
+ * @throws IOException If copying data from the stream fails.
*/
public void setVBAProject(InputStream vbaProjectStream) throws IOException {
if (!isMacroEnabled()) {
/**
* Adds a vbaProject.bin file taken from another, given workbook to this one.
- * @throws IOException
- * @throws InvalidFormatException
+ * @throws IOException If copying the VBAProject stream fails.
+ * @throws InvalidFormatException If an error occurs while handling parts of the XSSF format
*/
public void setVBAProject(XSSFWorkbook macroWorkbook) throws IOException, InvalidFormatException {
if (!macroWorkbook.isMacroEnabled()) {