bug 50795: move hack to avoid xmlbeans corrupt pointer to its own function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751742 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
140b11bc7a
commit
56d11479de
@ -60,10 +60,7 @@ public class XSSFComment implements Comment {
|
|||||||
clientData.setRowArray(0, new BigInteger(String.valueOf(ref.getRow())));
|
clientData.setRowArray(0, new BigInteger(String.valueOf(ref.getRow())));
|
||||||
clientData.setColumnArray(0, new BigInteger(String.valueOf(ref.getCol())));
|
clientData.setColumnArray(0, new BigInteger(String.valueOf(ref.getCol())));
|
||||||
|
|
||||||
// There is a very odd xmlbeans bug when changing the row
|
avoidXmlbeansCorruptPointer(vmlShape);
|
||||||
// arrays which can lead to corrupt pointer
|
|
||||||
// This call seems to fix them again... See bug #50795
|
|
||||||
vmlShape.getClientDataList().toString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,10 +153,7 @@ public class XSSFComment implements Comment {
|
|||||||
clientData.setRowArray(0, new BigInteger(String.valueOf(address.getRow())));
|
clientData.setRowArray(0, new BigInteger(String.valueOf(address.getRow())));
|
||||||
clientData.setColumnArray(0, new BigInteger(String.valueOf(address.getColumn())));
|
clientData.setColumnArray(0, new BigInteger(String.valueOf(address.getColumn())));
|
||||||
|
|
||||||
// There is a very odd xmlbeans bug when changing the column
|
avoidXmlbeansCorruptPointer(_vmlShape);
|
||||||
// arrays which can lead to corrupt pointer
|
|
||||||
// This call seems to fix them again... See bug #50795
|
|
||||||
_vmlShape.getClientDataList().toString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,4 +248,11 @@ public class XSSFComment implements Comment {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return ((getRow()*17) + getColumn())*31;
|
return ((getRow()*17) + getColumn())*31;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void avoidXmlbeansCorruptPointer(CTShape vmlShape) {
|
||||||
|
// There is a very odd xmlbeans bug when changing the row
|
||||||
|
// arrays which can lead to corrupt pointer
|
||||||
|
// This call seems to fix them again... See bug #50795
|
||||||
|
vmlShape.getClientDataList().toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user