aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2016-12-03 00:49:08 +0000
committerAndreas Beeker <kiwiwings@apache.org>2016-12-03 00:49:08 +0000
commitb988f251ad45d24ba138d32304d0f515d262ca4d (patch)
tree8274aa335c8b6302379ef62aed48a7933f2660ea /src
parent5f40d71f5f23895d112348f3f6c29cb50d1c647b (diff)
downloadpoi-b988f251ad45d24ba138d32304d0f515d262ca4d.tar.gz
poi-b988f251ad45d24ba138d32304d0f515d262ca4d.zip
#60331 - Remove deprecated classes - remove constructors with PackageRelationship argument
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1772424 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java73
-rw-r--r--src/ooxml/java/org/apache/poi/POIXMLFactory.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFBaseContents.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasterContents.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPageContents.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPages.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/xml/XDGFXMLDocumentPart.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFComments.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java14
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java11
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTheme.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java11
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java5
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCache.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheRecords.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java11
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVBAPart.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFooter.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeader.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java9
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java9
-rw-r--r--src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java34
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestReadOnlySharedStringsTable.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java5
55 files changed, 32 insertions, 572 deletions
diff --git a/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java b/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
index e1b94b64e9..163ace54a0 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
@@ -166,37 +166,6 @@ public class POIXMLDocumentPart {
}
/**
- * Creates an POIXMLDocumentPart representing the given package part and relationship.
- * Called by {@link #read(POIXMLFactory, java.util.Map)} when reading in an existing file.
- *
- * @param part - The package part that holds xml data representing this sheet.
- * @param rel - the relationship of the given package part
- * @see #read(POIXMLFactory, java.util.Map)
- *
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public POIXMLDocumentPart(PackagePart part, PackageRelationship rel){
- this(null, part);
- }
-
- /**
- * Creates an POIXMLDocumentPart representing the given package part, relationship and parent
- * Called by {@link #read(POIXMLFactory, java.util.Map)} when reading in an exisiting file.
- *
- * @param parent - Parent part
- * @param part - The package part that holds xml data represenring this sheet.
- * @param rel - the relationship of the given package part
- * @see #read(POIXMLFactory, java.util.Map)
- *
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public POIXMLDocumentPart(POIXMLDocumentPart parent, PackagePart part, PackageRelationship rel){
- this(parent, part);
- }
-
- /**
* When you open something like a theme, call this to
* re-base the XML Document onto the core child of the
* current core document
@@ -228,34 +197,6 @@ public class POIXMLDocumentPart {
}
/**
- * Provides access to the PackageRelationship that identifies this POIXMLDocumentPart
- *
- * @return the PackageRelationship that identifies this POIXMLDocumentPart
- *
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- @SuppressWarnings("resource")
- public final PackageRelationship getPackageRelationship() {
- if (this.parent != null) {
- for (RelationPart rp : parent.getRelationParts()) {
- if (rp.getDocumentPart() == this) {
- return rp.getRelationship();
- }
- }
- } else {
- OPCPackage pkg = getPackagePart().getPackage();
- String partName = getPackagePart().getPartName().getName();
- for (PackageRelationship rel : pkg.getRelationships()) {
- if (rel.getTargetURI().toASCIIString().equals(partName)) {
- return rel;
- }
- }
- }
- return null;
- }
-
- /**
* Returns the list of child relations for this POIXMLDocumentPart
*
* @return child relations
@@ -318,20 +259,6 @@ public class POIXMLDocumentPart {
/**
* Add a new child POIXMLDocumentPart
*
- * @param id the id of an existing child to replace
- * @param part the child to add
- *
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public final void addRelation(String id, POIXMLDocumentPart part) {
- PackageRelationship pr = part.getPackagePart().getRelationship(id);
- addRelation(pr, part);
- }
-
- /**
- * Add a new child POIXMLDocumentPart
- *
* @param relId the preferred relation id, when null the next free relation id will be used
* @param relationshipType the package relationship type
* @param part the child to add
diff --git a/src/ooxml/java/org/apache/poi/POIXMLFactory.java b/src/ooxml/java/org/apache/poi/POIXMLFactory.java
index aabe964ae0..eefa591877 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLFactory.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLFactory.java
@@ -92,22 +92,6 @@ public abstract class POIXMLFactory {
* @since POI 3.14-Beta1
*/
protected abstract POIXMLRelation getDescriptor(String relationshipType);
-
- /**
- * Create a POIXMLDocumentPart from existing package part and relation. This method is called
- * from {@link POIXMLDocument#load(POIXMLFactory)} when parsing a document
- *
- * @param parent parent part
- * @param rel the package part relationship
- * @param part the PackagePart representing the created instance
- * @return A new instance of a POIXMLDocumentPart.
- *
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public final POIXMLDocumentPart createDocumentPart(POIXMLDocumentPart parent, PackageRelationship rel, PackagePart part) {
- return createDocumentPart(parent, part);
- }
/**
* Create a new POIXMLDocumentPart using the supplied descriptor. This method is used when adding new parts
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFBaseContents.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFBaseContents.java
index 4ee9ee5ebf..2d65621f19 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFBaseContents.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFBaseContents.java
@@ -59,14 +59,6 @@ public class XDGFBaseContents extends XDGFXMLDocumentPart {
public XDGFBaseContents(PackagePart part, XDGFDocument document) {
super(part, document);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XDGFBaseContents(PackagePart part, PackageRelationship rel, XDGFDocument document) {
- this(part, document);
- }
@Internal
public PageContentsType getXmlObject() {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasterContents.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasterContents.java
index 335a32289a..8fd51324ad 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasterContents.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasterContents.java
@@ -21,7 +21,6 @@ import java.io.IOException;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.xdgf.exceptions.XDGFException;
import org.apache.xmlbeans.XmlException;
@@ -40,15 +39,6 @@ public class XDGFMasterContents extends XDGFBaseContents {
public XDGFMasterContents(PackagePart part, XDGFDocument document) {
super(part, document);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XDGFMasterContents(PackagePart part, PackageRelationship rel, XDGFDocument document) {
- this(part, document);
- }
-
@Override
protected void onDocumentRead() {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java
index 9fa90b8327..d2f72d4a26 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java
@@ -26,7 +26,6 @@ import java.util.Map;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Internal;
import org.apache.poi.xdgf.exceptions.XDGFException;
import org.apache.poi.xdgf.xml.XDGFXMLDocumentPart;
@@ -52,14 +51,6 @@ public class XDGFMasters extends XDGFXMLDocumentPart {
public XDGFMasters(PackagePart part, XDGFDocument document) {
super(part, document);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XDGFMasters(PackagePart part, PackageRelationship rel, XDGFDocument document) {
- this(part, document);
- }
@Internal
protected MastersType getXmlObject() {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPageContents.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPageContents.java
index e1965f3c25..54cf02f28e 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPageContents.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPageContents.java
@@ -24,7 +24,6 @@ import java.util.Map;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.xdgf.exceptions.XDGFException;
import org.apache.xmlbeans.XmlException;
@@ -41,14 +40,6 @@ public class XDGFPageContents extends XDGFBaseContents {
public XDGFPageContents(PackagePart part, XDGFDocument document) {
super(part, document);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XDGFPageContents(PackagePart part, PackageRelationship rel, XDGFDocument document) {
- this(part, document);
- }
@Override
protected void onDocumentRead() {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPages.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPages.java
index a2fc4c7a00..0ae3a039a6 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPages.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPages.java
@@ -24,7 +24,6 @@ import java.util.List;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Internal;
import org.apache.poi.xdgf.exceptions.XDGFException;
import org.apache.poi.xdgf.xml.XDGFXMLDocumentPart;
@@ -51,14 +50,6 @@ public class XDGFPages extends XDGFXMLDocumentPart {
public XDGFPages(PackagePart part, XDGFDocument document) {
super(part, document);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XDGFPages(PackagePart part, PackageRelationship rel, XDGFDocument document) {
- this(part, document);
- }
@Internal
PagesType getXmlObject() {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/xml/XDGFXMLDocumentPart.java b/src/ooxml/java/org/apache/poi/xdgf/xml/XDGFXMLDocumentPart.java
index 5e52646457..79e549e00e 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/xml/XDGFXMLDocumentPart.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/xml/XDGFXMLDocumentPart.java
@@ -18,7 +18,6 @@ package org.apache.poi.xdgf.xml;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.xdgf.usermodel.XDGFDocument;
public class XDGFXMLDocumentPart extends POIXMLDocumentPart {
@@ -32,13 +31,4 @@ public class XDGFXMLDocumentPart extends POIXMLDocumentPart {
super(part);
_document = document;
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XDGFXMLDocumentPart(PackagePart part, PackageRelationship rel, XDGFDocument document) {
- this(part, document);
- }
-
}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java
index 40b254c93a..942c13bea4 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFChart.java
@@ -28,7 +28,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Internal;
import org.apache.xmlbeans.XmlException;
@@ -70,21 +69,6 @@ public final class XSLFChart extends POIXMLDocumentPart {
chart = chartSpace.getChart();
}
- /**
- * Construct a chart from a package part.
- *
- * @param part the package part holding the chart data,
- * the content type must be <code>application/vnd.openxmlformats-officedocument.drawingml.chart+xml</code>
- * @param rel the package relationship holding this chart,
- * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart
- *
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSLFChart(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
-
/**
* Return the underlying CTChartSpace bean, the root element of the Chart part.
*
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java
index 52aa0f6ff2..61dff5b564 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java
@@ -23,7 +23,6 @@ import java.io.IOException;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Beta;
import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.presentationml.x2006.main.CTCommentAuthor;
@@ -57,21 +56,6 @@ public class XSLFCommentAuthors extends POIXMLDocumentPart {
CmAuthorLstDocument.Factory.parse(getPackagePart().getInputStream(), DEFAULT_XML_OPTIONS);
_authors = doc.getCmAuthorLst();
}
-
- /**
- * Construct a SpreadsheetML slide authors from a package part
- *
- * @param part the package part holding the comment authors data,
- * the content type must be <code>application/vnd.openxmlformats-officedocument.commentAuthors+xml</code>
- * @param rel the package relationship holding this comment authors,
- * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors
- *
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- XSLFCommentAuthors(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
public CTCommentAuthorList getCTCommentAuthorsList() {
return _authors;
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFComments.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFComments.java
index c2e1c732ff..04e09c865a 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFComments.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFComments.java
@@ -23,7 +23,6 @@ import java.io.IOException;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Beta;
import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.presentationml.x2006.main.CTComment;
@@ -59,21 +58,6 @@ public class XSLFComments extends POIXMLDocumentPart {
_comments = doc.getCmLst();
}
- /**
- * Construct a SpreadsheetML slide comments from a package part
- *
- * @param part the package part holding the comments data,
- * the content type must be <code>application/vnd.openxmlformats-officedocument.comments+xml</code>
- * @param rel the package relationship holding this comments,
- * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments
- *
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- XSLFComments(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
-
public CTCommentList getCTCommentsList() {
return _comments;
}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java
index 5c0ec58d25..5472011c06 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java
@@ -24,7 +24,6 @@ import java.util.List;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.sl.usermodel.Notes;
import org.apache.poi.util.Beta;
import org.apache.xmlbeans.XmlException;
@@ -65,14 +64,6 @@ implements Notes<XSLFShape,XSLFTextParagraph> {
setCommonSlideData(_notes.getCSld());
}
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- XSLFNotes(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
-
private static CTNotesSlide prototype(){
CTNotesSlide ctNotes = CTNotesSlide.Factory.newInstance();
CTCommonSlideData cSld = ctNotes.addNewCSld();
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java
index 6f955a45ed..658047a637 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotesMaster.java
@@ -24,7 +24,6 @@ import java.io.InputStream;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.sl.usermodel.MasterSheet;
import org.apache.poi.util.Beta;
import org.apache.xmlbeans.XmlException;
@@ -69,14 +68,6 @@ import org.openxmlformats.schemas.presentationml.x2006.main.NotesMasterDocument;
_slide = doc.getNotesMaster();
setCommonSlideData(_slide.getCSld());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSLFNotesMaster(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
private static CTNotesMaster prototype() {
InputStream is = XSLFNotesMaster.class.getResourceAsStream("notesMaster.xml");
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
index 3405ef3725..95abdebf2b 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
@@ -27,7 +27,6 @@ import java.io.OutputStream;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.sl.image.ImageHeaderBitmap;
import org.apache.poi.sl.image.ImageHeaderEMF;
import org.apache.poi.sl.image.ImageHeaderPICT;
@@ -67,19 +66,6 @@ public final class XSLFPictureData extends POIXMLDocumentPart implements Picture
public XSLFPictureData(PackagePart part) {
super(part);
}
-
- /**
- * Construct XSLFPictureData from a package part
- *
- * @param part the package part holding the drawing data,
- * @param rel the package relationship holding this drawing,
- * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/image
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XSLFPictureData(PackagePart part, PackageRelationship rel) {
- this(part);
- }
/**
* An InputStream to read the picture data directly
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
index 1edfff7ccb..50f31730d8 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
@@ -82,14 +82,6 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> {
}
/**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XSLFSheet(PackagePart part, PackageRelationship rel){
- this(part);
- }
-
- /**
* @return the XMLSlideShow this sheet belongs to
*/
@Override
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java
index 66ec5e1764..140921aa33 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlide.java
@@ -23,7 +23,6 @@ import java.io.IOException;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.sl.draw.DrawFactory;
import org.apache.poi.sl.draw.Drawable;
import org.apache.poi.sl.usermodel.Notes;
@@ -33,7 +32,6 @@ import org.apache.poi.util.Beta;
import org.apache.poi.util.DocumentHelper;
import org.apache.poi.util.NotImplemented;
import org.apache.xmlbeans.XmlException;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTBlip;
import org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties;
import org.openxmlformats.schemas.drawingml.x2006.main.CTGroupTransform2D;
import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
@@ -87,15 +85,6 @@ implements Slide<XSLFShape,XSLFTextParagraph> {
_slide = doc.getSld();
setCommonSlideData(_slide.getCSld());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- XSLFSlide(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
-
private static CTSlide prototype(){
CTSlide ctSlide = CTSlide.Factory.newInstance();
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java
index 15a4a169e4..704d09ea94 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideLayout.java
@@ -22,7 +22,6 @@ import java.io.IOException;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.sl.usermodel.MasterSheet;
import org.apache.poi.sl.usermodel.Placeholder;
import org.apache.poi.util.Beta;
@@ -55,14 +54,6 @@ implements MasterSheet<XSLFShape,XSLFTextParagraph> {
setCommonSlideData(_layout.getCSld());
}
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XSLFSlideLayout(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
-
public String getName() {
return _layout.getCSld().getName();
}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java
index ae6c40936c..eefa79e3b5 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java
@@ -25,7 +25,6 @@ import java.util.Map;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.sl.usermodel.MasterSheet;
import org.apache.poi.sl.usermodel.Placeholder;
import org.apache.poi.util.Beta;
@@ -79,14 +78,6 @@ import org.openxmlformats.schemas.presentationml.x2006.main.SldMasterDocument;
_slide = doc.getSldMaster();
setCommonSlideData(_slide.getCSld());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSLFSlideMaster(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
@Override
public CTSlideMaster getXmlObject() {
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java
index 410f84101d..487b339643 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java
@@ -25,7 +25,6 @@ import java.util.List;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Beta;
import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.drawingml.x2006.main.CTTableStyle;
@@ -57,14 +56,6 @@ public class XSLFTableStyles extends POIXMLDocumentPart implements Iterable<XSLF
_styles.add(new XSLFTableStyle(c));
}
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XSLFTableStyles(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
public CTTableStyleList getXmlObject(){
return _tblStyleLst;
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTheme.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTheme.java
index 37bc34dbad..809f745c42 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTheme.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTheme.java
@@ -27,7 +27,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Internal;
import org.apache.xmlbeans.XmlException;
@@ -66,14 +65,6 @@ public class XSLFTheme extends POIXMLDocumentPart {
_theme = doc.getTheme();
initialize();
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XSLFTheme(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
public void importTheme(XSLFTheme theme) {
_theme = theme.getXmlObject();
diff --git a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
index f2554e6b4f..92252dd52b 100644
--- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
@@ -28,7 +28,6 @@ import javax.xml.parsers.ParserConfigurationException;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.SAXHelper;
import org.apache.poi.xssf.usermodel.XSSFRelation;
import org.xml.sax.Attributes;
@@ -122,15 +121,6 @@ public class ReadOnlySharedStringsTable extends DefaultHandler {
public ReadOnlySharedStringsTable(PackagePart part) throws IOException, SAXException {
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public ReadOnlySharedStringsTable(PackagePart part, PackageRelationship rel_ignored)
- throws IOException, SAXException {
- this(part);
- }
/**
* Read this shared strings table from an XML file.
diff --git a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
index 71942a1324..9dfbf2bfc8 100644
--- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
+++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
@@ -47,7 +47,6 @@ import org.apache.poi.xssf.usermodel.XSSFShape;
import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheet;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorkbook;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.STSheetState;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.WorkbookDocument;
/**
@@ -94,7 +93,7 @@ public class XSSFReader {
*/
public SharedStringsTable getSharedStringsTable() throws IOException, InvalidFormatException {
ArrayList<PackagePart> parts = pkg.getPartsByContentType( XSSFRelation.SHARED_STRINGS.getContentType());
- return parts.size() == 0 ? null : new SharedStringsTable(parts.get(0), null);
+ return parts.size() == 0 ? null : new SharedStringsTable(parts.get(0));
}
/**
@@ -106,10 +105,10 @@ public class XSSFReader {
if(parts.size() == 0) return null;
// Create the Styles Table, and associate the Themes if present
- StylesTable styles = new StylesTable(parts.get(0), null);
+ StylesTable styles = new StylesTable(parts.get(0));
parts = pkg.getPartsByContentType( XSSFRelation.THEME.getContentType());
if(parts.size() != 0) {
- styles.setTheme(new ThemesTable(parts.get(0), null));
+ styles.setTheme(new ThemesTable(parts.get(0)));
}
return styles;
}
@@ -295,7 +294,7 @@ public class XSSFReader {
PackageRelationship comments = commentsList.getRelationship(0);
PackagePartName commentsName = PackagingURIHelper.createPartName(comments.getTargetURI());
PackagePart commentsPart = sheetPkg.getPackage().getPart(commentsName);
- return new CommentsTable(commentsPart, comments);
+ return new CommentsTable(commentsPart);
}
} catch (InvalidFormatException e) {
return null;
@@ -319,7 +318,7 @@ public class XSSFReader {
PackageRelationship drawings = drawingsList.getRelationship(i);
PackagePartName drawingsName = PackagingURIHelper.createPartName(drawings.getTargetURI());
PackagePart drawingsPart = sheetPkg.getPackage().getPart(drawingsName);
- XSSFDrawing drawing = new XSSFDrawing(drawingsPart, drawings);
+ XSSFDrawing drawing = new XSSFDrawing(drawingsPart);
for (XSSFShape shape : drawing.getShapes()){
shapes.add(shape);
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java b/src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java
index 6f254b3f1c..5e2a980c0c 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java
@@ -24,7 +24,6 @@ import java.io.OutputStream;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCalcCell;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCalcChain;
@@ -51,14 +50,6 @@ public class CalculationChain extends POIXMLDocumentPart {
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public CalculationChain(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
public void readFrom(InputStream is) throws IOException {
try {
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java b/src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
index 4dfd4bc86f..aca3834e70 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
@@ -28,7 +28,6 @@ import java.util.TreeMap;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.ss.util.CellAddress;
import org.apache.poi.util.Internal;
import org.apache.poi.xssf.usermodel.XSSFComment;
@@ -67,14 +66,6 @@ public class CommentsTable extends POIXMLDocumentPart {
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public CommentsTable(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
public void readFrom(InputStream is) throws IOException {
try {
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java b/src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java
index 55762f6b6b..8a796924d6 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java
@@ -56,14 +56,6 @@ public class ExternalLinksTable extends POIXMLDocumentPart {
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public ExternalLinksTable(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
public void readFrom(InputStream is) throws IOException {
try {
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java b/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
index e639591d4b..ab4522134e 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
@@ -28,7 +28,6 @@ import java.util.Map;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.xssf.usermodel.XSSFMap;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.xmlbeans.XmlException;
@@ -69,13 +68,6 @@ public class MapInfo extends POIXMLDocumentPart {
readFrom(part.getInputStream());
}
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- public MapInfo(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
-
public void readFrom(InputStream is) throws IOException {
try {
MapInfoDocument doc = MapInfoDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java b/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
index 8ade04f8f9..490a660595 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
@@ -31,7 +31,6 @@ import java.util.Map;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlOptions;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst;
@@ -109,13 +108,6 @@ public class SharedStringsTable extends POIXMLDocumentPart {
}
/**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- public SharedStringsTable(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
-
- /**
* Read this shared strings table from an XML file.
*
* @param is The input stream containing the XML document.
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java b/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
index 4b661438af..fb1c80bb3f 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
@@ -27,7 +27,6 @@ import java.util.Vector;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.helpers.XSSFSingleXmlCell;
import org.apache.xmlbeans.XmlException;
@@ -63,14 +62,6 @@ public class SingleXmlCells extends POIXMLDocumentPart {
readFrom(part.getInputStream());
}
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public SingleXmlCells(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
-
public void readFrom(InputStream is) throws IOException {
try {
SingleXmlCellsDocument doc = SingleXmlCellsDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java b/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
index bc85de49d6..c192aed3da 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
@@ -33,7 +33,6 @@ import java.util.TreeMap;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.usermodel.BuiltinFormats;
import org.apache.poi.ss.usermodel.FontFamily;
@@ -145,14 +144,6 @@ public class StylesTable extends POIXMLDocumentPart {
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public StylesTable(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
public void setWorkbook(XSSFWorkbook wb) {
this.workbook = wb;
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java b/src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java
index 0fe4abf426..9c3b1de400 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/ThemesTable.java
@@ -23,7 +23,6 @@ import java.io.OutputStream;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.xssf.usermodel.XSSFColor;
import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.drawingml.x2006.main.CTColor;
@@ -87,14 +86,6 @@ public class ThemesTable extends POIXMLDocumentPart {
throw new IOException(e.getLocalizedMessage(), e);
}
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public ThemesTable(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
/**
* Construct a ThemesTable from an existing ThemeDocument.
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
index d396792133..1bee1ad995 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
@@ -28,7 +28,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.ss.usermodel.Chart;
import org.apache.poi.ss.usermodel.charts.AxisPosition;
import org.apache.poi.ss.usermodel.charts.ChartAxis;
@@ -105,15 +104,6 @@ public final class XSSFChart extends POIXMLDocumentPart implements Chart, ChartA
chartSpace = ChartSpaceDocument.Factory.parse(part.getInputStream(), DEFAULT_XML_OPTIONS).getChartSpace();
chart = chartSpace.getChart();
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFChart(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
-
/**
* Construct a new CTChartSpace bean.
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java
index 03194ae02d..589cc19aa9 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChartSheet.java
@@ -29,7 +29,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlOptions;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTChartsheet;
@@ -57,14 +56,6 @@ public class XSSFChartSheet extends XSSFSheet {
protected XSSFChartSheet(PackagePart part) {
super(part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFChartSheet(PackagePart part, PackageRelationship rel) {
- this(part);
- }
protected void read(InputStream is) throws IOException {
//initialize the supeclass with a blank worksheet
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java
index 3885770619..46b6cd3629 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDialogsheet.java
@@ -17,7 +17,6 @@
package org.apache.poi.xssf.usermodel;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.ss.usermodel.Sheet;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDialogsheet;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter;
@@ -34,8 +33,8 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet;
public class XSSFDialogsheet extends XSSFSheet implements Sheet{
protected CTDialogsheet dialogsheet;
- protected XSSFDialogsheet(XSSFSheet sheet, PackageRelationship rel) {
- super(sheet.getPackagePart(), rel);
+ protected XSSFDialogsheet(XSSFSheet sheet) {
+ super(sheet.getPackagePart());
this.dialogsheet = CTDialogsheet.Factory.newInstance();
this.worksheet = CTWorksheet.Factory.newInstance();
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
index 8b70d712ad..c7104a4172 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
@@ -88,14 +88,6 @@ public final class XSSFDrawing extends POIXMLDocumentPart implements Drawing {
options.setLoadReplaceDocumentElement(null);
drawing = CTDrawing.Factory.parse(part.getInputStream(),options);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XSSFDrawing(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
/**
* Construct a new CTDrawing bean. By default, it's just an empty placeholder for drawing objects
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java
index f8c9c226c2..4a47bd7af0 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPictureData.java
@@ -23,7 +23,6 @@ import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.POIXMLRelation;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.ss.usermodel.PictureData;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.util.IOUtils;
@@ -72,14 +71,6 @@ public class XSSFPictureData extends POIXMLDocumentPart implements PictureData {
protected XSSFPictureData(PackagePart part) {
super(part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFPictureData(PackagePart part, PackageRelationship rel) {
- this(part);
- }
/**
* Gets the picture data as a byte array.
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCache.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCache.java
index 418185f2be..74c5861c27 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCache.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCache.java
@@ -23,7 +23,6 @@ import java.io.InputStream;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Beta;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlOptions;
@@ -58,14 +57,6 @@ public class XSSFPivotCache extends POIXMLDocumentPart {
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFPivotCache(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
@Beta
protected void readFrom(InputStream is) throws IOException {
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java
index 26735c782c..d93b8ed5bc 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java
@@ -27,7 +27,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
@@ -70,14 +69,6 @@ public class XSSFPivotCacheDefinition extends POIXMLDocumentPart{
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFPivotCacheDefinition(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
@Beta
public void readFrom(InputStream is) throws IOException {
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheRecords.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheRecords.java
index 5dcf0d3b78..e084106c8d 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheRecords.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheRecords.java
@@ -26,7 +26,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Internal;
import org.apache.xmlbeans.XmlException;
@@ -55,14 +54,6 @@ public class XSSFPivotCacheRecords extends POIXMLDocumentPart {
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFPivotCacheRecords(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
@Beta
protected void readFrom(InputStream is) throws IOException {
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
index e6f91afde7..f727583884 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
@@ -29,7 +29,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.DataConsolidateFunction;
@@ -78,14 +77,6 @@ public class XSSFPivotTable extends POIXMLDocumentPart {
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFPivotTable(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
@Beta
public void readFrom(InputStream is) throws IOException {
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
index 563c55f457..5f1529604e 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -99,7 +99,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
* contain text, numbers, dates, and formulas. Cells can also be formatted.
* </p>
*/
-public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
+public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
private static final POILogger logger = POILogFactory.getLogger(XSSFSheet.class);
private static final double DEFAULT_ROW_HEIGHT = 15.0;
@@ -153,14 +153,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
}
/**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFSheet(PackagePart part, PackageRelationship rel) {
- this(part);
- }
-
- /**
* Returns the parent XSSFWorkbook
*
* @return the parent XSSFWorkbook
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
index fb59384a16..5bdd950dea 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
@@ -30,12 +30,11 @@ import java.util.Locale;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.ss.usermodel.Table;
import org.apache.poi.ss.util.CellReference;
-import org.apache.poi.xssf.usermodel.helpers.XSSFXmlColumnPr;
import org.apache.poi.util.Internal;
import org.apache.poi.util.StringUtil;
+import org.apache.poi.xssf.usermodel.helpers.XSSFXmlColumnPr;
import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTable;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTableColumn;
@@ -76,14 +75,6 @@ public class XSSFTable extends POIXMLDocumentPart implements Table {
super(part);
readFrom(part.getInputStream());
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XSSFTable(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
public void readFrom(InputStream is) throws IOException {
try {
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVBAPart.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVBAPart.java
index 11501e9615..a58146b24b 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVBAPart.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVBAPart.java
@@ -19,7 +19,6 @@ package org.apache.poi.xssf.usermodel;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
public class XSSFVBAPart extends POIXMLDocumentPart {
@@ -40,14 +39,6 @@ public class XSSFVBAPart extends POIXMLDocumentPart {
protected XSSFVBAPart(PackagePart part) {
super(part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFVBAPart(PackagePart part, PackageRelationship rel) {
- this(part);
- }
/**
* Like *PictureData, VBA objects store the actual content in the part
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java
index 434742dd00..352b804b9a 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java
@@ -33,7 +33,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.DocumentHelper;
import org.apache.poi.xssf.util.EvilUnclosedBRFixingInputStream;
import org.apache.xmlbeans.XmlCursor;
@@ -121,14 +120,6 @@ public final class XSSFVMLDrawing extends POIXMLDocumentPart {
read(getPackagePart().getInputStream());
}
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- protected XSSFVMLDrawing(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
- this(part);
- }
-
@SuppressWarnings("resource")
protected void read(InputStream is) throws IOException, XmlException {
Document doc;
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
index 019b145e9f..eafe8789fb 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
@@ -873,9 +873,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
protected XSSFDialogsheet createDialogsheet(String sheetname, CTDialogsheet dialogsheet) {
XSSFSheet sheet = createSheet(sheetname);
- String sheetRelId = getRelationId(sheet);
- PackageRelationship pr = getPackagePart().getRelationship(sheetRelId);
- return new XSSFDialogsheet(sheet, pr);
+ return new XSSFDialogsheet(sheet);
}
private CTSheet addSheet(String sheetname) {
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFooter.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFooter.java
index dfe7462ce1..471b28bed3 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFooter.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFooter.java
@@ -27,7 +27,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
@@ -73,14 +72,6 @@ public class XWPFFooter extends XWPFHeaderFooter {
public XWPFFooter(POIXMLDocumentPart parent, PackagePart part) throws IOException {
super(parent, part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XWPFFooter(POIXMLDocumentPart parent, PackagePart part, PackageRelationship rel) throws IOException {
- this(parent, part);
- }
/**
* save and commit footer
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
index defae4ac6a..0be7b195dd 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
@@ -31,7 +31,6 @@ import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlOptions;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFootnotes;
@@ -56,14 +55,6 @@ public class XWPFFootnotes extends POIXMLDocumentPart {
public XWPFFootnotes(PackagePart part) throws IOException, OpenXML4JException {
super(part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XWPFFootnotes(PackagePart part, PackageRelationship rel) throws IOException, OpenXML4JException {
- this(part);
- }
/**
* Construct XWPFFootnotes from scratch for a new document.
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeader.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeader.java
index 0af8df4bd0..3789b521e5 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeader.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeader.java
@@ -27,7 +27,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
@@ -53,14 +52,6 @@ public class XWPFHeader extends XWPFHeaderFooter {
public XWPFHeader(POIXMLDocumentPart parent, PackagePart part) throws IOException {
super(parent, part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XWPFHeader(POIXMLDocumentPart parent, PackagePart part, PackageRelationship rel) throws IOException {
- this(parent, part);
- }
public XWPFHeader(XWPFDocument doc, CTHdrFtr hdrFtr) {
super(doc, hdrFtr);
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java
index e8488b3d44..c5a9365066 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java
@@ -28,7 +28,6 @@ import org.apache.poi.POIXMLException;
import org.apache.poi.POIXMLRelation;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.Internal;
import org.apache.xmlbeans.XmlCursor;
@@ -77,14 +76,6 @@ public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBo
throw new NullPointerException();
}
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XWPFHeaderFooter(POIXMLDocumentPart parent, PackagePart part, PackageRelationship rel) throws IOException {
- this(parent, part);
- }
@Override
protected void onDocumentRead() throws IOException {
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
index 10b42f8f65..37aac2b892 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
@@ -31,7 +31,6 @@ import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlOptions;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTAbstractNum;
@@ -57,14 +56,6 @@ public class XWPFNumbering extends POIXMLDocumentPart {
super(part);
isNew = true;
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XWPFNumbering(PackagePart part, PackageRelationship rel) throws IOException, OpenXML4JException {
- this(part);
- }
/**
* create a new XWPFNumbering object for use in a new document
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java
index 3c19b42a02..5bc1ece94e 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFPictureData.java
@@ -26,7 +26,6 @@ import org.apache.poi.POIXMLException;
import org.apache.poi.POIXMLRelation;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.util.IOUtils;
/**
@@ -78,14 +77,6 @@ public class XWPFPictureData extends POIXMLDocumentPart {
public XWPFPictureData(PackagePart part) {
super(part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XWPFPictureData(PackagePart part, PackageRelationship rel) {
- this(part);
- }
@Override
protected void onDocumentRead() throws IOException {
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java
index d9d29a3303..559c73f0c3 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java
@@ -30,7 +30,6 @@ import javax.xml.namespace.QName;
import org.apache.poi.EncryptedDocumentException;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.poifs.crypt.CryptoFunctions;
import org.apache.poi.poifs.crypt.HashAlgorithm;
import org.apache.xmlbeans.XmlOptions;
@@ -55,14 +54,6 @@ public class XWPFSettings extends POIXMLDocumentPart {
public XWPFSettings(PackagePart part) throws IOException {
super(part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XWPFSettings(PackagePart part, PackageRelationship rel) throws IOException {
- this(part);
- }
public XWPFSettings() {
super();
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java
index 5f961ea9dd..ae2b1fd58e 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java
@@ -31,7 +31,6 @@ import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.PackagePart;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlOptions;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDocDefaults;
@@ -68,14 +67,6 @@ public class XWPFStyles extends POIXMLDocumentPart {
public XWPFStyles(PackagePart part) throws IOException, OpenXML4JException {
super(part);
}
-
- /**
- * @deprecated in POI 3.14, scheduled for removal in POI 3.16
- */
- @Deprecated
- public XWPFStyles(PackagePart part, PackageRelationship rel) throws IOException, OpenXML4JException {
- this(part);
- }
/**
* Construct XWPFStyles from scratch for a new document.
diff --git a/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java b/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
index be63e2bf7a..eeb0e55119 100644
--- a/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
+++ b/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
@@ -34,6 +34,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import org.apache.poi.POIXMLDocumentPart.RelationPart;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException;
import org.apache.poi.openxml4j.opc.OPCPackage;
@@ -43,7 +44,6 @@ import org.apache.poi.util.NullOutputStream;
import org.apache.poi.util.PackageHelper;
import org.apache.poi.util.TempFile;
import org.apache.poi.xslf.usermodel.XMLSlideShow;
-import org.apache.poi.xslf.usermodel.XSLFShape;
import org.apache.poi.xssf.usermodel.XSSFRelation;
import org.apache.poi.xwpf.usermodel.XWPFRelation;
import org.junit.Test;
@@ -95,23 +95,31 @@ public final class TestPOIXMLDocument {
}
}
+ private static void traverse(POIXMLDocument doc) throws IOException{
+ HashMap<String,POIXMLDocumentPart> context = new HashMap<String,POIXMLDocumentPart>();
+ for (RelationPart p : doc.getRelationParts()){
+ traverse(p, context);
+ }
+ }
+
/**
* Recursively traverse a OOXML document and assert that same logical parts have the same physical instances
*/
- private static void traverse(POIXMLDocumentPart part, HashMap<String,POIXMLDocumentPart> context) throws IOException{
- assertEquals(part.getPackageRelationship().getTargetURI().toString(), part.getPackagePart().getPartName().getName());
+ private static void traverse(RelationPart rp, HashMap<String,POIXMLDocumentPart> context) throws IOException{
+ POIXMLDocumentPart dp = rp.getDocumentPart();
+ assertEquals(rp.getRelationship().getTargetURI().toString(), dp.getPackagePart().getPartName().getName());
- context.put(part.getPackagePart().getPartName().getName(), part);
- for(POIXMLDocumentPart p : part.getRelations()){
- assertNotNull(p.toString());
+ context.put(dp.getPackagePart().getPartName().getName(), dp);
+ for(RelationPart p : dp.getRelationParts()){
+ assertNotNull(p.getRelationship().toString());
- String uri = p.getPackagePart().getPartName().getURI().toString();
- assertEquals(uri, p.getPackageRelationship().getTargetURI().toString());
+ String uri = p.getDocumentPart().getPackagePart().getPartName().getURI().toString();
+ assertEquals(uri, p.getRelationship().getTargetURI().toString());
if (!context.containsKey(uri)) {
traverse(p, context);
} else {
POIXMLDocumentPart prev = context.get(uri);
- assertSame("Duplicate POIXMLDocumentPart instance for targetURI=" + uri, prev, p);
+ assertSame("Duplicate POIXMLDocumentPart instance for targetURI=" + uri, prev, p.getDocumentPart());
}
}
}
@@ -121,9 +129,7 @@ public final class TestPOIXMLDocument {
OPCParser doc = new OPCParser(pkg1);
doc.parse(new TestFactory());
- HashMap<String,POIXMLDocumentPart> context = new HashMap<String,POIXMLDocumentPart>();
- traverse(doc, context);
- context.clear();
+ traverse(doc);
File tmp = TempFile.createTempFile("poi-ooxml", ".tmp");
FileOutputStream out = new FileOutputStream(tmp);
@@ -167,9 +173,7 @@ public final class TestPOIXMLDocument {
doc = new OPCParser(pkg1);
try {
doc.parse(new TestFactory());
- context = new HashMap<String,POIXMLDocumentPart>();
- traverse(doc, context);
- context.clear();
+ traverse(doc);
assertEquals(pkg1.getRelationships().size(), pkg2.getRelationships().size());
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestReadOnlySharedStringsTable.java b/src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestReadOnlySharedStringsTable.java
index ad8470baba..98b51b1313 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestReadOnlySharedStringsTable.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestReadOnlySharedStringsTable.java
@@ -44,8 +44,8 @@ public final class TestReadOnlySharedStringsTable extends TestCase {
List<PackagePart> parts = pkg.getPartsByName(Pattern.compile("/xl/sharedStrings.xml"));
assertEquals(1, parts.size());
- SharedStringsTable stbl = new SharedStringsTable(parts.get(0), null);
- ReadOnlySharedStringsTable rtbl = new ReadOnlySharedStringsTable(parts.get(0), null);
+ SharedStringsTable stbl = new SharedStringsTable(parts.get(0));
+ ReadOnlySharedStringsTable rtbl = new ReadOnlySharedStringsTable(parts.get(0));
assertEquals(stbl.getCount(), rtbl.getCount());
assertEquals(stbl.getUniqueCount(), rtbl.getUniqueCount());
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java
index 0d8143795b..674eb9d45b 100644
--- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java
+++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java
@@ -37,9 +37,7 @@ import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackageAccess;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackagePartName;
-import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
-import org.apache.poi.openxml4j.opc.TargetMode;
import org.apache.poi.xwpf.XWPFTestDataSamples;
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
import org.apache.xmlbeans.XmlCursor;
@@ -264,8 +262,7 @@ public final class TestXWPFDocument {
os.write(nature1);
os.close();
XWPFHeader xwpfHeader = doc.getHeaderArray(0);
- PackageRelationship relationship = xwpfHeader.getPackagePart().addRelationship(partName, TargetMode.INTERNAL, jpgRelation.getRelation());
- XWPFPictureData newPicData = new XWPFPictureData(newImagePart, relationship);
+ XWPFPictureData newPicData = new XWPFPictureData(newImagePart);
/* new part is now ready to rumble */
assertFalse(xwpfHeader.getAllPictures().contains(newPicData));