]> source.dussan.org Git - poi.git/commitdiff
remove some deprecated code slated for removal in 3.18
authorPJ Fanning <fanningpj@apache.org>
Mon, 18 Sep 2017 12:27:36 +0000 (12:27 +0000)
committerPJ Fanning <fanningpj@apache.org>
Mon, 18 Sep 2017 12:27:36 +0000 (12:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808687 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/usermodel/Textbox.java [deleted file]
src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingParagraph.java [deleted file]
src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableCell.java [deleted file]
src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java [deleted file]
src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java [deleted file]
src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextPlaceholder.java [deleted file]

diff --git a/src/java/org/apache/poi/ss/usermodel/Textbox.java b/src/java/org/apache/poi/ss/usermodel/Textbox.java
deleted file mode 100644 (file)
index 9ba6849..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import org.apache.poi.util.Removal;
-
-/**
- * @deprecated 3.16 beta1. This interface isn't implemented ...
- */
-@Deprecated
-@Removal(version="3.18")
-public interface Textbox {
-
-    public final static short OBJECT_TYPE_TEXT = 6;
-
-    /**
-     * @return  the rich text string for this textbox.
-     */
-    RichTextString getString();
-
-    /**
-     * @param string    Sets the rich text string used by this object.
-     */
-    void setString(RichTextString string);
-
-    /**
-     * @return  Returns the left margin within the textbox.
-     */
-    int getMarginLeft();
-
-    /**
-     * Sets the left margin within the textbox.
-     */
-    void setMarginLeft(int marginLeft);
-
-    /**
-     * @return    returns the right margin within the textbox.
-     */
-    int getMarginRight();
-
-    /**
-     * Sets the right margin within the textbox.
-     */
-    void setMarginRight(int marginRight);
-
-    /**
-     * @return  returns the top margin within the textbox.
-     */
-    int getMarginTop();
-
-    /**
-     * Sets the top margin within the textbox.
-     */
-    void setMarginTop(int marginTop);
-
-    /**
-     * Gets the bottom margin within the textbox.
-     */
-    int getMarginBottom();
-
-    /**
-     * Sets the bottom margin within the textbox.
-     */
-    void setMarginBottom(int marginBottom);
-
-}
\ No newline at end of file
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingParagraph.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingParagraph.java
deleted file mode 100644 (file)
index 6a6ee38..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.xslf.usermodel;
-
-import org.apache.poi.util.Removal;
-import org.apache.xmlbeans.XmlCursor;
-import org.apache.xmlbeans.XmlObject;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTextLineBreak;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph;
-
-/*
- * @deprecated POI 3.16 beta 1. Instead iterate over the shapes/notes of the slides
- */
-@Removal(version="3.18")
-public class DrawingParagraph {
-    private final CTTextParagraph p;
-
-    public DrawingParagraph(CTTextParagraph p) {
-        this.p = p;
-    }
-
-    public CharSequence getText() {
-        StringBuilder text = new StringBuilder();
-
-        XmlCursor c = p.newCursor();
-        c.selectPath("./*");
-        while (c.toNextSelection()) {
-            XmlObject o = c.getObject();
-            if (o instanceof CTRegularTextRun) {
-                CTRegularTextRun txrun = (CTRegularTextRun) o;
-                text.append(txrun.getT());
-            } else if (o instanceof CTTextLineBreak) {
-                text.append('\n');
-            }
-        }
-
-        c.dispose();
-        
-        return text;
-    }
-}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableCell.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableCell.java
deleted file mode 100644 (file)
index 2924fbc..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.xslf.usermodel;
-
-import org.apache.poi.util.Removal;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTableCell;
-
-/*
- * @deprecated POI 3.16 beta 1. use {@link XSLFTable} instead
- */
-@Removal(version="3.18")
-public class DrawingTableCell {
-    private final CTTableCell cell;
-    private final DrawingTextBody drawingTextBody;
-
-    public DrawingTableCell(CTTableCell cell) {
-        this.cell = cell;
-        drawingTextBody = new DrawingTextBody(this.cell.getTxBody());
-    }
-
-    public DrawingTextBody getTextBody() {
-        return drawingTextBody;
-    }
-}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java
deleted file mode 100644 (file)
index 08a6939..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.xslf.usermodel;
-
-import org.apache.poi.util.Removal;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTableCell;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTableRow;
-
-/*
- * @deprecated POI 3.16 beta 1. use {@link XSLFTable} instead
- */
-@Removal(version="3.18")
-public class DrawingTableRow {
-    private final CTTableRow row;
-
-    public DrawingTableRow(CTTableRow row) {
-        this.row = row;
-    }
-
-    public DrawingTableCell[] getCells() {
-        CTTableCell[] ctTableCells = row.getTcArray();
-        DrawingTableCell[] o = new DrawingTableCell[ctTableCells.length];
-
-        for (int i=0; i<o.length; i++) {
-            o[i] = new DrawingTableCell(ctTableCells[i]);
-        }
-
-        return o;
-    }
-}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java
deleted file mode 100644 (file)
index d297e3b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.xslf.usermodel;
-
-import org.apache.poi.util.Removal;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph;
-
-/*
- * @deprecated POI 3.16 beta 1. use {@link XSLFTextShape} instead
- */
-@Removal(version="3.18")
-public class DrawingTextBody {
-    private final CTTextBody textBody;
-
-    public DrawingTextBody(CTTextBody textBody) {
-       this.textBody = textBody;
-    }
-
-    public DrawingParagraph[] getParagraphs() {
-        CTTextParagraph[] paragraphs = textBody.getPArray();
-        DrawingParagraph[] o = new DrawingParagraph[paragraphs.length];
-
-        for (int i=0; i<o.length; i++) {
-            o[i] = new DrawingParagraph(paragraphs[i]);
-        }
-
-        return o;
-    }
-}
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextPlaceholder.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextPlaceholder.java
deleted file mode 100644 (file)
index e22aa52..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.xslf.usermodel;
-
-import org.apache.poi.util.Removal;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody;
-import org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder;
-import org.openxmlformats.schemas.presentationml.x2006.main.STPlaceholderType;
-
-/**
- * A {@link DrawingTextBody} which is a placeholder
- * @author nick
- *
- */
-/*
- * @deprecated POI 3.16 beta 1. use {@link XSLFSimpleShape#isPlaceholder} instead
- */
-@Removal(version="3.18")
-public class DrawingTextPlaceholder extends DrawingTextBody {
-    private final CTPlaceholder placeholder;
-
-    public DrawingTextPlaceholder(CTTextBody textBody, CTPlaceholder placeholder) {
-       super(textBody);
-       this.placeholder = placeholder;
-    }
-    
-    /**
-     * What kind of placeholder is this?
-     */
-    public String getPlaceholderType() {
-       return placeholder.getType().toString();
-    }
-
-    /**
-     * What kind of placeholder is this?
-     */
-    public STPlaceholderType.Enum getPlaceholderTypeEnum() {
-       return placeholder.getType();
-    }
-
-    /**
-     * Is the PlaceHolder text customised?
-     */
-    public boolean isPlaceholderCustom() {
-       return placeholder.getHasCustomPrompt();
-    }
-}