summaryrefslogtreecommitdiff
path: root/desktop
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 /desktop
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 'desktop')
-rw-r--r--desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java
index 1f758dd9824a..2c420ab2a00d 100644
--- a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java
+++ b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java
@@ -89,7 +89,7 @@ public class OptionsEventHandler {
//We get the com.sun.star.container.XNameAccess from the instance of
//ConfigurationUpdateAccess and save it for later use.
try {
- m_xAccessLeaves = (XNameAccess) UnoRuntime.queryInterface(
+ m_xAccessLeaves = UnoRuntime.queryInterface(
XNameAccess.class, xConfig.createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationUpdateAccess", args));
@@ -185,7 +185,7 @@ public class OptionsEventHandler {
//To access the separate controls of the window we need to obtain the
//XControlContainer from the window implementation
- XControlContainer xContainer = (XControlContainer) UnoRuntime.queryInterface(
+ XControlContainer xContainer = UnoRuntime.queryInterface(
XControlContainer.class, aWindow);
if (xContainer == null)
throw new com.sun.star.uno.Exception(
@@ -209,7 +209,7 @@ public class OptionsEventHandler {
//From the control we get the model, which in turn supports the
//XPropertySet interface, which we finally use to get the data from
//the control.
- XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet xProp = UnoRuntime.queryInterface(
XPropertySet.class, xControl.getModel());
if (xProp == null)
@@ -235,7 +235,7 @@ public class OptionsEventHandler {
//com.sun.star.container.XNameAccess. The XNameAccess is used to get the
//particular registry node which represents this options page.
//Fortunately the name of the window is the same as the registry node.
- XPropertySet xLeaf = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet xLeaf = UnoRuntime.queryInterface(
XPropertySet.class, m_xAccessLeaves.getByName(sWindowName));
if (xLeaf == null)
throw new com.sun.star.uno.Exception(
@@ -247,7 +247,7 @@ public class OptionsEventHandler {
//Committing the changes will cause or changes to be written to the registry.
XChangesBatch xUpdateCommit =
- (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, m_xAccessLeaves);
+ UnoRuntime.queryInterface(XChangesBatch.class, m_xAccessLeaves);
xUpdateCommit.commitChanges();
}
@@ -264,7 +264,7 @@ public class OptionsEventHandler {
//To acces the separate controls of the window we need to obtain the
//XControlContainer from window implementation
- XControlContainer xContainer = (XControlContainer) UnoRuntime.queryInterface(
+ XControlContainer xContainer = UnoRuntime.queryInterface(
XControlContainer.class, aWindow);
if (xContainer == null)
throw new com.sun.star.uno.Exception(
@@ -280,7 +280,7 @@ public class OptionsEventHandler {
//of com.sun.star.configuration.ConfigurationUpdateAccess which supports
//com.sun.star.container.XNameAccess. We obtain now the section
//of the registry which is assigned to this options page.
- XPropertySet xLeaf = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet xLeaf = UnoRuntime.queryInterface(
XPropertySet.class, m_xAccessLeaves.getByName(sWindowName));
if (xLeaf == null)
throw new com.sun.star.uno.Exception(
@@ -304,7 +304,7 @@ public class OptionsEventHandler {
//From the control we get the model, which in turn supports the
//XPropertySet interface, which we finally use to set the data at the
//control
- XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet xProp = UnoRuntime.queryInterface(
XPropertySet.class, xControl.getModel());
if (xProp == null)
@@ -329,7 +329,7 @@ public class OptionsEventHandler {
//We need to get the control model of the window. Therefore the first step is
//to query for it.
- XControl xControlDlg = (XControl) UnoRuntime.queryInterface(
+ XControl xControlDlg = UnoRuntime.queryInterface(
XControl.class, aWindow);
if (xControlDlg == null)
@@ -343,7 +343,7 @@ public class OptionsEventHandler {
"Cannot obtain XControlModel from XWindow in method external_event.", this);
//The model itself does not provide any information except that its
//implementation supports XPropertySet which is used to access the data.
- XPropertySet xPropDlg = (XPropertySet) UnoRuntime.queryInterface(
+ XPropertySet xPropDlg = UnoRuntime.queryInterface(
XPropertySet.class, xModelDlg);
if (xPropDlg == null)
throw new com.sun.star.uno.Exception(