mirror of https://github.com/apache/poi.git
findbugs fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1735319 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e6a96fd11d
commit
5499c36019
|
@ -242,12 +242,13 @@ public final class BATBlock extends BigBlock {
|
||||||
*/
|
*/
|
||||||
public static long calculateMaximumSize(final POIFSBigBlockSize bigBlockSize,
|
public static long calculateMaximumSize(final POIFSBigBlockSize bigBlockSize,
|
||||||
final int numBATs) {
|
final int numBATs) {
|
||||||
long size = 1; // Header isn't FAT addressed
|
// Header isn't FAT addressed
|
||||||
|
long size = 1;
|
||||||
|
|
||||||
// The header has up to 109 BATs, and extra ones are referenced
|
// The header has up to 109 BATs, and extra ones are referenced
|
||||||
// from XBATs
|
// from XBATs
|
||||||
// However, all BATs can contain 128/1024 blocks
|
// However, all BATs can contain 128/1024 blocks
|
||||||
size += (numBATs * bigBlockSize.getBATEntriesPerBlock());
|
size += (((long)numBATs) * bigBlockSize.getBATEntriesPerBlock());
|
||||||
|
|
||||||
// So far we've been in sector counts, turn into bytes
|
// So far we've been in sector counts, turn into bytes
|
||||||
return size * bigBlockSize.getBigBlockSize();
|
return size * bigBlockSize.getBigBlockSize();
|
||||||
|
|
|
@ -122,11 +122,11 @@ public class DrawTextParagraph implements Drawable {
|
||||||
Double leftMargin = paragraph.getLeftMargin();
|
Double leftMargin = paragraph.getLeftMargin();
|
||||||
if (leftMargin == null) {
|
if (leftMargin == null) {
|
||||||
// if the marL attribute is omitted, then a value of 347663 is implied
|
// if the marL attribute is omitted, then a value of 347663 is implied
|
||||||
leftMargin = Units.toPoints(347663*indentLevel);
|
leftMargin = Units.toPoints(347663L*indentLevel);
|
||||||
}
|
}
|
||||||
Double indent = paragraph.getIndent();
|
Double indent = paragraph.getIndent();
|
||||||
if (indent == null) {
|
if (indent == null) {
|
||||||
indent = Units.toPoints(347663*indentLevel);
|
indent = Units.toPoints(347663L*indentLevel);
|
||||||
}
|
}
|
||||||
if (isHSLF()) {
|
if (isHSLF()) {
|
||||||
// special handling for HSLF
|
// special handling for HSLF
|
||||||
|
|
|
@ -283,7 +283,7 @@ public class HexDump {
|
||||||
* @return The result right padded with 0
|
* @return The result right padded with 0
|
||||||
*/
|
*/
|
||||||
public static String toHex(int value) {
|
public static String toHex(int value) {
|
||||||
return xpad(value & 0xFFFFFFFF, 8, "");
|
return xpad(value & 0xFFFFFFFFL, 8, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue