[PATCH] Deprecated warnings disabled for Office Beans.

Chris Sherlock (via Code Review) gerrit at gerrit.libreoffice.org
Tue Apr 16 03:00:25 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3407

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/07/3407/1

Deprecated warnings disabled for Office Beans.

There are classes that are deprecated that rely on deprecated classes,
but given that these classes are deprecated themselves there is no
need for any deprecation warnings!

Therefore, I'm adding @SupportWarnings("deprecation") throughout this
module.

Change-Id: Ic49101f362dbff33afba63fb96b36ae88d3633f5
---
M bean/com/sun/star/comp/beans/LocalOfficeConnection.java
M bean/com/sun/star/comp/beans/LocalOfficeWindow.java
M bean/com/sun/star/comp/beans/OOoBean.java
3 files changed, 11 insertions(+), 0 deletions(-)



diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
index f2dbbaa..7b43fa1 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java
@@ -42,6 +42,7 @@
  *
  * @since OOo 2.0.0
  */
+ at SuppressWarnings("deprecation")
 public class LocalOfficeConnection
     implements OfficeConnection
 {
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
index 9e471b0..5f606f5 100644
--- a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
+++ b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java
@@ -44,6 +44,7 @@
  *
  * @since OOo 2.0.0
  */
+ at SuppressWarnings("deprecation")
 public class LocalOfficeWindow
     extends java.awt.Canvas
     implements OfficeWindow, XEventListener
diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java
index 9c30201..14978d9 100644
--- a/bean/com/sun/star/comp/beans/OOoBean.java
+++ b/bean/com/sun/star/comp/beans/OOoBean.java
@@ -45,6 +45,7 @@
     int nOOoCheckCycle =    1000;
 
     // This member contains the connection to an OOo instance if established.
+    @SuppressWarnings("deprecation")
     private transient OfficeConnection      iConnection;
     private transient EventListener         xConnectionListener;
 
@@ -53,6 +54,7 @@
     // This member contains the OOo window
     // if a connection is established.
     // It is a child of the OOoBean canvas.
+    @SuppressWarnings("deprecation")
     private OfficeWindow xFrameWindow;
 
     // application environment
@@ -120,6 +122,7 @@
         the dispose method of the OfficeConnection or the OOoBean's stopOOoConnection
         method would make all instances of OOoBean stop working.
      */
+    @SuppressWarnings("deprecation")
     public OOoBean( OfficeConnection iConnection )
         throws NoConnectionException
     {
@@ -159,6 +162,7 @@
 
         @internal
      */
+    @SuppressWarnings("deprecation")
     private synchronized void setOOoConnection( OfficeConnection iNewConnection )
         throws  HasConnectionException, NoConnectionException
     {
@@ -192,6 +196,7 @@
         @throws NoConnectionException
             if the specified connection cannot be established
      */
+    @SuppressWarnings("deprecation")
     public void startOOoConnection( String aConnectionURL )
         throws  java.net.MalformedURLException,
             HasConnectionException,
@@ -226,6 +231,7 @@
         When the OOoBean is displayed in an applet by a web browser, then this
         method must be called from within java.applet.Applet.stop.
      */
+    @SuppressWarnings("deprecation")
     public synchronized void stopOOoConnection()
     {
         // clear OOo document, frame etc.
@@ -263,6 +269,7 @@
             if no connection can be established
 
      */
+     @SuppressWarnings("deprecation")
     public synchronized OfficeConnection getOOoConnection()
         throws NoConnectionException
     {
@@ -282,6 +289,7 @@
         @throws NoConnectionException
             if no connection is established and no default connection can be established.
      */
+    @SuppressWarnings("deprecation")
     public synchronized com.sun.star.lang.XMultiServiceFactory getMultiServiceFactory()
         throws NoConnectionException
     {
@@ -1444,6 +1452,7 @@
         }
 
         /// watching the connection
+        @SuppressWarnings("deprecation")
         public void run()
         {
             dbgPrint( "EventListener(" + aTag + ").run()" );

-- 
To view, visit https://gerrit.libreoffice.org/3407
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic49101f362dbff33afba63fb96b36ae88d3633f5
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Chris Sherlock <chris.sherlock79 at gmail.com>



More information about the LibreOffice mailing list