summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Charts
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/examples/DevelopersGuide/Charts
parent56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff)
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'odk/examples/DevelopersGuide/Charts')
-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
3 files changed, 7 insertions, 7 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(