summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java')
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
index 758835579bb5..86d58da4ba0d 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
@@ -100,12 +100,12 @@ public class ProtocolHandlerAddon {
if ( object.length > 0 )
{
- m_xFrame = ( XFrame ) UnoRuntime.queryInterface(
+ m_xFrame = UnoRuntime.queryInterface(
XFrame.class, object[ 0 ] );
}
// Create the toolkit to have access to it later
- m_xToolkit = (XToolkit) UnoRuntime.queryInterface(
+ m_xToolkit = UnoRuntime.queryInterface(
XToolkit.class,
m_xCmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit",
m_xCmpCtx));
@@ -210,7 +210,7 @@ public class ProtocolHandlerAddon {
aDescriptor.Type = WindowClass.MODALTOP;
aDescriptor.WindowServiceName = new String( "infobox" );
aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = (XWindowPeer)UnoRuntime.queryInterface(
+ aDescriptor.Parent = UnoRuntime.queryInterface(
XWindowPeer.class, m_xFrame.getContainerWindow());
aDescriptor.Bounds = new Rectangle(0,0,300,200);
aDescriptor.WindowAttributes = WindowAttribute.BORDER |
@@ -219,7 +219,7 @@ public class ProtocolHandlerAddon {
XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
if ( null != xPeer ) {
- XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
+ XMessageBox xMsgBox = UnoRuntime.queryInterface(
XMessageBox.class, xPeer);
if ( null != xMsgBox )
{