diff options
author | Yegor Kozlov <yegor@apache.org> | 2010-05-30 06:57:23 +0000 |
---|---|---|
committer | Yegor Kozlov <yegor@apache.org> | 2010-05-30 06:57:23 +0000 |
commit | 34afd001ead64914e039797be937d68247a3a4bb (patch) | |
tree | 06f8759433c99fad7d864101e2738f87140123be /src | |
parent | 8f9937a56900b6d22015e916611d9e6f7b612990 (diff) | |
download | poi-34afd001ead64914e039797be937d68247a3a4bb.tar.gz poi-34afd001ead64914e039797be937d68247a3a4bb.zip |
more cleanup of deprecation warnings generated by javac
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@949485 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
4 files changed, 8 insertions, 4 deletions
diff --git a/src/contrib/src/org/apache/poi/contrib/metrics/FontMetricsDumper.java b/src/contrib/src/org/apache/poi/contrib/metrics/FontMetricsDumper.java index d008050369..068c1a98f3 100644 --- a/src/contrib/src/org/apache/poi/contrib/metrics/FontMetricsDumper.java +++ b/src/contrib/src/org/apache/poi/contrib/metrics/FontMetricsDumper.java @@ -23,6 +23,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties; +@SuppressWarnings("deprecation") public class FontMetricsDumper { public static void main( String[] args ) throws IOException diff --git a/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java b/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java index 67304f7b78..41393d1a56 100644 --- a/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java +++ b/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java @@ -695,6 +695,7 @@ public class DummyGraphics2d return g2D.getClipBounds( r ); } + @SuppressWarnings("deprecation") public Rectangle getClipRect() { System.out.println( "getClipRect():" ); return g2D.getClipRect(); diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java index bcd9673a53..7500ac7b7b 100644 --- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java +++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java @@ -432,6 +432,7 @@ public class EscherGraphics return null; } + @SuppressWarnings("deprecation") public Rectangle getClipRect() { return getClipBounds(); @@ -447,6 +448,7 @@ public class EscherGraphics return font; } + @SuppressWarnings("deprecation") public FontMetrics getFontMetrics(Font f) { return Toolkit.getDefaultToolkit().getFontMetrics(f); diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java index 3258a9f4d2..60c5386957 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java @@ -70,7 +70,7 @@ public class TOC { p.setRsidR("00EF7E24".getBytes()); p.setRsidRDefault("00EF7E24".getBytes()); p.addNewPPr().addNewPStyle().setVal("TOCHeading"); - p.addNewR().addNewT().set("Table of Contents"); + p.addNewR().addNewT().setStringValue("Table of Contents"); } @Internal @@ -93,7 +93,7 @@ public class TOC { pPr.addNewRPr().addNewNoProof(); CTR run = p.addNewR(); run.addNewRPr().addNewNoProof(); - run.addNewT().set(title); + run.addNewT().setStringValue(title); run = p.addNewR(); run.addNewRPr().addNewNoProof(); run.addNewTab(); @@ -106,7 +106,7 @@ public class TOC { CTText text = run.addNewInstrText(); text.setSpace(Space.PRESERVE); // bookmark reference - text.set(" PAGEREF _Toc" + bookmarkRef + " \\h "); + text.setStringValue(" PAGEREF _Toc" + bookmarkRef + " \\h "); p.addNewR().addNewRPr().addNewNoProof(); run = p.addNewR(); run.addNewRPr().addNewNoProof(); @@ -114,7 +114,7 @@ public class TOC { // page number run run = p.addNewR(); run.addNewRPr().addNewNoProof(); - run.addNewT().set(Integer.valueOf(page).toString()); + run.addNewT().setStringValue(Integer.valueOf(page).toString()); run = p.addNewR(); run.addNewRPr().addNewNoProof(); run.addNewFldChar().setFldCharType(STFldCharType.END); |