diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 15:09:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:17 +0200 |
commit | ff0ad0493ee1729c726587f667761b04101d774c (patch) | |
tree | 8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java | |
parent | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff) |
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java')
-rw-r--r-- | odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java index f25a9cfded8f..a40722f5e625 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/GeneralTableSample.java @@ -106,7 +106,7 @@ public class GeneralTableSample extends SpreadsheetDocHelper // *** Change cell properties *** int nValue = bValid ? 0x00FF00 : 0xFF4040; xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( nValue ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( nValue ) ); // *** Accessing a CELL RANGE *** @@ -117,14 +117,14 @@ public class GeneralTableSample extends SpreadsheetDocHelper // Change properties of the range. xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( 0x8080FF ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( 0x8080FF ) ); // Accessing a cell range over its name. xCellRange = xSheet.getCellRangeByName( "C4:D5" ); // Change properties of the range. xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange ); - xPropSet.setPropertyValue( "CellBackColor", new Integer( 0xFFFF80 ) ); + xPropSet.setPropertyValue( "CellBackColor", Integer.valueOf( 0xFFFF80 ) ); // *** Using the CELL CURSOR to add some data below of the filled area *** @@ -155,7 +155,7 @@ public class GeneralTableSample extends SpreadsheetDocHelper // Get column C by index (interface XIndexAccess). Object aColumnObj = xColumns.getByIndex( 2 ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aColumnObj ); - xPropSet.setPropertyValue( "Width", new Integer( 5000 ) ); + xPropSet.setPropertyValue( "Width", Integer.valueOf( 5000 ) ); // Get the name of the column. com.sun.star.container.XNamed xNamed = UnoRuntime.queryInterface( com.sun.star.container.XNamed.class, aColumnObj ); @@ -172,7 +172,7 @@ public class GeneralTableSample extends SpreadsheetDocHelper // Get row 7 by index (interface XIndexAccess) Object aRowObj = xRows.getByIndex( 6 ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, aRowObj ); - xPropSet.setPropertyValue( "Height", new Integer( 5000 ) ); + xPropSet.setPropertyValue( "Height", Integer.valueOf( 5000 ) ); xSheet.getCellByPosition( 2, 6 ).setFormula( "What a big cell." ); |