mirror of https://github.com/apache/poi.git
use a few more lambdas
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872644 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aa11adebf1
commit
b211a1362c
|
@ -685,9 +685,7 @@ public final class PageSettingsBlock extends RecordAggregate {
|
||||||
for (RecordBase rb : sheetRecords) {
|
for (RecordBase rb : sheetRecords) {
|
||||||
if (rb instanceof CustomViewSettingsRecordAggregate) {
|
if (rb instanceof CustomViewSettingsRecordAggregate) {
|
||||||
final CustomViewSettingsRecordAggregate cv = (CustomViewSettingsRecordAggregate) rb;
|
final CustomViewSettingsRecordAggregate cv = (CustomViewSettingsRecordAggregate) rb;
|
||||||
cv.visitContainedRecords(new RecordVisitor() {
|
cv.visitContainedRecords(r -> {
|
||||||
@Override
|
|
||||||
public void visitRecord(org.apache.poi.hssf.record.Record r) {
|
|
||||||
if (r.getSid() == UserSViewBegin.sid) {
|
if (r.getSid() == UserSViewBegin.sid) {
|
||||||
String guid = HexDump.toHex(((UserSViewBegin) r).getGuid());
|
String guid = HexDump.toHex(((UserSViewBegin) r).getGuid());
|
||||||
HeaderFooterRecord hf = hfGuidMap.get(guid);
|
HeaderFooterRecord hf = hfGuidMap.get(guid);
|
||||||
|
@ -697,7 +695,6 @@ public final class PageSettingsBlock extends RecordAggregate {
|
||||||
_sviewHeaderFooters.remove(hf);
|
_sviewHeaderFooters.remove(hf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,12 +118,7 @@ final class EvaluationCache {
|
||||||
private void updateAnyBlankReferencingFormulas(int bookIndex, int sheetIndex,
|
private void updateAnyBlankReferencingFormulas(int bookIndex, int sheetIndex,
|
||||||
final int rowIndex, final int columnIndex) {
|
final int rowIndex, final int columnIndex) {
|
||||||
final BookSheetKey bsk = new BookSheetKey(bookIndex, sheetIndex);
|
final BookSheetKey bsk = new BookSheetKey(bookIndex, sheetIndex);
|
||||||
_formulaCellCache.applyOperation(new IEntryOperation() {
|
_formulaCellCache.applyOperation(entry -> entry.notifyUpdatedBlankCell(bsk, rowIndex, columnIndex, _evaluationListener));
|
||||||
|
|
||||||
public void processEntry(FormulaCellCacheEntry entry) {
|
|
||||||
entry.notifyUpdatedBlankCell(bsk, rowIndex, columnIndex, _evaluationListener);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlainValueCellCacheEntry getPlainValueEntry(int bookIndex, int sheetIndex,
|
public PlainValueCellCacheEntry getPlainValueEntry(int bookIndex, int sheetIndex,
|
||||||
|
|
|
@ -40,12 +40,7 @@ public class TestPresetGeometries {
|
||||||
|
|
||||||
for(String name : shapes.keySet()) {
|
for(String name : shapes.keySet()) {
|
||||||
CustomGeometry geom = shapes.get(name);
|
CustomGeometry geom = shapes.get(name);
|
||||||
Context ctx = new Context(geom, new Rectangle2D.Double(0, 0, 100, 100), new IAdjustableShape() {
|
Context ctx = new Context(geom, new Rectangle2D.Double(0, 0, 100, 100), presetName -> null);
|
||||||
@Override
|
|
||||||
public Guide getAdjustValue(String presetName) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
for(Path p : geom){
|
for(Path p : geom){
|
||||||
Path2D path = p.getPath(ctx);
|
Path2D path = p.getPath(ctx);
|
||||||
assertNotNull(path);
|
assertNotNull(path);
|
||||||
|
|
|
@ -162,18 +162,4 @@ final class NumberComparisonExamples {
|
||||||
return examples.clone();
|
return examples.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ComparisonExample[] getComparisonExamples2() {
|
|
||||||
ComparisonExample[] result = examples.clone();
|
|
||||||
|
|
||||||
for (int i = 0; i < result.length; i++) {
|
|
||||||
int ha = ("a"+i).hashCode();
|
|
||||||
double a = ha * Math.pow(0.75, ha % 100);
|
|
||||||
int hb = ("b"+i).hashCode();
|
|
||||||
double b = hb * Math.pow(0.75, hb % 100);
|
|
||||||
|
|
||||||
result[i] = new ComparisonExample(Double.doubleToLongBits(a), Double.doubleToLongBits(b), Double.compare(a, b));
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue