summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java4
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java b/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java
index 67d0331b2c29..608ad199c065 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/ContextMenuInterceptor.java
@@ -52,8 +52,8 @@ public class ContextMenuInterceptor implements XContextMenuInterceptor {
OfficeConnect aConnect = OfficeConnect.createConnection();
com.sun.star.frame.XDesktop xDesktop =
- (com.sun.star.frame.XDesktop)aConnect.createRemoteInstance(
- com.sun.star.frame.XDesktop.class,"com.sun.star.frame.Desktop");
+ aConnect.createRemoteInstance(
+ com.sun.star.frame.XDesktop.class,"com.sun.star.frame.Desktop");
// create a new test document
com.sun.star.frame.XComponentLoader xCompLoader =
diff --git a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
index 1efa20c4fc1b..47bf1bb74b04 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java
@@ -107,9 +107,9 @@ public class OfficeConnect
* @param sServiceSpecifier name of service which should be created
* @return Description of the Returned Value
*/
- public Object createRemoteInstance(Class aType, String sServiceSpecifier)
+ public <T> T createRemoteInstance(Class<T> aType, String sServiceSpecifier)
{
- Object aResult = null;
+ T aResult = null;
try
{
aResult = UnoRuntime.queryInterface(
@@ -136,9 +136,9 @@ public class OfficeConnect
* @param sServiceSpecifier Description of Parameter
* @return Description of the Returned Value
*/
- public Object createRemoteInstanceWithArguments(Class aType, String sServiceSpecifier, Any[] lArguments)
+ public <T> T createRemoteInstanceWithArguments(Class<T> aType, String sServiceSpecifier, Any[] lArguments)
{
- Object aResult = null;
+ T aResult = null;
try
{
aResult = UnoRuntime.queryInterface(