summaryrefslogtreecommitdiff
path: root/odk/examples/java/DocumentHandling/DocumentConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/java/DocumentHandling/DocumentConverter.java')
-rw-r--r--odk/examples/java/DocumentHandling/DocumentConverter.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/odk/examples/java/DocumentHandling/DocumentConverter.java b/odk/examples/java/DocumentHandling/DocumentConverter.java
index b6bbdbe7d957..aeb6f022d2ca 100644
--- a/odk/examples/java/DocumentHandling/DocumentConverter.java
+++ b/odk/examples/java/DocumentHandling/DocumentConverter.java
@@ -112,8 +112,8 @@ public class DocumentConverter {
// Getting an object that will offer a simple way to store
// a document to a URL.
com.sun.star.frame.XStorable xStorable =
- (com.sun.star.frame.XStorable)UnoRuntime.queryInterface(
- com.sun.star.frame.XStorable.class, oDocToStore );
+ UnoRuntime.queryInterface(
+ com.sun.star.frame.XStorable.class, oDocToStore );
// Preparing properties for converting the document
propertyValues = new com.sun.star.beans.PropertyValue[2];
@@ -138,15 +138,15 @@ public class DocumentConverter {
// Closing the converted document. Use XCloseable.clsoe if the
// interface is supported, otherwise use XComponent.dispose
com.sun.star.util.XCloseable xCloseable =
- (com.sun.star.util.XCloseable)UnoRuntime.queryInterface(
- com.sun.star.util.XCloseable.class, xStorable);
+ UnoRuntime.queryInterface(
+ com.sun.star.util.XCloseable.class, xStorable);
if ( xCloseable != null ) {
xCloseable.close(false);
} else {
com.sun.star.lang.XComponent xComp =
- (com.sun.star.lang.XComponent)UnoRuntime.queryInterface(
- com.sun.star.lang.XComponent.class, xStorable);
+ UnoRuntime.queryInterface(
+ com.sun.star.lang.XComponent.class, xStorable);
xComp.dispose();
}
@@ -194,9 +194,8 @@ public class DocumentConverter {
Object oDesktop = xMCF.createInstanceWithContext(
"com.sun.star.frame.Desktop", xContext);
- xCompLoader = (com.sun.star.frame.XComponentLoader)
- UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class,
- oDesktop);
+ xCompLoader = UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class,
+ oDesktop);
// Getting the given starting directory
File file = new File(args[0]);