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
This commit is contained in:
PJ Fanning 2017-09-18 12:27:36 +00:00
parent 16d262d0b4
commit d9b63eb569
6 changed files with 0 additions and 329 deletions

View File

@ -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);
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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();
}
}