summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 14:00:54 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:16 +0200
commitbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (patch)
treed67d16a68d1469b5096a27c743c4b0326a0c0ebe /odk
parent56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff)
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartInCalc.java4
-rw-r--r--odk/examples/DevelopersGuide/Charts/ChartInDraw.java6
-rw-r--r--odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java4
-rw-r--r--odk/examples/DevelopersGuide/Config/ConfigExamples.java8
-rw-r--r--odk/examples/DevelopersGuide/Database/CodeSamples.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java4
-rw-r--r--odk/examples/DevelopersGuide/Drawing/DrawingDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/GluePointDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/LayerDemo.java10
-rw-r--r--odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/PresentationDemo.java10
-rw-r--r--odk/examples/DevelopersGuide/Drawing/StyleDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/Drawing/TextDemo.java2
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java2
-rw-r--r--odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java8
-rw-r--r--odk/examples/DevelopersGuide/Forms/ControlLock.java2
-rw-r--r--odk/examples/DevelopersGuide/Forms/ControlValidation.java6
-rw-r--r--odk/examples/DevelopersGuide/Forms/DataAwareness.java6
-rw-r--r--odk/examples/DevelopersGuide/Forms/SalesFilter.java8
-rw-r--r--odk/examples/DevelopersGuide/Forms/SingleControlValidation.java2
-rw-r--r--odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java4
-rw-r--r--odk/examples/DevelopersGuide/GUI/MessageBox.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/SystemDialog.java2
-rw-r--r--odk/examples/DevelopersGuide/GUI/UnoDialogSample.java4
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java6
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java2
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java8
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java2
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java16
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java6
-rw-r--r--odk/examples/DevelopersGuide/Text/TextDocuments.java10
-rw-r--r--odk/examples/DevelopersGuide/UCB/ResourceRemover.java2
-rw-r--r--odk/examples/java/ConverterServlet/ConverterServlet.java4
-rw-r--r--odk/examples/java/DocumentHandling/DocumentConverter.java4
-rw-r--r--odk/examples/java/DocumentHandling/DocumentSaver.java4
-rw-r--r--odk/examples/java/Drawing/SDraw.java2
-rw-r--r--odk/examples/java/EmbedDocument/Container1/EmbedContApp.java2
-rw-r--r--odk/examples/java/Spreadsheet/ChartTypeChange.java2
-rw-r--r--odk/examples/java/Spreadsheet/SCalc.java6
-rw-r--r--odk/examples/java/Storage/TestHelper.java6
-rw-r--r--odk/examples/java/Text/BookmarkInsertion.java2
-rw-r--r--odk/examples/java/Text/SWriter.java8
-rw-r--r--odk/examples/java/Text/StyleCreation.java2
49 files changed, 105 insertions, 105 deletions
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java
index 617ae104e207..ee493144f98a 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java
@@ -172,7 +172,7 @@ public class ChartInCalc
if( aDiaProp != null )
{
// change chart type
- aDiaProp.setPropertyValue( "Lines", new Boolean( true ));
+ aDiaProp.setPropertyValue( "Lines", Boolean.TRUE);
// change attributes for all series
// set line width to 0.5mm
@@ -308,7 +308,7 @@ public class ChartInCalc
// change main title
XPropertySet aDocProp = UnoRuntime.queryInterface(
XPropertySet.class, maChartDocument );
- aDocProp.setPropertyValue( "HasMainTitle", new Boolean( true ));
+ aDocProp.setPropertyValue( "HasMainTitle", Boolean.TRUE);
XShape aTitle = maChartDocument.getTitle();
XPropertySet aTitleProp = UnoRuntime.queryInterface( XPropertySet.class, aTitle );
diff --git a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
index cf9822c9bdb8..ee9e05d49d79 100644
--- a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
+++ b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java
@@ -170,7 +170,7 @@ public class ChartInDraw
// change main title
XPropertySet aDocProp = UnoRuntime.queryInterface(
XPropertySet.class, maChartDocument );
- aDocProp.setPropertyValue( "HasMainTitle", new Boolean( true ));
+ aDocProp.setPropertyValue( "HasMainTitle", Boolean.TRUE);
XShape aTitle = maChartDocument.getTitle();
XPropertySet aTitleProp = UnoRuntime.queryInterface( XPropertySet.class, aTitle );
@@ -203,7 +203,7 @@ public class ChartInDraw
com.sun.star.lang.IllegalArgumentException, WrappedTargetException
{
XPropertySet aDiaProp = UnoRuntime.queryInterface( XPropertySet.class, maDiagram );
- Boolean aTrue = new Boolean( true );
+ Boolean aTrue = Boolean.TRUE;
aDiaProp.setPropertyValue( "Dim3D", aTrue );
aDiaProp.setPropertyValue( "Deep", aTrue );
@@ -278,7 +278,7 @@ public class ChartInDraw
aDirection.DirectionZ = 0.5;
aDiaProp.setPropertyValue( "D3DSceneLightDirection1", aDirection );
- aDiaProp.setPropertyValue( "D3DSceneLightOn1", new Boolean( true ));
+ aDiaProp.setPropertyValue( "D3DSceneLightOn1", Boolean.TRUE);
}
diff --git a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java
index 95b476125c55..60ac0b0d5b26 100644
--- a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java
+++ b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java
@@ -106,7 +106,7 @@ public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener
{
UnoRuntime.queryInterface(
XPropertySet.class, maChartDocument ).setPropertyValue(
- "HasSubTitle", new Boolean( true ));
+ "HasSubTitle", Boolean.TRUE);
// start listening for death of spreadsheet
UnoRuntime.queryInterface(
@@ -165,7 +165,7 @@ public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener
{
XPropertySet aDocProp = UnoRuntime.queryInterface(
XPropertySet.class, maChartDocument );
- aDocProp.setPropertyValue( "HasMainTitle", new Boolean( true ));
+ aDocProp.setPropertyValue( "HasMainTitle", Boolean.TRUE);
UnoRuntime.queryInterface(
XPropertySet.class, maChartDocument.getSubTitle()).setPropertyValue(
diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
index 6c070476e00b..687fb4c8cd0e 100644
--- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java
+++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java
@@ -725,7 +725,7 @@ public class ConfigExamples
Boolean bOldValue = (Boolean)xHPS.getHierarchicalPropertyValue(sSetting);
- Boolean bNewValue = new Boolean( ! bOldValue.booleanValue() );
+ Boolean bNewValue = Boolean.valueOf( ! bOldValue.booleanValue() );
xHPS.setHierarchicalPropertyValue(sSetting,bNewValue);
}
@@ -767,7 +767,7 @@ public class ConfigExamples
boolean bNew = ! bOld;
System.out.println("Replacing boolean value: " + aItemNames [i]);
- aReplace.replaceByName( aItemNames [i], new Boolean( bNew ) );
+ aReplace.replaceByName( aItemNames [i], Boolean.valueOf( bNew ) );
}
}
@@ -866,7 +866,7 @@ public class ConfigExamples
String sSampleDataSourceURL = "sdbc:flat:$(userurl)/database/SampleTextDatabase";
com.sun.star.beans.NamedValue [] aSettings = new com.sun.star.beans.NamedValue [2];
- aSettings[0] = new com.sun.star.beans.NamedValue("HeaderLine",new Boolean(true));
+ 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];
@@ -897,7 +897,7 @@ public class ConfigExamples
xDataSourceProperties.setPropertyValue("URL", sDataSourceURL );
xDataSourceProperties.setPropertyValue("User", sUser );
- xDataSourceProperties.setPropertyValue("IsPasswordRequired", new Boolean( bNeedsPassword ) );
+ xDataSourceProperties.setPropertyValue("IsPasswordRequired", Boolean.valueOf( bNeedsPassword ) );
xDataSourceProperties.setPropertyValue("LoginTimeout", new Integer( nTimeout ) );
if ( aTableFilter != null )
diff --git a/odk/examples/DevelopersGuide/Database/CodeSamples.java b/odk/examples/DevelopersGuide/Database/CodeSamples.java
index f41f2ff11b71..4d8c765f8fae 100644
--- a/odk/examples/DevelopersGuide/Database/CodeSamples.java
+++ b/odk/examples/DevelopersGuide/Database/CodeSamples.java
@@ -277,7 +277,7 @@ public class CodeSamples
XPropertySet xProp = UnoRuntime.queryInterface(
XPropertySet.class,xSingleFac.createInstance());
xProp.setPropertyValue("Command","SELECT * FROM biblio");
- xProp.setPropertyValue("EscapeProcessing",new Boolean(true));
+ xProp.setPropertyValue("EscapeProcessing",Boolean.TRUE);
XNameContainer xCont = UnoRuntime.queryInterface(XNameContainer.class, xQDefs);
try
diff --git a/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java b/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
index 0518e327bba3..1def8ad4a131 100644
--- a/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/ChangeOrderDemo.java
@@ -70,7 +70,7 @@ public class ChangeOrderDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/sdraw", "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java b/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java
index 654c3b2feae1..3e265ef166bf 100644
--- a/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/ControlAndSelectDemo.java
@@ -82,7 +82,7 @@ public class ControlAndSelectDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xComponent = Helper.createDocument( xOfficeContext,
"private:factory/sdraw", "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java b/odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java
index 322868efdd8d..fe72a16bcf3a 100644
--- a/odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/CustomShowDemo.java
@@ -86,7 +86,7 @@ public class CustomShowDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/simpress", "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java b/odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java
index efea885c8693..2377a711f9bb 100644
--- a/odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/DrawViewDemo.java
@@ -78,7 +78,7 @@ public class DrawViewDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
java.io.File sourceFile = new java.io.File(args[0]);
StringBuffer sUrl = new StringBuffer("file:///");
@@ -125,7 +125,7 @@ public class DrawViewDemo
System.out.println( aPropSeq[ i ].Name );
}
System.out.println("*** change into masterpage mode");
- xPropSet.setPropertyValue( "IsMasterPageMode", new Boolean( true ) );
+ xPropSet.setPropertyValue( "IsMasterPageMode", Boolean.TRUE );
}
catch( Exception ex )
diff --git a/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java b/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java
index 742e5b4a4f07..926a34a3eba1 100644
--- a/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/DrawingDemo.java
@@ -99,7 +99,7 @@ public class DrawingDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
sURL, "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java b/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java
index 472ae81c6340..f7c50a4bedbc 100644
--- a/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/FillAndLineStyleDemo.java
@@ -72,7 +72,7 @@ public class FillAndLineStyleDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/sdraw", "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java b/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java
index 5f1a32e06493..fc34da6fdfcf 100644
--- a/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/GluePointDemo.java
@@ -77,7 +77,7 @@ public class GluePointDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/sdraw", "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java b/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
index dc93c75b28c2..844cd0b67794 100644
--- a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java
@@ -71,7 +71,7 @@ public class GraphicExportDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
java.io.File sourceFile = new java.io.File(args[0]);
StringBuffer sUrl = new StringBuffer("file:///");
diff --git a/odk/examples/DevelopersGuide/Drawing/LayerDemo.java b/odk/examples/DevelopersGuide/Drawing/LayerDemo.java
index cbf66354ba14..b22d301150a3 100644
--- a/odk/examples/DevelopersGuide/Drawing/LayerDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/LayerDemo.java
@@ -76,7 +76,7 @@ public class LayerDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/sdraw", "_blank", 0, pPropValues );
@@ -122,8 +122,8 @@ public class LayerDemo
xLayerPropSet = UnoRuntime.queryInterface(
XPropertySet.class, xNotVisibleAndEditable );
xLayerPropSet.setPropertyValue( "Name", "NotVisibleAndEditable" );
- xLayerPropSet.setPropertyValue( "IsVisible", new Boolean( false ) );
- xLayerPropSet.setPropertyValue( "IsLocked", new Boolean( true ) );
+ xLayerPropSet.setPropertyValue( "IsVisible", Boolean.FALSE );
+ xLayerPropSet.setPropertyValue( "IsLocked", Boolean.TRUE );
// create a second layer
XLayer xNotEditable = xLayerManager.insertNewByIndex(
@@ -132,8 +132,8 @@ public class LayerDemo
xLayerPropSet = UnoRuntime.queryInterface(
XPropertySet.class, xNotEditable );
xLayerPropSet.setPropertyValue( "Name", "NotEditable" );
- xLayerPropSet.setPropertyValue( "IsVisible", new Boolean( true ) );
- xLayerPropSet.setPropertyValue( "IsLocked", new Boolean( true ) );
+ xLayerPropSet.setPropertyValue( "IsVisible", Boolean.TRUE );
+ xLayerPropSet.setPropertyValue( "IsLocked", Boolean.TRUE );
// attach the layer to the rectangles
xLayerManager.attachShapeToLayer( xRect1, xNotVisibleAndEditable );
diff --git a/odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java b/odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java
index f45326a185b9..de81472f462f 100644
--- a/odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/ObjectTransformationDemo.java
@@ -71,7 +71,7 @@ public class ObjectTransformationDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/simpress", "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java b/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java
index 61e62d2cfadf..bfa352016488 100644
--- a/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/PresentationDemo.java
@@ -82,7 +82,7 @@ public class PresentationDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/simpress", "_blank", 0, pPropValues );
@@ -116,8 +116,8 @@ public class PresentationDemo
/* the following three properties provokes that the shape is dimmed
to red
after the animation has been finished */
- xShapePropSet.setPropertyValue( "DimHide", new Boolean( false ) );
- xShapePropSet.setPropertyValue( "DimPrevious", new Boolean( true ) );
+ xShapePropSet.setPropertyValue( "DimHide", Boolean.FALSE );
+ xShapePropSet.setPropertyValue( "DimPrevious", Boolean.TRUE );
xShapePropSet.setPropertyValue( "DimColor", new Integer( 0xff0000 ) );
@@ -187,8 +187,8 @@ public class PresentationDemo
XPresentationSupplier xPresSupplier = UnoRuntime.queryInterface( XPresentationSupplier.class, xDrawDoc );
XPresentation xPresentation = xPresSupplier.getPresentation();
XPropertySet xPresPropSet = UnoRuntime.queryInterface( XPropertySet.class, xPresentation );
- xPresPropSet.setPropertyValue( "IsEndless", new Boolean( true ) );
- xPresPropSet.setPropertyValue( "IsAlwaysOnTop", new Boolean( true ) );
+ xPresPropSet.setPropertyValue( "IsEndless", Boolean.TRUE );
+ xPresPropSet.setPropertyValue( "IsAlwaysOnTop", Boolean.TRUE );
xPresPropSet.setPropertyValue( "Pause", new Integer( 0 ) );
xPresentation.start();
}
diff --git a/odk/examples/DevelopersGuide/Drawing/StyleDemo.java b/odk/examples/DevelopersGuide/Drawing/StyleDemo.java
index b371f63d70fb..945b7a78c6f6 100644
--- a/odk/examples/DevelopersGuide/Drawing/StyleDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/StyleDemo.java
@@ -75,7 +75,7 @@ public class StyleDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xComponent = Helper.createDocument( xOfficeContext,
"private:factory/simpress", "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/Drawing/TextDemo.java b/odk/examples/DevelopersGuide/Drawing/TextDemo.java
index 82b9abfc338d..3dd22e4bd0ed 100644
--- a/odk/examples/DevelopersGuide/Drawing/TextDemo.java
+++ b/odk/examples/DevelopersGuide/Drawing/TextDemo.java
@@ -75,7 +75,7 @@ public class TextDemo
PropertyValue[] pPropValues = new PropertyValue[ 1 ];
pPropValues[ 0 ] = new PropertyValue();
pPropValues[ 0 ].Name = "Silent";
- pPropValues[ 0 ].Value = new Boolean( true );
+ pPropValues[ 0 ].Value = Boolean.TRUE;
xDrawDoc = Helper.createDocument( xOfficeContext,
"private:factory/sdraw", "_blank", 0, pPropValues );
diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java
index ac8d6430874b..c98124d6ca09 100644
--- a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java
+++ b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java
@@ -123,7 +123,7 @@ public class FirstLoadComponent {
// instantiate PropertyValue struct and set its member fields
PropertyValue asTemplate = new PropertyValue();
asTemplate.Name = "AsTemplate";
- asTemplate.Value = new Boolean(true);
+ asTemplate.Value = Boolean.TRUE;
// assign PropertyValue struct to array of references for PropertyValue
// structs
diff --git a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java
index 301db58a2c6f..9d27e66a5d42 100644
--- a/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java
+++ b/odk/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java
@@ -134,7 +134,7 @@ public class HelloTextTableShape {
XPropertySet xShapeProps = UnoRuntime.queryInterface(
XPropertySet.class, writerShape);
// wrap text inside shape
- xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true));
+ xShapeProps.setPropertyValue("TextContourFrame", Boolean.TRUE);
XText xShapeText = UnoRuntime.queryInterface(XText.class, writerShape);
@@ -217,7 +217,7 @@ public class HelloTextTableShape {
XCell xCell = xSpreadsheetCells.getCellByPosition(0,1);
XPropertySet xCellProps = UnoRuntime.queryInterface(
XPropertySet.class, xCell);
- xCellProps.setPropertyValue("IsTextWrapped", new Boolean(true));
+ xCellProps.setPropertyValue("IsTextWrapped", Boolean.TRUE);
XText xCellText = UnoRuntime.queryInterface(XText.class, xCell);
@@ -244,7 +244,7 @@ public class HelloTextTableShape {
XPropertySet xShapeProps = UnoRuntime.queryInterface(
XPropertySet.class, calcShape);
// wrap text inside shape
- xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true));
+ xShapeProps.setPropertyValue("TextContourFrame", Boolean.TRUE);
XText xShapeText = UnoRuntime.queryInterface(XText.class, calcShape);
@@ -291,7 +291,7 @@ public class HelloTextTableShape {
XPropertySet.class, drawShape);
// wrap text inside shape
- xShapeProps.setPropertyValue("TextContourFrame", new Boolean(true));
+ xShapeProps.setPropertyValue("TextContourFrame", Boolean.TRUE);
manipulateText(xShapeText);
manipulateShape(xDrawShape);
diff --git a/odk/examples/DevelopersGuide/Forms/ControlLock.java b/odk/examples/DevelopersGuide/Forms/ControlLock.java
index 2663cd52f00f..d518a5140a14 100644
--- a/odk/examples/DevelopersGuide/Forms/ControlLock.java
+++ b/odk/examples/DevelopersGuide/Forms/ControlLock.java
@@ -55,7 +55,7 @@ class LockControlModels extends ComponentTreeTraversal
public LockControlModels( String sDataField, boolean bLockIt )
{
m_sDataField = sDataField;
- m_aLockIt = new Boolean( bLockIt );
+ m_aLockIt = Boolean.valueOf( bLockIt );
m_nLevel = 0;
}
diff --git a/odk/examples/DevelopersGuide/Forms/ControlValidation.java b/odk/examples/DevelopersGuide/Forms/ControlValidation.java
index 0ef0702eba20..a7a6d8347386 100644
--- a/odk/examples/DevelopersGuide/Forms/ControlValidation.java
+++ b/odk/examples/DevelopersGuide/Forms/ControlValidation.java
@@ -46,21 +46,21 @@ public class ControlValidation extends DocumentBasedExample
validation = new SingleControlValidation( m_document, 5, 55, "DatabaseDateField", new DateValidator() );
validation.setExplanatoryText( "Please enter a date in the current month" );
- validation.getInputField().setPropertyValue( "Dropdown", new Boolean( true ) );
+ validation.getInputField().setPropertyValue( "Dropdown", Boolean.TRUE );
validation = new SingleControlValidation( m_document, 90, 55, "DatabaseTimeField", new TimeValidator() );
validation.setExplanatoryText( "Please enter a time. Valid values are all full hours." );
validation = new SingleControlValidation( m_document, 5, 110, "DatabaseCheckBox", new BooleanValidator( false ) );
validation.setExplanatoryText( "Please check (well, or uncheck) the box. Don't leave it in indetermined state." );
- validation.getInputField().setPropertyValue( "TriState", new Boolean( true ) );
+ validation.getInputField().setPropertyValue( "TriState", Boolean.TRUE );
validation = new SingleControlValidation( m_document, 90, 110, "DatabaseRadioButton", new BooleanValidator( true ), 3, 0 );
validation.setExplanatoryText( "Please check any but the first button" );
validation = new SingleControlValidation( m_document, 5, 165, "DatabaseListBox", new ListSelectionValidator( ), 1, 24 );
validation.setExplanatoryText( "Please select not more than two entries." );
- validation.getInputField().setPropertyValue( "MultiSelection", new Boolean( true ) );
+ validation.getInputField().setPropertyValue( "MultiSelection", Boolean.TRUE );
validation.getInputField().setPropertyValue( "StringItemList", new String[] { "first", "second", "third", "forth", "fivth" } );
// switch to alive mode
diff --git a/odk/examples/DevelopersGuide/Forms/DataAwareness.java b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
index edde8d98b434..6c5cc5154709 100644
--- a/odk/examples/DevelopersGuide/Forms/DataAwareness.java
+++ b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
@@ -618,9 +618,9 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
xButton.setPropertyValue( "HelpText", sName );
// don't want buttons to be accessible by the "tab" key - this would be uncomfortable when traveling
// with records with "tab"
- xButton.setPropertyValue( "Tabstop", new Boolean( false ) );
+ xButton.setPropertyValue( "Tabstop", Boolean.FALSE );
// similar, they should not steal the focus when clicked
- xButton.setPropertyValue( "FocusOnClick", new Boolean( false ) );
+ xButton.setPropertyValue( "FocusOnClick", Boolean.FALSE );
m_aOperator.addButton( xButton, _formFeature );
@@ -804,7 +804,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
xManualFilter.setPropertyValue( "Name", "ManualFilter" );
XPropertySet xApplyFilter = m_formLayer.createControlAndShape( "CommandButton", 139, 125, 25, 6, xSalesFilterForm );
xApplyFilter.setPropertyValue( "Name", "ApplyFilter" );
- xApplyFilter.setPropertyValue( "DefaultButton", new Boolean( true ) );
+ xApplyFilter.setPropertyValue( "DefaultButton", Boolean.TRUE );
new SalesFilter( m_document, xSalesFormProps, xFilterSelection,
xManualFilter, xApplyFilter );
diff --git a/odk/examples/DevelopersGuide/Forms/SalesFilter.java b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
index aad8b13b106b..2506f16a3666 100644
--- a/odk/examples/DevelopersGuide/Forms/SalesFilter.java
+++ b/odk/examples/DevelopersGuide/Forms/SalesFilter.java
@@ -83,7 +83,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
{
// init control models
- m_xFilterList.setPropertyValue( "Dropdown", new Boolean( true ) );
+ m_xFilterList.setPropertyValue( "Dropdown", Boolean.TRUE );
m_xFilterList.setPropertyValue( "LineCount", new Short( (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[] { new Short( (short)0 ) } );
@@ -239,7 +239,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
{
try
{
- m_xApplyFilter.setPropertyValue( "Enabled", new Boolean( m_bSettingsDirty ) );
+ m_xApplyFilter.setPropertyValue( "Enabled", Boolean.valueOf( m_bSettingsDirty ) );
}
catch ( com.sun.star.uno.Exception e )
{
@@ -306,7 +306,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
// custom filter?
boolean bCustomFilter = isManualFilter( m_nPreviousFilterIndex );
- m_xManualFilter.setPropertyValue( "Enabled", new Boolean( bCustomFilter ) );
+ m_xManualFilter.setPropertyValue( "Enabled", Boolean.valueOf( bCustomFilter ) );
if ( bCustomFilter )
m_aDocument.getCurrentView().grabControlFocus( m_xManualFilter );
@@ -430,7 +430,7 @@ class SalesFilter implements XActionListener, XPropertyChangeListener, XResetLis
sCompleteFilter += sOdbcDate;
}
m_xSalesForm.setPropertyValue( "Filter", sCompleteFilter );
- m_xSalesForm.setPropertyValue( "ApplyFilter", new Boolean( true ) );
+ m_xSalesForm.setPropertyValue( "ApplyFilter", Boolean.TRUE );
// and reload the form
XLoadable xLoad = UnoRuntime.queryInterface(
diff --git a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
index 910b46fcf951..c22054b46f37 100644
--- a/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
+++ b/odk/examples/DevelopersGuide/Forms/SingleControlValidation.java
@@ -74,7 +74,7 @@ public class SingleControlValidation implements XFormComponentValidityListener
try
{
m_inputLabel = m_formLayer.createControlAndShape( "FixedText", columnPos, rowPos, 70, 12, null );
- m_inputLabel.setPropertyValue( "MultiLine", new Boolean( true ) );
+ m_inputLabel.setPropertyValue( "MultiLine", Boolean.TRUE );
com.sun.star.awt.FontDescriptor font = (com.sun.star.awt.FontDescriptor)m_inputLabel.getPropertyValue( "FontDescriptor" );
font.Weight = com.sun.star.awt.FontWeight.BOLD;
diff --git a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
index 8baca5dca0d5..1eab64cd08ae 100644
--- a/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
+++ b/odk/examples/DevelopersGuide/Forms/SpreadsheetValueBinding.java
@@ -55,7 +55,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample
numericControl.setPropertyValue( "ValueMax", new Short( (short)5 ) );
numericControl.setPropertyValue( "Value", new Short( (short)1 ) );
numericControl.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
- numericControl.setPropertyValue( "Spin", new Boolean( true ) );
+ numericControl.setPropertyValue( "Spin", Boolean.TRUE );
// bind the control model to cell B2
implBind( numericControl, document.createCellBinding( sheet, exchangeColumn, exchangeRow ) );
@@ -64,7 +64,7 @@ public class SpreadsheetValueBinding extends DocumentBasedExample
// insert a list box
XPropertySet listBox = m_formLayer.insertControlLine( "ListBox",
"select an entry", "", 2, 40, 20 );
- listBox.setPropertyValue( "Dropdown", new Boolean( false ) );
+ listBox.setPropertyValue( "Dropdown", Boolean.FALSE );
// a list binding for cell range C1-C5
final short listSourceSheet = (short)1;
diff --git a/odk/examples/DevelopersGuide/GUI/MessageBox.java b/odk/examples/DevelopersGuide/GUI/MessageBox.java
index 055659a04204..7cc1159518d1 100644
--- a/odk/examples/DevelopersGuide/GUI/MessageBox.java
+++ b/odk/examples/DevelopersGuide/GUI/MessageBox.java
@@ -152,7 +152,7 @@ public class MessageBox {
com.sun.star.beans.PropertyValue[] args = new com.sun.star.beans.PropertyValue [1];
args[0] = new com.sun.star.beans.PropertyValue();
args[0].Name = "Hidden";
- args[0].Value = new Boolean(true);
+ args[0].Value = Boolean.TRUE;
String strDoc = "private:factory/swriter";
xComp = xCLoader.loadComponentFromURL(strDoc, "_blank", 0, args);
diff --git a/odk/examples/DevelopersGuide/GUI/SystemDialog.java b/odk/examples/DevelopersGuide/GUI/SystemDialog.java
index 453d9b99cd72..1fb63c61890d 100644
--- a/odk/examples/DevelopersGuide/GUI/SystemDialog.java
+++ b/odk/examples/DevelopersGuide/GUI/SystemDialog.java
@@ -104,7 +104,7 @@ public class SystemDialog {
// add a control to the dialog to add the extension automatically to the filename...
XFilePickerControlAccess xFilePickerControlAccess = UnoRuntime.queryInterface(XFilePickerControlAccess.class, xFilePicker);
- xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, new Boolean(true));
+ xFilePickerControlAccess.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION, (short) 0, Boolean.TRUE);
xComponent = UnoRuntime.queryInterface(XComponent.class, xFilePicker);
diff --git a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
index 3c52f56fd10e..750b4a5d4a59 100644
--- a/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+++ b/odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
@@ -1266,7 +1266,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
}
// Alternatively we could have done it also this way:
// bdoEnable = (nState == 1);
- xModelPropertySet.setPropertyValue("Enabled", new Boolean(bdoEnable));
+ xModelPropertySet.setPropertyValue("Enabled", Boolean.valueOf(bdoEnable));
}catch (com.sun.star.uno.Exception ex){
/* perform individual exception handling here.
* Possible exception types are:
@@ -1352,7 +1352,7 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
XPropertySet xRMItemPSet = UnoRuntime.queryInterface(XPropertySet.class, oRoadmapItem);
xRMItemPSet.setPropertyValue("Label", _sLabel);
// sometimes steps are supposed to be set disabled depending on the program logic...
- xRMItemPSet.setPropertyValue("Enabled", new Boolean(_bEnabled));
+ xRMItemPSet.setPropertyValue("Enabled", Boolean.valueOf(_bEnabled));
// in this context the "ID" is meant to refer to a step of the dialog
xRMItemPSet.setPropertyValue("ID", new Integer(_ID));
m_xRMIndexCont.insertByIndex(Index, oRoadmapItem);
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java
index e02af229a601..0ce02128ca79 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java
@@ -229,7 +229,7 @@ public class CustomizeView extends JPanel
com.sun.star.beans.PropertyValue[] lProperties = new com.sun.star.beans.PropertyValue[1];
lProperties[0] = new com.sun.star.beans.PropertyValue();
lProperties[0].Name = m_sProp;
- lProperties[0].Value = new Boolean(bState);
+ lProperties[0].Value = Boolean.valueOf(bState);
// execute (dispatch) it into the frame
if (m_xFrame==null)
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
index c7099bb19ef4..887d8f35ffa3 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/LinguisticExamples.java
@@ -174,7 +174,7 @@ public class LinguisticExamples
PropertyValue[] aProps = new PropertyValue[1];
aProps[0] = new PropertyValue();
aProps[0].Name = "IsGermanPreReform";
- aProps[0].Value = new Boolean( true );
+ aProps[0].Value = Boolean.TRUE;
GetSpell();
@@ -292,7 +292,7 @@ public class LinguisticExamples
// set a spellchecker and hyphenator property value to a defined state
try {
- aLinguProps.setPropertyValue("IsGermanPreReform", new Boolean(true));
+ aLinguProps.setPropertyValue("IsGermanPreReform", Boolean.TRUE);
} catch (Exception e) {
}
@@ -305,7 +305,7 @@ public class LinguisticExamples
// event that eventually results in the listeners
// 'processLinguServiceEvent' function being called
try {
- aLinguProps.setPropertyValue("IsGermanPreReform", new Boolean(false));
+ aLinguProps.setPropertyValue("IsGermanPreReform", Boolean.FALSE);
} catch (Exception e) {
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java
index 31643329ad5a..0f7e25851a4d 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java
@@ -175,7 +175,7 @@ public class Number_Formats
UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class,
xIndexAccess.getByIndex(1));
- xColPropSet.setPropertyValue( "OptimalWidth", new Boolean(true) );
+ xColPropSet.setPropertyValue( "OptimalWidth", Boolean.TRUE );
}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
index 41b0929b5403..e72861db0233 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java
@@ -143,7 +143,7 @@ class ExampleMember implements com.sun.star.container.XNamed,
if ( aPropertyName.equals( "IsVisible" ) ||
aPropertyName.equals( "ShowDetails" ) )
{
- return new Boolean( true ); // always true
+ return Boolean.TRUE; // always true
}
else
throw new com.sun.star.beans.UnknownPropertyException();
@@ -352,7 +352,7 @@ class ExampleLevel implements
if ( aPropertyName.equals( "SubTotals" ) )
return new com.sun.star.sheet.GeneralFunction[0];
else if ( aPropertyName.equals( "ShowEmpty" ) )
- return new Boolean( true );
+ return Boolean.TRUE;
else
throw new com.sun.star.beans.UnknownPropertyException();
}
@@ -648,7 +648,7 @@ class ExampleDimension implements
if ( aPropertyName.equals( "Original" ) )
return null;
else if ( aPropertyName.equals( "IsDataLayoutDimension" ) )
- return new Boolean( nDimension == ExampleSettings.nDataDimension );
+ return Boolean.valueOf( nDimension == ExampleSettings.nDataDimension );
else if ( aPropertyName.equals( "Orientation" ) )
return eOrientation;
else if ( aPropertyName.equals( "Position" ) )
@@ -903,7 +903,7 @@ public class ExampleDataPilotSource
if ( aPropertyName.equals( "ColumnGrand" ) ||
aPropertyName.equals( "RowGrand" ) )
{
- return new Boolean( false ); // always false
+ return Boolean.FALSE; // always false
}
else
throw new com.sun.star.beans.UnknownPropertyException();
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java
index b018c55be9ef..f25a9cfded8f 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java
@@ -167,7 +167,7 @@ public class GeneralTableSample extends SpreadsheetDocHelper
aColumnObj = xColumnsName.getByName( "D" );
xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aColumnObj );
- xPropSet.setPropertyValue( "IsVisible", new Boolean( false ) );
+ xPropSet.setPropertyValue( "IsVisible", Boolean.FALSE );
// Get row 7 by index (interface XIndexAccess)
Object aRowObj = xRows.getByIndex( 6 );
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java
index 7f4652a2545d..4438f880440e 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java
@@ -266,7 +266,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper
// from styles.ParagraphProperties
xPropSet.setPropertyValue( "ParaLeftMargin", new Integer( 500 ) );
// from table.CellProperties
- xPropSet.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
+ xPropSet.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE );
xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x99CCFF ) );
@@ -317,7 +317,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper
// from com.sun.star.styles.ParagraphProperties
xPropSet.setPropertyValue( "ParaLeftMargin", new Integer( 500 ) );
// from com.sun.star.table.CellProperties
- xPropSet.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
+ xPropSet.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE );
xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x99CCFF ) );
@@ -327,7 +327,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper
xReplaceDesc.setSearchString( "cell" );
xReplaceDesc.setReplaceString( "text" );
// property SearchWords searches for whole cells!
- xReplaceDesc.setPropertyValue( "SearchWords", new Boolean( false ) );
+ xReplaceDesc.setPropertyValue( "SearchWords", Boolean.FALSE );
int nCount = xReplace.replaceAll( xReplaceDesc );
System.out.println( "Search text replaced " + nCount + " times." );
@@ -648,7 +648,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper
// modify properties of the new style
xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aCellStyle );
xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x888888 ) );
- xPropSet.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
+ xPropSet.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE );
@@ -848,7 +848,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper
com.sun.star.beans.XPropertySet xValidPropSet = UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class,
xCellPropSet.getPropertyValue( "Validation" ));
xValidPropSet.setPropertyValue( "Type", com.sun.star.sheet.ValidationType.DECIMAL );
- xValidPropSet.setPropertyValue( "ShowErrorMessage", new Boolean( true ) );
+ xValidPropSet.setPropertyValue( "ShowErrorMessage", Boolean.TRUE );
xValidPropSet.setPropertyValue( "ErrorMessage", "This is an invalid value!" );
xValidPropSet.setPropertyValue( "ErrorAlertStyle", com.sun.star.sheet.ValidationAlertStyle.STOP );
// condition
@@ -1117,7 +1117,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper
aFilterFields[0].NumericValue = 1998;
xFilterDesc.setFilterFields( aFilterFields );
com.sun.star.beans.XPropertySet xFilterProp = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xFilterDesc );
- xFilterProp.setPropertyValue( "ContainsHeader", new Boolean( true ) );
+ xFilterProp.setPropertyValue( "ContainsHeader", Boolean.TRUE );
xFilter.filter( xFilterDesc );
@@ -1150,7 +1150,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper
aSortDesc[0].Value = aSortFields;
aSortDesc[1] = new com.sun.star.beans.PropertyValue();
aSortDesc[1].Name = "ContainsHeader";
- aSortDesc[1].Value = new Boolean( true );
+ aSortDesc[1].Value = Boolean.TRUE;
com.sun.star.util.XSortable xSort = UnoRuntime.queryInterface( com.sun.star.util.XSortable.class, xRange );
xSort.sort( aSortDesc );
@@ -1207,7 +1207,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper
com.sun.star.sheet.XCellRangeReferrer xRef = UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeReferrer.class, aRangeObj );
com.sun.star.table.XCellRange xResultRange = xRef.getReferredCells();
com.sun.star.beans.XPropertySet xResultProp = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xResultRange );
- xResultProp.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
+ xResultProp.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE );
xResultProp.setPropertyValue( "CellBackColor", new Integer( 0xFFFFCC ) );
}
}
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java b/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java
index d522b09cde5a..c313fa193d18 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ViewSample.java
@@ -89,13 +89,13 @@ public class ViewSample extends SpreadsheetDocHelper
com.sun.star.sheet.XCellRangeReferrer xRefer = UnoRuntime.queryInterface( com.sun.star.sheet.XCellRangeReferrer.class, aPane );
com.sun.star.table.XCellRange xRange = xRefer.getReferredCells();
com.sun.star.beans.XPropertySet xRangeProp = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xRange );
- xRangeProp.setPropertyValue( "IsCellBackgroundTransparent", new Boolean( false ) );
+ xRangeProp.setPropertyValue( "IsCellBackgroundTransparent", Boolean.FALSE );
xRangeProp.setPropertyValue( "CellBackColor", new Integer( 0xFFFFCC ) );
// --- View settings ---
// change the view to display green grid lines
com.sun.star.beans.XPropertySet xProp = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xController );
- xProp.setPropertyValue( "ShowGrid", new Boolean(true) );
+ xProp.setPropertyValue( "ShowGrid", Boolean.TRUE );
xProp.setPropertyValue( "GridColor", new Integer(0x00CC00) );
// --- Range selection ---
@@ -109,7 +109,7 @@ public class ViewSample extends SpreadsheetDocHelper
aArguments[0].Value = "Please select a cell range (e.g. C4:E6)";
aArguments[1] = new com.sun.star.beans.PropertyValue();
aArguments[1].Name = "CloseOnMouseRelease";
- aArguments[1].Value = new Boolean(true);
+ aArguments[1].Value = Boolean.TRUE;
xRngSel.startRangeSelection( aArguments );
synchronized (aListener)
{
diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java
index ab66ebd5f3a8..92b5504f536b 100644
--- a/odk/examples/DevelopersGuide/Text/TextDocuments.java
+++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java
@@ -439,7 +439,7 @@ public class TextDocuments {
PropertyValue[] loadProps = new PropertyValue[1];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "AsTemplate";
- loadProps[0].Value = new Boolean(true);
+ loadProps[0].Value = Boolean.TRUE;
// load
return xComponentLoader.loadComponentFromURL(loadUrl, "_blank",
0, loadProps);
@@ -717,7 +717,7 @@ public class TextDocuments {
XPropertySet xRow = UnoRuntime.queryInterface(
XPropertySet.class, xRows.getByIndex ( 0 ) );
// If BackTransparant is false, then the background color is visible
- xRow.setPropertyValue( "BackTransparent", new Boolean(false));
+ xRow.setPropertyValue( "BackTransparent", Boolean.FALSE);
// Specify the color of the background to be dark blue
xRow.setPropertyValue( "BackColor", new Integer(6710932));
@@ -725,7 +725,7 @@ public class TextDocuments {
XPropertySet xTableProps = UnoRuntime.queryInterface(
XPropertySet.class, xTable );
// We want visible background colors
- xTableProps.setPropertyValue( "BackTransparent", new Boolean(false));
+ xTableProps.setPropertyValue( "BackTransparent", Boolean.FALSE);
// Set the background colour to light blue
xTableProps.setPropertyValue( "BackColor", new Integer(13421823));
@@ -863,7 +863,7 @@ public class TextDocuments {
// We want a visible background
xTableProps.setPropertyValue( "BackTransparent",
- new Boolean(false));
+ Boolean.FALSE);
// We want the background to be light blue
xTableProps.setPropertyValue( "BackColor", new Integer(13421823));
@@ -879,7 +879,7 @@ public class TextDocuments {
XPropertySet.class, xRows.getByIndex ( 0 ) );
// We want the background of the first row to be visible too
- xRow.setPropertyValue( "BackTransparent", new Boolean(false));
+ xRow.setPropertyValue( "BackTransparent", Boolean.FALSE);
// And let's make it dark blue
xRow.setPropertyValue( "BackColor", new Integer(6710932));
diff --git a/odk/examples/DevelopersGuide/UCB/ResourceRemover.java b/odk/examples/DevelopersGuide/UCB/ResourceRemover.java
index 0efa68a00d8e..b55bbae7fe4e 100644
--- a/odk/examples/DevelopersGuide/UCB/ResourceRemover.java
+++ b/odk/examples/DevelopersGuide/UCB/ResourceRemover.java
@@ -81,7 +81,7 @@ public class ResourceRemover {
// Destroy a resource physically...
- Boolean deletePhysically = new Boolean( true );
+ Boolean deletePhysically = Boolean.TRUE;
// Execute command "delete".
m_helper.executeCommand( m_content, "delete", deletePhysically );
diff --git a/odk/examples/java/ConverterServlet/ConverterServlet.java b/odk/examples/java/ConverterServlet/ConverterServlet.java
index be1b5cbc4ea2..379d75814dba 100644
--- a/odk/examples/java/ConverterServlet/ConverterServlet.java
+++ b/odk/examples/java/ConverterServlet/ConverterServlet.java
@@ -265,7 +265,7 @@ public class ConverterServlet extends HttpServlet {
// Setting the flag for hidding the open document
propertyvalue[ 0 ] = new PropertyValue();
propertyvalue[ 0 ].Name = "Hidden";
- propertyvalue[ 0 ].Value = new Boolean(true);
+ propertyvalue[ 0 ].Value = Boolean.TRUE;
// Loading the wanted document
Object objectDocumentToStore =
@@ -282,7 +282,7 @@ public class ConverterServlet extends HttpServlet {
// Setting the flag for overwriting
propertyvalue[ 0 ] = new PropertyValue();
propertyvalue[ 0 ].Name = "Overwrite";
- propertyvalue[ 0 ].Value = new Boolean(true);
+ propertyvalue[ 0 ].Value = Boolean.TRUE;
// Setting the filter name
propertyvalue[ 1 ] = new PropertyValue();
propertyvalue[ 1 ].Name = "FilterName";
diff --git a/odk/examples/java/DocumentHandling/DocumentConverter.java b/odk/examples/java/DocumentHandling/DocumentConverter.java
index aeb6f022d2ca..35002fb5de1b 100644
--- a/odk/examples/java/DocumentHandling/DocumentConverter.java
+++ b/odk/examples/java/DocumentHandling/DocumentConverter.java
@@ -103,7 +103,7 @@ public class DocumentConverter {
new com.sun.star.beans.PropertyValue[1];
propertyValues[0] = new com.sun.star.beans.PropertyValue();
propertyValues[0].Name = "Hidden";
- propertyValues[0].Value = new Boolean(true);
+ propertyValues[0].Value = Boolean.TRUE;
Object oDocToStore =
DocumentConverter.xCompLoader.loadComponentFromURL(
@@ -120,7 +120,7 @@ public class DocumentConverter {
// Setting the flag for overwriting
propertyValues[0] = new com.sun.star.beans.PropertyValue();
propertyValues[0].Name = "Overwrite";
- propertyValues[0].Value = new Boolean(true);
+ propertyValues[0].Value = Boolean.TRUE;
// Setting the filter name
propertyValues[1] = new com.sun.star.beans.PropertyValue();
propertyValues[1].Name = "FilterName";
diff --git a/odk/examples/java/DocumentHandling/DocumentSaver.java b/odk/examples/java/DocumentHandling/DocumentSaver.java
index 052b344a3d2e..42a99e91b5c9 100644
--- a/odk/examples/java/DocumentHandling/DocumentSaver.java
+++ b/odk/examples/java/DocumentHandling/DocumentSaver.java
@@ -86,7 +86,7 @@ public class DocumentSaver {
new com.sun.star.beans.PropertyValue[1];
propertyValue[0] = new com.sun.star.beans.PropertyValue();
propertyValue[0].Name = "Hidden";
- propertyValue[0].Value = new Boolean(true);
+ propertyValue[0].Value = Boolean.TRUE;
Object oDocToStore = xCompLoader.loadComponentFromURL(
sLoadUrl.toString(), "_blank", 0, propertyValue );
@@ -97,7 +97,7 @@ public class DocumentSaver {
propertyValue = new com.sun.star.beans.PropertyValue[ 2 ];
propertyValue[0] = new com.sun.star.beans.PropertyValue();
propertyValue[0].Name = "Overwrite";
- propertyValue[0].Value = new Boolean(true);
+ propertyValue[0].Value = Boolean.TRUE;
propertyValue[1] = new com.sun.star.beans.PropertyValue();
propertyValue[1].Name = "FilterName";
propertyValue[1].Value = "StarOffice XML (Writer)";
diff --git a/odk/examples/java/Drawing/SDraw.java b/odk/examples/java/Drawing/SDraw.java
index a70a9288e01f..54404e244de6 100644
--- a/odk/examples/java/Drawing/SDraw.java
+++ b/odk/examples/java/Drawing/SDraw.java
@@ -238,7 +238,7 @@ public class SDraw {
try {
xSPS.setPropertyValue("FillColor", new Integer(getCol(r,g,b)));
- xSPS.setPropertyValue("Shadow", new Boolean(true));
+ xSPS.setPropertyValue("Shadow", Boolean.TRUE);
} catch (Exception e) {
System.err.println("Can't change colors " + e);
e.printStackTrace(System.err);
diff --git a/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java b/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java
index fad4b844466a..d419063b6879 100644
--- a/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java
+++ b/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java
@@ -795,7 +795,7 @@ public class EmbedContApp extends Applet implements MouseListener, XEmbeddedClie
aMedDescr[0].Name = "URL";
aMedDescr[0].Value = (Object) aFileURI;
aMedDescr[1].Name = "ReadOnly";
- aMedDescr[1].Value = (Object) new Boolean( false );
+ aMedDescr[1].Value = (Object) Boolean.FALSE;
Object oEmbObj = xEmbedFactory.createInstanceInitFromMediaDescriptor( m_xStorage,
"EmbedSub",
aMedDescr );
diff --git a/odk/examples/java/Spreadsheet/ChartTypeChange.java b/odk/examples/java/Spreadsheet/ChartTypeChange.java
index 20fbfadb971b..271433890617 100644
--- a/odk/examples/java/Spreadsheet/ChartTypeChange.java
+++ b/odk/examples/java/Spreadsheet/ChartTypeChange.java
@@ -162,7 +162,7 @@ public class ChartTypeChange {
XPropertySet xPropSet = UnoRuntime.queryInterface(
XPropertySet.class, xDiagram );
- xPropSet.setPropertyValue( "Dim3D", new Boolean( booleanIs3D ) );
+ xPropSet.setPropertyValue( "Dim3D", Boolean.valueOf( booleanIs3D ) );
xChartDoc.setDiagram(xDiagram);
}
diff --git a/odk/examples/java/Spreadsheet/SCalc.java b/odk/examples/java/Spreadsheet/SCalc.java
index 8f4e1d98982c..a303fafabc65 100644
--- a/odk/examples/java/Spreadsheet/SCalc.java
+++ b/odk/examples/java/Spreadsheet/SCalc.java
@@ -138,7 +138,7 @@ public class SCalc {
oStyleFamilyNameContainer.insertByName("My Style", oInt1);
XPropertySet oCPS1 = UnoRuntime.queryInterface(
XPropertySet.class, oInt1 );
- oCPS1.setPropertyValue("IsCellBackgroundTransparent", new Boolean(false));
+ oCPS1.setPropertyValue("IsCellBackgroundTransparent", Boolean.FALSE);
oCPS1.setPropertyValue("CellBackColor",new Integer(6710932));
oCPS1.setPropertyValue("CharColor",new Integer(16777215));
XInterface oInt2 = (XInterface) oDocMSF.createInstance(
@@ -146,7 +146,7 @@ public class SCalc {
oStyleFamilyNameContainer.insertByName("My Style2", oInt2);
XPropertySet oCPS2 = UnoRuntime.queryInterface(
XPropertySet.class, oInt2 );
- oCPS2.setPropertyValue("IsCellBackgroundTransparent", new Boolean(false));
+ oCPS2.setPropertyValue("IsCellBackgroundTransparent", Boolean.FALSE);
oCPS2.setPropertyValue("CellBackColor",new Integer(13421823));
} catch (Exception e) {
e.printStackTrace(System.err);
@@ -309,7 +309,7 @@ public class SCalc {
System.out.println("Change Diagramm to 3D");
XPropertySet oCPS = UnoRuntime.queryInterface(
XPropertySet.class, oDiag );
- oCPS.setPropertyValue("Dim3D", new Boolean(true));
+ oCPS.setPropertyValue("Dim3D", Boolean.TRUE);
System.out.println("Change the title");
Thread.sleep(200);
XPropertySet oTPS = UnoRuntime.queryInterface(
diff --git a/odk/examples/java/Storage/TestHelper.java b/odk/examples/java/Storage/TestHelper.java
index 9fa2faff086d..3d95f7952203 100644
--- a/odk/examples/java/Storage/TestHelper.java
+++ b/odk/examples/java/Storage/TestHelper.java
@@ -80,7 +80,7 @@ public class TestHelper {
try
{
xPropSet.setPropertyValue( "MediaType", sMediaType );
- xPropSet.setPropertyValue( "Compressed", new Boolean( bCompressed ) );
+ xPropSet.setPropertyValue( "Compressed", Boolean.valueOf( bCompressed ) );
}
catch( Exception e )
{
@@ -208,7 +208,7 @@ public class TestHelper {
// set properties to the stream
try
{
- xPropSet.setPropertyValue( "Encrypted", new Boolean( bEncrypted ) );
+ xPropSet.setPropertyValue( "Encrypted", Boolean.valueOf( bEncrypted ) );
}
catch( Exception e )
{
@@ -711,7 +711,7 @@ public class TestHelper {
{
try
{
- xTempFileProps.setPropertyValue( "RemoveFile", new Boolean( false ) );
+ xTempFileProps.setPropertyValue( "RemoveFile", Boolean.FALSE );
sResult = AnyConverter.toString( xTempFileProps.getPropertyValue( "Uri" ) );
}
catch( Exception e )
diff --git a/odk/examples/java/Text/BookmarkInsertion.java b/odk/examples/java/Text/BookmarkInsertion.java
index bb5a44e3413c..3358e23ebcbb 100644
--- a/odk/examples/java/Text/BookmarkInsertion.java
+++ b/odk/examples/java/Text/BookmarkInsertion.java
@@ -160,7 +160,7 @@ public class BookmarkInsertion {
com.sun.star.beans.XPropertySet.class, xSearchDescriptor);
xPropertySet.setPropertyValue("SearchRegularExpression",
- new Boolean( true ) );
+ Boolean.TRUE );
xSearchInterface = (com.sun.star.uno.XInterface)
xSearchable.findFirst(xSearchDescriptor);
diff --git a/odk/examples/java/Text/SWriter.java b/odk/examples/java/Text/SWriter.java
index d96c583ce6b5..393edc1c01d5 100644
--- a/odk/examples/java/Text/SWriter.java
+++ b/odk/examples/java/Text/SWriter.java
@@ -155,9 +155,9 @@ public class SWriter {
// Change the BackColor
try {
- xTTPS.setPropertyValue("BackTransparent", new Boolean(false));
+ xTTPS.setPropertyValue("BackTransparent", Boolean.FALSE);
xTTPS.setPropertyValue("BackColor",new Integer(13421823));
- xTTRowPS.setPropertyValue("BackTransparent", new Boolean(false));
+ xTTRowPS.setPropertyValue("BackTransparent", Boolean.FALSE);
xTTRowPS.setPropertyValue("BackColor",new Integer(6710932));
} catch (Exception e) {
@@ -206,7 +206,7 @@ public class SWriter {
// Change the CharColor and add a Shadow
try {
xTCPS.setPropertyValue("CharColor",new Integer(255));
- xTCPS.setPropertyValue("CharShadowed", new Boolean(true));
+ xTCPS.setPropertyValue("CharShadowed", Boolean.TRUE);
} catch (Exception e) {
System.err.println("Couldn't change the color " + e);
e.printStackTrace(System.err);
@@ -316,7 +316,7 @@ public class SWriter {
// Change the CharColor and add a Shadow
try {
xTCPS.setPropertyValue("CharColor",new Integer(65536));
- xTCPS.setPropertyValue("CharShadowed", new Boolean(false));
+ xTCPS.setPropertyValue("CharShadowed", Boolean.FALSE);
} catch (Exception e) {
System.err.println("Couldn't change the color " + e);
e.printStackTrace(System.err);
diff --git a/odk/examples/java/Text/StyleCreation.java b/odk/examples/java/Text/StyleCreation.java
index a5ae0cc790f0..04207407c41d 100644
--- a/odk/examples/java/Text/StyleCreation.java
+++ b/odk/examples/java/Text/StyleCreation.java
@@ -99,7 +99,7 @@ public class StyleCreation {
new Float( com.sun.star.awt.FontWeight.BOLD ) );
System.out.println( "set the font attribute 'Bold'" );
- xPropertySet.setPropertyValue("CharAutoKerning", new Boolean( true ) );
+ xPropertySet.setPropertyValue("CharAutoKerning", Boolean.TRUE );
System.out.println( "set the paragraph attribute 'AutoKerning'" );
xPropertySet.setPropertyValue("ParaAdjust",
new Integer( com.sun.star.style.ParagraphAdjust.CENTER_value ) );