summaryrefslogtreecommitdiffstats
path: root/qadevOOo/tests/java/mod/_sw
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/mod/_sw')
-rw-r--r--qadevOOo/tests/java/mod/_sw/CharacterStyle.java14
-rw-r--r--qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/PageStyle.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/ParagraphStyle.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java5
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java14
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java13
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java19
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java4
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXAutoTextEntry.java5
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup.java4
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXBookmark.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXBookmarks.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXCell.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXCellRange.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXChapterNumbering.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java9
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXDrawPage.java4
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXEndnoteProperties.java9
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java12
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXFieldMaster.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXFootnote.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXFootnoteProperties.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXFootnoteText.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXFootnotes.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXFrames.java9
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXHeadFootText.java5
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXLineNumberingProperties.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXMailMerge.java25
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXNumberingRules.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXParagraph.java10
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXPrintSettings.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java11
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java16
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXShape.java5
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXStyle.java14
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java9
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTableCellText.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextColumns.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextCursor.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextDefaults.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextDocument.java30
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObject.java13
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextField.java12
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextFrame.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java13
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextGraphicObjects.java8
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextPortion.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextPortionEnumeration.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextRanges.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextSearch.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextSection.java26
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextSections.java14
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextTable.java10
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextTables.java6
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextView.java21
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXTextViewCursor.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwXViewSettings.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLContentExporter.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLContentImporter.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLExporter.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLImporter.java4
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java7
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java2
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java7
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLSettingsImporter.java3
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLStylesExporter.java4
-rw-r--r--qadevOOo/tests/java/mod/_sw/XMLStylesImporter.java2
86 files changed, 251 insertions, 403 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);
diff --git a/qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java b/qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java
index 686f4e598311..e9bc64e1ab2b 100644
--- a/qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java
+++ b/qadevOOo/tests/java/mod/_sw/ConditionalParagraphStyle.java
@@ -89,14 +89,12 @@ public class ConditionalParagraphStyle 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();
oSFNA = (XNameAccess) UnoRuntime.queryInterface(
XNameAccess.class,oSF.getByName("ParagraphStyles"));
- XIndexAccess oSFIA = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
+ XIndexAccess oSFIA = UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
oStyle = (XStyle) UnoRuntime.queryInterface(
XStyle.class,oSFIA.getByIndex(1));
} catch ( com.sun.star.lang.WrappedTargetException e ) {
@@ -115,8 +113,7 @@ public class ConditionalParagraphStyle 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.ConditionalParagraphStyle");
oMyStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, oInt);
diff --git a/qadevOOo/tests/java/mod/_sw/PageStyle.java b/qadevOOo/tests/java/mod/_sw/PageStyle.java
index 8751a28cb9ba..0f7564035a5e 100644
--- a/qadevOOo/tests/java/mod/_sw/PageStyle.java
+++ b/qadevOOo/tests/java/mod/_sw/PageStyle.java
@@ -82,14 +82,12 @@ public class PageStyle 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();
oSFNA = (XNameAccess) UnoRuntime.queryInterface(
XNameAccess.class,oSF.getByName("PageStyles")); // get the page style
- XIndexAccess oSFIA = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
+ XIndexAccess oSFIA = UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
oStyle = (XStyle) UnoRuntime.queryInterface(
XStyle.class,oSFIA.getByIndex(0));
log.println("Chosen pool style: "+oStyle.getName());
@@ -110,8 +108,7 @@ public class PageStyle 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.PageStyle");
// oMSF.createInstanceWithArguments("com.sun.star.style.PageStyle",new Object[]{oStyle});
diff --git a/qadevOOo/tests/java/mod/_sw/ParagraphStyle.java b/qadevOOo/tests/java/mod/_sw/ParagraphStyle.java
index 0dc7c858b5cd..c0d95a6163be 100644
--- a/qadevOOo/tests/java/mod/_sw/ParagraphStyle.java
+++ b/qadevOOo/tests/java/mod/_sw/ParagraphStyle.java
@@ -82,14 +82,12 @@ public class ParagraphStyle 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();
oSFNA = (XNameAccess) UnoRuntime.queryInterface(
XNameAccess.class,oSF.getByName("ParagraphStyles"));
- XIndexAccess oSFIA = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
+ XIndexAccess oSFIA = UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
String[] els = oSFNA.getElementNames();
oStyle = (XStyle) UnoRuntime.queryInterface(
XStyle.class,oSFIA.getByIndex(1));
@@ -109,8 +107,7 @@ public class ParagraphStyle 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.ParagraphStyle");
oMyStyle = (XStyle) UnoRuntime.queryInterface(XStyle.class, oInt);
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java
index b4107e65da88..4c4a63104286 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java
@@ -93,16 +93,13 @@ public class SwAccessibleDocumentPageView extends TestCase {
XController xController = xTextDoc.getCurrentController();
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
//switch to 'Print Preview' mode
try {
- XDispatchProvider xDispProv = (XDispatchProvider)
- UnoRuntime.queryInterface(XDispatchProvider.class, xController);
- XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
- UnoRuntime.queryInterface(XURLTransformer.class,
- ( (XMultiServiceFactory) Param.getMSF()).createInstance("com.sun.star.util.URLTransformer"));
+ XDispatchProvider xDispProv = UnoRuntime.queryInterface(XDispatchProvider.class, xController);
+ XURLTransformer xParser = UnoRuntime.queryInterface(XURLTransformer.class,
+ ( (XMultiServiceFactory) Param.getMSF()).createInstance("com.sun.star.util.URLTransformer"));
// Because it's an in/out parameter we must use an array of URL objects.
URL[] aParseURL = new URL[1];
aParseURL[0] = new URL();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java
index b83497c564f5..dfdb74e55711 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java
@@ -95,8 +95,7 @@ public class SwAccessibleDocumentView extends TestCase {
throw new StatusException( "Couldn't insert lines", e );
}
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
@@ -113,7 +112,7 @@ public class SwAccessibleDocumentView extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
getAccessibleObjectForRole(xRoot, AccessibleRole.SCROLL_BAR);
- final XAccessibleValue xAccVal = (XAccessibleValue) UnoRuntime.queryInterface
+ final XAccessibleValue xAccVal = UnoRuntime.queryInterface
(XAccessibleValue.class, SearchedContext) ;
tEnv.addObjRelation("EventProducer",
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java
index e16e1346f2ea..007f6a3171e8 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java
@@ -66,8 +66,7 @@ public class SwAccessibleEndnoteView extends TestCase {
XInterface oEndnote = null;
log.println( "Creating a test environment" );
- XMultiServiceFactory msf = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
log.println("creating a endnote");
try {
oEndnote = (XInterface) UnoRuntime.queryInterface(XInterface.class,
@@ -81,8 +80,7 @@ public class SwAccessibleEndnoteView extends TestCase {
XTextCursor oCursor = oText.createTextCursor();
log.println("inserting the footnote into text document");
- XTextContent xTC = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oEndnote);
+ XTextContent xTC = UnoRuntime.queryInterface(XTextContent.class, oEndnote);
try {
oText.insertTextContent(oCursor, xTC, false);
} catch (com.sun.star.lang.IllegalArgumentException e) {
@@ -91,9 +89,8 @@ public class SwAccessibleEndnoteView extends TestCase {
}
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
XPropertySet xPropSet = xViewSetSup.getViewSettings();
try {
@@ -114,8 +111,7 @@ public class SwAccessibleEndnoteView extends TestCase {
throw new StatusException("Couldn't set propertyValue...", e);
}
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
index 1bc425afb69c..95ecd52424e5 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
@@ -77,8 +77,7 @@ public class SwAccessibleFooterView extends TestCase {
XNameAccess PageStyles = null;
XStyle StdStyle = null;
- XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
+ XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
XNameAccess StyleFamNames = StyleFam.getStyleFamilies();
// obtains style 'Standard' from style family 'PageStyles'
@@ -109,9 +108,8 @@ public class SwAccessibleFooterView extends TestCase {
//change zoom value to 10%
//footer should be in the vissible area of the document
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
XPropertySet xPropSet = xViewSetSup.getViewSettings();
xPropSet.setPropertyValue("ZoomValue", new Short("20"));
} catch ( com.sun.star.lang.WrappedTargetException e ) {
@@ -128,8 +126,7 @@ public class SwAccessibleFooterView extends TestCase {
throw new StatusException("Couldn't set propertyValue...", e);
}
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java
index b7e08e4241d9..757a4c7aac1b 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java
@@ -67,12 +67,11 @@ public class SwAccessibleFootnoteView extends TestCase {
log.println( "Creating a test environment" );
// get a soffice factory object
- XMultiServiceFactory msf = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
log.println("creating a footnote");
try {
- oFootnote = (XFootnote) UnoRuntime.queryInterface(XFootnote.class,
+ oFootnote = UnoRuntime.queryInterface(XFootnote.class,
msf.createInstance("com.sun.star.text.Footnote"));
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
@@ -91,9 +90,8 @@ public class SwAccessibleFootnoteView extends TestCase {
}
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
XPropertySet xPropSet = xViewSetSup.getViewSettings();
try {
@@ -114,8 +112,7 @@ public class SwAccessibleFootnoteView extends TestCase {
throw new StatusException("Couldn't set propertyValue...", e);
}
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java
index 3727505703d3..544e27b1279c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java
@@ -75,8 +75,7 @@ public class SwAccessibleHeaderView extends TestCase {
XNameAccess PageStyles = null;
XStyle StdStyle = null;
- XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
+ XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
XNameAccess StyleFamNames = StyleFam.getStyleFamilies();
// obtains style 'Standatd' from style family 'PageStyles'
@@ -117,8 +116,7 @@ public class SwAccessibleHeaderView extends TestCase {
throw new StatusException("Couldn't set propertyValue...", e);
}
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java b/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java
index d4cb6e768d25..8c183b6d41ec 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessiblePageView.java
@@ -103,15 +103,13 @@ public class SwAccessiblePageView extends TestCase {
}
// Enumeration
- XEnumerationAccess oEnumA = (XEnumerationAccess)
- UnoRuntime.queryInterface(XEnumerationAccess.class, oText );
+ XEnumerationAccess oEnumA = UnoRuntime.queryInterface(XEnumerationAccess.class, oText );
XEnumeration oEnum = oEnumA.createEnumeration();
try {
para = (XInterface) AnyConverter.toObject(
new Type(XInterface.class),oEnum.nextElement());
- XEnumerationAccess oEnumB = (XEnumerationAccess)
- UnoRuntime.queryInterface( XEnumerationAccess.class, para );
+ XEnumerationAccess oEnumB = UnoRuntime.queryInterface( XEnumerationAccess.class, para );
XEnumeration oEnum2 = oEnumB.createEnumeration();
port = (XInterface) AnyConverter.toObject(
new Type(XInterface.class),oEnum2.nextElement());
@@ -154,16 +152,13 @@ public class SwAccessiblePageView extends TestCase {
XController xController = xTextDoc.getCurrentController();
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
//switch to 'Print Preview' mode
try {
- XDispatchProvider xDispProv = (XDispatchProvider)
- UnoRuntime.queryInterface(XDispatchProvider.class, xController);
- XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
- UnoRuntime.queryInterface(XURLTransformer.class,
- ((XMultiServiceFactory)Param.getMSF()).createInstance("com.sun.star.util.URLTransformer"));
+ XDispatchProvider xDispProv = UnoRuntime.queryInterface(XDispatchProvider.class, xController);
+ XURLTransformer xParser = UnoRuntime.queryInterface(XURLTransformer.class,
+ ((XMultiServiceFactory)Param.getMSF()).createInstance("com.sun.star.util.URLTransformer"));
// Because it's an in/out parameter we must use an array of URL objects.
URL[] aParseURL = new URL[1];
aParseURL[0] = new URL();
@@ -197,7 +192,7 @@ public class SwAccessiblePageView extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
getAccessibleObjectForRole(xRoot, AccessibleRole.SCROLL_BAR);
- final XAccessibleValue xAccVal = (XAccessibleValue) UnoRuntime.queryInterface
+ final XAccessibleValue xAccVal = UnoRuntime.queryInterface
(XAccessibleValue.class, SearchedContext) ;
tEnv.addObjRelation("EventProducer",
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java
index 71899aa0da43..199ef24592fa 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java
@@ -67,8 +67,7 @@ public class SwAccessibleParagraphView extends TestCase {
XText oText = xTextDoc.getText();
oText.setString("XAccessibleText");
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
index b4fa283569f2..cef4cacd2c8d 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
@@ -86,7 +86,7 @@ public class SwAccessibleTableCellView extends TestCase {
e.getMessage(), e);
}
- XModel aModel = (XModel) UnoRuntime.queryInterface(XModel.class,
+ XModel aModel = UnoRuntime.queryInterface(XModel.class,
xTextDoc);
AccessibilityTools at = new AccessibilityTools();
@@ -103,7 +103,7 @@ public class SwAccessibleTableCellView extends TestCase {
at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
TestEnvironment tEnv = new TestEnvironment(oObj);
- final XAccessibleSelection accSel = (XAccessibleSelection) UnoRuntime.queryInterface(
+ final XAccessibleSelection accSel = UnoRuntime.queryInterface(
XAccessibleSelection.class,
at.SearchedContext.getAccessibleParent());
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
index 1a661d35a063..a50d88912aa2 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
@@ -88,8 +88,7 @@ public class SwAccessibleTableView extends TestCase {
+ e.getMessage(), e);
}
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
@@ -106,9 +105,8 @@ public class SwAccessibleTableView extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
final XPropertySet PropSet = xViewSetSup.getViewSettings();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java
index cc686fdb3883..4c3985871672 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java
@@ -66,8 +66,7 @@ public class SwAccessibleTextEmbeddedObject extends TestCase {
XInterface oObj = null;
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
@@ -84,9 +83,8 @@ public class SwAccessibleTextEmbeddedObject extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
final XPropertySet PropSet = xViewSetSup.getViewSettings();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
index 82b20821010b..36679927caf4 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
@@ -92,16 +92,14 @@ public class SwAccessibleTextFrameView extends TestCase {
oCursor = oText.createTextCursor();
log.println( "inserting Frame1" );
- XTextContent the_content = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oFrame1);
+ XTextContent the_content = UnoRuntime.queryInterface(XTextContent.class, oFrame1);
oText.insertTextContent(oCursor, the_content, true);
} catch (Exception e) {
e.printStackTrace(log);
throw new StatusException("Couldn't insert TextFrame", e);
}
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
@@ -118,9 +116,8 @@ public class SwAccessibleTextFrameView extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
final XPropertySet PropSet = xViewSetSup.getViewSettings();
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java
index 0d7a2af5a243..d5687731e435 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java
@@ -78,8 +78,7 @@ public class SwAccessibleTextGraphicObject extends TestCase {
XText the_text = xTextDoc.getText();
XTextCursor the_cursor = the_text.createTextCursor();
- XTextContent the_content = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oGraphObj);
+ XTextContent the_content = UnoRuntime.queryInterface(XTextContent.class, oGraphObj);
log.println( "inserting graphic" );
try {
@@ -89,8 +88,7 @@ public class SwAccessibleTextGraphicObject extends TestCase {
throw new StatusException("Couldn't insert Content", e);
}
- XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);
AccessibilityTools at = new AccessibilityTools();
@@ -107,9 +105,8 @@ public class SwAccessibleTextGraphicObject extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
final XPropertySet PropSet = xViewSetSup.getViewSettings();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java b/qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java
index b1eeb10e780a..934616fb2fec 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java
@@ -64,7 +64,7 @@ public class SwXAutoTextContainer extends TestCase {
XMultiServiceFactory myMSF = (XMultiServiceFactory)Param.getMSF();
Object oInst = myMSF.createInstance
("com.sun.star.text.AutoTextContainer");
- oContainer = (XAutoTextContainer)UnoRuntime.queryInterface
+ oContainer = UnoRuntime.queryInterface
(XAutoTextContainer.class,oInst);
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXAutoTextEntry.java b/qadevOOo/tests/java/mod/_sw/SwXAutoTextEntry.java
index bc2666fe5377..0fdacdebbf3e 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXAutoTextEntry.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXAutoTextEntry.java
@@ -130,8 +130,7 @@ public class SwXAutoTextEntry extends TestCase {
XMultiServiceFactory myMSF = (XMultiServiceFactory)Param.getMSF();
Object oInst = myMSF.createInstance
("com.sun.star.text.AutoTextContainer");
- oContainer = (XAutoTextContainer)
- UnoRuntime.queryInterface(XAutoTextContainer.class,oInst);
+ oContainer = UnoRuntime.queryInterface(XAutoTextContainer.class,oInst);
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
throw new StatusException("Couldn't create AutoTextContainer", e);
@@ -151,7 +150,7 @@ public class SwXAutoTextEntry extends TestCase {
throw new StatusException("Couldn't get AutoTextGroup", e);
}
- oGroup = (XAutoTextGroup) UnoRuntime.queryInterface
+ oGroup = UnoRuntime.queryInterface
(XAutoTextGroup.class, oObj);
String[] oENames = oGroup.getElementNames();
for (int i=0; i<oENames.length; i++) {
diff --git a/qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup.java b/qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup.java
index 9d36689322b5..232e634c2a90 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXAutoTextGroup.java
@@ -108,14 +108,14 @@ public class SwXAutoTextGroup extends TestCase {
try {
XMultiServiceFactory myMSF = (XMultiServiceFactory)Param.getMSF();
Object oInst = myMSF.createInstance("com.sun.star.text.AutoTextContainer");
- oContainer = (XAutoTextContainer) UnoRuntime.queryInterface(XAutoTextContainer.class,oInst);
+ oContainer = UnoRuntime.queryInterface(XAutoTextContainer.class,oInst);
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
throw new StatusException("Couldn't create AutoTextContainer", e);
}
String myGroupName="myNewGroup2*1";
- XAutoTextContainer xATC = (XAutoTextContainer) UnoRuntime.queryInterface(XAutoTextContainer.class, oContainer);
+ XAutoTextContainer xATC = UnoRuntime.queryInterface(XAutoTextContainer.class, oContainer);
try {
log.println("removing element with name '" + myGroupName + "'");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXBookmark.java b/qadevOOo/tests/java/mod/_sw/SwXBookmark.java
index 6e3d44f9a186..72fbd60e1f0a 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXBookmark.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXBookmark.java
@@ -101,8 +101,7 @@ public class SwXBookmark extends TestCase {
util.dbg.printInterfaces((XInterface) instance);
- tEnv.addObjRelation("CONTENT", (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,instance));
+ tEnv.addObjRelation("CONTENT", UnoRuntime.queryInterface(XTextContent.class,instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
return tEnv;
} // finish method getTestEnvironment
diff --git a/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java b/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java
index 11aa0c8e98d2..3307b8a7ac9a 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXBookmarks.java
@@ -96,8 +96,7 @@ public class SwXBookmarks extends TestCase {
throw new StatusException( "Couldn't create Bookmark", e );
}
- XBookmarksSupplier oBSupp = (XBookmarksSupplier)
- UnoRuntime.queryInterface(XBookmarksSupplier.class, xTextDoc);
+ XBookmarksSupplier oBSupp = UnoRuntime.queryInterface(XBookmarksSupplier.class, xTextDoc);
XNameAccess oBookNA = oBSupp.getBookmarks();
oObj = oBookNA;
log.println( "creating a new environment for Bookmarks object" );
diff --git a/qadevOOo/tests/java/mod/_sw/SwXCell.java b/qadevOOo/tests/java/mod/_sw/SwXCell.java
index bee7e774d483..a6f3aefc08f1 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXCell.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXCell.java
@@ -108,8 +108,7 @@ public class SwXCell extends TestCase {
log.println( " creating a new environment for bodytext object" );
TestEnvironment tEnv = new TestEnvironment( oObj );
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
try {
XInterface oTS = (XInterface) oDocMSF.createInstance
("com.sun.star.text.TextSection");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXCellRange.java b/qadevOOo/tests/java/mod/_sw/SwXCellRange.java
index c4b5ee832291..2d2c386e08b1 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXCellRange.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXCellRange.java
@@ -124,8 +124,7 @@ public class SwXCellRange extends TestCase {
TestEnvironment tEnv = new TestEnvironment( oObj );
log.println("ImplName: " + util.utils.getImplName(oObj));
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
try {
XInterface oTS = (XInterface)
oDocMSF.createInstance("com.sun.star.text.TextSection");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXChapterNumbering.java b/qadevOOo/tests/java/mod/_sw/SwXChapterNumbering.java
index 9a238fb84908..75b0a49b8285 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXChapterNumbering.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXChapterNumbering.java
@@ -87,8 +87,7 @@ public class SwXChapterNumbering extends TestCase {
TestParameters tParam, PrintWriter log ) throws StatusException {
XInterface oObj = null;
- XChapterNumberingSupplier oCNSupp = (XChapterNumberingSupplier)
- UnoRuntime.queryInterface(XChapterNumberingSupplier.class,xTextDoc);
+ XChapterNumberingSupplier oCNSupp = UnoRuntime.queryInterface(XChapterNumberingSupplier.class,xTextDoc);
oObj = oCNSupp.getChapterNumberingRules();
PropertyValue[] instance1 = null;
diff --git a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java
index 034ba37e86a6..046dc9e29992 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java
@@ -119,11 +119,9 @@ public class SwXDocumentIndex extends TestCase {
TestEnvironment tEnv = new TestEnvironment(xTC);
- tEnv.addObjRelation("CONTENT", (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,instance));
+ tEnv.addObjRelation("CONTENT", UnoRuntime.queryInterface(XTextContent.class,instance));
oCursor.gotoEnd(false);
- tEnv.addObjRelation("RANGE", (XTextRange)
- UnoRuntime.queryInterface(XTextRange.class, oCursor));
+ tEnv.addObjRelation("RANGE", UnoRuntime.queryInterface(XTextRange.class, oCursor));
// relation for XDocumentIndex
tEnv.addObjRelation("TextDoc", xTextDoc);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java
index 5287d80017c6..0bc8ce938378 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexMark.java
@@ -97,8 +97,7 @@ public class SwXDocumentIndexMark extends TestCase {
XText oText = xTextDoc.getText();
XTextCursor oCursor = oText.createTextCursor();
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
Object oDIM = null;
Object instance = null;
@@ -111,8 +110,7 @@ public class SwXDocumentIndexMark extends TestCase {
log.println("Error:" + e);
}
- XDocumentIndexMark xDIM = (XDocumentIndexMark)
- UnoRuntime.queryInterface(XDocumentIndexMark.class, oDIM);
+ XDocumentIndexMark xDIM = UnoRuntime.queryInterface(XDocumentIndexMark.class, oDIM);
try {
oText.insertTextContent(oCursor, xDIM, false);
@@ -124,8 +122,7 @@ public class SwXDocumentIndexMark extends TestCase {
TestEnvironment tEnv = new TestEnvironment(xDIM);
- tEnv.addObjRelation("CONTENT", (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,instance));
+ tEnv.addObjRelation("CONTENT", UnoRuntime.queryInterface(XTextContent.class,instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
return tEnv;
diff --git a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java
index 9ba11de06c12..b2dd757a2521 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java
@@ -113,8 +113,7 @@ public class SwXDocumentIndexes extends TestCase {
throw new StatusException("Couldn't insert the Index", e);
}
- XDocumentIndexesSupplier xDocInd = (XDocumentIndexesSupplier)
- UnoRuntime.queryInterface(XDocumentIndexesSupplier.class,xTextDoc);
+ XDocumentIndexesSupplier xDocInd = UnoRuntime.queryInterface(XDocumentIndexesSupplier.class,xTextDoc);
oObj = xDocInd.getDocumentIndexes();
TestEnvironment tEnv = new TestEnvironment(oObj);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXDrawPage.java b/qadevOOo/tests/java/mod/_sw/SwXDrawPage.java
index 88208cdaf5da..45cc2daf6f7c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXDrawPage.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXDrawPage.java
@@ -126,7 +126,7 @@ public class SwXDrawPage extends TestCase {
log.println( "creating a test environment" );
SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF() );
- XDPSupp = (XDrawPageSupplier) UnoRuntime.queryInterface
+ XDPSupp = UnoRuntime.queryInterface
(XDrawPageSupplier.class, xTextDoc);
xDP = XDPSupp.getDrawPage();
oObj = xDP;
@@ -135,7 +135,7 @@ public class SwXDrawPage extends TestCase {
//System.exit(0);
log.println( "inserting some Shapes" );
- oShapes = (XShapes) UnoRuntime.queryInterface(XShapes.class, oObj);
+ oShapes = UnoRuntime.queryInterface(XShapes.class, oObj);
oShapes.add(SOF.createShape(xTextDoc,2000,1500,1000,1000,"Line"));
oShapes.add(SOF.createShape(xTextDoc,3000,4500,15000,1000,"Ellipse"));
oShapes.add(SOF.createShape(xTextDoc,5000,3500,7500,5000,"Rectangle"));
diff --git a/qadevOOo/tests/java/mod/_sw/SwXEndnoteProperties.java b/qadevOOo/tests/java/mod/_sw/SwXEndnoteProperties.java
index f455886e4b62..2e1e7d20e000 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXEndnoteProperties.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXEndnoteProperties.java
@@ -88,8 +88,7 @@ public class SwXEndnoteProperties extends TestCase {
XInterface oEndnote;
log.println( "Creating a test environment" );
- XMultiServiceFactory msf = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
log.println("creating a endnote");
try {
oEndnote = (XInterface) UnoRuntime.queryInterface(XInterface.class,
@@ -103,8 +102,7 @@ public class SwXEndnoteProperties extends TestCase {
XTextCursor oCursor = oText.createTextCursor();
log.println("inserting the footnote into text document");
- XTextContent xTC = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oEndnote);
+ XTextContent xTC = UnoRuntime.queryInterface(XTextContent.class, oEndnote);
try {
oText.insertTextContent(oCursor, xTC, false);
} catch (com.sun.star.lang.IllegalArgumentException e) {
@@ -112,8 +110,7 @@ public class SwXEndnoteProperties extends TestCase {
throw new StatusException("Couldn't insert the endnote", e);
}
- oInterface = (XEndnotesSupplier)
- UnoRuntime.queryInterface(XEndnotesSupplier.class, xTextDoc);
+ oInterface = UnoRuntime.queryInterface(XEndnotesSupplier.class, xTextDoc);
oObj = oInterface.getEndnoteSettings();
dbg.printPropertiesNames((XPropertySet) oObj);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java b/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java
index 38ae17446269..39f4999e4a7f 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXFieldEnumeration.java
@@ -102,8 +102,7 @@ public class SwXFieldEnumeration extends TestCase {
XTextContent the_Field;
log.println( "creating a test environment" );
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDoc );
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDoc );
try {
FieldMaster = oDocMSF.createInstance
@@ -112,8 +111,7 @@ public class SwXFieldEnumeration extends TestCase {
(XPropertySet.class,(XInterface) FieldMaster);
oObj = (XInterface)
oDocMSF.createInstance("com.sun.star.text.TextField.Database");
- xTF = (XDependentTextField)
- UnoRuntime.queryInterface(XDependentTextField.class,oObj);
+ xTF = UnoRuntime.queryInterface(XDependentTextField.class,oObj);
} catch ( com.sun.star.uno.Exception e ) {
e.printStackTrace(log);
}
@@ -138,8 +136,7 @@ public class SwXFieldEnumeration extends TestCase {
the_Text = xTextDoc.getText();
the_Cursor = the_Text.createTextCursor();
- the_Field = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oObj);
+ the_Field = UnoRuntime.queryInterface(XTextContent.class, oObj);
try {
xTF.attachTextFieldMaster(PFieldMaster);
@@ -150,8 +147,7 @@ public class SwXFieldEnumeration extends TestCase {
}
// create testobject here
- XTextFieldsSupplier oTFS = (XTextFieldsSupplier)
- UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );
+ XTextFieldsSupplier oTFS = UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );
xFEA = oTFS.getTextFields();
oObj = oTFS.getTextFields().createEnumeration();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFieldMaster.java b/qadevOOo/tests/java/mod/_sw/SwXFieldMaster.java
index 44af7e26ac31..b570ad3d322f 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXFieldMaster.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXFieldMaster.java
@@ -84,8 +84,7 @@ public class SwXFieldMaster extends TestCase {
log.println( "creating a test environment" );
try {
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDoc );
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, xTextDoc );
oObj = (XInterface)
oDocMSF.createInstance( "com.sun.star.text.FieldMaster.Database" );
} catch ( com.sun.star.uno.Exception e ) {
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFootnote.java b/qadevOOo/tests/java/mod/_sw/SwXFootnote.java
index e470bb83bd86..c650a67d6d35 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXFootnote.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXFootnote.java
@@ -107,12 +107,11 @@ public class SwXFootnote extends TestCase {
log.println( "Creating a test environment" );
// get a soffice factory object
- XMultiServiceFactory msf = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
log.println("creating a footnote");
Object instance = null;
try {
- oFootnote = (XFootnote) UnoRuntime.queryInterface(XFootnote.class,
+ oFootnote = UnoRuntime.queryInterface(XFootnote.class,
msf.createInstance("com.sun.star.text.Footnote"));
instance = msf.createInstance("com.sun.star.text.Footnote");
} catch (com.sun.star.uno.Exception e) {
@@ -133,8 +132,7 @@ public class SwXFootnote extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oFootnote);
- tEnv.addObjRelation("CONTENT", (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,instance));
+ tEnv.addObjRelation("CONTENT", UnoRuntime.queryInterface(XTextContent.class,instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
log.println( "adding InstDescriptor object" );
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFootnoteProperties.java b/qadevOOo/tests/java/mod/_sw/SwXFootnoteProperties.java
index 343cf421e32b..4659f0198e93 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXFootnoteProperties.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXFootnoteProperties.java
@@ -88,12 +88,11 @@ public class SwXFootnoteProperties extends TestCase {
log.println( "Creating a test environment" );
// get a soffice factory object
- XMultiServiceFactory msf = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
log.println("creating a footnote");
try {
- oFootnote = (XFootnote) UnoRuntime.queryInterface(XFootnote.class,
+ oFootnote = UnoRuntime.queryInterface(XFootnote.class,
msf.createInstance("com.sun.star.text.Footnote"));
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
@@ -111,8 +110,7 @@ public class SwXFootnoteProperties extends TestCase {
throw new StatusException("Couldn't insert the footnote", e);
}
- oInterface = (XFootnotesSupplier)
- UnoRuntime.queryInterface(XFootnotesSupplier.class, xTextDoc);
+ oInterface = UnoRuntime.queryInterface(XFootnotesSupplier.class, xTextDoc);
oObj = oInterface.getFootnoteSettings();
TestEnvironment tEnv = new TestEnvironment(oObj);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFootnoteText.java b/qadevOOo/tests/java/mod/_sw/SwXFootnoteText.java
index 7bd14b8a4f19..6a563a6977a2 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXFootnoteText.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXFootnoteText.java
@@ -118,12 +118,11 @@ public class SwXFootnoteText extends TestCase {
XFootnote oFootnote;
log.println( "creating a test environment" );
- XMultiServiceFactory msf = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
log.println("creating a footnote");
try {
- oFootnote = (XFootnote)UnoRuntime.queryInterface(XFootnote.class,
+ oFootnote = UnoRuntime.queryInterface(XFootnote.class,
msf.createInstance("com.sun.star.text.Footnote"));
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
@@ -141,8 +140,7 @@ public class SwXFootnoteText extends TestCase {
throw new StatusException("Couldn't insert the footnote", e);
}
- XSimpleText oFootText = (XSimpleText)
- UnoRuntime.queryInterface(XSimpleText.class, oFootnote);
+ XSimpleText oFootText = UnoRuntime.queryInterface(XSimpleText.class, oFootnote);
oFootText.setString("SwXFootnoteText");
oObj = oFootText.getText();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFootnotes.java b/qadevOOo/tests/java/mod/_sw/SwXFootnotes.java
index cbfd2475ac9d..d9a7215b8887 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXFootnotes.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXFootnotes.java
@@ -89,13 +89,12 @@ public class SwXFootnotes extends TestCase {
XInterface oObj = null;
log.println( "Creating a test environment" );
- XMultiServiceFactory msf = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
log.println("creating a footnote");
XFootnote oFootnote;
try {
- oFootnote = (XFootnote) UnoRuntime.queryInterface(XFootnote.class,
+ oFootnote = UnoRuntime.queryInterface(XFootnote.class,
msf.createInstance("com.sun.star.text.Footnote"));
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace(log);
@@ -112,8 +111,7 @@ public class SwXFootnotes extends TestCase {
e.printStackTrace(log);
throw new StatusException("Couldn't insert the footnote", e);
}
- oInterface = (XFootnotesSupplier)
- UnoRuntime.queryInterface(XFootnotesSupplier.class, xTextDoc);
+ oInterface = UnoRuntime.queryInterface(XFootnotesSupplier.class, xTextDoc);
oObj = oInterface.getFootnotes();
log.println( "creating a new environment for Foontnotes object" );
diff --git a/qadevOOo/tests/java/mod/_sw/SwXFrames.java b/qadevOOo/tests/java/mod/_sw/SwXFrames.java
index 35e7c6b877a2..50050ea5c048 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXFrames.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXFrames.java
@@ -97,11 +97,9 @@ public class SwXFrames extends TestCase {
log.println( "creating a test environment" );
try {
- oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
Object oInt = oDocMSF.createInstance("com.sun.star.text.TextFrame");
- oFrame1 = (XTextFrame)
- UnoRuntime.queryInterface( XTextFrame.class, oInt );
+ oFrame1 = UnoRuntime.queryInterface( XTextFrame.class, oInt );
} catch ( com.sun.star.uno.Exception e ) {
e.printStackTrace(log);
throw new StatusException
@@ -119,8 +117,7 @@ public class SwXFrames extends TestCase {
("Error: can't insert text content to text document", e);
}
- oInterface = (XTextFramesSupplier)
- UnoRuntime.queryInterface( XTextFramesSupplier.class, xTextDoc );
+ oInterface = UnoRuntime.queryInterface( XTextFramesSupplier.class, xTextDoc );
oObj = oInterface.getTextFrames();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXHeadFootText.java b/qadevOOo/tests/java/mod/_sw/SwXHeadFootText.java
index f26c9e7b9a28..580b7b95c260 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXHeadFootText.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXHeadFootText.java
@@ -121,8 +121,7 @@ public class SwXHeadFootText extends TestCase {
XStyle StdStyle = null;
log.println( "creating a test environment" );
- XStyleFamiliesSupplier StyleFam = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
+ XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
XNameAccess StyleFamNames = StyleFam.getStyleFamilies();
// obtains style 'Standatd' from style family 'PageStyles'
@@ -152,7 +151,7 @@ public class SwXHeadFootText extends TestCase {
log.println( "Switching on footer" );
PropSet.setPropertyValue("FooterIsOn", new Boolean(true));
log.println( "Get header text" );
- oObj = (XText) UnoRuntime.queryInterface(
+ oObj = UnoRuntime.queryInterface(
XText.class, PropSet.getPropertyValue("HeaderText"));
} catch ( com.sun.star.lang.WrappedTargetException e ) {
e.printStackTrace(log);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXLineNumberingProperties.java b/qadevOOo/tests/java/mod/_sw/SwXLineNumberingProperties.java
index c6348472b0de..ff07a8cfc46e 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXLineNumberingProperties.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXLineNumberingProperties.java
@@ -97,8 +97,7 @@ public class SwXLineNumberingProperties extends TestCase {
log.println("Exception occurred: " + e);
}
- XLineNumberingProperties oLNP = (XLineNumberingProperties)
- UnoRuntime.queryInterface(XLineNumberingProperties.class,xTextDoc);
+ XLineNumberingProperties oLNP = UnoRuntime.queryInterface(XLineNumberingProperties.class,xTextDoc);
XPropertySet lineNumProps = oLNP.getLineNumberingProperties();
dbg.printPropertiesNames(lineNumProps);
TestEnvironment tEnv = new TestEnvironment(lineNumProps);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXMailMerge.java b/qadevOOo/tests/java/mod/_sw/SwXMailMerge.java
index 19ba95632732..cdf3d693425f 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXMailMerge.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXMailMerge.java
@@ -107,8 +107,7 @@ public class SwXMailMerge extends TestCase {
}
XPropertySet oRowSetProps = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, oRowSet);
- XRowSet xRowSet = (XRowSet)
- UnoRuntime.queryInterface(XRowSet.class, oRowSet);
+ XRowSet xRowSet = UnoRuntime.queryInterface(XRowSet.class, oRowSet);
try {
oRowSetProps.setPropertyValue("DataSourceName",cDataSourceName);
oRowSetProps.setPropertyValue("Command",cDataCommand);
@@ -128,8 +127,7 @@ public class SwXMailMerge extends TestCase {
throw new StatusException("Can't execute oRowSet", e);
}
- XResultSet oResultSet = (XResultSet)
- UnoRuntime.queryInterface(XResultSet.class, oRowSet);
+ XResultSet oResultSet = UnoRuntime.queryInterface(XResultSet.class, oRowSet);
@@ -137,7 +135,7 @@ public class SwXMailMerge extends TestCase {
// <create Bookmarks>
log.println("create bookmarks");
try {
- XRowLocate oRowLocate = (XRowLocate) UnoRuntime.queryInterface(
+ XRowLocate oRowLocate = UnoRuntime.queryInterface(
XRowLocate.class, oResultSet);
oResultSet.first();
myBookMarks[0] = oRowLocate.getBookmark();
@@ -245,7 +243,7 @@ public class SwXMailMerge extends TestCase {
}
oRowSetProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oRowSet);
- xRowSet = (XRowSet) UnoRuntime.queryInterface(XRowSet.class, oRowSet);
+ xRowSet = UnoRuntime.queryInterface(XRowSet.class, oRowSet);
try {
oRowSetProps.setPropertyValue("DataSourceName",cDataSourceName);
@@ -266,16 +264,14 @@ public class SwXMailMerge extends TestCase {
throw new StatusException("Can't execute oRowSet", e);
}
- oResultSet = (XResultSet)
- UnoRuntime.queryInterface(XResultSet.class, oRowSet);
+ oResultSet = UnoRuntime.queryInterface(XResultSet.class, oRowSet);
XResultSet oMMXResultSet = null;
try {
- oMMXResultSet = (XResultSet)
- UnoRuntime.queryInterface(XResultSet.class,
- ( (XInterface)
- ( (XMultiServiceFactory)
- Param.getMSF()).createInstance("com.sun.star.sdb.RowSet")));
+ oMMXResultSet = UnoRuntime.queryInterface(XResultSet.class,
+ ( (XInterface)
+ ( (XMultiServiceFactory)
+ Param.getMSF()).createInstance("com.sun.star.sdb.RowSet")));
} catch (Exception e) {
throw new StatusException("Can't create com.sun.star.sdb.RowSet", e);
@@ -384,8 +380,7 @@ public class SwXMailMerge extends TestCase {
try{
Object oDataBase = xNADataCont.getByName(dataName);
- XDataSource xDataSource = (XDataSource)
- UnoRuntime.queryInterface(XDataSource.class, oDataBase);
+ XDataSource xDataSource = UnoRuntime.queryInterface(XDataSource.class, oDataBase);
return xDataSource.getConnection("","");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXNumberingRules.java b/qadevOOo/tests/java/mod/_sw/SwXNumberingRules.java
index 0ed693034f47..f2700b03095c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXNumberingRules.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXNumberingRules.java
@@ -114,16 +114,14 @@ public class SwXNumberingRules extends TestCase {
e.printStackTrace(log);
}
- XStyleFamiliesSupplier oStyleFamiliesSupplier = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
+ XStyleFamiliesSupplier oStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
try {
XNameAccess oStyleFamilies = oStyleFamiliesSupplier.getStyleFamilies();
XNameContainer NumStyles = (XNameContainer) AnyConverter.toObject(
new Type(XNameContainer.class),
oStyleFamilies.getByName("NumberingStyles"));
- NumStyleI = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class,NumStyles);
+ NumStyleI = UnoRuntime.queryInterface(XIndexAccess.class,NumStyles);
} catch ( com.sun.star.lang.WrappedTargetException e ) {
log.println("Error, exception occurred...");
e.printStackTrace(log);
@@ -144,7 +142,7 @@ public class SwXNumberingRules extends TestCase {
UnoRuntime.queryInterface(XPropertySet.class, oObj);
oObj = (XInterface) AnyConverter.toObject(
new Type(XInterface.class),props.getPropertyValue("NumberingRules"));
- XIndexAccess nRules = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, props.getPropertyValue("NumberingRules"));
+ XIndexAccess nRules = UnoRuntime.queryInterface(XIndexAccess.class, props.getPropertyValue("NumberingRules"));
instance1 = nRules.getByIndex(0);
} catch ( com.sun.star.lang.WrappedTargetException e ) {
log.println("Error, exception occurred...");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXParagraph.java b/qadevOOo/tests/java/mod/_sw/SwXParagraph.java
index e34768c5a901..3520338d5b0c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXParagraph.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXParagraph.java
@@ -97,7 +97,7 @@ public class SwXParagraph extends TestCase {
log.println(" disposing xTextDoc ");
try {
- XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
+ XCloseable closer = UnoRuntime.queryInterface(
XCloseable.class, xTextDoc);
closer.close(true);
} catch (com.sun.star.util.CloseVetoException e) {
@@ -136,7 +136,7 @@ public class SwXParagraph extends TestCase {
log.println(" disposing xTextDoc ");
try {
- XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
+ XCloseable closer = UnoRuntime.queryInterface(
XCloseable.class, xTextDoc);
closer.close(true);
} catch (com.sun.star.util.CloseVetoException e) {
@@ -190,15 +190,13 @@ public class SwXParagraph extends TestCase {
}
// Enumeration
- XEnumerationAccess oEnumA = (XEnumerationAccess)
- UnoRuntime.queryInterface(XEnumerationAccess.class, oText );
+ XEnumerationAccess oEnumA = UnoRuntime.queryInterface(XEnumerationAccess.class, oText );
XEnumeration oEnum = oEnumA.createEnumeration();
try {
para = (XInterface) AnyConverter.toObject(
new Type(XInterface.class),oEnum.nextElement());
- XEnumerationAccess oEnumB = (XEnumerationAccess)
- UnoRuntime.queryInterface( XEnumerationAccess.class, para );
+ XEnumerationAccess oEnumB = UnoRuntime.queryInterface( XEnumerationAccess.class, para );
XEnumeration oEnum2 = oEnumB.createEnumeration();
port = (XInterface) AnyConverter.toObject(
new Type(XInterface.class),oEnum2.nextElement());
diff --git a/qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java b/qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java
index 8a6916c92a1b..ace70b24c369 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXParagraphEnumeration.java
@@ -127,8 +127,7 @@ public class SwXParagraphEnumeration extends TestCase {
}
// Enumeration
- XEnumerationAccess oEnumA = (XEnumerationAccess)
- UnoRuntime.queryInterface( XEnumerationAccess.class, oText );
+ XEnumerationAccess oEnumA = UnoRuntime.queryInterface( XEnumerationAccess.class, oText );
XEnumeration oEnum = oEnumA.createEnumeration();
oObj = oEnum;
diff --git a/qadevOOo/tests/java/mod/_sw/SwXPrintSettings.java b/qadevOOo/tests/java/mod/_sw/SwXPrintSettings.java
index 38b0adf60ada..0c08a925bf00 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXPrintSettings.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXPrintSettings.java
@@ -89,8 +89,7 @@ public class SwXPrintSettings extends TestCase {
e.printStackTrace( log );
throw new StatusException( "Couldn't create instance!", e );
}
- XPrintSettingsSupplier xPSS = (XPrintSettingsSupplier)
- UnoRuntime.queryInterface(XPrintSettingsSupplier.class, oInst);
+ XPrintSettingsSupplier xPSS = UnoRuntime.queryInterface(XPrintSettingsSupplier.class, oInst);
oObj = xPSS.getPrintSettings();
TestEnvironment tEnv = new TestEnvironment(oObj);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java b/qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java
index c424e7fd1e77..6fc12bc9ad31 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXReferenceMark.java
@@ -94,8 +94,7 @@ public class SwXReferenceMark extends TestCase {
log.println( "creating a test environment" );
oText = xTextDoc.getText();
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
Object instance = null;
try {
oObj = (XInterface) oDocMSF.createInstance
@@ -107,10 +106,9 @@ public class SwXReferenceMark extends TestCase {
throw new StatusException( "Couldn't get ReferenceMark", e);
}
- XNamed oObjN = (XNamed) UnoRuntime.queryInterface(XNamed.class, oObj);
+ XNamed oObjN = UnoRuntime.queryInterface(XNamed.class, oObj);
oObjN.setName(Name);
- XTextContent oObjTC = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oObj);
+ XTextContent oObjTC = UnoRuntime.queryInterface(XTextContent.class, oObj);
XTextCursor oCursor = oText.createTextCursor();
try {
@@ -122,8 +120,7 @@ public class SwXReferenceMark extends TestCase {
TestEnvironment tEnv = new TestEnvironment( oObj );
- tEnv.addObjRelation("CONTENT", (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,instance));
+ tEnv.addObjRelation("CONTENT", UnoRuntime.queryInterface(XTextContent.class,instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
return tEnv;
diff --git a/qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java b/qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java
index 55be83e23f3f..273ca44ceb3b 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXReferenceMarks.java
@@ -99,8 +99,7 @@ public class SwXReferenceMarks extends TestCase {
log.println( "creating a test environment" );
oText = xTextDoc.getText();
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
// Creation and insertion of ReferenceMark01
try {
@@ -110,10 +109,9 @@ public class SwXReferenceMarks extends TestCase {
e.printStackTrace( log );
throw new StatusException( "Couldn't get ReferenceMark", e);
}
- XNamed oObjN = (XNamed) UnoRuntime.queryInterface(XNamed.class, oObj);
+ XNamed oObjN = UnoRuntime.queryInterface(XNamed.class, oObj);
oObjN.setName(Name);
- XTextContent oObjTC = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oObj);
+ XTextContent oObjTC = UnoRuntime.queryInterface(XTextContent.class, oObj);
XTextCursor oCursor = oText.createTextCursor();
try {
oText.insertTextContent(oCursor, oObjTC, false);
@@ -130,11 +128,10 @@ public class SwXReferenceMarks extends TestCase {
e.printStackTrace( log );
throw new StatusException( "Couldn't get ReferenceMark", e);
}
- XNamed oObjN2 = (XNamed) UnoRuntime.queryInterface(XNamed.class, oObj);
+ XNamed oObjN2 = UnoRuntime.queryInterface(XNamed.class, oObj);
oObjN2.setName(Name2);
- XTextContent oObjTC2 = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oObj);
+ XTextContent oObjTC2 = UnoRuntime.queryInterface(XTextContent.class, oObj);
try {
oText.insertTextContent(oCursor, oObjTC2, false);
} catch ( com.sun.star.lang.IllegalArgumentException e ){
@@ -143,8 +140,7 @@ public class SwXReferenceMarks extends TestCase {
}
// getting ReferenceMarks from text document
- XReferenceMarksSupplier oRefSupp = (XReferenceMarksSupplier)
- UnoRuntime.queryInterface(XReferenceMarksSupplier.class, xTextDoc);
+ XReferenceMarksSupplier oRefSupp = UnoRuntime.queryInterface(XReferenceMarksSupplier.class, xTextDoc);
oObj = oRefSupp.getReferenceMarks();
TestEnvironment tEnv = new TestEnvironment( oObj );
diff --git a/qadevOOo/tests/java/mod/_sw/SwXShape.java b/qadevOOo/tests/java/mod/_sw/SwXShape.java
index bca7545e2c9a..dc7ca25d0dcd 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXShape.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXShape.java
@@ -99,12 +99,11 @@ public class SwXShape extends TestCase {
log.println( "creating a test environment" );
log.println( "getting Drawpage" );
- XDrawPageSupplier oDPS = (XDrawPageSupplier)
- UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDoc);
+ XDrawPageSupplier oDPS = UnoRuntime.queryInterface(XDrawPageSupplier.class, xTextDoc);
oDP = oDPS.getDrawPage();
log.println( "getting Shape" );
- oShapes = (XShapes) UnoRuntime.queryInterface(XShapes.class, oDP);
+ oShapes = UnoRuntime.queryInterface(XShapes.class, oDP);
oObj = SOF.createShape(xTextDoc,5000,3500,7500,5000,"Rectangle");
oShapes.add((XShape) oObj);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXStyle.java b/qadevOOo/tests/java/mod/_sw/SwXStyle.java
index 36d1627c520b..640295b53ebe 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXStyle.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXStyle.java
@@ -118,16 +118,13 @@ public class SwXStyle 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) AnyConverter.toObject(
new Type(XNameAccess.class),oSFsIA.getByIndex(0));
- XIndexAccess oSFIA = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
+ XIndexAccess oSFIA = UnoRuntime.queryInterface(XIndexAccess.class, oSFNA);
oStyle = (XStyle) AnyConverter.toObject(
new Type(XStyle.class),oSFIA.getByIndex(10));
} catch ( com.sun.star.lang.WrappedTargetException e ) {
@@ -146,8 +143,7 @@ public class SwXStyle 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);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java b/qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java
index c66e6671cbc0..bd77d4cabe99 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXStyleFamilies.java
@@ -87,10 +87,8 @@ public class SwXStyleFamilies extends TestCase {
log.println( "Creating a test environment" );
- XTextDocument xArea = (XTextDocument)
- UnoRuntime.queryInterface(XTextDocument.class, xTextDoc);
- XStyleFamiliesSupplier oSFS = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xArea);
+ XTextDocument xArea = UnoRuntime.queryInterface(XTextDocument.class, xTextDoc);
+ XStyleFamiliesSupplier oSFS = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xArea);
XNameAccess oSF = oSFS.getStyleFamilies();
TestEnvironment tEnv = new TestEnvironment(oSF);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java b/qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java
index bbac63996dbc..3ba157938b76 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXStyleFamily.java
@@ -121,15 +121,12 @@ public class SwXStyleFamily extends TestCase {
log.println( "Creating Test Environment..." );
SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF());
- XComponent xComp = (XComponent)
- UnoRuntime.queryInterface(XComponent.class, xTextDoc);
+ XComponent xComp = UnoRuntime.queryInterface(XComponent.class, xTextDoc);
XInterface oInstance = (XInterface)
SOF.createInstance(xComp, "com.sun.star.style.CharacterStyle");
- XStyleFamiliesSupplier oSFsS = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
+ XStyleFamiliesSupplier oSFsS = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
XNameAccess oSF = oSFsS.getStyleFamilies();
- XIndexAccess oSFIA = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, oSF);
+ XIndexAccess oSFIA = UnoRuntime.queryInterface(XIndexAccess.class, oSF);
try {
oSFNA = (XNameAccess) AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTableCellText.java b/qadevOOo/tests/java/mod/_sw/SwXTableCellText.java
index ab24657dc5b6..cc59873ab331 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTableCellText.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTableCellText.java
@@ -136,8 +136,7 @@ public class SwXTableCellText extends TestCase {
}
XCell oCell = oTable.getCellByName("A1");
- XSimpleText oCellText = (XSimpleText)
- UnoRuntime.queryInterface(XSimpleText.class, oCell);
+ XSimpleText oCellText = UnoRuntime.queryInterface(XSimpleText.class, oCell);
oCellText.setString("SwXTableCellText");
oObj = oCellText.getText();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextColumns.java b/qadevOOo/tests/java/mod/_sw/SwXTextColumns.java
index 624252556917..98a073d32dad 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextColumns.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextColumns.java
@@ -99,11 +99,9 @@ public class SwXTextColumns extends TestCase {
log.println( "creating a test environment" );
log.println("getting PageStyle");
- XStyleFamiliesSupplier oSFS = (XStyleFamiliesSupplier)
- UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
+ XStyleFamiliesSupplier oSFS = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);
XNameAccess oSF = oSFS.getStyleFamilies();
- XIndexAccess oSFIA = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, oSF);
+ XIndexAccess oSFIA = UnoRuntime.queryInterface(XIndexAccess.class, oSF);
try {
XNameAccess oSFNA = (XNameAccess) AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextCursor.java b/qadevOOo/tests/java/mod/_sw/SwXTextCursor.java
index 2053403a6e5d..7f943e2bca76 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextCursor.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextCursor.java
@@ -179,7 +179,7 @@ public class SwXTextCursor extends TestCase {
tEnv.addObjRelation("PropertyNames", getPropertyNames(xCursorProp));
//Adding relation for util.XSortable
- final XParagraphCursor paragrCursor = (XParagraphCursor) UnoRuntime.queryInterface(
+ final XParagraphCursor paragrCursor = UnoRuntime.queryInterface(
XParagraphCursor.class,
oObj);
final PrintWriter finalLog = log;
@@ -292,7 +292,7 @@ public class SwXTextCursor extends TestCase {
public String[] getPropertyNames(XPropertySet props) {
Property[] the_props = props.getPropertySetInfo().getProperties();
- ArrayList names = new ArrayList();
+ ArrayList<String> names = new ArrayList<String>();
for (int i = 0; i < the_props.length; i++) {
boolean isWritable = ((the_props[i].Attributes & PropertyAttribute.READONLY) == 0);
@@ -302,6 +302,6 @@ public class SwXTextCursor extends TestCase {
}
}
- return (String[]) names.toArray(new String[names.size()]);
+ return names.toArray(new String[names.size()]);
}
} // finish class SwXTextCursor
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextDefaults.java b/qadevOOo/tests/java/mod/_sw/SwXTextDefaults.java
index e91b2d1cc2e6..e39a409b98d8 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextDefaults.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextDefaults.java
@@ -75,8 +75,7 @@ public class SwXTextDefaults extends TestCase {
XInterface oObj = null;
- XMultiServiceFactory docMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class,xTextDoc);
+ XMultiServiceFactory docMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class,xTextDoc);
try {
oObj = (XInterface)
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextDocument.java b/qadevOOo/tests/java/mod/_sw/SwXTextDocument.java
index 60b1358795ff..b6c1d07c7fa9 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextDocument.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextDocument.java
@@ -111,14 +111,14 @@ public class SwXTextDocument extends TestCase {
}
//insert two sections parent and child
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(
XMultiServiceFactory.class,
xTextDoc);
XInterface oTS;
XTextSection xTS;
- XTextSectionsSupplier oTSSupp = (XTextSectionsSupplier) UnoRuntime.queryInterface(
+ XTextSectionsSupplier oTSSupp = UnoRuntime.queryInterface(
XTextSectionsSupplier.class,
xTextDoc);
XNameAccess oTSSuppName = oTSSupp.getTextSections();
@@ -126,11 +126,11 @@ public class SwXTextDocument extends TestCase {
oTS = (XInterface) oDocMSF.createInstance(
"com.sun.star.text.TextSection");
- XTextContent oTSC = (XTextContent) UnoRuntime.queryInterface(
+ XTextContent oTSC = UnoRuntime.queryInterface(
XTextContent.class, oTS);
oText.insertTextContent(oCursor, oTSC, false);
- XWordCursor oWordC = (XWordCursor) UnoRuntime.queryInterface(
+ XWordCursor oWordC = UnoRuntime.queryInterface(
XWordCursor.class, oCursor);
oCursor.setString("End of TextSection");
oCursor.gotoStart(false);
@@ -139,11 +139,11 @@ public class SwXTextDocument extends TestCase {
XInterface oTS2 = (XInterface) oDocMSF.createInstance(
"com.sun.star.text.TextSection");
- oTSC = (XTextContent) UnoRuntime.queryInterface(XTextContent.class,
+ oTSC = UnoRuntime.queryInterface(XTextContent.class,
oTS2);
oText.insertTextContent(oCursor, oTSC, false);
- XIndexAccess oTSSuppIndex = (XIndexAccess) UnoRuntime.queryInterface(
+ XIndexAccess oTSSuppIndex = UnoRuntime.queryInterface(
XIndexAccess.class,
oTSSuppName);
log.println(
@@ -151,14 +151,14 @@ public class SwXTextDocument extends TestCase {
xTS = (XTextSection) UnoRuntime.queryInterface(XTextSection.class,
oTSSuppIndex.getByIndex(0));
- XNamed xTSName = (XNamed) UnoRuntime.queryInterface(XNamed.class,
+ XNamed xTSName = UnoRuntime.queryInterface(XNamed.class,
xTS);
xTSName.setName("SwXTextSection");
log.println(" adding TextTable");
the_table = SOfficeFactory.createTextTable(xTextDoc, 6, 4);
- XNamed the_name = (XNamed) UnoRuntime.queryInterface(XNamed.class,
+ XNamed the_name = UnoRuntime.queryInterface(XNamed.class,
the_table);
the_name.setName("SwXTextDocument");
SOfficeFactory.insertTextContent(xTextDoc,
@@ -168,10 +168,10 @@ public class SwXTextDocument extends TestCase {
XInterface aMark = (XInterface) oDocMSF.createInstance(
"com.sun.star.text.ReferenceMark");
- the_name = (XNamed) UnoRuntime.queryInterface(XNamed.class, aMark);
+ the_name = UnoRuntime.queryInterface(XNamed.class, aMark);
the_name.setName("SwXTextDocument");
- XTextContent oTC = (XTextContent) UnoRuntime.queryInterface(
+ XTextContent oTC = UnoRuntime.queryInterface(
XTextContent.class, aMark);
SOfficeFactory.insertTextContent(xTextDoc, (XTextContent) oTC);
@@ -184,7 +184,7 @@ public class SwXTextDocument extends TestCase {
XInterface aEndNote = (XInterface) oDocMSF.createInstance(
"com.sun.star.text.Endnote");
- oTC = (XTextContent) UnoRuntime.queryInterface(XTextContent.class,
+ oTC = UnoRuntime.queryInterface(XTextContent.class,
aEndNote);
SOfficeFactory.insertTextContent(xTextDoc, (XTextContent) oTC);
@@ -202,7 +202,7 @@ public class SwXTextDocument extends TestCase {
XTextFrame frame = SOfficeFactory.createTextFrame(xTextDoc, 500,
500);
- oTC = (XTextContent) UnoRuntime.queryInterface(XTextContent.class,
+ oTC = UnoRuntime.queryInterface(XTextContent.class,
frame);
SOfficeFactory.insertTextContent(xTextDoc, (XTextContent) oTC);
@@ -232,9 +232,9 @@ public class SwXTextDocument extends TestCase {
return tEnv;
}
- XModel model1 = (XModel) UnoRuntime.queryInterface(XModel.class,
+ XModel model1 = UnoRuntime.queryInterface(XModel.class,
xTextDoc);
- XModel model2 = (XModel) UnoRuntime.queryInterface(XModel.class,
+ XModel model2 = UnoRuntime.queryInterface(XModel.class,
xSecondTextDoc);
XController cont1 = model1.getCurrentController();
@@ -243,7 +243,7 @@ public class SwXTextDocument extends TestCase {
cont1.getFrame().setName("cont1");
cont2.getFrame().setName("cont2");
- XSelectionSupplier sel = (XSelectionSupplier) UnoRuntime.queryInterface(
+ XSelectionSupplier sel = UnoRuntime.queryInterface(
XSelectionSupplier.class, cont1);
log.println("Adding SelectionSupplier and Shape to select for XModel");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObject.java b/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObject.java
index 4b4843797175..3fcbd3687ba8 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObject.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObject.java
@@ -71,7 +71,7 @@ public class SwXTextEmbeddedObject extends TestCase {
log.println(" disposing xTextDoc ");
try {
- XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
+ XCloseable closer = UnoRuntime.queryInterface(
XCloseable.class, xTextDoc);
closer.close(true);
} catch (com.sun.star.util.CloseVetoException e) {
@@ -107,10 +107,9 @@ public class SwXTextEmbeddedObject extends TestCase {
XTextCursor xCursor = xTextDoc.getText().createTextCursor();
try {
- XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory xMultiServiceFactory = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
Object o = xMultiServiceFactory.createInstance("com.sun.star.text.TextEmbeddedObject" );
- XTextContent xTextContent = (XTextContent)UnoRuntime.queryInterface(XTextContent.class, o);
+ XTextContent xTextContent = UnoRuntime.queryInterface(XTextContent.class, o);
String sChartClassID = "12dcae26-281f-416f-a234-c3086127382e";
XPropertySet xPropertySet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xTextContent);
@@ -122,12 +121,12 @@ public class SwXTextEmbeddedObject extends TestCase {
e.printStackTrace((java.io.PrintWriter)log);
}
- XTextEmbeddedObjectsSupplier oTEOS = (XTextEmbeddedObjectsSupplier) UnoRuntime.queryInterface(
+ XTextEmbeddedObjectsSupplier oTEOS = UnoRuntime.queryInterface(
XTextEmbeddedObjectsSupplier.class,
xTextDoc);
XNameAccess oEmObj = oTEOS.getEmbeddedObjects();
- XIndexAccess oEmIn = (XIndexAccess) UnoRuntime.queryInterface(
+ XIndexAccess oEmIn = UnoRuntime.queryInterface(
XIndexAccess.class, oEmObj);
try {
@@ -145,7 +144,7 @@ public class SwXTextEmbeddedObject extends TestCase {
XTextFrame aFrame = SOF.createTextFrame(xTextDoc, 500, 500);
XText oText = xTextDoc.getText();
XTextCursor oCursor = oText.createTextCursor();
- XTextContent the_content = (XTextContent) UnoRuntime.queryInterface(
+ XTextContent the_content = UnoRuntime.queryInterface(
XTextContent.class, aFrame);
try {
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java b/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java
index ec21d9fb625d..b1e209575d03 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObjects.java
@@ -99,10 +99,9 @@ public class SwXTextEmbeddedObjects extends TestCase {
// create testobject here
XTextCursor xCursor = oDoc.getText().createTextCursor();
try {
- XMultiServiceFactory xMultiServiceFactory = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc);
+ XMultiServiceFactory xMultiServiceFactory = UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc);
Object o = xMultiServiceFactory.createInstance("com.sun.star.text.TextEmbeddedObject" );
- XTextContent xTextContent = (XTextContent)UnoRuntime.queryInterface(XTextContent.class, o);
+ XTextContent xTextContent = UnoRuntime.queryInterface(XTextContent.class, o);
String sChartClassID = "12dcae26-281f-416f-a234-c3086127382e";
XPropertySet xPropertySet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xTextContent);
@@ -114,8 +113,7 @@ public class SwXTextEmbeddedObjects extends TestCase {
e.printStackTrace((java.io.PrintWriter)log);
}
- XTextEmbeddedObjectsSupplier oTEOS = (XTextEmbeddedObjectsSupplier)
- UnoRuntime.queryInterface(XTextEmbeddedObjectsSupplier.class, oDoc);
+ XTextEmbeddedObjectsSupplier oTEOS = UnoRuntime.queryInterface(XTextEmbeddedObjectsSupplier.class, oDoc);
oObj = oTEOS.getEmbeddedObjects();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextField.java b/qadevOOo/tests/java/mod/_sw/SwXTextField.java
index 9d29e59add8d..3de89f88e159 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextField.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextField.java
@@ -113,8 +113,7 @@ public class SwXTextField extends TestCase {
// create testobject here
try {
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
Object FieldMaster = oDocMSF.createInstance
( "com.sun.star.text.FieldMaster.Database" );
@@ -126,16 +125,14 @@ public class SwXTextField extends TestCase {
instance = (XInterface) oDocMSF.createInstance
( "com.sun.star.text.TextField.DateTime" );
- XDependentTextField xTF = (XDependentTextField)
- UnoRuntime.queryInterface(XDependentTextField.class,oObj);
+ XDependentTextField xTF = UnoRuntime.queryInterface(XDependentTextField.class,oObj);
PFieldMaster.setPropertyValue("DataBaseName","Address Book File");
PFieldMaster.setPropertyValue("DataTableName","address");
PFieldMaster.setPropertyValue("DataColumnName","FIRSTNAME");
XText the_Text = xTextDoc.getText();
XTextCursor the_Cursor = the_Text.createTextCursor();
- XTextContent the_Field = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,oObj);
+ XTextContent the_Field = UnoRuntime.queryInterface(XTextContent.class,oObj);
xTF.attachTextFieldMaster(PFieldMaster);
the_Text.insertTextContent(the_Cursor,the_Field,false);
@@ -149,8 +146,7 @@ public class SwXTextField extends TestCase {
TestEnvironment tEnv = new TestEnvironment( oObj );
- tEnv.addObjRelation("CONTENT", (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,instance));
+ tEnv.addObjRelation("CONTENT", UnoRuntime.queryInterface(XTextContent.class,instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
return tEnv;
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java b/qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java
index 8b71b639f7ba..a212f8c2a617 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextFieldMasters.java
@@ -111,8 +111,7 @@ public class SwXTextFieldMasters extends TestCase {
// create testobject here
try {
- XTextFieldsSupplier oTFS = (XTextFieldsSupplier)
- UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );
+ XTextFieldsSupplier oTFS = UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );
oObj = oTFS.getTextFieldMasters();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java b/qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java
index cde0303e3045..45684ade15fe 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java
@@ -109,8 +109,7 @@ public class SwXTextFieldTypes extends TestCase {
// create testobject here
try {
- XTextFieldsSupplier oTFS = (XTextFieldsSupplier)
- UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );
+ XTextFieldsSupplier oTFS = UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc );
oObj = oTFS.getTextFields();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextFrame.java b/qadevOOo/tests/java/mod/_sw/SwXTextFrame.java
index 68ce266a1559..05127431b3a5 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextFrame.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextFrame.java
@@ -107,12 +107,12 @@ public class SwXTextFrame extends TestCase {
log.println("inserting Frame1");
- XTextContent the_content = (XTextContent) UnoRuntime.queryInterface(
+ XTextContent the_content = UnoRuntime.queryInterface(
XTextContent.class, oFrame1);
oText.insertTextContent(oCursor, the_content, true);
log.println("inserting Frame2");
- the_content = (XTextContent) UnoRuntime.queryInterface(
+ the_content = UnoRuntime.queryInterface(
XTextContent.class, oFrame2);
oText.insertTextContent(oCursor, the_content, true);
@@ -134,7 +134,7 @@ public class SwXTextFrame extends TestCase {
TestEnvironment tEnv = new TestEnvironment(oObj);
tEnv.addObjRelation("CONTENT",
- (XTextContent) UnoRuntime.queryInterface(
+ UnoRuntime.queryInterface(
XTextContent.class, instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java b/qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java
index be7024444073..a083cf58a378 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java
@@ -118,7 +118,7 @@ public class SwXTextFrameText extends TestCase {
throw new StatusException("Couldn't insert TextFrame ", Ex);
}
- XText oFText = (XText)UnoRuntime.queryInterface(XText.class, oFrame1);
+ XText oFText = UnoRuntime.queryInterface(XText.class, oFrame1);
XTextCursor oFCursor = oFText.createTextCursor();
oFText.insertString(oFCursor, "SwXTextFrameText", false);
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java b/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java
index 7658326e5a07..9956a8f93fd3 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObject.java
@@ -118,12 +118,11 @@ public class SwXTextGraphicObject extends TestCase {
XText the_text = xTextDoc.getText();
XTextCursor the_cursor = the_text.createTextCursor();
- XTextContent the_content = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,oObj);
+ XTextContent the_content = UnoRuntime.queryInterface(XTextContent.class,oObj);
log.println("inserting Frame");
try{
- XTextContent Framecontent = (XTextContent) UnoRuntime.queryInterface(
+ XTextContent Framecontent = UnoRuntime.queryInterface(
XTextContent.class, xTextFrame);
the_text.insertTextContent(the_cursor, Framecontent, true);
} catch (Exception e) {
@@ -171,9 +170,8 @@ public class SwXTextGraphicObject extends TestCase {
//creating ObjectRelation for the property
// 'ImageMap' of 'TextGraphicObject'
try {
- XMultiServiceFactory xDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface
- (XMultiServiceFactory.class,xTextDoc);
+ XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface
+ (XMultiServiceFactory.class,xTextDoc);
ImgMap = xDocMSF.createInstance
("com.sun.star.image.ImageMapRectangleObject");
}
@@ -183,8 +181,7 @@ public class SwXTextGraphicObject extends TestCase {
tEnv.addObjRelation("IMGMAP",ImgMap);
- tEnv.addObjRelation("CONTENT", (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,instance));
+ tEnv.addObjRelation("CONTENT", UnoRuntime.queryInterface(XTextContent.class,instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
//object relation for text.BaseFrameProperties
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObjects.java b/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObjects.java
index 74d4081f7eac..3a0ec080f562 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObjects.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextGraphicObjects.java
@@ -113,8 +113,7 @@ public class SwXTextGraphicObjects extends TestCase {
XText the_text = xTextDoc.getText();
XTextCursor the_cursor = the_text.createTextCursor();
- XTextContent the_content = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,oObj);
+ XTextContent the_content = UnoRuntime.queryInterface(XTextContent.class,oObj);
log.println( "inserting graphic" );
try {
@@ -141,9 +140,8 @@ public class SwXTextGraphicObjects extends TestCase {
throw new StatusException("Couldn't set property 'GraphicURL'", e );
}
- XTextGraphicObjectsSupplier xTGS = (XTextGraphicObjectsSupplier)
- UnoRuntime.queryInterface(XTextGraphicObjectsSupplier.class,
- xTextDoc);
+ XTextGraphicObjectsSupplier xTGS = UnoRuntime.queryInterface(XTextGraphicObjectsSupplier.class,
+ xTextDoc);
oObj = xTGS.getGraphicObjects();
TestEnvironment tEnv = new TestEnvironment( oObj );
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextPortion.java b/qadevOOo/tests/java/mod/_sw/SwXTextPortion.java
index 1255703ff113..b5c816ca3dfc 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextPortion.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextPortion.java
@@ -120,8 +120,7 @@ public class SwXTextPortion extends TestCase {
}
// Enumeration
- XEnumerationAccess oEnumA = (XEnumerationAccess)
- UnoRuntime.queryInterface( XEnumerationAccess.class, oText );
+ XEnumerationAccess oEnumA = UnoRuntime.queryInterface( XEnumerationAccess.class, oText );
XEnumeration oEnum = oEnumA.createEnumeration();
int n = 0;
@@ -138,8 +137,7 @@ public class SwXTextPortion extends TestCase {
n++;
}
- XEnumerationAccess oEnumP = (XEnumerationAccess)
- UnoRuntime.queryInterface( XEnumerationAccess.class, param );
+ XEnumerationAccess oEnumP = UnoRuntime.queryInterface( XEnumerationAccess.class, param );
XEnumeration oEnum2 = oEnumP.createEnumeration();
try {
oObj = (XInterface)AnyConverter.toObject(
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextPortionEnumeration.java b/qadevOOo/tests/java/mod/_sw/SwXTextPortionEnumeration.java
index 4a5896af38fc..97700079e63e 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextPortionEnumeration.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextPortionEnumeration.java
@@ -117,8 +117,7 @@ public class SwXTextPortionEnumeration extends TestCase {
}
// Enumeration
- XEnumerationAccess oEnumA = (XEnumerationAccess)
- UnoRuntime.queryInterface( XEnumerationAccess.class, oText );
+ XEnumerationAccess oEnumA = UnoRuntime.queryInterface( XEnumerationAccess.class, oText );
XEnumeration oEnum = oEnumA.createEnumeration();
int n = 0;
@@ -134,8 +133,7 @@ public class SwXTextPortionEnumeration extends TestCase {
n++;
}
- XEnumerationAccess oEnumP = (XEnumerationAccess)
- UnoRuntime.queryInterface( XEnumerationAccess.class, param );
+ XEnumerationAccess oEnumP = UnoRuntime.queryInterface( XEnumerationAccess.class, param );
XEnumeration oEnum2 = oEnumP.createEnumeration();
log.println( "creating a new environment for TextPortionEnumeration object" );
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextRanges.java b/qadevOOo/tests/java/mod/_sw/SwXTextRanges.java
index 3457098fb8aa..25fa596433d8 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextRanges.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextRanges.java
@@ -100,7 +100,7 @@ public class SwXTextRanges extends TestCase {
}
}
- XSearchable oSearch = (XSearchable)UnoRuntime.queryInterface
+ XSearchable oSearch = UnoRuntime.queryInterface
(XSearchable.class, xTextDoc);
XSearchDescriptor xSDesc = oSearch.createSearchDescriptor();
xSDesc.setSearchString("SwXTextRanges");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextSearch.java b/qadevOOo/tests/java/mod/_sw/SwXTextSearch.java
index d38ad5a9b400..974adea3208e 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextSearch.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextSearch.java
@@ -102,7 +102,7 @@ public class SwXTextSearch extends TestCase {
}
}
- XSearchable oSearch = (XSearchable)UnoRuntime.queryInterface
+ XSearchable oSearch = UnoRuntime.queryInterface
(XSearchable.class, xTextDoc);
XSearchDescriptor xSDesc = oSearch.createSearchDescriptor();
xSDesc.setSearchString("SwXTextSearch");
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextSection.java b/qadevOOo/tests/java/mod/_sw/SwXTextSection.java
index f807398aecfb..e8ff1259a720 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextSection.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextSection.java
@@ -91,12 +91,10 @@ public class SwXTextSection extends TestCase {
oText = xTextDoc.getText();
XTextCursor oCursor = oText.createTextCursor();
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
try {
- XTextSectionsSupplier oTSSupp = (XTextSectionsSupplier)
- UnoRuntime.queryInterface
+ XTextSectionsSupplier oTSSupp = UnoRuntime.queryInterface
( XTextSectionsSupplier.class, xTextDoc );
XNameAccess oTSSuppName = oTSSupp.getTextSections();
@@ -105,8 +103,7 @@ public class SwXTextSection extends TestCase {
XTextSection old = (XTextSection) AnyConverter.toObject(
new Type(XTextSection.class),
oTSSuppName.getByName("SwXTextSection"));
- XComponent oldC = (XComponent)
- UnoRuntime.queryInterface(XComponent.class,old);
+ XComponent oldC = UnoRuntime.queryInterface(XComponent.class,old);
oldC.dispose();
oText.setString("");
}
@@ -115,28 +112,24 @@ public class SwXTextSection extends TestCase {
oTS = (XInterface) oDocMSF.createInstance
("com.sun.star.text.TextSection");
instance = oDocMSF.createInstance("com.sun.star.text.TextSection");
- XTextContent oTSC = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oTS);
+ XTextContent oTSC = UnoRuntime.queryInterface(XTextContent.class, oTS);
oText.insertTextContent(oCursor, oTSC, false);
- XWordCursor oWordC = (XWordCursor)
- UnoRuntime.queryInterface(XWordCursor.class, oCursor);
+ XWordCursor oWordC = UnoRuntime.queryInterface(XWordCursor.class, oCursor);
oCursor.setString("End of TextSection");
oCursor.gotoStart(false);
oCursor.setString("Start of TextSection ");
oWordC.gotoEndOfWord(false);
XInterface oTS2 = (XInterface) oDocMSF.createInstance
("com.sun.star.text.TextSection");
- oTSC = (XTextContent)UnoRuntime.queryInterface(XTextContent.class, oTS2);
+ oTSC = UnoRuntime.queryInterface(XTextContent.class, oTS2);
oText.insertTextContent(oCursor, oTSC, false);
- XIndexAccess oTSSuppIndex = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, oTSSuppName);
+ XIndexAccess oTSSuppIndex = UnoRuntime.queryInterface(XIndexAccess.class, oTSSuppName);
log.println( "getting a TextSection with the XTextSectionSupplier()" );
xTS = (XTextSection) AnyConverter.toObject(
new Type(XTextSection.class),oTSSuppIndex.getByIndex(0));
- XNamed xTSName = (XNamed)
- UnoRuntime.queryInterface( XNamed.class, xTS);
+ XNamed xTSName = UnoRuntime.queryInterface( XNamed.class, xTS);
xTSName.setName("SwXTextSection");
}
catch(Exception e){
@@ -166,8 +159,7 @@ public class SwXTextSection extends TestCase {
}
tEnv.addObjRelation("TC",TC);
- tEnv.addObjRelation("CONTENT", (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class,instance));
+ tEnv.addObjRelation("CONTENT", UnoRuntime.queryInterface(XTextContent.class,instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
return tEnv;
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextSections.java b/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
index ca4bbb6244c0..4745242a875e 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextSections.java
@@ -86,15 +86,13 @@ public class SwXTextSections extends TestCase {
log.println( "inserting TextSections" );
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XMultiServiceFactory oDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
// First TextSection
try {
oTS = (XInterface) oDocMSF.createInstance
("com.sun.star.text.TextSection");
- XTextContent oTSC = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oTS);
+ XTextContent oTSC = UnoRuntime.queryInterface(XTextContent.class, oTS);
oText.insertTextContent(oCursor, oTSC, false);
}
catch(Exception e){
@@ -106,8 +104,7 @@ public class SwXTextSections extends TestCase {
try {
oTS = (XInterface) oDocMSF.createInstance
("com.sun.star.text.TextSection");
- XTextContent oTSC = (XTextContent)
- UnoRuntime.queryInterface(XTextContent.class, oTS);
+ XTextContent oTSC = UnoRuntime.queryInterface(XTextContent.class, oTS);
oText.insertTextContent(oCursor, oTSC, false);
}
catch(Exception e){
@@ -119,9 +116,8 @@ public class SwXTextSections extends TestCase {
log.println( "try to get a TextSection with the XTextSectionSupplier()" );
try{
- XTextSectionsSupplier oTSSupp = (XTextSectionsSupplier)
- UnoRuntime.queryInterface( XTextSectionsSupplier.class,
- xTextDoc );
+ XTextSectionsSupplier oTSSupp = UnoRuntime.queryInterface( XTextSectionsSupplier.class,
+ xTextDoc );
oTSSuppName = oTSSupp.getTextSections();
}
catch(Exception e){
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTable.java b/qadevOOo/tests/java/mod/_sw/SwXTextTable.java
index d3653d8c2859..db5f8d3b4a97 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextTable.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextTable.java
@@ -153,17 +153,17 @@ public class SwXTextTable extends TestCase {
public void prepareToSort() {
oTable.getCellByName("A1").setValue(4);
- XTextRange textRange = (XTextRange) UnoRuntime.queryInterface(
+ XTextRange textRange = UnoRuntime.queryInterface(
XTextRange.class,
oTable.getCellByName("A2"));
textRange.setString("b");
oTable.getCellByName("A3").setValue(3);
- textRange = (XTextRange) UnoRuntime.queryInterface(
+ textRange = UnoRuntime.queryInterface(
XTextRange.class,
oTable.getCellByName("A4"));
textRange.setString("a");
oTable.getCellByName("A5").setValue(23);
- textRange = (XTextRange) UnoRuntime.queryInterface(
+ textRange = UnoRuntime.queryInterface(
XTextRange.class,
oTable.getCellByName("A6"));
textRange.setString("ab");
@@ -179,7 +179,7 @@ public class SwXTextTable extends TestCase {
for (int i = 0; i < 6; i++) {
XCell cell = oTable.getCellByName("A" + (i + 1));
- XTextRange textRange = (XTextRange) UnoRuntime.queryInterface(
+ XTextRange textRange = UnoRuntime.queryInterface(
XTextRange.class, cell);
value[i] = textRange.getString();
}
@@ -243,7 +243,7 @@ public class SwXTextTable extends TestCase {
});
tEnv.addObjRelation("CONTENT",
- (XTextContent) UnoRuntime.queryInterface(
+ UnoRuntime.queryInterface(
XTextContent.class, instance));
tEnv.addObjRelation("RANGE", xTextDoc.getText().createTextCursor());
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java b/qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java
index 3e87f369a938..d1ed329ee344 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java
@@ -96,7 +96,7 @@ public class SwXTextTableRow extends TestCase {
try {
log.println("getting table row");
XTableRows oTRn = oTable.getRows();
- XIndexAccess oIA = (XIndexAccess) UnoRuntime.queryInterface
+ XIndexAccess oIA = UnoRuntime.queryInterface
(XIndexAccess.class,oTRn);
oObj = (XPropertySet) AnyConverter.toObject(
new Type(XPropertySet.class),oIA.getByIndex(1));
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTables.java b/qadevOOo/tests/java/mod/_sw/SwXTextTables.java
index f4c3c1caf4d8..4b32dde504d4 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextTables.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextTables.java
@@ -114,10 +114,8 @@ public class SwXTextTables extends TestCase {
+ uE.getMessage(), uE);
}
- XMultiServiceFactory msf = (XMultiServiceFactory)
- UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
- XTextTablesSupplier oTTSupp = (XTextTablesSupplier)
- UnoRuntime.queryInterface(XTextTablesSupplier.class, msf);
+ XMultiServiceFactory msf = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
+ XTextTablesSupplier oTTSupp = UnoRuntime.queryInterface(XTextTablesSupplier.class, msf);
oObj = oTTSupp.getTextTables();
if ( oTable != null ) {
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextView.java b/qadevOOo/tests/java/mod/_sw/SwXTextView.java
index 6d5798ef1349..b27c77da8510 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextView.java
@@ -144,12 +144,12 @@ public class SwXTextView extends TestCase {
XTextCursor oCursor = oText.createTextCursor();
oFrame1 = SOF.createInstance
(xTextDoc, "com.sun.star.text.TextFrame" );
- first = (XTextFrame)UnoRuntime.queryInterface
+ first = UnoRuntime.queryInterface
( XTextFrame.class, oFrame1);
oText.insertTextContent(oCursor,first, false);
first.getText().setString("Frame 1");
oFrame2 = SOF.createInstance(xTextDoc, "com.sun.star.text.TextFrame" );
- second = (XTextFrame)UnoRuntime.queryInterface
+ second = UnoRuntime.queryInterface
( XTextFrame.class, oFrame2);
oText.insertTextContent(oCursor,second, false);
second.getText().setString("Frame 2");
@@ -164,7 +164,7 @@ public class SwXTextView extends TestCase {
throw new StatusException("Couldn't insert text table ", Ex);
}
- XSearchable oSearch = (XSearchable)UnoRuntime.queryInterface
+ XSearchable oSearch = UnoRuntime.queryInterface
(XSearchable.class, xTextDoc);
XSearchDescriptor xSDesc = oSearch.createSearchDescriptor();
xSDesc.setSearchString("SwXTextRanges");
@@ -188,10 +188,8 @@ public class SwXTextView extends TestCase {
return -1;
}
- XIndexAccess indAc1 = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, o1);
- XIndexAccess indAc2 = (XIndexAccess)
- UnoRuntime.queryInterface(XIndexAccess.class, o2);
+ XIndexAccess indAc1 = UnoRuntime.queryInterface(XIndexAccess.class, o1);
+ XIndexAccess indAc2 = UnoRuntime.queryInterface(XIndexAccess.class, o2);
if (indAc1 != null && indAc2 != null) {
int c1 = indAc1.getCount();
@@ -199,10 +197,8 @@ public class SwXTextView extends TestCase {
return c1 == c2 ? 0 : 1;
}
- XText text1 = (XText)
- UnoRuntime.queryInterface(XText.class, o1);
- XText text2 = (XText)
- UnoRuntime.queryInterface(XText.class, o2);
+ XText text1 = UnoRuntime.queryInterface(XText.class, o1);
+ XText text2 = UnoRuntime.queryInterface(XText.class, o2);
if (text1 != null && text2 != null) {
return text1.getString().equals(text2.getString()) ? 0 : 1;
@@ -214,8 +210,7 @@ public class SwXTextView extends TestCase {
return compare(this, obj) == 0;
} });
- XSelectionSupplier xsel = (XSelectionSupplier)
- UnoRuntime.queryInterface(XSelectionSupplier.class,xContr);
+ XSelectionSupplier xsel = UnoRuntime.queryInterface(XSelectionSupplier.class,xContr);
try {
xsel.select(second);
} catch (Exception e) {
diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextViewCursor.java b/qadevOOo/tests/java/mod/_sw/SwXTextViewCursor.java
index 3a160a55c901..00b6af83262c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXTextViewCursor.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXTextViewCursor.java
@@ -94,8 +94,7 @@ public class SwXTextViewCursor extends TestCase {
// create testobject here
oObj = xTextDoc.getCurrentController();
- XTextViewCursorSupplier oTVCSupp = (XTextViewCursorSupplier)
- UnoRuntime.queryInterface(XTextViewCursorSupplier.class, oObj);
+ XTextViewCursorSupplier oTVCSupp = UnoRuntime.queryInterface(XTextViewCursorSupplier.class, oObj);
oObj = oTVCSupp.getViewCursor();
diff --git a/qadevOOo/tests/java/mod/_sw/SwXViewSettings.java b/qadevOOo/tests/java/mod/_sw/SwXViewSettings.java
index 3f7765d76631..93b67a715d84 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXViewSettings.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXViewSettings.java
@@ -84,8 +84,7 @@ public class SwXViewSettings extends TestCase {
// create testobject here
oObj = xTextDoc.getCurrentController();
- XViewSettingsSupplier oVSSupp = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class, oObj);
+ XViewSettingsSupplier oVSSupp = UnoRuntime.queryInterface(XViewSettingsSupplier.class, oObj);
oObj = oVSSupp.getViewSettings();
diff --git a/qadevOOo/tests/java/mod/_sw/XMLContentExporter.java b/qadevOOo/tests/java/mod/_sw/XMLContentExporter.java
index 853d8aaa9f46..b5ce7ab8412c 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLContentExporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLContentExporter.java
@@ -123,7 +123,7 @@ public class XMLContentExporter extends TestCase {
oObj = (XInterface) xMSF.createInstanceWithArguments(
"com.sun.star.comp.Writer.XMLContentExporter",
new Object[] {arg});
- XExporter xEx = (XExporter) UnoRuntime.queryInterface
+ XExporter xEx = UnoRuntime.queryInterface
(XExporter.class,oObj);
xEx.setSourceDocument(xTextDoc);
diff --git a/qadevOOo/tests/java/mod/_sw/XMLContentImporter.java b/qadevOOo/tests/java/mod/_sw/XMLContentImporter.java
index eccb4306245e..760c9b1049c9 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLContentImporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLContentImporter.java
@@ -151,7 +151,7 @@ public class XMLContentImporter extends TestCase {
tEnv.addObjRelation("XDocumentHandler.XMLData", xml) ;
- final XTextDocument textDoc = (XTextDocument) UnoRuntime.queryInterface
+ final XTextDocument textDoc = UnoRuntime.queryInterface
(XTextDocument.class, xTextDoc) ;
final PrintWriter fLog = log ;
tEnv.addObjRelation("XDocumentHandler.ImportChecker",
diff --git a/qadevOOo/tests/java/mod/_sw/XMLExporter.java b/qadevOOo/tests/java/mod/_sw/XMLExporter.java
index b40d6fde1cf4..66bcc8971825 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLExporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLExporter.java
@@ -123,7 +123,7 @@ public class XMLExporter extends TestCase {
try {
oObj = (XInterface) xMSF.createInstanceWithArguments(
"com.sun.star.comp.Writer.XMLExporter", new Object[] {arg});
- XExporter xEx = (XExporter) UnoRuntime.queryInterface
+ XExporter xEx = UnoRuntime.queryInterface
(XExporter.class,oObj);
xEx.setSourceDocument(xTextDoc);
diff --git a/qadevOOo/tests/java/mod/_sw/XMLImporter.java b/qadevOOo/tests/java/mod/_sw/XMLImporter.java
index f15fcda68848..c6707c59bf11 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLImporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLImporter.java
@@ -112,7 +112,7 @@ public class XMLImporter extends TestCase {
try {
oObj = (XInterface) xMSF.createInstance
("com.sun.star.comp.Writer.XMLImporter");
- XImporter xIm = (XImporter) UnoRuntime.queryInterface
+ XImporter xIm = UnoRuntime.queryInterface
(XImporter.class,oObj);
xIm.setTargetDocument(xTextDoc);
} catch (com.sun.star.uno.Exception e) {
@@ -142,7 +142,7 @@ public class XMLImporter extends TestCase {
tEnv.addObjRelation("TargetDocument",xTextDoc);
log.println("Implementation Name: "+util.utils.getImplName(oObj));
- final XTextDocument textDoc = (XTextDocument) UnoRuntime.queryInterface
+ final XTextDocument textDoc = UnoRuntime.queryInterface
(XTextDocument.class, xTextDoc) ;
final PrintWriter fLog = log ;
tEnv.addObjRelation("XDocumentHandler.ImportChecker",
diff --git a/qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java b/qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java
index 77cf1db58bc7..52df6783e384 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLMetaExporter.java
@@ -124,14 +124,13 @@ public class XMLMetaExporter extends TestCase {
oObj = (XInterface) xMSF.createInstanceWithArguments(
"com.sun.star.comp.Writer.XMLMetaExporter",
new Object[] {arg});
- XExporter xEx = (XExporter) UnoRuntime.queryInterface
+ XExporter xEx = UnoRuntime.queryInterface
(XExporter.class,oObj);
xEx.setSourceDocument(xTextDoc);
//set some meta data
- XDocumentInfoSupplier infoSup = (XDocumentInfoSupplier)
- UnoRuntime.queryInterface
- (XDocumentInfoSupplier.class, xTextDoc) ;
+ XDocumentInfoSupplier infoSup = UnoRuntime.queryInterface
+ (XDocumentInfoSupplier.class, xTextDoc) ;
XPropertySet docInfo = (XPropertySet) UnoRuntime.queryInterface
(XPropertySet.class, infoSup.getDocumentInfo()) ;
docInfo.setPropertyValue("Title", TITLE);
diff --git a/qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java b/qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java
index 705260fa02d2..6b24e0232efb 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLMetaImporter.java
@@ -153,7 +153,7 @@ public class XMLMetaImporter extends TestCase {
tEnv.addObjRelation("XDocumentHandler.XMLData", xml) ;
- XDocumentInfoSupplier infoSup = (XDocumentInfoSupplier) UnoRuntime.queryInterface
+ XDocumentInfoSupplier infoSup = UnoRuntime.queryInterface
(XDocumentInfoSupplier.class, xTextDoc) ;
final XPropertySet docInfo = (XPropertySet) UnoRuntime.queryInterface
(XPropertySet.class, infoSup.getDocumentInfo()) ;
diff --git a/qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java b/qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java
index 9a0ec50b4e07..2950cc7a6de2 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java
@@ -127,15 +127,14 @@ public class XMLSettingsExporter extends TestCase {
oObj = (XInterface) xMSF.createInstanceWithArguments(
"com.sun.star.comp.Writer.XMLSettingsExporter",
new Object[] {arg});
- XExporter xEx = (XExporter) UnoRuntime.queryInterface
+ XExporter xEx = UnoRuntime.queryInterface
(XExporter.class,oObj);
xEx.setSourceDocument(xTextDoc);
//set some settings
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
XPropertySet xPropSet = xViewSetSup.getViewSettings();
xPropSet.setPropertyValue("ZoomValue", new Short(ZOOM));
diff --git a/qadevOOo/tests/java/mod/_sw/XMLSettingsImporter.java b/qadevOOo/tests/java/mod/_sw/XMLSettingsImporter.java
index f4bcc2f2b32c..db1ebaff1ba0 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLSettingsImporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLSettingsImporter.java
@@ -174,8 +174,7 @@ public class XMLSettingsImporter extends TestCase {
final PrintWriter logF = log ;
XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = (XViewSettingsSupplier)
- UnoRuntime.queryInterface(XViewSettingsSupplier.class, xController);
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class, xController);
final XPropertySet xPropSet = xViewSetSup.getViewSettings();
tEnv.addObjRelation("XDocumentHandler.ImportChecker",
new ifc.xml.sax._XDocumentHandler.ImportChecker() {
diff --git a/qadevOOo/tests/java/mod/_sw/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_sw/XMLStylesExporter.java
index 37a8186dcdbc..b854e9fd0ac6 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLStylesExporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLStylesExporter.java
@@ -121,7 +121,7 @@ public class XMLStylesExporter extends TestCase {
oObj = (XInterface) xMSF.createInstanceWithArguments(
"com.sun.star.comp.Writer.XMLStylesExporter",
new Object[] {arg});
- XExporter xEx = (XExporter) UnoRuntime.queryInterface
+ XExporter xEx = UnoRuntime.queryInterface
(XExporter.class,oObj);
xEx.setSourceDocument(xTextDoc);
} catch (com.sun.star.uno.Exception e) {
@@ -139,7 +139,7 @@ public class XMLStylesExporter extends TestCase {
TestEnvironment tEnv = new TestEnvironment( oObj );
// Obtain Footnotes properties
- XFootnotesSupplier supp = (XFootnotesSupplier) UnoRuntime.queryInterface
+ XFootnotesSupplier supp = UnoRuntime.queryInterface
(XFootnotesSupplier.class, xTextDoc);
XPropertySet set = supp.getFootnoteSettings();
diff --git a/qadevOOo/tests/java/mod/_sw/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_sw/XMLStylesImporter.java
index e039d5ab4a4b..07de7aa86b0b 100644
--- a/qadevOOo/tests/java/mod/_sw/XMLStylesImporter.java
+++ b/qadevOOo/tests/java/mod/_sw/XMLStylesImporter.java
@@ -153,7 +153,7 @@ public class XMLStylesImporter extends TestCase {
tEnv.addObjRelation("XDocumentHandler.XMLData", xml) ;
- XFootnotesSupplier supp = (XFootnotesSupplier) UnoRuntime.queryInterface
+ XFootnotesSupplier supp = UnoRuntime.queryInterface
(XFootnotesSupplier.class, xTextDoc);
final XPropertySet set = supp.getFootnoteSettings();
final PrintWriter logF = log ;