summaryrefslogtreecommitdiff
path: root/forms/qa/integration/forms/ListSelection.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-04-17 13:54:28 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-04-19 07:51:41 +0000
commitd62425cc27e04a3237cfec2ea2663b8b11284ec8 (patch)
treebc96f74a3460377c4d368ba2d3cbd56b2e8baa89 /forms/qa/integration/forms/ListSelection.java
parenta79d43dcd7989ee927de1b8c69ebc2981cc7166e (diff)
Java cleanup, remove unnecessary casts
Change-Id: Id12089bc7df16631737e6acaee0973fb91dd953f Reviewed-on: https://gerrit.libreoffice.org/3431 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'forms/qa/integration/forms/ListSelection.java')
-rw-r--r--forms/qa/integration/forms/ListSelection.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/forms/qa/integration/forms/ListSelection.java b/forms/qa/integration/forms/ListSelection.java
index a7a03889ad4a..5d080cb7691c 100644
--- a/forms/qa/integration/forms/ListSelection.java
+++ b/forms/qa/integration/forms/ListSelection.java
@@ -100,12 +100,12 @@ public class ListSelection extends integration.forms.TestCase
XSpreadsheet activeSheet = view.getActiveSheet();
// Accessibility access to the list box control in this sheet
- XAccessible accessibleListBox = (XAccessible)UnoRuntime.queryInterface(
+ XAccessible accessibleListBox = UnoRuntime.queryInterface(
XAccessible.class, getListBoxControl( activeSheet ) );
XAccessibleContext context = accessibleListBox.getAccessibleContext();
// the first "accessible child" of a list box is its list
- XAccessibleSelection accessibleList = (XAccessibleSelection)UnoRuntime.queryInterface(
+ XAccessibleSelection accessibleList = UnoRuntime.queryInterface(
XAccessibleSelection.class, context.getAccessibleChild( 1 ) );
int selectPosition = generator.nextInt( 5 );
@@ -120,7 +120,7 @@ public class ListSelection extends integration.forms.TestCase
}
catch( java.lang.InterruptedException e ) { }
- XNamed sheetName = (XNamed)UnoRuntime.queryInterface( XNamed.class, view.getActiveSheet() );
+ XNamed sheetName = UnoRuntime.queryInterface( XNamed.class, view.getActiveSheet() );
assure( "sheet was not selected as expected!", sheetName.getName().equals( selectSheetName ) );
}
}
@@ -137,7 +137,7 @@ public class ListSelection extends integration.forms.TestCase
try
{
XPropertySet docProps = dbfTools.queryPropertySet( m_document.getDocument() );
- XLibraryContainer basicLibs = (XLibraryContainer)UnoRuntime.queryInterface(
+ XLibraryContainer basicLibs = UnoRuntime.queryInterface(
XLibraryContainer.class, docProps.getPropertyValue( "BasicLibraries" ) );
XNameContainer basicLib = basicLibs.createLibrary( "default" );
@@ -184,7 +184,7 @@ public class ListSelection extends integration.forms.TestCase
{
XIndexContainer parentForm = (XIndexContainer)dbfTools.getParent( controlModel, XIndexContainer.class );
- XEventAttacherManager manager = (XEventAttacherManager)UnoRuntime.queryInterface(
+ XEventAttacherManager manager = UnoRuntime.queryInterface(
XEventAttacherManager.class, parentForm );
int containerPosition = -1;
@@ -230,7 +230,7 @@ public class ListSelection extends integration.forms.TestCase
String[] newSheetNames = new String[] { "first", "second", "third", "forth", "fifth" };
// give the first one the right name
- XNamed sheet = (XNamed)UnoRuntime.queryInterface( XNamed.class,
+ XNamed sheet = UnoRuntime.queryInterface( XNamed.class,
sheets.getByName( sheetNames[ 0 ] )
);
sheet.setName( newSheetNames[ 0 ] );
@@ -274,7 +274,7 @@ public class ListSelection extends integration.forms.TestCase
/* ------------------------------------------------------------------ */
protected XControlModel getListBoxModel( XSpreadsheet sheet )
{
- XDrawPageSupplier suppPage = (XDrawPageSupplier)UnoRuntime.queryInterface(
+ XDrawPageSupplier suppPage = UnoRuntime.queryInterface(
XDrawPageSupplier.class, sheet );
FormComponent formsRoot = new FormComponent( suppPage.getDrawPage() );
XControlModel listBoxModel = (XControlModel)formsRoot.getByIndex( 0 ).
@@ -285,7 +285,7 @@ public class ListSelection extends integration.forms.TestCase
/* ------------------------------------------------------------------ */
protected XListBox getListBoxControl( XSpreadsheet sheet ) throws com.sun.star.uno.Exception
{
- return (XListBox)UnoRuntime.queryInterface(
+ return UnoRuntime.queryInterface(
XListBox.class, m_document.getCurrentView().getControl( getListBoxModel( sheet ) ) );
}
}