diff options
Diffstat (limited to 'qadevOOo/tests/java/mod/_xmloff/Draw')
8 files changed, 12 insertions, 20 deletions
diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java index 287695778987..3007c80c8bb1 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLContentExporter.java @@ -142,12 +142,10 @@ public class XMLContentExporter extends TestCase { // can not be exported to XML) set.insertNewByIndex(1); - XDrawPage page1 = (XDrawPage) - UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0)); + XDrawPage page1 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0)); XNamed NPage1 = UnoRuntime.queryInterface(XNamed.class,page1); NPage1.setName("NewSlide1"); - XDrawPage page2 = (XDrawPage) - UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1)); + XDrawPage page2 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1)); XNamed NPage2 = UnoRuntime.queryInterface(XNamed.class,page2); NPage2.setName("NewSlide2"); xEx.setSourceDocument(xDrawDoc); diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java index 9bce636bb357..3730d72e000c 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLExporter.java @@ -141,12 +141,10 @@ public class XMLExporter extends TestCase { // This is an XML-export BUG (new slide named "NewSlide2" can not be exported to XML) set.insertNewByIndex(1); - XDrawPage page1 = (XDrawPage) - UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0)); + XDrawPage page1 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(0)); XNamed NPage1 = UnoRuntime.queryInterface(XNamed.class,page1); NPage1.setName("NewSlide1"); - XDrawPage page2 = (XDrawPage) - UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1)); + XDrawPage page2 = UnoRuntime.queryInterface(XDrawPage.class, set.getByIndex(1)); XNamed NPage2 = UnoRuntime.queryInterface(XNamed.class,page2); NPage2.setName("NewSlide2"); diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java index e572aeb7c13f..01b61cb665f7 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaExporter.java @@ -130,7 +130,7 @@ public class XMLMetaExporter extends TestCase { //set some meta data XDocumentInfoSupplier infoSup = UnoRuntime.queryInterface(XDocumentInfoSupplier.class, xDrawDoc) ; - XPropertySet docInfo = (XPropertySet) UnoRuntime.queryInterface + XPropertySet docInfo = UnoRuntime.queryInterface (XPropertySet.class, infoSup.getDocumentInfo()) ; docInfo.setPropertyValue("Title", TITLE); diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java index 7c951ad28ab8..1fbfb34922c8 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLMetaImporter.java @@ -154,7 +154,7 @@ public class XMLMetaImporter extends TestCase { //set some meta data XDocumentInfoSupplier infoSup = UnoRuntime.queryInterface (XDocumentInfoSupplier.class, xDrawDoc); - final XPropertySet docInfo = (XPropertySet) UnoRuntime.queryInterface + final XPropertySet docInfo = UnoRuntime.queryInterface (XPropertySet.class, infoSup.getDocumentInfo()); final PrintWriter logF = log ; diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java index 5b6ff5b1df0b..3197070f159d 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsExporter.java @@ -131,8 +131,7 @@ public class XMLSettingsExporter extends TestCase { //set some settings XModel xDrawModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc); XController xController = xDrawModel.getCurrentController(); - XPropertySet xPropSet = (XPropertySet) - UnoRuntime.queryInterface(XPropertySet.class, xController); + XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xController); xPropSet.setPropertyValue("IsLayerMode", new Boolean("true")); } catch (com.sun.star.uno.Exception e) { diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java index 1872604bba32..7debe8e434f6 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLSettingsImporter.java @@ -164,8 +164,7 @@ public class XMLSettingsImporter extends TestCase { final PrintWriter logF = log; XModel xDrawModel = UnoRuntime.queryInterface(XModel.class, xDrawDoc); XController xController = xDrawModel.getCurrentController(); - final XPropertySet xPropSet = (XPropertySet) - UnoRuntime.queryInterface(XPropertySet.class, xController); + final XPropertySet xPropSet = UnoRuntime.queryInterface(XPropertySet.class, xController); tEnv.addObjRelation("XDocumentHandler.ImportChecker", new ifc.xml.sax._XDocumentHandler.ImportChecker() { diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java index c964b0c31a61..8f6bc82ffcd1 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesExporter.java @@ -138,11 +138,10 @@ public class XMLStylesExporter extends TestCase { String styleFamilyName = styleFamiliesNames[0]; //obtain style family with name[0] Object objectStyle = StyleFamilies.getByName(styleFamilyName); - XNameContainer xStyleFamilyName = (XNameContainer) - UnoRuntime.queryInterface(XNameContainer.class, objectStyle); + XNameContainer xStyleFamilyName = UnoRuntime.queryInterface(XNameContainer.class, objectStyle); //creat new style Object SC = SOF.createInstance(xDrawDoc, "com.sun.star.style.Style"); - XStyle Style = (XStyle) UnoRuntime.queryInterface(XStyle.class,SC); + XStyle Style = UnoRuntime.queryInterface(XStyle.class,SC); //add new style to style familiy with name[0] xStyleFamilyName.insertByName(STYLE_NAME,Style); } catch (com.sun.star.uno.Exception e) { diff --git a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java index aa067b04b939..d5981a0f9614 100644 --- a/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java +++ b/qadevOOo/tests/java/mod/_xmloff/Draw/XMLStylesImporter.java @@ -166,9 +166,8 @@ public class XMLStylesImporter extends TestCase { try { Object objectStyle = StyleFamilies.getByName(impFamilyName); - XNameContainer StyleFamilyName = (XNameContainer) - UnoRuntime.queryInterface - (XNameContainer.class, objectStyle); + XNameContainer StyleFamilyName = UnoRuntime.queryInterface + (XNameContainer.class, objectStyle); boolean hasStyle = StyleFamilyName.hasByName(impStyleName); logF.println("Does style with name '" + impStyleName |