org.ttzero.excel.entity.e3.MulBlankParser Maven / Gradle / Ivy
/*
* Copyright (c) 2019-2020, [email protected] All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ttzero.excel.entity.e3;
/**
* 5.68 MULBLANK – Multiple BLANK
*
* This record represents a cell range of empty cells.
* All cells are located in the same row.
*
* @author guanquan.wang at 2019-04-18 22:44
*/
public class MulBlankParser {
public static void get(Block block, MulBlank mulBlank) {
short size = block.nextShort();
// Index to row
mulBlank.row = block.nextUnsignedShort();
// Index to first column (fc)
mulBlank.fc = block.nextShort();
// List of nc=lc-fc+1 16-bit indexes to XF records (➜5.115)
int nc = (size >> 1) - 3;
short[] xf = new short[nc];
for (int i = 0; i < nc; i++) {
xf[i] = block.nextShort();
}
mulBlank.xf = xf;
// Index to last column (lc)
mulBlank.lc = block.nextShort();
}
public static short getId() {
return ParserIdentifier.MULBLANK;
}
}