*
* @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)
+ * @see #read(POIXMLFactory, java.util.Map)
*/
public POIXMLDocumentPart(PackagePart part, PackageRelationship rel){
this.packagePart = 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
+ * current core document
*/
protected final void rebase(OPCPackage pkg) throws InvalidFormatException {
PackageRelationshipCollection cores =
* {@link POIXMLDocumentPart} to the {@link PackagePart} of the target
* {@link POIXMLDocumentPart} with a {@link PackageRelationship#getId()}
* matching the given parameter value.
- *
+ *
* @param id
* The relation id to look for
* @return the target part of the relation, or null, if none exists
* {@link PackageRelationship}, that sources from the {@link PackagePart} of
* this {@link POIXMLDocumentPart} to the {@link PackagePart} of the given
* parameter value.
- *
+ *
* @param part
* The {@link POIXMLDocumentPart} for which the according
* relation-id shall be found.
/**
* Remove the relation to the specified part in this package and remove the
* part, if it is no longer needed and flag is set to true.
- *
+ *
* @param part
* The related part, to which the relation shall be removed.
* @param removeUnusedParts
* @param noRelation if true, then no relationship is added.
* @return the created child POIXMLDocumentPart
*/
- @SuppressWarnings("null")
- protected final POIXMLDocumentPart createRelationship(POIXMLRelation descriptor, POIXMLFactory factory, int idx, boolean noRelation){
+ protected final POIXMLDocumentPart createRelationship(POIXMLRelation descriptor, POIXMLFactory factory, int idx, boolean noRelation){
try {
PackagePartName ppName = PackagingURIHelper.createPartName(descriptor.getFileName(idx));
PackageRelationship rel = null;
}
}
}
-
+
/**
* Get the PackagePart that is the target of a relationship from this Part.
*
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
import java.util.regex.Pattern;
import javax.xml.namespace.QName;
import org.apache.poi.POIXMLDocumentPart;
import org.apache.poi.POIXMLException;
import org.apache.poi.POIXMLProperties;
-import org.apache.poi.ss.formula.SheetNameFormatter;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationshipTypes;
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
import org.apache.poi.openxml4j.opc.TargetMode;
+import org.apache.poi.ss.formula.SheetNameFormatter;
import org.apache.poi.ss.formula.udf.IndexedUDFFinder;
import org.apache.poi.ss.formula.udf.UDFFinder;
import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.CellReference;
import org.apache.poi.ss.util.WorkbookUtil;
-import org.apache.poi.util.*;
-import org.apache.poi.xssf.model.*;
+import org.apache.poi.util.IOUtils;
+import org.apache.poi.util.Internal;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
+import org.apache.poi.util.PackageHelper;
+import org.apache.poi.xssf.model.CalculationChain;
+import org.apache.poi.xssf.model.MapInfo;
+import org.apache.poi.xssf.model.SharedStringsTable;
+import org.apache.poi.xssf.model.StylesTable;
+import org.apache.poi.xssf.model.ThemesTable;
import org.apache.poi.xssf.usermodel.helpers.XSSFFormulaUtils;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
/**
* Get the document's embedded files.
*/
- public List<PackagePart> getAllEmbedds() throws OpenXML4JException {
+ @Override
+ public List<PackagePart> getAllEmbedds() throws OpenXML4JException {
List<PackagePart> embedds = new LinkedList<PackagePart>();
for(XSSFSheet sheet : sheets){