add @NotImplemented annotation to methods that are not implemented

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738469 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-04-10 21:28:41 +00:00
parent f2e250d7e4
commit f49047e733
11 changed files with 128 additions and 20 deletions

View File

@ -18,6 +18,7 @@
package org.apache.poi.hssf.usermodel; package org.apache.poi.hssf.usermodel;
import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger; import org.apache.poi.util.POILogger;
import org.apache.poi.util.SuppressForbidden; import org.apache.poi.util.SuppressForbidden;
@ -60,14 +61,14 @@ import java.text.AttributedCharacterIterator;
*/ */
public class EscherGraphics extends Graphics public class EscherGraphics extends Graphics
{ {
private HSSFShapeGroup escherGroup; private final HSSFShapeGroup escherGroup;
private HSSFWorkbook workbook; private final HSSFWorkbook workbook;
private float verticalPointsPerPixel = 1.0f; private float verticalPointsPerPixel = 1.0f;
private float verticalPixelsPerPoint; private final float verticalPixelsPerPoint;
private Color foreground; private Color foreground;
private Color background = Color.white; private Color background = Color.white;
private Font font; private Font font;
private static POILogger logger = POILogFactory.getLogger(EscherGraphics.class); private static final POILogger logger = POILogFactory.getLogger(EscherGraphics.class);
/** /**
* Construct an escher graphics object. * Construct an escher graphics object.
@ -121,6 +122,8 @@ public class EscherGraphics extends Graphics
// } // }
@Override
@NotImplemented
public void clearRect(int x, int y, int width, int height) public void clearRect(int x, int y, int width, int height)
{ {
Color color = foreground; Color color = foreground;
@ -129,18 +132,23 @@ public class EscherGraphics extends Graphics
setColor(color); setColor(color);
} }
@Override
@NotImplemented
public void clipRect(int x, int y, int width, int height) public void clipRect(int x, int y, int width, int height)
{ {
if (logger.check( POILogger.WARN )) if (logger.check( POILogger.WARN ))
logger.log(POILogger.WARN,"clipRect not supported"); logger.log(POILogger.WARN,"clipRect not supported");
} }
@Override
@NotImplemented
public void copyArea(int x, int y, int width, int height, int dx, int dy) public void copyArea(int x, int y, int width, int height, int dx, int dy)
{ {
if (logger.check( POILogger.WARN )) if (logger.check( POILogger.WARN ))
logger.log(POILogger.WARN,"copyArea not supported"); logger.log(POILogger.WARN,"copyArea not supported");
} }
@Override
public Graphics create() public Graphics create()
{ {
EscherGraphics g = new EscherGraphics(escherGroup, workbook, EscherGraphics g = new EscherGraphics(escherGroup, workbook,
@ -148,10 +156,13 @@ public class EscherGraphics extends Graphics
return g; return g;
} }
@Override
public void dispose() public void dispose()
{ {
} }
@Override
@NotImplemented
public void drawArc(int x, int y, int width, int height, public void drawArc(int x, int y, int width, int height,
int startAngle, int arcAngle) int startAngle, int arcAngle)
{ {
@ -159,6 +170,8 @@ public class EscherGraphics extends Graphics
logger.log(POILogger.WARN,"drawArc not supported"); logger.log(POILogger.WARN,"drawArc not supported");
} }
@Override
@NotImplemented
public boolean drawImage(Image img, public boolean drawImage(Image img,
int dx1, int dy1, int dx2, int dy2, int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2, int sx1, int sy1, int sx2, int sy2,
@ -171,6 +184,8 @@ public class EscherGraphics extends Graphics
return true; return true;
} }
@Override
@NotImplemented
public boolean drawImage(Image img, public boolean drawImage(Image img,
int dx1, int dy1, int dx2, int dy2, int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2, int sx1, int sy1, int sx2, int sy2,
@ -181,26 +196,31 @@ public class EscherGraphics extends Graphics
return true; return true;
} }
@Override
public boolean drawImage(Image image, int i, int j, int k, int l, Color color, ImageObserver imageobserver) public boolean drawImage(Image image, int i, int j, int k, int l, Color color, ImageObserver imageobserver)
{ {
return drawImage(image, i, j, i + k, j + l, 0, 0, image.getWidth(imageobserver), image.getHeight(imageobserver), color, imageobserver); return drawImage(image, i, j, i + k, j + l, 0, 0, image.getWidth(imageobserver), image.getHeight(imageobserver), color, imageobserver);
} }
@Override
public boolean drawImage(Image image, int i, int j, int k, int l, ImageObserver imageobserver) public boolean drawImage(Image image, int i, int j, int k, int l, ImageObserver imageobserver)
{ {
return drawImage(image, i, j, i + k, j + l, 0, 0, image.getWidth(imageobserver), image.getHeight(imageobserver), imageobserver); return drawImage(image, i, j, i + k, j + l, 0, 0, image.getWidth(imageobserver), image.getHeight(imageobserver), imageobserver);
} }
@Override
public boolean drawImage(Image image, int i, int j, Color color, ImageObserver imageobserver) public boolean drawImage(Image image, int i, int j, Color color, ImageObserver imageobserver)
{ {
return drawImage(image, i, j, image.getWidth(imageobserver), image.getHeight(imageobserver), color, imageobserver); return drawImage(image, i, j, image.getWidth(imageobserver), image.getHeight(imageobserver), color, imageobserver);
} }
@Override
public boolean drawImage(Image image, int i, int j, ImageObserver imageobserver) public boolean drawImage(Image image, int i, int j, ImageObserver imageobserver)
{ {
return drawImage(image, i, j, image.getWidth(imageobserver), image.getHeight(imageobserver), imageobserver); return drawImage(image, i, j, image.getWidth(imageobserver), image.getHeight(imageobserver), imageobserver);
} }
@Override
public void drawLine(int x1, int y1, int x2, int y2) public void drawLine(int x1, int y1, int x2, int y2)
{ {
drawLine(x1,y1,x2,y2,0); drawLine(x1,y1,x2,y2,0);
@ -214,6 +234,7 @@ public class EscherGraphics extends Graphics
shape.setLineStyleColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue()); shape.setLineStyleColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue());
} }
@Override
public void drawOval(int x, int y, int width, int height) public void drawOval(int x, int y, int width, int height)
{ {
HSSFSimpleShape shape = escherGroup.createShape(new HSSFChildAnchor(x,y,x+width,y+height) ); HSSFSimpleShape shape = escherGroup.createShape(new HSSFChildAnchor(x,y,x+width,y+height) );
@ -223,6 +244,7 @@ public class EscherGraphics extends Graphics
shape.setNoFill(true); shape.setNoFill(true);
} }
@Override
public void drawPolygon(int xPoints[], int yPoints[], public void drawPolygon(int xPoints[], int yPoints[],
int nPoints) int nPoints)
{ {
@ -246,6 +268,8 @@ public class EscherGraphics extends Graphics
return result; return result;
} }
@Override
@NotImplemented
public void drawPolyline(int xPoints[], int yPoints[], public void drawPolyline(int xPoints[], int yPoints[],
int nPoints) int nPoints)
{ {
@ -253,12 +277,16 @@ public class EscherGraphics extends Graphics
logger.log(POILogger.WARN,"drawPolyline not supported"); logger.log(POILogger.WARN,"drawPolyline not supported");
} }
@Override
@NotImplemented
public void drawRect(int x, int y, int width, int height) public void drawRect(int x, int y, int width, int height)
{ {
if (logger.check( POILogger.WARN )) if (logger.check( POILogger.WARN ))
logger.log(POILogger.WARN,"drawRect not supported"); logger.log(POILogger.WARN,"drawRect not supported");
} }
@Override
@NotImplemented
public void drawRoundRect(int x, int y, int width, int height, public void drawRoundRect(int x, int y, int width, int height,
int arcWidth, int arcHeight) int arcWidth, int arcHeight)
{ {
@ -266,6 +294,7 @@ public class EscherGraphics extends Graphics
logger.log(POILogger.WARN,"drawRoundRect not supported"); logger.log(POILogger.WARN,"drawRoundRect not supported");
} }
@Override
public void drawString(String str, int x, int y) public void drawString(String str, int x, int y)
{ {
if (str == null || str.equals("")) if (str == null || str.equals(""))
@ -326,6 +355,7 @@ public class EscherGraphics extends Graphics
} }
@Override
public void drawString(AttributedCharacterIterator iterator, public void drawString(AttributedCharacterIterator iterator,
int x, int y) int x, int y)
{ {
@ -333,6 +363,7 @@ public class EscherGraphics extends Graphics
logger.log(POILogger.WARN,"drawString not supported"); logger.log(POILogger.WARN,"drawString not supported");
} }
@Override
public void fillArc(int x, int y, int width, int height, public void fillArc(int x, int y, int width, int height,
int startAngle, int arcAngle) int startAngle, int arcAngle)
{ {
@ -340,6 +371,7 @@ public class EscherGraphics extends Graphics
logger.log(POILogger.WARN,"fillArc not supported"); logger.log(POILogger.WARN,"fillArc not supported");
} }
@Override
public void fillOval(int x, int y, int width, int height) public void fillOval(int x, int y, int width, int height)
{ {
HSSFSimpleShape shape = escherGroup.createShape(new HSSFChildAnchor( x, y, x + width, y + height ) ); HSSFSimpleShape shape = escherGroup.createShape(new HSSFChildAnchor( x, y, x + width, y + height ) );
@ -369,6 +401,7 @@ public class EscherGraphics extends Graphics
* @param nPoints the total number of points in the polygon. * @param nPoints the total number of points in the polygon.
* @see java.awt.Graphics#drawPolygon(int[], int[], int) * @see java.awt.Graphics#drawPolygon(int[], int[], int)
*/ */
@Override
public void fillPolygon(int xPoints[], int yPoints[], public void fillPolygon(int xPoints[], int yPoints[],
int nPoints) int nPoints)
{ {
@ -405,6 +438,7 @@ public class EscherGraphics extends Graphics
return result; return result;
} }
@Override
public void fillRect(int x, int y, int width, int height) public void fillRect(int x, int y, int width, int height)
{ {
HSSFSimpleShape shape = escherGroup.createShape(new HSSFChildAnchor( x, y, x + width, y + height ) ); HSSFSimpleShape shape = escherGroup.createShape(new HSSFChildAnchor( x, y, x + width, y + height ) );
@ -414,6 +448,7 @@ public class EscherGraphics extends Graphics
shape.setLineStyleColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue()); shape.setLineStyleColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue());
} }
@Override
public void fillRoundRect(int x, int y, int width, int height, public void fillRoundRect(int x, int y, int width, int height,
int arcWidth, int arcHeight) int arcWidth, int arcHeight)
{ {
@ -421,26 +456,31 @@ public class EscherGraphics extends Graphics
logger.log(POILogger.WARN,"fillRoundRect not supported"); logger.log(POILogger.WARN,"fillRoundRect not supported");
} }
@Override
public Shape getClip() public Shape getClip()
{ {
return getClipBounds(); return getClipBounds();
} }
@Override
public Rectangle getClipBounds() public Rectangle getClipBounds()
{ {
return null; return null;
} }
@Override
public Color getColor() public Color getColor()
{ {
return foreground; return foreground;
} }
@Override
public Font getFont() public Font getFont()
{ {
return font; return font;
} }
@Override
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@SuppressForbidden @SuppressForbidden
public FontMetrics getFontMetrics(Font f) public FontMetrics getFontMetrics(Font f)
@ -448,38 +488,48 @@ public class EscherGraphics extends Graphics
return Toolkit.getDefaultToolkit().getFontMetrics(f); return Toolkit.getDefaultToolkit().getFontMetrics(f);
} }
@Override
public void setClip(int x, int y, int width, int height) public void setClip(int x, int y, int width, int height)
{ {
setClip(new Rectangle(x,y,width,height)); setClip(new Rectangle(x,y,width,height));
} }
@Override
@NotImplemented
public void setClip(Shape shape) public void setClip(Shape shape)
{ {
// ignore... not implemented // ignore... not implemented
} }
@Override
public void setColor(Color color) public void setColor(Color color)
{ {
foreground = color; foreground = color;
} }
@Override
public void setFont(Font f) public void setFont(Font f)
{ {
font = f; font = f;
} }
@Override
@NotImplemented
public void setPaintMode() public void setPaintMode()
{ {
if (logger.check( POILogger.WARN )) if (logger.check( POILogger.WARN ))
logger.log(POILogger.WARN,"setPaintMode not supported"); logger.log(POILogger.WARN,"setPaintMode not supported");
} }
@Override
@NotImplemented
public void setXORMode(Color color) public void setXORMode(Color color)
{ {
if (logger.check( POILogger.WARN )) if (logger.check( POILogger.WARN ))
logger.log(POILogger.WARN,"setXORMode not supported"); logger.log(POILogger.WARN,"setXORMode not supported");
} }
@Override
@NotImplemented
public void translate(int x, int y) public void translate(int x, int y)
{ {
if (logger.check( POILogger.WARN )) if (logger.check( POILogger.WARN ))

View File

@ -50,6 +50,7 @@ import org.apache.poi.ss.usermodel.ClientAnchor;
import org.apache.poi.ss.usermodel.Drawing; import org.apache.poi.ss.usermodel.Drawing;
import org.apache.poi.util.HexDump; import org.apache.poi.util.HexDump;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.StringUtil; import org.apache.poi.util.StringUtil;
/** /**
@ -518,6 +519,7 @@ public final class HSSFPatriarch implements HSSFShapeContainer, Drawing {
return new HSSFClientAnchor(dx1, dy1, dx2, dy2, (short) col1, row1, (short) col2, row2); return new HSSFClientAnchor(dx1, dy1, dx2, dy2, (short) col1, row1, (short) col2, row2);
} }
@NotImplemented
public Chart createChart(ClientAnchor anchor) { public Chart createChart(ClientAnchor anchor) {
throw new RuntimeException("NotImplemented"); throw new RuntimeException("NotImplemented");
} }

View File

@ -60,6 +60,7 @@ import org.apache.poi.sl.usermodel.StrokeStyle;
import org.apache.poi.sl.usermodel.TextBox; import org.apache.poi.sl.usermodel.TextBox;
import org.apache.poi.sl.usermodel.TextRun; import org.apache.poi.sl.usermodel.TextRun;
import org.apache.poi.sl.usermodel.VerticalAlignment; import org.apache.poi.sl.usermodel.VerticalAlignment;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger; import org.apache.poi.util.POILogger;
import org.apache.poi.util.SuppressForbidden; import org.apache.poi.util.SuppressForbidden;
@ -381,6 +382,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* <code>Clip</code>. If <code>s</code> is <code>null</code>, * <code>Clip</code>. If <code>s</code> is <code>null</code>,
* this method clears the current <code>Clip</code>. * this method clears the current <code>Clip</code>.
*/ */
@NotImplemented
public void clip(Shape s){ public void clip(Shape s){
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -403,6 +405,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.Graphics#setClip(Shape) * @see java.awt.Graphics#setClip(Shape)
* @since JDK1.1 * @since JDK1.1
*/ */
@NotImplemented
public Shape getClip(){ public Shape getClip(){
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -669,6 +672,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/ */
@NotImplemented
public boolean drawImage(Image img, int x, int y, public boolean drawImage(Image img, int x, int y,
Color bgcolor, Color bgcolor,
ImageObserver observer){ ImageObserver observer){
@ -717,6 +721,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/ */
@NotImplemented
public boolean drawImage(Image img, int x, int y, public boolean drawImage(Image img, int x, int y,
int width, int height, int width, int height,
Color bgcolor, Color bgcolor,
@ -776,6 +781,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
* @since JDK1.1 * @since JDK1.1
*/ */
@NotImplemented
public boolean drawImage(Image img, public boolean drawImage(Image img,
int dx1, int dy1, int dx2, int dy2, int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2, int sx1, int sy1, int sx2, int sy2,
@ -839,6 +845,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
* @since JDK1.1 * @since JDK1.1
*/ */
@NotImplemented
public boolean drawImage(Image img, public boolean drawImage(Image img,
int dx1, int dy1, int dx2, int dy2, int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2, int sx1, int sy1, int sx2, int sy2,
@ -882,6 +889,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/ */
@NotImplemented
public boolean drawImage(Image img, int x, int y, public boolean drawImage(Image img, int x, int y,
ImageObserver observer) { ImageObserver observer) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
@ -1069,6 +1077,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.Graphics#setClip(int, int, int, int) * @see java.awt.Graphics#setClip(int, int, int, int)
* @since JDK1.1 * @since JDK1.1
*/ */
@NotImplemented
public void setClip(Shape clip) { public void setClip(Shape clip) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1368,6 +1377,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.Graphics#setPaintMode * @see java.awt.Graphics#setPaintMode
* @see java.awt.AlphaComposite * @see java.awt.AlphaComposite
*/ */
@NotImplemented
public void setComposite(Composite comp){ public void setComposite(Composite comp){
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1381,6 +1391,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* which defines a compositing style. * which defines a compositing style.
* @see #setComposite * @see #setComposite
*/ */
@NotImplemented
public Composite getComposite(){ public Composite getComposite(){
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1524,6 +1535,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see #setComposite * @see #setComposite
* @see #setClip * @see #setClip
*/ */
@NotImplemented
public void drawString(AttributedCharacterIterator iterator, float x, float y) { public void drawString(AttributedCharacterIterator iterator, float x, float y) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1630,10 +1642,11 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see #clip * @see #clip
* @see #setClip(Shape) * @see #setClip(Shape)
*/ */
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs) { @NotImplemented
if (log.check(POILogger.WARN)) { public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs) {
log.log(POILogger.WARN, "Not implemented"); if (log.check(POILogger.WARN)) {
} log.log(POILogger.WARN, "Not implemented");
}
return false; return false;
} }
@ -1673,6 +1686,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/ */
@NotImplemented
public boolean drawImage(Image img, int x, int y, public boolean drawImage(Image img, int x, int y,
int width, int height, int width, int height,
ImageObserver observer) { ImageObserver observer) {
@ -1725,6 +1739,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* drawn twice, then all pixels are restored to their original values. * drawn twice, then all pixels are restored to their original values.
* @param c1 the XOR alternation color * @param c1 the XOR alternation color
*/ */
@NotImplemented
public void setXORMode(Color c1) { public void setXORMode(Color c1) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1738,6 +1753,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* overwrite mode. All subsequent rendering operations will * overwrite mode. All subsequent rendering operations will
* overwrite the destination with the current color. * overwrite the destination with the current color.
*/ */
@NotImplemented
public void setPaintMode() { public void setPaintMode() {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1775,10 +1791,11 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see #setClip * @see #setClip
* @see #drawRenderedImage * @see #drawRenderedImage
*/ */
public void drawRenderedImage(RenderedImage img, AffineTransform xform) { @NotImplemented
if (log.check(POILogger.WARN)) { public void drawRenderedImage(RenderedImage img, AffineTransform xform) {
log.log(POILogger.WARN, "Not implemented"); if (log.check(POILogger.WARN)) {
} log.log(POILogger.WARN, "Not implemented");
}
} }
/** /**
@ -1802,6 +1819,7 @@ public final class SLGraphics extends Graphics2D implements Cloneable {
* @see #clip * @see #clip
* @see #setClip * @see #setClip
*/ */
@NotImplemented
public void drawRenderableImage(RenderableImage img, AffineTransform xform) { public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");

View File

@ -53,6 +53,7 @@ import org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMar
import org.apache.poi.openxml4j.opc.internal.unmarshallers.PackagePropertiesUnmarshaller; import org.apache.poi.openxml4j.opc.internal.unmarshallers.PackagePropertiesUnmarshaller;
import org.apache.poi.openxml4j.opc.internal.unmarshallers.UnmarshallContext; import org.apache.poi.openxml4j.opc.internal.unmarshallers.UnmarshallContext;
import org.apache.poi.openxml4j.util.Nullable; import org.apache.poi.openxml4j.util.Nullable;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger; import org.apache.poi.util.POILogger;
@ -1433,6 +1434,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
* *
* @return <b>true</b> if the package is valid else <b>false</b> * @return <b>true</b> if the package is valid else <b>false</b>
*/ */
@NotImplemented
public boolean validatePackage(OPCPackage pkg) throws InvalidFormatException { public boolean validatePackage(OPCPackage pkg) throws InvalidFormatException {
throw new InvalidOperationException("Not implemented yet !!!"); throw new InvalidOperationException("Not implemented yet !!!");
} }

View File

@ -26,6 +26,7 @@ import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.InvalidOperationException; import org.apache.poi.openxml4j.exceptions.InvalidOperationException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.internal.marshallers.ZipPartMarshaller; import org.apache.poi.openxml4j.opc.internal.marshallers.ZipPartMarshaller;
import org.apache.poi.util.NotImplemented;
/** /**
* Zip implementation of a PackagePart. * Zip implementation of a PackagePart.
@ -124,16 +125,19 @@ public class ZipPackagePart extends PackagePart {
} }
@Override @Override
@NotImplemented
public boolean load(InputStream ios) { public boolean load(InputStream ios) {
throw new InvalidOperationException("Method not implemented !"); throw new InvalidOperationException("Method not implemented !");
} }
@Override @Override
@NotImplemented
public void close() { public void close() {
throw new InvalidOperationException("Method not implemented !"); throw new InvalidOperationException("Method not implemented !");
} }
@Override @Override
@NotImplemented
public void flush() { public void flush() {
throw new InvalidOperationException("Method not implemented !"); throw new InvalidOperationException("Method not implemented !");
} }

View File

@ -18,6 +18,7 @@
package org.apache.poi.xdgf.usermodel.section.geometry; package org.apache.poi.xdgf.usermodel.section.geometry;
import org.apache.poi.POIXMLException; import org.apache.poi.POIXMLException;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.xdgf.usermodel.XDGFCell; import org.apache.poi.xdgf.usermodel.XDGFCell;
import org.apache.poi.xdgf.usermodel.XDGFShape; import org.apache.poi.xdgf.usermodel.XDGFShape;
@ -90,6 +91,7 @@ public class PolyLineTo implements GeometryRow {
} }
@Override @Override
@NotImplemented
public void addToPath(java.awt.geom.Path2D.Double path, XDGFShape parent) { public void addToPath(java.awt.geom.Path2D.Double path, XDGFShape parent) {
if (getDel()) if (getDel())
return; return;

View File

@ -31,6 +31,7 @@ import org.apache.poi.sl.usermodel.Placeholder;
import org.apache.poi.sl.usermodel.Slide; import org.apache.poi.sl.usermodel.Slide;
import org.apache.poi.util.Beta; import org.apache.poi.util.Beta;
import org.apache.poi.util.DocumentHelper; import org.apache.poi.util.DocumentHelper;
import org.apache.poi.util.NotImplemented;
import org.apache.xmlbeans.XmlException; import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.drawingml.x2006.main.CTBlip; import org.openxmlformats.schemas.drawingml.x2006.main.CTBlip;
import org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties; import org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties;
@ -259,6 +260,7 @@ implements Slide<XSLFShape,XSLFTextParagraph> {
return false; return false;
} }
@NotImplemented
public void setFollowMasterBackground(boolean follow) { public void setFollowMasterBackground(boolean follow) {
// not implemented ... also not in the specs // not implemented ... also not in the specs
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
@ -268,12 +270,14 @@ implements Slide<XSLFShape,XSLFTextParagraph> {
return false; return false;
} }
@NotImplemented
public void setFollowMasterColourScheme(boolean follow) { public void setFollowMasterColourScheme(boolean follow) {
// not implemented ... only for OLE objects in the specs // not implemented ... only for OLE objects in the specs
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override @Override
@NotImplemented
public void setNotes(Notes<XSLFShape,XSLFTextParagraph> notes) { public void setNotes(Notes<XSLFShape,XSLFTextParagraph> notes) {
assert(notes instanceof XSLFNotes); assert(notes instanceof XSLFNotes);
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@ -38,6 +38,7 @@ import org.apache.poi.ss.formula.udf.IndexedUDFFinder;
import org.apache.poi.ss.formula.udf.UDFFinder; import org.apache.poi.ss.formula.udf.UDFFinder;
import org.apache.poi.ss.util.AreaReference; import org.apache.poi.ss.util.AreaReference;
import org.apache.poi.ss.util.CellReference; import org.apache.poi.ss.util.CellReference;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.xssf.model.ExternalLinksTable; import org.apache.poi.xssf.model.ExternalLinksTable;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDefinedName; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDefinedName;
@ -280,6 +281,7 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork
} }
} }
@NotImplemented
public int getExternalSheetIndex(String workbookName, String sheetName) { public int getExternalSheetIndex(String workbookName, String sheetName) {
throw new RuntimeException("not implemented yet"); throw new RuntimeException("not implemented yet");
} }

View File

@ -67,6 +67,7 @@ import org.apache.poi.ss.util.WorkbookUtil;
import org.apache.poi.util.Beta; import org.apache.poi.util.Beta;
import org.apache.poi.util.IOUtils; import org.apache.poi.util.IOUtils;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger; import org.apache.poi.util.POILogger;
import org.apache.poi.util.PackageHelper; import org.apache.poi.util.PackageHelper;
@ -1777,11 +1778,13 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
} }
@Override @Override
@NotImplemented
public boolean isHidden() { public boolean isHidden() {
throw new RuntimeException("Not implemented yet"); throw new RuntimeException("Not implemented yet");
} }
@Override @Override
@NotImplemented
public void setHidden(boolean hiddenFlag) { public void setHidden(boolean hiddenFlag) {
throw new RuntimeException("Not implemented yet"); throw new RuntimeException("Not implemented yet");
} }
@ -1937,6 +1940,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
* @param name The name the workbook will be referenced as in formulas * @param name The name the workbook will be referenced as in formulas
* @param workbook The open workbook to fetch the link required information from * @param workbook The open workbook to fetch the link required information from
*/ */
@NotImplemented
public int linkExternalWorkbook(String name, Workbook workbook) { public int linkExternalWorkbook(String name, Workbook workbook) {
throw new RuntimeException("Not Implemented - see bug #57184"); throw new RuntimeException("Not Implemented - see bug #57184");
} }

View File

@ -61,6 +61,7 @@ import org.apache.poi.hslf.usermodel.HSLFTextRun;
import org.apache.poi.sl.draw.DrawPaint; import org.apache.poi.sl.draw.DrawPaint;
import org.apache.poi.sl.usermodel.StrokeStyle; import org.apache.poi.sl.usermodel.StrokeStyle;
import org.apache.poi.sl.usermodel.VerticalAlignment; import org.apache.poi.sl.usermodel.VerticalAlignment;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger; import org.apache.poi.util.POILogger;
import org.apache.poi.util.SuppressForbidden; import org.apache.poi.util.SuppressForbidden;
@ -139,7 +140,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.Color * @see java.awt.Color
* @see java.awt.Graphics#setColor * @see java.awt.Graphics#setColor
*/ */
public Color getColor(){ public Color getColor(){
return _foreground; return _foreground;
} }
@ -197,7 +198,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* color during the rendering process, or <code>null</code> * color during the rendering process, or <code>null</code>
* @see java.awt.Graphics#setColor * @see java.awt.Graphics#setColor
*/ */
public void setPaint(Paint paint){ public void setPaint(Paint paint){
if(paint == null) return; if(paint == null) return;
this._paint = paint; this._paint = paint;
@ -389,6 +390,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* <code>Clip</code>. If <code>s</code> is <code>null</code>, * <code>Clip</code>. If <code>s</code> is <code>null</code>,
* this method clears the current <code>Clip</code>. * this method clears the current <code>Clip</code>.
*/ */
@NotImplemented
public void clip(Shape s){ public void clip(Shape s){
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -411,6 +413,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.Graphics#setClip(Shape) * @see java.awt.Graphics#setClip(Shape)
* @since JDK1.1 * @since JDK1.1
*/ */
@NotImplemented
public Shape getClip(){ public Shape getClip(){
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -679,6 +682,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/ */
@NotImplemented
public boolean drawImage(Image img, int x, int y, public boolean drawImage(Image img, int x, int y,
Color bgcolor, Color bgcolor,
ImageObserver observer){ ImageObserver observer){
@ -727,6 +731,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/ */
@NotImplemented
public boolean drawImage(Image img, int x, int y, public boolean drawImage(Image img, int x, int y,
int width, int height, int width, int height,
Color bgcolor, Color bgcolor,
@ -786,6 +791,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
* @since JDK1.1 * @since JDK1.1
*/ */
@NotImplemented
public boolean drawImage(Image img, public boolean drawImage(Image img,
int dx1, int dy1, int dx2, int dy2, int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2, int sx1, int sy1, int sx2, int sy2,
@ -849,6 +855,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
* @since JDK1.1 * @since JDK1.1
*/ */
@NotImplemented
public boolean drawImage(Image img, public boolean drawImage(Image img,
int dx1, int dy1, int dx2, int dy2, int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2, int sx1, int sy1, int sx2, int sy2,
@ -892,6 +899,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/ */
@NotImplemented
public boolean drawImage(Image img, int x, int y, public boolean drawImage(Image img, int x, int y,
ImageObserver observer) { ImageObserver observer) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
@ -1079,6 +1087,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.Graphics#setClip(int, int, int, int) * @see java.awt.Graphics#setClip(int, int, int, int)
* @since JDK1.1 * @since JDK1.1
*/ */
@NotImplemented
public void setClip(Shape clip) { public void setClip(Shape clip) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1378,6 +1387,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.Graphics#setPaintMode * @see java.awt.Graphics#setPaintMode
* @see java.awt.AlphaComposite * @see java.awt.AlphaComposite
*/ */
@NotImplemented
public void setComposite(Composite comp){ public void setComposite(Composite comp){
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1391,6 +1401,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* which defines a compositing style. * which defines a compositing style.
* @see #setComposite * @see #setComposite
*/ */
@NotImplemented
public Composite getComposite(){ public Composite getComposite(){
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1534,6 +1545,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see #setComposite * @see #setComposite
* @see #setClip * @see #setClip
*/ */
@NotImplemented
public void drawString(AttributedCharacterIterator iterator, float x, float y) { public void drawString(AttributedCharacterIterator iterator, float x, float y) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1640,7 +1652,8 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see #clip * @see #clip
* @see #setClip(Shape) * @see #setClip(Shape)
*/ */
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs) { @NotImplemented
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
} }
@ -1683,6 +1696,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver
* @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)
*/ */
@NotImplemented
public boolean drawImage(Image img, int x, int y, public boolean drawImage(Image img, int x, int y,
int width, int height, int width, int height,
ImageObserver observer) { ImageObserver observer) {
@ -1735,6 +1749,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* drawn twice, then all pixels are restored to their original values. * drawn twice, then all pixels are restored to their original values.
* @param c1 the XOR alternation color * @param c1 the XOR alternation color
*/ */
@NotImplemented
public void setXORMode(Color c1) { public void setXORMode(Color c1) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1748,6 +1763,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* overwrite mode. All subsequent rendering operations will * overwrite mode. All subsequent rendering operations will
* overwrite the destination with the current color. * overwrite the destination with the current color.
*/ */
@NotImplemented
public void setPaintMode() { public void setPaintMode() {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");
@ -1785,10 +1801,11 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see #setClip * @see #setClip
* @see #drawRenderedImage * @see #drawRenderedImage
*/ */
public void drawRenderedImage(RenderedImage img, AffineTransform xform) { @NotImplemented
if (log.check(POILogger.WARN)) { public void drawRenderedImage(RenderedImage img, AffineTransform xform) {
log.log(POILogger.WARN, "Not implemented"); if (log.check(POILogger.WARN)) {
} log.log(POILogger.WARN, "Not implemented");
}
} }
/** /**
@ -1812,6 +1829,7 @@ public final class PPGraphics2D extends Graphics2D implements Cloneable {
* @see #clip * @see #clip
* @see #setClip * @see #setClip
*/ */
@NotImplemented
public void drawRenderableImage(RenderableImage img, AffineTransform xform) { public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
if (log.check(POILogger.WARN)) { if (log.check(POILogger.WARN)) {
log.log(POILogger.WARN, "Not implemented"); log.log(POILogger.WARN, "Not implemented");

View File

@ -28,6 +28,7 @@ import org.apache.poi.hssf.record.Record;
import org.apache.poi.hssf.record.RecordFactory; import org.apache.poi.hssf.record.RecordFactory;
import org.apache.poi.hssf.record.TestcaseRecordInputStream; import org.apache.poi.hssf.record.TestcaseRecordInputStream;
import org.apache.poi.hssf.record.UnknownRecord; import org.apache.poi.hssf.record.UnknownRecord;
import org.apache.poi.util.NotImplemented;
/** /**
* enclosing_type describe the purpose here * enclosing_type describe the purpose here
@ -123,6 +124,7 @@ public final class TestEventRecordFactory extends TestCase {
* constructed record in the case of a continued record. * constructed record in the case of a continued record.
* TODO - need a real world example to put in a unit test * TODO - need a real world example to put in a unit test
*/ */
@NotImplemented
public void testCreateContinuedRecord() public void testCreateContinuedRecord()
{ {
// fail("not implemented"); // fail("not implemented");