diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-27 15:40:17 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:01 +0200 |
commit | b65017a2a7af290f6681da7b197a52efe83d5185 (patch) | |
tree | 06f71a435ba200d044109469b13be7c8f5dbe950 /qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java | |
parent | 33ec740d1438c3dddf8e1974757ed05bb76425ca (diff) |
Java5 update - usage generics where possible
Change-Id: I12f8c448961919e153047e28fee2a0acf3af1002
Diffstat (limited to 'qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java b/qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java index 4d49cd86afbf..2beb29244e9d 100644 --- a/qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java +++ b/qadevOOo/tests/java/mod/_sd/SdXCustomPresentation.java @@ -122,9 +122,8 @@ public class SdXCustomPresentation extends TestCase { log.println( "creating a test environment" ); log.println( "get presentation" ); - XCustomPresentationSupplier oPS = (XCustomPresentationSupplier) - UnoRuntime.queryInterface( - XCustomPresentationSupplier.class, xImpressDoc); + XCustomPresentationSupplier oPS = UnoRuntime.queryInterface( + XCustomPresentationSupplier.class, xImpressDoc); XInterface oObj = oPS.getCustomPresentations(); XSingleServiceFactory oSingleMSF = (XSingleServiceFactory) @@ -156,11 +155,9 @@ public class SdXCustomPresentation extends TestCase { // get the drawpage of drawing here log.println( "getting Drawpage" ); - XDrawPagesSupplier oDPS = (XDrawPagesSupplier) - UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc); + XDrawPagesSupplier oDPS = UnoRuntime.queryInterface(XDrawPagesSupplier.class, xImpressDoc); XDrawPages oDPn = oDPS.getDrawPages(); - XIndexAccess oDPi = (XIndexAccess) - UnoRuntime.queryInterface(XIndexAccess.class, oDPn); + XIndexAccess oDPi = UnoRuntime.queryInterface(XIndexAccess.class, oDPn); XDrawPage oDrawPage = null; try { @@ -177,8 +174,7 @@ public class SdXCustomPresentation extends TestCase { throw new StatusException("Couldn't get by index", e); } - XIndexContainer aIContainer = (XIndexContainer) - UnoRuntime.queryInterface(XIndexContainer.class,oInstance); + XIndexContainer aIContainer = UnoRuntime.queryInterface(XIndexContainer.class,oInstance); try { aIContainer.insertByIndex(0, oDrawPage); |