diff options
Diffstat (limited to 'src/ooxml/java/org/apache')
3 files changed, 70 insertions, 113 deletions
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 e327238b72..d3af46bff7 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java @@ -45,24 +45,13 @@ import org.apache.poi.sl.draw.Drawable; import org.apache.poi.sl.usermodel.PictureData; import org.apache.poi.sl.usermodel.Placeholder; import org.apache.poi.sl.usermodel.Sheet; -import org.apache.poi.util.Beta; -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.Removal; +import org.apache.poi.util.*; import org.apache.xmlbeans.XmlCursor; import org.apache.xmlbeans.XmlException; import org.apache.xmlbeans.XmlObject; import org.apache.xmlbeans.XmlOptions; import org.apache.xmlbeans.impl.values.XmlAnyTypeImpl; -import org.openxmlformats.schemas.presentationml.x2006.main.CTCommonSlideData; -import org.openxmlformats.schemas.presentationml.x2006.main.CTConnector; -import org.openxmlformats.schemas.presentationml.x2006.main.CTGraphicalObjectFrame; -import org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape; -import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture; -import org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder; -import org.openxmlformats.schemas.presentationml.x2006.main.CTShape; +import org.openxmlformats.schemas.presentationml.x2006.main.*; @Beta public abstract class XSLFSheet extends POIXMLDocumentPart @@ -156,21 +145,12 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { * @deprecated POI 3.16 beta 1. use {@link XSLFTable} instead */ @Removal(version="3.18") - @Internal - public XSLFCommonSlideData getCommonSlideData() { - return _commonSlideData; - } - - /* - * @deprecated POI 3.16 beta 1. use {@link XSLFTable} instead - */ - @Removal(version="3.18") protected void setCommonSlideData(CTCommonSlideData data) { - if(data == null) { - _commonSlideData = null; - } else { - _commonSlideData = new XSLFCommonSlideData(data); - } + if(data == null) { + _commonSlideData = null; + } else { + _commonSlideData = new XSLFCommonSlideData(data); + } } private XSLFDrawing getDrawing(){ diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java index 9dcf1eaa04..9cc402ba02 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java @@ -49,13 +49,7 @@ import org.apache.poi.ss.usermodel.Row.MissingCellPolicy; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.SheetVisibility; import org.apache.poi.ss.usermodel.Workbook; -import org.apache.poi.util.IOUtils; -import org.apache.poi.util.Internal; -import org.apache.poi.util.NotImplemented; -import org.apache.poi.util.POILogFactory; -import org.apache.poi.util.POILogger; -import org.apache.poi.util.Removal; -import org.apache.poi.util.TempFile; +import org.apache.poi.util.*; import org.apache.poi.xssf.model.SharedStringsTable; import org.apache.poi.xssf.usermodel.XSSFChartSheet; import org.apache.poi.xssf.usermodel.XSSFSheet; @@ -1011,20 +1005,6 @@ public class SXSSFWorkbook implements Workbook { } /** - * @param nameIndex position of the named range (0-based) - * @return the defined name at the specified index - * @throws IllegalArgumentException if the supplied index is invalid - * @deprecated 3.16. New projects should avoid accessing named ranges by index. - */ - @Override - @Deprecated - @Removal(version="3.18") - public Name getNameAt(int nameIndex) { - //noinspection deprecation - return _wb.getNameAt(nameIndex); - } - - /** * Creates a new (uninitialised) defined name in this workbook * * @return new defined name object @@ -1036,56 +1016,6 @@ public class SXSSFWorkbook implements Workbook { } /** - * Gets the defined name index by name - * - * <i>Note:</i> Excel defined names are case-insensitive and - * this method performs a case-insensitive search. - * - * @param name the name of the defined name - * @return zero based index of the defined name. <code>-1</code> if not found. - * - * @deprecated 3.16. New projects should avoid accessing named ranges by index. - * Use {@link #getName(String)} instead. - */ - @Override - @Deprecated - @Removal(version="3.18") - public int getNameIndex(String name) { - //noinspection deprecation - return _wb.getNameIndex(name); - } - - /** - * Remove the defined name at the specified index - * - * @param index named range index (0 based) - * - * @deprecated 3.16. New projects should use {@link #removeName(Name)}. - */ - @Override - @Deprecated - @Removal(version="3.18") - public void removeName(int index) { - //noinspection deprecation - _wb.removeName(index); - } - - /** - * Remove a defined name by name - * - * @param name the name of the defined name - * - * @deprecated 3.16. New projects should use {@link #removeName(Name)}. - */ - @Override - @Deprecated - @Removal(version="3.18") - public void removeName(String name) { - //noinspection deprecation - _wb.removeName(name); - } - - /** * Remove the given defined name * * @param name the name to remove @@ -1269,17 +1199,72 @@ public class SXSSFWorkbook implements Workbook { _wb.setSheetHidden(sheetIx,hidden); } - @Removal(version="3.18") + @Override + public void setSheetVisibility(int sheetIx, SheetVisibility visibility) { + _wb.setSheetVisibility(sheetIx, visibility); + } + + /** + * @param nameIndex position of the named range (0-based) + * @return the defined name at the specified index + * @throws IllegalArgumentException if the supplied index is invalid + * @deprecated 3.16. New projects should avoid accessing named ranges by index. + */ + @Override @Deprecated + @Removal(version="3.20") + public Name getNameAt(int nameIndex) { + //noinspection deprecation + return _wb.getNameAt(nameIndex); + } + + /** + * Gets the defined name index by name + * + * <i>Note:</i> Excel defined names are case-insensitive and + * this method performs a case-insensitive search. + * + * @param name the name of the defined name + * @return zero based index of the defined name. <code>-1</code> if not found. + * + * @deprecated 3.16. New projects should avoid accessing named ranges by index. + * Use {@link #getName(String)} instead. + */ @Override - public void setSheetHidden(int sheetIx, int hidden) - { - _wb.setSheetHidden(sheetIx,hidden); + @Deprecated + @Removal(version="3.20") + public int getNameIndex(String name) { + //noinspection deprecation + return _wb.getNameIndex(name); } - + + /** + * Remove the defined name at the specified index + * @param index named range index (0 based) + * + * @deprecated 3.16. New projects should use {@link #removeName(Name)}. + */ @Override - public void setSheetVisibility(int sheetIx, SheetVisibility visibility) { - _wb.setSheetVisibility(sheetIx, visibility); + @Deprecated + @Removal(version="3.20") + public void removeName(int index) { + //noinspection deprecation + _wb.removeName(index); + } + + /** + * Remove a defined name by name + * + * @param name the name of the defined name + * + * @deprecated 3.16. New projects should use {@link #removeName(Name)}. + */ + @Override + @Deprecated + @Removal(version="3.20") + public void removeName(String name) { + //noinspection deprecation + _wb.removeName(name); } /** 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 1774932a4e..e3e8f56eb7 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -1906,14 +1906,6 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook { setSheetVisibility(sheetIx, hidden ? SheetVisibility.HIDDEN : SheetVisibility.VISIBLE); } - @Deprecated - @Removal(version="3.18") - @Override - public void setSheetHidden(int sheetIx, int state) { - WorkbookUtil.validateSheetState(state); - setSheetVisibility(sheetIx, SheetVisibility.values()[state]); - } - @Override public void setSheetVisibility(int sheetIx, SheetVisibility visibility) { validateSheetIndex(sheetIx); |