summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/qa/complex/filter/detection/typeDetection/TypeDetection.java7
-rw-r--r--framework/qa/complex/dispatches/Interceptor.java6
-rw-r--r--framework/qa/complex/dispatches/checkdispatchapi.java3
-rw-r--r--javaunohelper/com/sun/star/comp/helper/Bootstrap.java14
-rw-r--r--linguistic/qa/complex/linguistic/HangulHanjaConversion.java6
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java8
-rw-r--r--odk/examples/DevelopersGuide/Config/ConfigExamples.java9
-rw-r--r--odk/source/com/sun/star/lib/loader/InstallationFinder.java4
-rw-r--r--qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java16
-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
16 files changed, 43 insertions, 70 deletions
diff --git a/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java b/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
index 57558c41d78e..72fb1668d37a 100644
--- a/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
+++ b/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
@@ -496,10 +496,9 @@ public class TypeDetection extends ComplexTestCase {
*
*/
log.println("### checkStreamLoader() ###");
- String[] urls = new String[2];
-
- urls[0] = helper.getClassURLString("TypeDetection.props");
- urls[1] = helper.getClassURLString("files.csv");
+ String[] urls = new String[] {
+ helper.getClassURLString("TypeDetection.props"),
+ helper.getClassURLString("files.csv") };
for (int j=0; j<urls.length; j++){
String fileURL = urls[j];
diff --git a/framework/qa/complex/dispatches/Interceptor.java b/framework/qa/complex/dispatches/Interceptor.java
index a6653d195e98..44ba2a2a9da0 100644
--- a/framework/qa/complex/dispatches/Interceptor.java
+++ b/framework/qa/complex/dispatches/Interceptor.java
@@ -259,8 +259,7 @@ public class Interceptor implements XDispatch,
{
if (m_lURLs4InterceptionInfo == null)
{
- m_lURLs4InterceptionInfo = new String[1];
- m_lURLs4InterceptionInfo[0] = "*";
+ m_lURLs4InterceptionInfo = new String[] { "*" };
}
return m_lURLs4InterceptionInfo;
@@ -276,8 +275,7 @@ public class Interceptor implements XDispatch,
{
if (m_lURLs4Blocking == null)
{
- m_lURLs4Blocking = new String[1];
- m_lURLs4Blocking[0] = "*";
+ m_lURLs4Blocking = new String[] { "*" };
}
return m_lURLs4Blocking;
diff --git a/framework/qa/complex/dispatches/checkdispatchapi.java b/framework/qa/complex/dispatches/checkdispatchapi.java
index b2342232fece..c227be25e9bb 100644
--- a/framework/qa/complex/dispatches/checkdispatchapi.java
+++ b/framework/qa/complex/dispatches/checkdispatchapi.java
@@ -251,8 +251,7 @@ public class checkdispatchapi
public void checkInterception()
{
- String[] lDisabledURLs = new String[1];
- lDisabledURLs[0] = ".uno:Open";
+ String[] lDisabledURLs = new String[] { ".uno:Open" };
System.out.println("create and initialize interceptor ...");
Interceptor aInterceptor = new Interceptor();
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index 6e677e66ddae..537959b98e24 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -270,13 +270,13 @@ public class Bootstrap {
Long.toString( (new Random()).nextLong() & 0x7fffffffffffffffL );
// create call with arguments
- String[] cmdArray = new String[6];
- cmdArray[0] = fOffice.getPath();
- cmdArray[1] = "--nologo";
- cmdArray[2] = "--nodefault";
- cmdArray[3] = "--norestore";
- cmdArray[4] = "--nolockcheck";
- cmdArray[5] = "--accept=pipe,name=" + sPipeName + ";urp;";
+ String[] cmdArray = new String[] {
+ fOffice.getPath(),
+ "--nologo",
+ "--nodefault",
+ "--norestore",
+ "--nolockcheck",
+ "--accept=pipe,name=" + sPipeName + ";urp;" };
// start office process
Process p = Runtime.getRuntime().exec( cmdArray );
diff --git a/linguistic/qa/complex/linguistic/HangulHanjaConversion.java b/linguistic/qa/complex/linguistic/HangulHanjaConversion.java
index 4b59d5265a20..b7e479d271b8 100644
--- a/linguistic/qa/complex/linguistic/HangulHanjaConversion.java
+++ b/linguistic/qa/complex/linguistic/HangulHanjaConversion.java
@@ -245,9 +245,9 @@ XComponent xDoc = DesktopTools.loadDoc(xMSF, FileToLoad,
}
private String[] getLeftAndRight(int counter, XSpreadsheet xSpreadsheet) {
- String[] re = new String[2];
- re[0] = getCell(0, counter, xSpreadsheet).getFormula().trim();
- re[1] = getCell(1, counter, xSpreadsheet).getFormula().trim();
+ String[] re = new String[] {
+ getCell(0, counter, xSpreadsheet).getFormula().trim(),
+ getCell(1, counter, xSpreadsheet).getFormula().trim() };
return re;
}
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
index 253ca608b503..2c1aa7cce227 100644
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
+++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
@@ -190,10 +190,10 @@ public class DialogComponent {
}
public String[] getSupportedMethodNames() {
- String[] retValue= new String[3];
- retValue[0]= aHandlerMethod1;
- retValue[1]= aHandlerMethod2;
- retValue[2]= aHandlerMethod3;
+ String[] retValue= new String[] {
+ aHandlerMethod1,
+ aHandlerMethod2,
+ aHandlerMethod3 };
return retValue;
}
diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
index 510425d57e32..e197fd529897 100644
--- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java
+++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
@@ -401,10 +401,7 @@ public class ConfigExamples
UnoRuntime.queryInterface(XMultiPropertySet.class, xSubdivision);
// variables for multi-element access
- String[] aElementNames = new String[2];
-
- aElementNames[0] = "XAxis";
- aElementNames[1] = "YAxis";
+ String[] aElementNames = new String[] { "XAxis", "YAxis" };
Object[] aElementValues = xSubdivProperties.getPropertyValues(aElementNames);
@@ -869,9 +866,7 @@ public class ConfigExamples
aSettings[0] = new com.sun.star.beans.NamedValue("HeaderLine",Boolean.TRUE);
aSettings[1] = new com.sun.star.beans.NamedValue("FieldDelimiter",";");
- String [] aTableFilter = new String[2];
- aTableFilter[0] = "table.txt";
- aTableFilter[1] = "othertable.txt";
+ String [] aTableFilter = new String[] { "table.txt", "othertable.txt" };
storeDataSource(sSampleDataSourceName,sSampleDataSourceURL,"",false,0,aSettings,aTableFilter);
}
diff --git a/odk/source/com/sun/star/lib/loader/InstallationFinder.java b/odk/source/com/sun/star/lib/loader/InstallationFinder.java
index 05ba219bfe8b..d1f8738cbef9 100644
--- a/odk/source/com/sun/star/lib/loader/InstallationFinder.java
+++ b/odk/source/com/sun/star/lib/loader/InstallationFinder.java
@@ -291,9 +291,7 @@ final class InstallationFinder {
String path = null;
// start the which process
- String[] cmdArray = new String[2];
- cmdArray[0] = WHICH;
- cmdArray[1] = SOFFICE;
+ String[] cmdArray = new String[] { WHICH, SOFFICE };
Process proc = null;
Runtime rt = Runtime.getRuntime();
try {
diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java b/qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java
index 55af96b9f861..0bbadd23dae4 100644
--- a/qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java
+++ b/qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java
@@ -67,9 +67,9 @@ public class _XMultiLayerStratum extends MultiMethodTest {
boolean res = true;
try {
- String[] LayerIds = new String[2];
- LayerIds[0] = "1 /org/openoffice/Office/Jobs.xcu";
- LayerIds[1] = "2 /org/openoffice/Office/Linguistic.xcu";
+ String[] LayerIds = new String[] {
+ "1 /org/openoffice/Office/Jobs.xcu",
+ "2 /org/openoffice/Office/Linguistic.xcu" };
XLayer[] Layers = oObj.getLayers(LayerIds, "");
res = Layers.length == 2;
@@ -93,12 +93,10 @@ public class _XMultiLayerStratum extends MultiMethodTest {
boolean res = true;
try {
- String[] LayerIds = new String[2];
- LayerIds[0] = "1 /org/openoffice/Office/Jobs.xcu";
- LayerIds[1] = "2 /org/openoffice/Office/Linguistic.xcu";
- String[] Times = new String[2];
- Times[0] = "";
- Times[1] = "";
+ String[] LayerIds = new String[] {
+ "1 /org/openoffice/Office/Jobs.xcu",
+ "2 /org/openoffice/Office/Linguistic.xcu" };
+ String[] Times = new String[] { "", "" };
XLayer[] Layers = oObj.getMultipleLayers(LayerIds, Times);
res = Layers.length == 2;
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);
}
}