whitespace change
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f98fda03c1
commit
d0694f4fc9
@ -146,53 +146,55 @@ public final class FormulaShifter {
|
|||||||
default:
|
default:
|
||||||
throw new IllegalStateException("Unsupported shift mode: " + _mode);
|
throw new IllegalStateException("Unsupported shift mode: " + _mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @return <code>true</code> if this Ptg needed to be changed
|
* @return in-place modified ptg (if row move would cause Ptg to change),
|
||||||
*/
|
* deleted ref ptg (if row move causes an error),
|
||||||
private Ptg adjustPtgDueToRowMove(Ptg ptg, int currentExternSheetIx) {
|
* or null (if no Ptg change is needed)
|
||||||
if(ptg instanceof RefPtg) {
|
*/
|
||||||
if (currentExternSheetIx != _externSheetIndex) {
|
private Ptg adjustPtgDueToRowMove(Ptg ptg, int currentExternSheetIx) {
|
||||||
// local refs on other sheets are unaffected
|
if(ptg instanceof RefPtg) {
|
||||||
return null;
|
if (currentExternSheetIx != _externSheetIndex) {
|
||||||
}
|
// local refs on other sheets are unaffected
|
||||||
RefPtg rptg = (RefPtg)ptg;
|
return null;
|
||||||
return rowMoveRefPtg(rptg);
|
}
|
||||||
}
|
RefPtg rptg = (RefPtg)ptg;
|
||||||
if(ptg instanceof Ref3DPtg) {
|
return rowMoveRefPtg(rptg);
|
||||||
Ref3DPtg rptg = (Ref3DPtg)ptg;
|
}
|
||||||
if (_externSheetIndex != rptg.getExternSheetIndex()) {
|
if(ptg instanceof Ref3DPtg) {
|
||||||
// only move 3D refs that refer to the sheet with cells being moved
|
Ref3DPtg rptg = (Ref3DPtg)ptg;
|
||||||
// (currentExternSheetIx is irrelevant)
|
if (_externSheetIndex != rptg.getExternSheetIndex()) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return rowMoveRefPtg(rptg);
|
|
||||||
}
|
|
||||||
if(ptg instanceof Ref3DPxg) {
|
|
||||||
Ref3DPxg rpxg = (Ref3DPxg)ptg;
|
|
||||||
if (rpxg.getExternalWorkbookNumber() > 0 ||
|
|
||||||
! _sheetName.equals(rpxg.getSheetName())) {
|
|
||||||
// only move 3D refs that refer to the sheet with cells being moved
|
// only move 3D refs that refer to the sheet with cells being moved
|
||||||
return null;
|
// (currentExternSheetIx is irrelevant)
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
|
return rowMoveRefPtg(rptg);
|
||||||
|
}
|
||||||
|
if(ptg instanceof Ref3DPxg) {
|
||||||
|
Ref3DPxg rpxg = (Ref3DPxg)ptg;
|
||||||
|
if (rpxg.getExternalWorkbookNumber() > 0 ||
|
||||||
|
! _sheetName.equals(rpxg.getSheetName())) {
|
||||||
|
// only move 3D refs that refer to the sheet with cells being moved
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return rowMoveRefPtg(rpxg);
|
return rowMoveRefPtg(rpxg);
|
||||||
}
|
}
|
||||||
if(ptg instanceof Area2DPtgBase) {
|
if(ptg instanceof Area2DPtgBase) {
|
||||||
if (currentExternSheetIx != _externSheetIndex) {
|
if (currentExternSheetIx != _externSheetIndex) {
|
||||||
// local refs on other sheets are unaffected
|
// local refs on other sheets are unaffected
|
||||||
return ptg;
|
return ptg;
|
||||||
}
|
}
|
||||||
return rowMoveAreaPtg((Area2DPtgBase)ptg);
|
return rowMoveAreaPtg((Area2DPtgBase)ptg);
|
||||||
}
|
}
|
||||||
if(ptg instanceof Area3DPtg) {
|
if(ptg instanceof Area3DPtg) {
|
||||||
Area3DPtg aptg = (Area3DPtg)ptg;
|
Area3DPtg aptg = (Area3DPtg)ptg;
|
||||||
if (_externSheetIndex != aptg.getExternSheetIndex()) {
|
if (_externSheetIndex != aptg.getExternSheetIndex()) {
|
||||||
// only move 3D refs that refer to the sheet with cells being moved
|
// only move 3D refs that refer to the sheet with cells being moved
|
||||||
// (currentExternSheetIx is irrelevant)
|
// (currentExternSheetIx is irrelevant)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return rowMoveAreaPtg(aptg);
|
return rowMoveAreaPtg(aptg);
|
||||||
}
|
}
|
||||||
if(ptg instanceof Area3DPxg) {
|
if(ptg instanceof Area3DPxg) {
|
||||||
Area3DPxg apxg = (Area3DPxg)ptg;
|
Area3DPxg apxg = (Area3DPxg)ptg;
|
||||||
if (apxg.getExternalWorkbookNumber() > 0 ||
|
if (apxg.getExternalWorkbookNumber() > 0 ||
|
||||||
@ -202,8 +204,8 @@ public final class FormulaShifter {
|
|||||||
}
|
}
|
||||||
return rowMoveAreaPtg(apxg);
|
return rowMoveAreaPtg(apxg);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Ptg adjustPtgDueToSheetMove(Ptg ptg) {
|
private Ptg adjustPtgDueToSheetMove(Ptg ptg) {
|
||||||
Ptg updatedPtg = null;
|
Ptg updatedPtg = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user