From d9b63eb569a27ee6b4da9000782caa234302850b Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 18 Sep 2017 12:27:36 +0000 Subject: [PATCH] remove some deprecated code slated for removal in 3.18 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808687 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/ss/usermodel/Textbox.java | 81 ------------------- .../poi/xslf/usermodel/DrawingParagraph.java | 57 ------------- .../poi/xslf/usermodel/DrawingTableCell.java | 39 --------- .../poi/xslf/usermodel/DrawingTableRow.java | 45 ----------- .../poi/xslf/usermodel/DrawingTextBody.java | 45 ----------- .../usermodel/DrawingTextPlaceholder.java | 62 -------------- 6 files changed, 329 deletions(-) delete mode 100644 src/java/org/apache/poi/ss/usermodel/Textbox.java delete mode 100644 src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingParagraph.java delete mode 100644 src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableCell.java delete mode 100644 src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java delete mode 100644 src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java delete mode 100644 src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextPlaceholder.java 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 index 9ba68498c5..0000000000 --- a/src/java/org/apache/poi/ss/usermodel/Textbox.java +++ /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 index 6a6ee38074..0000000000 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingParagraph.java +++ /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 index 2924fbc746..0000000000 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableCell.java +++ /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 index 08a693959d..0000000000 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java +++ /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