summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Forms/ValueBinding.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-04-23 09:01:41 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-04-23 10:29:36 +0000
commit68b9fb0aaeff4aef41dfd6989491b522578ca079 (patch)
tree91ce6c4395e11b17c7ca652a66bd8ce905afcd7b /odk/examples/DevelopersGuide/Forms/ValueBinding.java
parent4f6adb0585037013241bd59e5c869a261c1f20c1 (diff)
Java cleanup - remove unnecessary casts in the ODK code
Change-Id: I1ab8ad5182444fc3eebd2349135a0240ebbe0fd4 Reviewed-on: https://gerrit.libreoffice.org/3566 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'odk/examples/DevelopersGuide/Forms/ValueBinding.java')
-rw-r--r--odk/examples/DevelopersGuide/Forms/ValueBinding.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/odk/examples/DevelopersGuide/Forms/ValueBinding.java b/odk/examples/DevelopersGuide/Forms/ValueBinding.java
index ffb7555eaf5f..3cf649cce543 100644
--- a/odk/examples/DevelopersGuide/Forms/ValueBinding.java
+++ b/odk/examples/DevelopersGuide/Forms/ValueBinding.java
@@ -41,7 +41,7 @@ public class ValueBinding extends DocumentBasedExample
// insert a table with exactly one cell. The content of this table will be synced with
// the content of a form control
- XTextDocument textDoc = (XTextDocument)UnoRuntime.queryInterface( XTextDocument.class, m_document.getDocument() );
+ XTextDocument textDoc = UnoRuntime.queryInterface( XTextDocument.class, m_document.getDocument() );
XText documentText = textDoc.getText();
XTextCursor textCursor = documentText.createTextCursor();
documentText.insertString( textCursor, "Below, there's a table cell, and a text field. ", false );
@@ -49,7 +49,7 @@ public class ValueBinding extends DocumentBasedExample
documentText.insertString( textCursor, "That means that anything you insert into the table cell is reflected in the ", false );
documentText.insertString( textCursor, "text field, and vice versa.\n", false );
- XTextTable table = (XTextTable)UnoRuntime.queryInterface( XTextTable.class,
+ XTextTable table = UnoRuntime.queryInterface( XTextTable.class,
m_document.createInstance( "com.sun.star.text.TextTable" )
);
table.initialize( 1, 1 );
@@ -61,7 +61,7 @@ public class ValueBinding extends DocumentBasedExample
// create a value binding for the first cell of the table
XValueBinding cellBinding = new TableCellTextBinding( table.getCellByName( "A1" ) );
// and bind it to the control
- XBindableValue bindable = (XBindableValue)UnoRuntime.queryInterface(
+ XBindableValue bindable = UnoRuntime.queryInterface(
XBindableValue.class, textControl
);
bindable.setValueBinding( cellBinding );