diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-27 16:08:28 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:01 +0200 |
commit | 453d7edc424d6652e209ace4915d96193a79be71 (patch) | |
tree | 0a6af928cf7d1fd90ec995ae7d114f08eaf617fd /qadevOOo/runner/util/SOfficeFactory.java | |
parent | b65017a2a7af290f6681da7b197a52efe83d5185 (diff) |
Java5 update - convert more code to use generics:wq
Change-Id: I7ea32cad40a6657e4e5886d04af008cb6d67ac6e
Diffstat (limited to 'qadevOOo/runner/util/SOfficeFactory.java')
-rw-r--r-- | qadevOOo/runner/util/SOfficeFactory.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java index 327b271c946c..df8b0ddfcf64 100644 --- a/qadevOOo/runner/util/SOfficeFactory.java +++ b/qadevOOo/runner/util/SOfficeFactory.java @@ -386,7 +386,7 @@ public class SOfficeFactory { Object oInt = oDocMSF.createInstance( "com.sun.star.sheet.Spreadsheet"); - XSpreadsheet oSpreadsheet = (XSpreadsheet) UnoRuntime.queryInterface(XSpreadsheet.class, oInt); + XSpreadsheet oSpreadsheet = UnoRuntime.queryInterface(XSpreadsheet.class, oInt); return oSpreadsheet; } @@ -402,7 +402,7 @@ public class SOfficeFactory { } public static String getUniqueName(XInterface oInterface, String prefix) { - XNameAccess oNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, oInterface); + XNameAccess oNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oInterface); if (oNameAccess == null) { return null; } @@ -473,7 +473,7 @@ public class SOfficeFactory { XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc); try { - oInstance = (Object) oDocMSF.createInstance(kind); + oInstance = oDocMSF.createInstance(kind); } catch (Exception e) { // Some exception occures.FAILED System.out.println("Couldn't create instance " + kind + ": " + e); @@ -609,7 +609,7 @@ public class SOfficeFactory { // query for XServiceInfo public Object queryXServiceInfo(Object oObj) { if (oObj != null) { - XServiceInfo oInfo = (XServiceInfo) UnoRuntime.queryInterface( + XServiceInfo oInfo = UnoRuntime.queryInterface( XServiceInfo.class, oObj); System.out.println("!!!! XServiceInfo n.a. !!!! "); } else { |