diff options
Diffstat (limited to 'qadevOOo/tests/java/mod/_sw/CharacterStyle.java')
-rw-r--r-- | qadevOOo/tests/java/mod/_sw/CharacterStyle.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/CharacterStyle.java b/qadevOOo/tests/java/mod/_sw/CharacterStyle.java index e0eb2a51654f..8a72e83f4680 100644 --- a/qadevOOo/tests/java/mod/_sw/CharacterStyle.java +++ b/qadevOOo/tests/java/mod/_sw/CharacterStyle.java @@ -100,16 +100,13 @@ public class CharacterStyle extends TestCase { try { log.println("getting style"); - XStyleFamiliesSupplier oSFS = (XStyleFamiliesSupplier) - UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, - xTextDoc); + XStyleFamiliesSupplier oSFS = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, + xTextDoc); XNameAccess oSF = oSFS.getStyleFamilies(); - XIndexAccess oSFsIA = (XIndexAccess) - UnoRuntime.queryInterface(XIndexAccess.class, oSF); + XIndexAccess oSFsIA = UnoRuntime.queryInterface(XIndexAccess.class, oSF); oSFNA = (XNameAccess) UnoRuntime.queryInterface( XNameAccess.class,oSFsIA.getByIndex(0)); - XIndexAccess oSFIA = (XIndexAccess) - UnoRuntime.queryInterface(XIndexAccess.class, oSFNA); + XIndexAccess oSFIA = UnoRuntime.queryInterface(XIndexAccess.class, oSFNA); oStyle = (XStyle) UnoRuntime.queryInterface( XStyle.class,oSFIA.getByIndex(0)); } catch ( com.sun.star.lang.WrappedTargetException e ) { @@ -124,8 +121,7 @@ public class CharacterStyle extends TestCase { try { log.print("Creating a user-defined style... "); - XMultiServiceFactory oMSF = (XMultiServiceFactory) - UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc); + XMultiServiceFactory oMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc); XInterface oInt = (XInterface) oMSF.createInstance("com.sun.star.style.CharacterStyle"); oMyStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, oInt); |