aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java10
-rw-r--r--src/resources/ooxml-lite-report.clazz9
2 files changed, 15 insertions, 4 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
index 83aa926529..1459bc872d 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -36,10 +36,7 @@ import org.apache.poi.ooxml.POIXMLDocumentPart;
import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException;
-import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
-import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
-import org.apache.poi.openxml4j.opc.TargetMode;
+import org.apache.poi.openxml4j.opc.*;
import org.apache.poi.poifs.crypt.HashAlgorithm;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.formula.FormulaShifter;
@@ -4315,6 +4312,11 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet, OoxmlSheetEx
removeRelation(getRelationById(toDelete.getKey()), true);
tables.remove(toDelete.getKey());
toDelete.getValue().onTableDelete();
+ OPCPackage opcPackage = getWorkbook().getPackage();
+ PackagePart packagePart = t.getPackagePart();
+ if (packagePart != null && opcPackage.containPart(packagePart.getPartName())) {
+ opcPackage.removePart(packagePart);
+ }
}
}
diff --git a/src/resources/ooxml-lite-report.clazz b/src/resources/ooxml-lite-report.clazz
index a8fb87693f..811deff38a 100644
--- a/src/resources/ooxml-lite-report.clazz
+++ b/src/resources/ooxml-lite-report.clazz
@@ -2504,3 +2504,12 @@ com/microsoft/schemas/office/drawing/x2008/diagram/CTGroupShapeNonVisual
com/microsoft/schemas/office/drawing/x2008/diagram/impl/CTShapeImpl
com/microsoft/schemas/office/drawing/x2008/diagram/impl/CTShapeNonVisualImpl
com/microsoft/schemas/office/drawing/x2008/diagram/CTShapeNonVisual
+org/openxmlformats/schemas/drawingml/x2006/chart/impl/CTBubbleChartImpl
+org/openxmlformats/schemas/drawingml/x2006/chart/CTBubbleChart
+org/openxmlformats/schemas/drawingml/x2006/chart/CTBubbleSer
+org/openxmlformats/schemas/drawingml/x2006/chart/impl/CTBubbleSerImpl
+org/openxmlformats/schemas/drawingml/x2006/chart/impl/CTDLblPosImpl
+org/openxmlformats/schemas/drawingml/x2006/chart/CTDLblPos
+org/openxmlformats/schemas/drawingml/x2006/chart/STDLblPos$Enum
+org/openxmlformats/schemas/drawingml/x2006/chart/impl/STDLblPosImpl
+org/openxmlformats/schemas/drawingml/x2006/chart/STDLblPos