summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-13 19:19:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-13 19:28:56 +0200
commit5b78551dcf54158adffe3236a45946942af5f354 (patch)
treed7786aea5864674e68ad5a277b9d0d5aafbb7992 /odk
parent86ab6471520a5300df2b8bc577987550362f4921 (diff)
Related tdf#99272: Prevent bogus com.sun.star.uno.Type(Short[].class) etc.
...so that the JNI UNO bridge will not accidentally reinterpret a Short[] as a short[]. <https://wiki.openoffice.org/wiki/Uno/Java/Specifications/Type_Mapping> makes it clear that the former is not a valid Java representation for UNO type "sequence of short". Needed one fix in bogus test code. Also fixed the two bogus places in odk/examples mentioned in f53e427291321eabe8d060a737e750a94739f911 "Resolves: tdf#99272 new Short[] used instead of new short[]". Change-Id: I8321eb1294ec77b3a9bf73cafb6e7fe337157bb7
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Forms/SalesFilter.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/SystemDialog.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/odk/examples/DevelopersGuide/Forms/SalesFilter.java b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
index 26b7ba8842a5..0eda8082afd5 100644
--- a/odk/examples/DevelopersGuide/Forms/SalesFilter.java
+++ b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
@@ -86,7 +86,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
m_xFilterList.setPropertyValue( "Dropdown", Boolean.TRUE );
m_xFilterList.setPropertyValue( "LineCount", Short.valueOf( (short)11 ) );
m_xFilterList.setPropertyValue( "StringItemList", new String[] { "ever (means no filter)", "this morning", "1 week ago", "1 month ago", "1 year ago", "<other>" } );
- m_xFilterList.setPropertyValue( "DefaultSelection", new Short[] { Short.valueOf( (short)0 ) } );
+ m_xFilterList.setPropertyValue( "DefaultSelection", new short[] { (short)0 } );
m_xApplyFilter.setPropertyValue( "Label", "Apply Filter" );
diff --git a/odk/examples/DevelopersGuide/GUI/SystemDialog.java b/odk/examples/DevelopersGuide/GUI/SystemDialog.java
index 3631678d3f20..7d2abefe10ec 100644
--- a/odk/examples/DevelopersGuide/GUI/SystemDialog.java
+++ b/odk/examples/DevelopersGuide/GUI/SystemDialog.java
@@ -99,7 +99,7 @@ public class SystemDialog {
// choose the template that defines the capabilities of the filepicker dialog
XInitialization xInitialize = UnoRuntime.queryInterface(XInitialization.class, xFilePicker);
- Short[] listAny = new Short[] { Short.valueOf(com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION)};
+ short[] listAny = new short[] { com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION };
xInitialize.initialize(listAny);
// add a control to the dialog to add the extension automatically to the filename...