summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-09 14:51:38 +0200
committerNoel Grandin <noel@peralex.com>2015-01-09 15:10:51 +0200
commit3757c03fc8f138427e21c41ef5e66e8c5a98159c (patch)
tree64d58e7d94aa60c4da475ac038e59d5c1a517437 /wizards
parent8912e6dab98eabbdeea870a387d30ef1de938acb (diff)
java: simplify array creation
and remove the need to worry about keeping indexes correct Change-Id: I9a5fc00f7e28f305279b41099274c96daebebb95
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/form/CallFormWizard.java4
-rw-r--r--wizards/com/sun/star/wizards/query/CallQueryWizard.java4
-rw-r--r--wizards/com/sun/star/wizards/report/CallReportWizard.java4
-rw-r--r--wizards/com/sun/star/wizards/report/ReportTextImplementation.java12
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java6
-rw-r--r--wizards/com/sun/star/wizards/table/CallTableWizard.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/AggregateComponent.java6
7 files changed, 13 insertions, 27 deletions
diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java
index 8adbfe389acb..0cfec7b32812 100644
--- a/wizards/com/sun/star/wizards/form/CallFormWizard.java
+++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java
@@ -105,9 +105,7 @@ public class CallFormWizard
*/
public java.lang.String[] getSupportedServiceNames()
{
- String[] stringSupportedServiceNames = new String[1];
-
- stringSupportedServiceNames[0] = __serviceName;
+ String[] stringSupportedServiceNames = new String[] { __serviceName };
return (stringSupportedServiceNames);
}
diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
index 942456673b7f..3b5a2a1c271e 100644
--- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java
+++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java
@@ -111,9 +111,7 @@ public class CallQueryWizard
*/
public java.lang.String[] getSupportedServiceNames()
{
- String[] stringSupportedServiceNames = new String[1];
-
- stringSupportedServiceNames[0] = __serviceName;
+ String[] stringSupportedServiceNames = new String[] { __serviceName };
return (stringSupportedServiceNames);
}
diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java
index 52839fe21703..8d86ad92e905 100644
--- a/wizards/com/sun/star/wizards/report/CallReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java
@@ -137,9 +137,7 @@ public class CallReportWizard
*/
public java.lang.String[] getSupportedServiceNames()
{
- String[] stringSupportedServiceNames = new String[1];
-
- stringSupportedServiceNames[ 0] = __serviceName;
+ String[] stringSupportedServiceNames = new String[] { __serviceName };
return (stringSupportedServiceNames);
}
diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
index be202282f3fc..a7f38d41ac13 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
@@ -653,10 +653,8 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
catch (com.sun.star.wizards.common.NoValidPathException e)
{
ContentFiles = new String[2][];
- String[] a = new String[1];
- String[] b = new String[1];
- a[0] = "DefaultLayoutOfData";
- b[0] = "default";
+ String[] a = new String[] { "DefaultLayoutOfData" };
+ String[] b = new String[] { "default" };
ContentFiles[1] = a;
ContentFiles[0] = b;
}
@@ -674,10 +672,8 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
catch (com.sun.star.wizards.common.NoValidPathException e)
{
LayoutFiles = new String[2][];
- String[] a = new String[1];
- String[] b = new String[1];
- a[0] = "DefaultLayoutOfHeaders";
- b[0] = "default";
+ String[] a = new String[] { "DefaultLayoutOfHeaders" };
+ String[] b = new String[] { "default" };
LayoutFiles[1] = a;
LayoutFiles[0] = b;
}
diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
index ef07f83daa1d..d9e4e50f726a 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
@@ -612,10 +612,8 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
{
// if there are problems, don't show anything is a little bit hard.
LayoutFiles = new String[2][];
- String[] a = new String[1];
- String[] b = new String[1];
- a[0] = "DefaultLayoutOfHeaders";
- b[0] = "default";
+ String[] a = new String[] { "DefaultLayoutOfHeaders" };
+ String[] b = new String[] { "default" };
LayoutFiles[1] = a;
LayoutFiles[0] = b;
}
diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java
index e25f0063dce6..2d126a340adb 100644
--- a/wizards/com/sun/star/wizards/table/CallTableWizard.java
+++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java
@@ -110,9 +110,7 @@ public class CallTableWizard
*/
public java.lang.String[] getSupportedServiceNames()
{
- String[] stringSupportedServiceNames = new String[1];
-
- stringSupportedServiceNames[0] = __serviceName;
+ String[] stringSupportedServiceNames = new String[] { __serviceName };
return (stringSupportedServiceNames);
}
diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
index 6957bdb2d62a..759e2f4b3f79 100644
--- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java
+++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
@@ -355,9 +355,9 @@ public class AggregateComponent extends ControlScroller
short[] iselfunction = (short[]) AnyConverter.toArray(currowproperties[0].Value);
if ((iselfield.length > 0) && (iselfunction.length > 0))
{
- String[] curaggregatename = new String[2];
- curaggregatename[0] = CurDBMetaData.NumericFieldNames[iselfield[0]];
- curaggregatename[1] = this.sFunctionOperators[iselfunction[0]];
+ String[] curaggregatename = new String[] {
+ CurDBMetaData.NumericFieldNames[iselfield[0]],
+ this.sFunctionOperators[iselfunction[0]] };
aggregatevector.add(curaggregatename);
}
}