fix: замечания ревью — crash-гарды моста и сверка цитат MS-DOC
- CfbReader: цепочка FAT — сектор за sectorTotal → ConversionException «за концом FAT» (раньше FAT[>127] уходил за массив: ArrayIndexOutOfBounds на битом CFB) - FibHeader: cbRgFcLcb — u16 по §2.5.1 (читался u32 → AIOOBE на FIB длиной 154 байта); csw/cslw MUST — цитата §2.5.1 Fib - PieceTable: aCP[0] < 0 и endCp <= startCp → ConversionException (отрицательный aCP читал бы WordDocument до начала; отрицательный span ронял new String) - Таблица nFib→cbRgFcLcb — ссыка на [MS-OSHARED] §2.1.1 Table 2 - Цитаты секций MS-DOC по ToC ms-doc-full.md: CSSAOperand §2.9.46, SHDOperand §2.9.249 (Shd §2.9.247, Ipat §2.9.121, Shd80 §2.9.248), Ico §2.9.119, SttbfFfn §2.9.286, Brc/BrcType §2.9.16/.22, PapxFkp §2.9.174 — в Grpprl/Tables/Sections/FibHeader, тестах моста, doc-bridge.md - Регрессы: FibHeaderTest#blobEndAtBoundary_rejectedNotCrash, PieceTableTest#negativeStartCp_rejected, CfbReaderTest пин «за концом FAT»
This commit is contained in:
@@ -66,7 +66,8 @@ public final class DocxRewritePipeline {
|
||||
// Ширина полосы набора для правила 7 (таблицы в header/footer-
|
||||
// частях своей sectPr не содержат): из сырого document.xml —
|
||||
// геометрия инвариантна к рерайтам цепочки (Strict не трогает
|
||||
// w:pgSz/@w:w, а pgMar-чередование left|start покрывает strict).
|
||||
// w:pgSz/@w:w; у strict CT_PageMar start/end нет вовсе —
|
||||
// только left/right).
|
||||
// Записи нет/несколько секций → −1, header/footer консервативно
|
||||
// пропускаются (та же неоднозначность полосы, что для body).
|
||||
int band = -1;
|
||||
|
||||
@@ -39,8 +39,13 @@ import org.apache.commons.compress.utils.SeekableInMemoryByteChannel;
|
||||
* правило 2 к моменту запуска уже привело on/off к true/false, но обе формы
|
||||
* принимаются) либо {@code w:rStyle} ссылается на стиль с vanish — по
|
||||
* цепочке {@code w:basedOn} (капа 16, цикл — обрыв; тот же приём, что
|
||||
* {@code internal/doc/Styles}). Прямой vanish ранa перекрывает стилевой;
|
||||
* вложенные раны ({@code w:rubyBase}/{@code w:rt}, текстовые боксы)
|
||||
* {@code internal/doc/Styles}). Прямой vanish ранa перекрывает стилевой
|
||||
* (§17.7.3: в конфликте toggle выигрывает direct formatting); принятое
|
||||
* упрощение стилевого слоя — явный falsy {@code w:val} <b>у стиля</b>
|
||||
* (vanish=false поверх vanish-предка по {@code w:basedOn}) не
|
||||
* разворачивается: стиль с {@code w:vanish} делает раны скрытыми
|
||||
* независимо от {@code w:val}; вложенные раны
|
||||
* ({@code w:rubyBase}/{@code w:rt}, текстовые боксы)
|
||||
* оцениваются независимо, но ран внутри уже удалённого внешнего не
|
||||
* вырезается повторно (диапазоны сливаются при сборке).
|
||||
*
|
||||
|
||||
@@ -14,9 +14,9 @@ import java.util.zip.ZipOutputStream;
|
||||
* Свёртка {@code w:tblPr/w:jc} (center/right) с ненулевым {@code w:tblInd} в
|
||||
* абсолютный {@code w:tblInd} — до загрузки docx4j.
|
||||
*
|
||||
* Word (MS-OI29500 §2.1.155; Part 1 §17.4.50 {@code w:jc} описывает без
|
||||
* аддитивной семантики — «сдвиг от поля после центрирования/прижимания»
|
||||
* есть измеренное поведение Word): при {@code w:jc}≠left
|
||||
* Word (MS-OI29500 §2.1.155; Part 1 §17.4.28 {@code w:jc} + §17.4.50
|
||||
* {@code w:tblInd} описывают без аддитивной семантики — «сдвиг от поля после
|
||||
* центрирования/прижимания» есть измеренное поведение Word): при {@code w:jc}≠left
|
||||
* таблица центрируется/прижимается, а {@code w:tblInd} добавляется сдвигом от
|
||||
* поля. docx4j же при {@code w:jc}≠left {@code w:tblInd} игнорирует буквально
|
||||
* (аудит раскладки ECMA-376, матрица B3) — таблица рендерилась без учёта
|
||||
@@ -38,7 +38,7 @@ import java.util.zip.ZipOutputStream;
|
||||
* {@code w:tblPr} с {@code w:tblCellSpacing} без {@code w:tblInd} (вставить
|
||||
* тег в корректную позицию CT_TblPrBase некуда). Дефолты при отсутствии
|
||||
* pgSz/pgMar — 11906 и 1440/1440: ECMA дефолтов {@code w:pgSz}/{@code w:pgMar}
|
||||
* не фиксирует (§17.6.11/§17.6.13), а 11906/1440 — измеренное поведение
|
||||
* не фиксирует (§17.6.13/§17.6.11), а 11906/1440 — измеренное поведение
|
||||
* docx4j при отсутствующем {@code w:pgMar} (левый край текста = 72pt =
|
||||
* 1440 twips) — нормализатор обязан считать ту же полосу, что рендерит стек.
|
||||
* Band берётся из сырого {@code word/document.xml}: геометрия инвариантна
|
||||
@@ -191,13 +191,18 @@ final class TableIndentNormalizer {
|
||||
if (hasInd) {
|
||||
String indTag = ind.group();
|
||||
Matcher indW = TBL_IND_W.matcher(indTag);
|
||||
// CT_SignedTwipsMeasure: опущенный w:type = dxa (§17.4.87);
|
||||
// CT_TblWidth (§17.4.87): опущенный w:type = dxa;
|
||||
// явный не-dxa (pct и т.п.) — величина сдвига неизвестна
|
||||
boolean nonDxa = indTag.contains("w:type=") && !indTag.contains("w:type=\"dxa\"");
|
||||
if (!indW.find() || nonDxa) {
|
||||
continue;
|
||||
}
|
||||
x = Integer.parseInt(indW.group(1));
|
||||
} else if (pr.contains("<w:tblInd")) {
|
||||
// парный (не самозакрывающийся) w:tblInd — паттерн видит
|
||||
// только самозакрытый; вставка нового тега оставила бы старый
|
||||
// → дубль элемента (maxOccurs=1 у CT_TblPrBase), консервативно
|
||||
continue;
|
||||
} else if (pr.contains("<w:tblCellSpacing")) {
|
||||
// tblInd по CT_TblPrBase идёт ПОСЛЕ tblCellSpacing — вставить
|
||||
// тег в корректную позицию некуда, консервативно пропускаем
|
||||
|
||||
@@ -272,7 +272,10 @@ final class CfbReader {
|
||||
if (sectors.size() > limit) {
|
||||
throw new ConversionException("Циклическая " + what + " в .doc");
|
||||
}
|
||||
if (sect >= fat.length) {
|
||||
if (sect >= fat.length || sect >= sectorTotal) {
|
||||
// sectorTotal: sectorOffset=(sector+1)*sectorSize обязан
|
||||
// остаться положительным int — сектор «за файлом» дал бы
|
||||
// оффлоу и обход проверок base+n>cfb.length
|
||||
throw new ConversionException("Сектор за концом FAT в .doc: " + what);
|
||||
}
|
||||
sectors.add((int) sect);
|
||||
@@ -345,7 +348,11 @@ final class CfbReader {
|
||||
}
|
||||
|
||||
private static int sectorOffset(int sector, int sectorSize) {
|
||||
return (sector + 1) * sectorSize;
|
||||
long off = (long) (sector + 1) * sectorSize;
|
||||
if (off > Integer.MAX_VALUE) {
|
||||
throw new ConversionException("Сектор за концом файла в .doc");
|
||||
}
|
||||
return (int) off;
|
||||
}
|
||||
|
||||
private static void requireInFile(int offset, int len, int fileLen, String what) {
|
||||
|
||||
@@ -58,7 +58,8 @@ final class ChpxIndex {
|
||||
if (bx != 0) {
|
||||
int chpxOff = (int) pageOff + bx * 2;
|
||||
int cb = wordDocument[chpxOff] & 0xFF;
|
||||
// cb=0 (§2.9.33 Chpx) — «there is no Chpx»: диапазон без
|
||||
// cb=0 (§2.9.32 Chpx — пустой grpx; ср. rgb[i]=0 в
|
||||
// §2.9.33 «there is no Chpx associated»): диапазон без
|
||||
// прямых свойств, но валидный — заносим с пустым grpprl
|
||||
if (cb > 0) {
|
||||
if (chpxOff + 1 + cb > pageOff + FKP_PAGE_SIZE) {
|
||||
|
||||
@@ -8,8 +8,9 @@ import ru.pjandro.wordpdf.ConversionException;
|
||||
* <p>По [MS-DOC] §2.5: Fib = FibBase (32) + csw + FibRgW97 + cslw + FibRgLw97
|
||||
* + cbRgFcLcb + FibRgFcLcbBlob (§2.5.1). Читаются только нужные поля;
|
||||
* порядок и смещения — §2.5.15 «How to read the FIB», побайтовые примеры —
|
||||
* §3 (Figure 22/30). cbRgFcLcb: 0x0101 = 136 пар (Word 2002), 0x010C = 164
|
||||
* (Word 2003) — сверяется при чтении; нужные
|
||||
* §3 (Figure 22/30). cbRgFcLcb — один из по таблице nFib (§2.5.1):
|
||||
* 0x00C1→0x005D (88 пар, Word 97), 0x0101→0x0088 (136, Word 2002),
|
||||
* 0x010C→0x00A4 (164, Word 2003) — сверяется при чтении; нужные
|
||||
* пары стоят на фиксированных индексах.</p>
|
||||
*/
|
||||
final class FibHeader {
|
||||
@@ -30,7 +31,7 @@ final class FibHeader {
|
||||
/** Значение бита флага «включён» (§2.5.2, grpprl FIB). */
|
||||
private static final int BIT_ON = 1;
|
||||
|
||||
/** MUST-значения счётчиков (§2.5.2/§2.5.4, Word 97+): csw=14 коротких, cslw=22 длинных. */
|
||||
/** MUST-значения счётчиков (§2.5.1 Fib, Word 97+): csw=14 коротких, cslw=22 длинных. */
|
||||
private static final int C_SW = 0x000E;
|
||||
private static final int C_SLW = 0x0016;
|
||||
|
||||
@@ -94,8 +95,8 @@ final class FibHeader {
|
||||
throw new ConversionException("Документ зашифрован (пароль на открытие) — конвертация невозможна");
|
||||
}
|
||||
use1Table = ((flags >> BIT_F_WHICH_TBL_STM) & BIT_ON) == BIT_ON;
|
||||
// §2.5.2: csw «MUST be set to 0x000E», §2.5.4: cslw «MUST be set to
|
||||
// 0x0016» — фиксированный layout FibRgW97/FibRgLw97, любое другое
|
||||
// §2.5.1 Fib: csw «MUST be 0x000E», cslw «MUST be 0x0016» —
|
||||
// фиксированный layout FibRgW97/FibRgLw97, любое другое
|
||||
// значение = чужая версия FIB, чтение по константным смещениям дало
|
||||
// бы мусор
|
||||
int csw = (int) CfbReader.u32(wd, OFF_CSW) & 0xFFFF;
|
||||
@@ -110,7 +111,7 @@ final class FibHeader {
|
||||
if (ccpText < 0) {
|
||||
throw new ConversionException("Отрицательная длина текста в .doc");
|
||||
}
|
||||
int cbRgFcLcb = (int) CfbReader.u32(wd, OFF_CB_RG_FC_LCB) & 0xFFFF;
|
||||
int cbRgFcLcb = CfbReader.u16(wd, OFF_CB_RG_FC_LCB);
|
||||
if (cbRgFcLcb <= PAIR_CLX) {
|
||||
throw new ConversionException("Устаревшая структура FIB в .doc");
|
||||
}
|
||||
@@ -153,9 +154,9 @@ final class FibHeader {
|
||||
|
||||
/**
|
||||
* Пара (fc,lcb) с индексом {@code index} в FibRgFcLcbBlob. Индекс за
|
||||
* объявленным числом пар (§2.5.1 cbRgFcLcb — «MUST be set to 0x005D»
|
||||
* только для Word 2003+; старые FIB короче) — поле отсутствует:
|
||||
* fc=0/lcb=0, потребитель трактует как «нет структуры».
|
||||
* объявленным числом пар (§2.5.1: cbRgFcLcb «MUST be one of» —
|
||||
* 0x005D при nFib=0x00C1 … 0x00B7 при 0x0112; старые FIB короче) — поле
|
||||
* отсутствует: fc=0/lcb=0, потребитель трактует как «нет структуры».
|
||||
*/
|
||||
private static long[] pair(byte[] wd, int index, int pairCount) {
|
||||
if (index >= pairCount) {
|
||||
|
||||
@@ -207,7 +207,7 @@ final class Grpprl {
|
||||
static final int SPRM_T_CELL_PADDING_DEFAULT = 0xD634;
|
||||
/**
|
||||
* sprmTInsert (§2.6.3): вставка определений ячеек ряда — пропускается
|
||||
* правилом spra=3 (4 байта: itcFirst(1)+ctc(1)+dxaCol(2 XAS), §2.9.322;
|
||||
* правилом spra=3 (4 байта: itcFirst(1)+ctc(1)+dxaCol(2 XAS), §2.9.324;
|
||||
* ECMA-376 Part 4 описывал прежнюю форму rgttte ctc×6 байт, но [MS-DOC]
|
||||
* и реальные файлы Word сходятся на 4 байтах: в TAP образцов
|
||||
* ru-table-image.doc/ru-en-mixed.doc following-sprm выравниваются ровно
|
||||
@@ -245,8 +245,8 @@ final class Grpprl {
|
||||
/** sprmSDxaColumns (§2.6.4, XAS_nonNeg): зазор между колонками при evenly-spaced. */
|
||||
static final int SPRM_S_DXA_COLUMNS = 0x900C;
|
||||
/**
|
||||
* sprmSDxaColWidth/sprmSDxaColSpacing (§2.6.4, SDxaColWidthOperand /
|
||||
* SDxaColSpacingOperand §2.9.241/.242: iCol(1)+dxaCol(2)) — ширина
|
||||
* sprmSDxaColWidth/sprmSDxaColSpacing (§2.6.4, SDxaColWidthOperand
|
||||
* §2.9.242 / SDxaColSpacingOperand §2.9.241: iCol(1)+dxaCol(2)) — ширина
|
||||
* колонки iCol / зазор ПОСЛЕ колонки iCol при неравных колонках.
|
||||
*/
|
||||
static final int SPRM_S_DXA_COL_WIDTH = 0xF203;
|
||||
|
||||
@@ -195,8 +195,9 @@ final class OfficeArt {
|
||||
// бросает OutOfMemoryError (Error, не ловится catch ниже). Отказ по
|
||||
// площади — та же семантика «битый → объект пропущен»; порог
|
||||
// приходит параметром (WordPdfValidator.maxImagePixels).
|
||||
long area = (long) Math.abs((int) CfbReader.u32(data, off + 4))
|
||||
* Math.abs((int) CfbReader.u32(data, off + 8));
|
||||
// abs в long: Math.abs(Integer.MIN_VALUE) отрицателен и обходил бы guard
|
||||
long area = Math.abs((long) (int) CfbReader.u32(data, off + 4))
|
||||
* Math.abs((long) (int) CfbReader.u32(data, off + 8));
|
||||
if (area > maxPixels) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -97,11 +97,13 @@ final class PieceTable {
|
||||
compressed = new boolean[n];
|
||||
for (int i = 0; i <= n; i++) {
|
||||
aCp[i] = (int) CfbReader.u32(tableStream, plcStart + i * 4);
|
||||
// §2.9.178: «no value can be greater than the value that follows
|
||||
// it… Duplicate values MUST NOT be present» — строгое
|
||||
// возрастание, дубль = пустой/битый кусок
|
||||
if (i > 0 && aCp[i] <= aCp[i - 1]) {
|
||||
throw new ConversionException("Невозрастающие aCP в PlcPcd .doc");
|
||||
// §2.8.35 PlcPcd: «All CPs MUST be greater than or equal to
|
||||
// zero», «aCP MUST be sorted in ascending order and MUST NOT
|
||||
// contain duplicate CPs» — дубль/отрицательный CP = битый кусок;
|
||||
// отрицательный aCP[0] сдвигал бы delta и читал бы до начала
|
||||
// WordDocument-потока
|
||||
if (aCp[0] < 0 || (i > 0 && aCp[i] <= aCp[i - 1])) {
|
||||
throw new ConversionException("Битые aCP в PlcPcd .doc");
|
||||
}
|
||||
}
|
||||
int pcdBase = plcStart + (n + 1) * 4;
|
||||
|
||||
@@ -160,7 +160,7 @@ final class Sections {
|
||||
/** iCol(1) + dxaCol(2) — минимальная длина SDxaColWidth/Spacing-операнда. */
|
||||
private static final int COL_OPERAND_LEN = 3;
|
||||
|
||||
/** SDxaColWidthOperand/SDxaColSpacingOperand: iCol(1)+dxaCol(2), §2.9.241/.242. */
|
||||
/** SDxaColSpacingOperand/SDxaColWidthOperand: iCol(1)+dxaCol(2), §2.9.241/.242. */
|
||||
private void applyCol(int sprm, byte[] buf, int off, int len) {
|
||||
if (len < COL_OPERAND_LEN) {
|
||||
return;
|
||||
|
||||
@@ -1023,7 +1023,7 @@ class WordPdfConverterTest {
|
||||
|
||||
/**
|
||||
* w:suff="space": Word пишет после номера обычный пробел (Part 1
|
||||
* §17.3.1.28), docx4j разделитель не эмитит вовсе (дамп n4.fo).
|
||||
* §17.9.28), docx4j разделитель не эмитит вовсе (дамп n4.fo).
|
||||
* NumberingSuffixNormalizer дописывает пробел в lvlText; FOP отдаёт
|
||||
* лейбл отдельными TextPosition («1», «.», « »), поэтому проверка — по
|
||||
* склеенной последовательности TP (без нормализатора было бы «1.ITEM»:
|
||||
@@ -1547,8 +1547,8 @@ class WordPdfConverterTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, 14); // ccpText
|
||||
put32(wd, 80, 0); // ccpFtn
|
||||
@@ -1602,8 +1602,8 @@ class WordPdfConverterTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, 2); // ccpText
|
||||
put32(wd, 80, 0); // ccpFtn
|
||||
@@ -1700,8 +1700,8 @@ class WordPdfConverterTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -1804,8 +1804,8 @@ class WordPdfConverterTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -1857,8 +1857,8 @@ class WordPdfConverterTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -1930,7 +1930,7 @@ class WordPdfConverterTest {
|
||||
System.arraycopy(grpprl, 0, wd, at + 3, grpprl.length);
|
||||
}
|
||||
|
||||
/** SttbfFfn (§2.9.147): одно семейство на ftc0=0. */
|
||||
/** SttbfFfn (§2.9.286): одно семейство на ftc0=0. */
|
||||
private static byte[] sttbfFfn(String family) {
|
||||
byte[] fam = (family + "\0").getBytes(StandardCharsets.UTF_16LE);
|
||||
byte[] t = new byte[4 + 1 + 39 + fam.length];
|
||||
@@ -2114,8 +2114,8 @@ class WordPdfConverterTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -2185,8 +2185,8 @@ class WordPdfConverterTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, 2); // ccpText
|
||||
put32(wd, 80, 0); // ccpFtn
|
||||
@@ -2353,7 +2353,7 @@ class WordPdfConverterTest {
|
||||
* Скрытый текст не выводится: правило 9 (HiddenTextNormalizer) вырезает
|
||||
* раны с прямым truthy vanish и с rStyle на vanish-стиль; falsy vanish
|
||||
* остаётся. Word при печати/PDF-export скрытое не печатает.
|
||||
* Регрессия — аудит ECMA-376 2026-11 (Part 1 §17.3.2.30).
|
||||
* Регрессия — аудит ECMA-376 2026-11 (Part 1 §17.3.2.41).
|
||||
*/
|
||||
@Test
|
||||
void hiddenText_notPrinted() throws IOException {
|
||||
@@ -2416,7 +2416,7 @@ class WordPdfConverterTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@code w:bdo}/{@code w:dir} (§17.3.2.4/.7): текст печатается
|
||||
* {@code w:bdo}/{@code w:dir} (§17.3.2.3/§17.3.2.8): текст печатается
|
||||
* (AUDIT-FIX-2 в вендорном XSLT, до патча ловил catch-all);
|
||||
* bidi-направление — принятая деградация.
|
||||
*/
|
||||
@@ -2431,7 +2431,8 @@ class WordPdfConverterTest {
|
||||
|
||||
/**
|
||||
* Текст перемещённых правок ({@code w:moveFrom}/{@code w:moveTo},
|
||||
* §17.13.5.15/.17) печатается (AUDIT-FIX-2): до патча терялся целиком.
|
||||
* §17.13.5.21–.22/§17.13.5.25–.26) печатается (AUDIT-FIX-2): до патча
|
||||
* терялся целиком.
|
||||
*/
|
||||
@Test
|
||||
void movedRevision_textPrinted() throws IOException {
|
||||
@@ -2750,8 +2751,8 @@ class WordPdfConverterTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, 14); // ccpText
|
||||
put32(wd, 80, 0); // ccpFtn
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
/**
|
||||
* Юниты {@link HiddenTextNormalizer}: вырезание ранов с truthy
|
||||
* {@code w:vanish} (прямой и стилевой по цепочке {@code w:basedOn},
|
||||
* Part 1 §17.3.2.30 / §17.18.69).
|
||||
* Part 1 §17.3.2.41; ST_OnOff §22.9.2.7).
|
||||
*/
|
||||
class HiddenTextNormalizerTest {
|
||||
|
||||
|
||||
+1
-1
@@ -263,7 +263,7 @@ class StrictOoxmlNormalizerTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* w:pgNumType/@w:start — старт нумерации страниц (Part 1 §17.13.7),
|
||||
* w:pgNumType/@w:start — старт нумерации страниц (Part 1 §17.6.12),
|
||||
* одинаков в strict и transitional — атрибутому renaming не подлежит
|
||||
* (раньше превращался в w:left, и сброс нумерации терялся — регрессия
|
||||
* WordPdfConverterTest#docClassD_pageNumberRestartLowerRoman).
|
||||
|
||||
@@ -52,6 +52,15 @@ class TableIndentNormalizerTest {
|
||||
assertFalse(fixed.contains("<w:jc"), "jc удалён: " + fixed);
|
||||
}
|
||||
|
||||
/** Парный (не самозакрывающийся) tblInd — свёртка пропускается целиком. */
|
||||
@Test
|
||||
void pairedIndent_foldSkipped() {
|
||||
String xml = doc(table("<w:jc w:val=\"center\"/>"
|
||||
+ "<w:tblInd w:w=\"720\" w:type=\"dxa\"></w:tblInd>", GRID_6000));
|
||||
assertNull(TableIndentNormalizer.rewrite(xml),
|
||||
"парный tblInd: вставка дала бы дубль (maxOccurs=1) — не трогаем");
|
||||
}
|
||||
|
||||
/** tblInd без w:type — по умолчанию dxa (§17.4.87): (9922−6000)/2+720 = 2681. */
|
||||
@Test
|
||||
void centerWithIndentNoType_treatedAsDxa() {
|
||||
|
||||
@@ -342,6 +342,7 @@ class CfbReaderTest {
|
||||
ConversionException ex = assertThrows(ConversionException.class,
|
||||
() -> CfbReader.readStreams(file));
|
||||
assertSame(ConversionException.class, ex.getClass());
|
||||
assertTrue(ex.getMessage().contains("за концом FAT"), ex.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -420,6 +421,7 @@ class CfbReaderTest {
|
||||
ConversionException ex = assertThrows(ConversionException.class,
|
||||
() -> CfbReader.readStreams(file));
|
||||
assertSame(ConversionException.class, ex.getClass());
|
||||
assertTrue(ex.getMessage().contains("за концом FAT"), ex.getMessage());
|
||||
}
|
||||
|
||||
private static void put16(byte[] b, int off, int v) {
|
||||
|
||||
+26
-26
@@ -58,8 +58,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9); // fWhichTblStm → 1Table
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length); // cbMac
|
||||
put32(wd, 76, TEXT.length()); // ccpText
|
||||
put16(wd, 152, 98); // cbRgFcLcb
|
||||
@@ -682,8 +682,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, 4); // ccpText
|
||||
put32(wd, 80, 0); // ccpFtn
|
||||
@@ -698,8 +698,8 @@ class DocToDocxFormattingTest {
|
||||
System.arraycopy(t, 0, wd, TEXT_FC, t.length);
|
||||
// PapxFkp pn=3: p1 istd=11 (без Prl), footer-абзац istd=10
|
||||
int page = 3 * 512;
|
||||
// rgfc — началА абзацев (§2.6.1): «one\r» [0,4), ¶-блок [4,13),
|
||||
// «ft\r» [13,16), guard [16,18)
|
||||
// rgfc — началА абзацев (возрастающие границы ¶-блоков, §2.9.174):
|
||||
// «one\r» [0,4), ¶-блок [4,13), «ft\r» [13,16), guard [16,18)
|
||||
int[] rgfc = {TEXT_FC, TEXT_FC + 8, TEXT_FC + 26, TEXT_FC + 32,
|
||||
TEXT_FC + 2 * text.length()};
|
||||
for (int i = 0; i < rgfc.length; i++) {
|
||||
@@ -787,8 +787,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -879,8 +879,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -997,8 +997,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -1090,8 +1090,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -1308,8 +1308,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, 6); // ccpText
|
||||
put32(wd, 80, 0); // ccpFtn
|
||||
@@ -1448,8 +1448,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, 4); // ccpText
|
||||
put16(wd, 152, 98);
|
||||
@@ -1506,8 +1506,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, 2); // ccpText
|
||||
put32(wd, 80, 0); // ccpFtn
|
||||
@@ -1593,8 +1593,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9); // fWhichTblStm → 1Table
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length); // cbMac
|
||||
put32(wd, 76, text.length()); // ccpText
|
||||
put16(wd, 152, 98); // cbRgFcLcb
|
||||
@@ -1808,8 +1808,8 @@ class DocToDocxFormattingTest {
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 64, wd.length);
|
||||
put32(wd, 76, text.length());
|
||||
put16(wd, 152, 98);
|
||||
@@ -2018,7 +2018,7 @@ class DocToDocxFormattingTest {
|
||||
assertFalse(xml.contains("<w:vAlign"), "top и out-of-range не эмитятся: " + xml);
|
||||
}
|
||||
|
||||
/** CSSAOperand (§2.9.209) как Prl: cb=6 + itc(2) + grfbrc + fts + wWidth(2). */
|
||||
/** CSSAOperand (§2.9.46) как Prl: cb=6 + itc(2) + grfbrc + fts + wWidth(2). */
|
||||
private static byte[] cssaOp(int sprm, int itcFirst, int itcLim, int grfbrc,
|
||||
int fts, int wWidth) {
|
||||
return new byte[] {(byte) (sprm & 0xFF), (byte) (sprm >>> 8), 6,
|
||||
@@ -2026,7 +2026,7 @@ class DocToDocxFormattingTest {
|
||||
(byte) wWidth, (byte) (wWidth >>> 8)};
|
||||
}
|
||||
|
||||
/** SHDOperand (§2.9.177): cb=10 + cvFore(4) + cvBack(4) + ipat(2), COLORREF R-first. */
|
||||
/** SHDOperand (§2.9.249): cb=10 + cvFore(4) + cvBack(4) + ipat(2), COLORREF R-first. */
|
||||
private static byte[] shd10(int sprm, int[] fore, int[] back, int ipat) {
|
||||
byte[] op = new byte[3 + 10];
|
||||
op[0] = (byte) (sprm & 0xFF);
|
||||
|
||||
@@ -22,8 +22,8 @@ class FibHeaderTest {
|
||||
put16(wd, 0, 0xA5EC); // wIdent
|
||||
put16(wd, 2, 0x00C1); // nFib = Word 97
|
||||
put16(wd, 10, flags); // grpprl FIB
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.2)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.4)
|
||||
put16(wd, 32, 14); // csw (MUST 0x000E, §2.5.1)
|
||||
put16(wd, 62, 22); // cslw (MUST 0x0016, §2.5.1)
|
||||
put32(wd, 76, 10); // ccpText
|
||||
put32(wd, 152, 98); // cbRgFcLcb
|
||||
return wd;
|
||||
@@ -38,6 +38,21 @@ class FibHeaderTest {
|
||||
assertFalse(f0.use1Table());
|
||||
}
|
||||
|
||||
/** WordDocument ровно 154 байта: cbRgFcLcb — u16@152 (§2.5.1), u32 читал бы за массив. */
|
||||
@Test
|
||||
void blobEndAtBoundary_rejectedNotCrash() {
|
||||
byte[] wd = new byte[154];
|
||||
put16(wd, 0, 0xA5EC);
|
||||
put16(wd, 2, 0x00C1);
|
||||
put16(wd, 10, 1 << 9);
|
||||
put16(wd, 32, 14);
|
||||
put16(wd, 62, 22);
|
||||
put32(wd, 76, 10);
|
||||
ConversionException ex = assertThrows(ConversionException.class,
|
||||
() -> FibHeader.read(wd));
|
||||
assertSame(ConversionException.class, ex.getClass());
|
||||
}
|
||||
|
||||
@Test
|
||||
void tooShort_rejected() {
|
||||
ConversionException ex = assertThrows(ConversionException.class,
|
||||
@@ -84,7 +99,7 @@ class FibHeaderTest {
|
||||
assertTrue(ex.getMessage().contains("Обрезанный FIB"), ex.getMessage());
|
||||
}
|
||||
|
||||
/** §2.5.2: csw «MUST be set to 0x000E» — любое другое значение = отказ. */
|
||||
/** §2.5.1 Fib: csw «MUST be 0x000E» — любое другое значение = отказ. */
|
||||
@Test
|
||||
void badCsw_rejected() {
|
||||
byte[] wd = fib(1 << 9);
|
||||
|
||||
@@ -65,7 +65,7 @@ class ListsTest {
|
||||
return concat(u32(1), lfo, u32(0xFFFFFFFFL), lfoData);
|
||||
}
|
||||
|
||||
/** SttbfFfn (§2.9.147 FontTable) с одним семейством на индексе ftc. */
|
||||
/** SttbfFfn (§2.9.286) с одним семейством на индексе ftc. */
|
||||
private static FontTable fonts(String... names) {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
byte[] header = new byte[4];
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test;
|
||||
import ru.pjandro.wordpdf.ConversionException;
|
||||
|
||||
/**
|
||||
* Юниты {@link PapxIndex} ([MS-DOC] §2.4.6.1, §2.9.16/.175): крафтовый
|
||||
* Юниты {@link PapxIndex} ([MS-DOC] §2.4.6.1, §2.9.174/.175): крафтовый
|
||||
* PlcfBtePapx + PapxFkp — обе формы PapxInFkp (cb≠0 и cb=0→cb'), пропуски
|
||||
* и {@code countPageBreakBefore}.
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,16 @@ class PieceTableTest {
|
||||
return new byte[] {(byte) v, (byte) (v >>> 8), (byte) (v >>> 16), (byte) (v >>> 24)};
|
||||
}
|
||||
|
||||
/** aCP[0] < 0 (§2.8.35 «All CPs MUST be greater than or equal to zero»). */
|
||||
@Test
|
||||
void negativeStartCp_rejected() throws Exception {
|
||||
byte[] table = clxOnePiece(10, 0, false);
|
||||
table[5] = (byte) 0xFF; // aCP[0] = 0xFFFFFFFF → (int) −1
|
||||
ConversionException e = assertThrows(ConversionException.class,
|
||||
() -> PieceTable.read(table, 0, table.length, new byte[64], 64));
|
||||
assertSame(ConversionException.class, e.getClass());
|
||||
}
|
||||
|
||||
@Test
|
||||
void uncompressedPieceBeyondWordDocument_rejected() throws Exception {
|
||||
byte[] table = clxOnePiece(10, 0, false); // 10 CP × 2 байта = 20
|
||||
|
||||
@@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Юниты {@link Tables} ([MS-DOC] §2.6.3, §2.9.321/.302/.303/.39/.171):
|
||||
* Юниты {@link Tables} ([MS-DOC] §2.6.3, §2.9.321/.302/.303/.16/.119):
|
||||
* TAP TTP-абзаца → сетка (ширины из rgdxaCenter, сдвиг от поля) и границы
|
||||
* w:tblBorders; деградация в {@code null} на битом/отсутствующем
|
||||
* sprmTDefTable.
|
||||
@@ -181,10 +181,10 @@ class TablesTest {
|
||||
void borders80_fallbackAndPrecedence() {
|
||||
Tables.Grid only80 = Tables.parse(concat(
|
||||
defTable(new int[] {0, 100}),
|
||||
borders80(new int[][] {{1, 1, 2}}))); // ico=2 → blue (§2.9.171)
|
||||
borders80(new int[][] {{1, 1, 2}}))); // ico=2 → blue (§2.9.119)
|
||||
String xml = only80.bordersXml();
|
||||
assertTrue(xml.contains("<w:top w:val=\"single\" w:sz=\"2\""),
|
||||
"dptLineWidth<2 → 2 (§2.9.37): " + xml);
|
||||
"dptLineWidth<2 → 2 (§2.9.16): " + xml);
|
||||
assertTrue(xml.contains("w:color=\"0000FF\""), "ico→цвет: " + xml);
|
||||
Tables.Grid both = Tables.parse(concat(
|
||||
defTable(new int[] {0, 100}),
|
||||
@@ -206,7 +206,7 @@ class TablesTest {
|
||||
|
||||
@Test
|
||||
void borderVal_fullStBorderTable() {
|
||||
// ST_Border §2.9.39: каждый brcType — своё имя ST_Border
|
||||
// BrcType §2.9.22: каждый brcType — своё имя ST_Border
|
||||
assertEquals("single", Tables.borderVal(0x01));
|
||||
assertEquals("double", Tables.borderVal(0x03));
|
||||
assertEquals("dotted", Tables.borderVal(0x06));
|
||||
@@ -270,7 +270,7 @@ class TablesTest {
|
||||
|
||||
@Test
|
||||
void borders80_icoBeyondPalette_noColor() {
|
||||
// ico за таблицей §2.9.171 — цвет не пишется (FOP возьмёт auto)
|
||||
// ico за таблицей §2.9.119 — цвет не пишется (FOP возьмёт auto)
|
||||
Tables.Grid g = Tables.parse(concat(
|
||||
defTable(new int[] {0, 100}),
|
||||
borders80(new int[][] {{4, 1, 0xFF}})));
|
||||
@@ -302,7 +302,7 @@ class TablesTest {
|
||||
assertNull(Tables.parse(concat(defTable(new int[] {0, 3000}), bad)).cellVAlign());
|
||||
}
|
||||
|
||||
/** CSSAOperand (§2.9.209): cb(1)=6 + itc(2) + grfbrc(1) + fts(1) + wWidth(2). */
|
||||
/** CSSAOperand (§2.9.46): cb(1)=6 + itc(2) + grfbrc(1) + fts(1) + wWidth(2). */
|
||||
private static byte[] cssa(int sprm, int itcFirst, int itcLim, int grfbrc,
|
||||
int fts, int wWidth) {
|
||||
return new byte[] {(byte) (sprm & 0xFF), (byte) (sprm >>> 8), 6,
|
||||
|
||||
Reference in New Issue
Block a user