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/java | |
parent | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff) |
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'odk/examples/java')
-rw-r--r-- | odk/examples/java/Drawing/SDraw.java | 4 | ||||
-rw-r--r-- | odk/examples/java/EmbedDocument/Container1/EmbedContApp.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Inspector/Introspector.java | 2 | ||||
-rw-r--r-- | odk/examples/java/PropertySet/PropTest.java | 6 | ||||
-rw-r--r-- | odk/examples/java/Spreadsheet/EuroAdaption.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Spreadsheet/SCalc.java | 6 | ||||
-rw-r--r-- | odk/examples/java/Storage/Test01.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Storage/Test02.java | 2 | ||||
-rw-r--r-- | odk/examples/java/Storage/Test04.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Storage/Test05.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Storage/Test07.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Storage/Test08.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Storage/Test09.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Text/GraphicsInserter.java | 8 | ||||
-rw-r--r-- | odk/examples/java/Text/HardFormatting.java | 2 | ||||
-rw-r--r-- | odk/examples/java/Text/SWriter.java | 10 | ||||
-rw-r--r-- | odk/examples/java/Text/StyleCreation.java | 4 | ||||
-rw-r--r-- | odk/examples/java/Text/TextReplace.java | 8 | ||||
-rw-r--r-- | odk/examples/java/ToDo/ToDo.java | 46 |
19 files changed, 65 insertions, 65 deletions
diff --git a/odk/examples/java/Drawing/SDraw.java b/odk/examples/java/Drawing/SDraw.java index 54404e244de6..73a05022147a 100644 --- a/odk/examples/java/Drawing/SDraw.java +++ b/odk/examples/java/Drawing/SDraw.java @@ -182,7 +182,7 @@ public class SDraw { com.sun.star.beans.XPropertySet.class, xShape); try { - xSPS.setPropertyValue("FillColor", new Integer(col)); + xSPS.setPropertyValue("FillColor", Integer.valueOf(col)); } catch (Exception e) { System.err.println("Can't change colors " + e); e.printStackTrace(System.err); @@ -237,7 +237,7 @@ public class SDraw { xShape); try { - xSPS.setPropertyValue("FillColor", new Integer(getCol(r,g,b))); + xSPS.setPropertyValue("FillColor", Integer.valueOf(getCol(r,g,b))); xSPS.setPropertyValue("Shadow", Boolean.TRUE); } catch (Exception e) { System.err.println("Can't change colors " + e); diff --git a/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java b/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java index d419063b6879..52ec8ce47d33 100644 --- a/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java +++ b/odk/examples/java/EmbedDocument/Container1/EmbedContApp.java @@ -891,7 +891,7 @@ public class EmbedContApp extends Applet implements MouseListener, XEmbeddedClie { Object aArgs[] = new Object[2]; aArgs[0] = aFileURI; - aArgs[1] = new Integer( ElementModes.READWRITE ); + aArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs ); XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage ); @@ -926,7 +926,7 @@ public class EmbedContApp extends Applet implements MouseListener, XEmbeddedClie oStorageFactory ); Object aArgs[] = new Object[2]; aArgs[0] = aFileURI; - aArgs[1] = new Integer( ElementModes.READWRITE ); + aArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs ); XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage ); diff --git a/odk/examples/java/Inspector/Introspector.java b/odk/examples/java/Inspector/Introspector.java index 4498e5257368..1d04e8dc21cf 100644 --- a/odk/examples/java/Inspector/Introspector.java +++ b/odk/examples/java/Inspector/Introspector.java @@ -172,7 +172,7 @@ public class Introspector extends WeakBase{ XIdlMethod mMethod = xIntrospectionAccessObject.getMethod("getByIndex", com.sun.star.beans.MethodConcept.INDEXCONTAINER); for ( int i = 0; i < xIndexAccess.getCount(); i++ ) { Object[][] aParamInfo = new Object[1][1]; - aParamInfo[0] = new Integer[] { new Integer(i) }; + aParamInfo[0] = new Integer[] { Integer.valueOf(i) }; oRetComponentsVector.add(mMethod.invoke(_oUnoParentObject, aParamInfo)); } } diff --git a/odk/examples/java/PropertySet/PropTest.java b/odk/examples/java/PropertySet/PropTest.java index fd77886a6678..148c000d9938 100644 --- a/odk/examples/java/PropertySet/PropTest.java +++ b/odk/examples/java/PropertySet/PropTest.java @@ -152,9 +152,9 @@ public class PropTest extends PropertySet implements XServiceInfo // readonly public int roIntA= 100; - public Integer roIntClassA= new Integer(100); - public Object roObjectA= new Integer(101); - public Any roAnyA= new Any( new Type(int.class), new Integer(102)); + public Integer roIntClassA= Integer.valueOf(100); + public Object roObjectA= Integer.valueOf(101); + public Any roAnyA= new Any( new Type(int.class), Integer.valueOf(102)); // BOUND & CONSTRAINED public boolean bcBoolA; diff --git a/odk/examples/java/Spreadsheet/EuroAdaption.java b/odk/examples/java/Spreadsheet/EuroAdaption.java index 498f18800dd3..870c20978245 100644 --- a/odk/examples/java/Spreadsheet/EuroAdaption.java +++ b/odk/examples/java/Spreadsheet/EuroAdaption.java @@ -213,7 +213,7 @@ public class EuroAdaption { // set the new numberformat to the cellrange DM->EUR xCellProp.setPropertyValue( "NumberFormat", - new Integer( iNewNumberFormat ) ); + Integer.valueOf( iNewNumberFormat ) ); // interate over all cells from the cellrange with an // content and use the DM/EUR factor @@ -297,7 +297,7 @@ public class EuroAdaption { XPropertySet xCellProp = UnoRuntime.queryInterface( XPropertySet.class, xCellRange ); xCellProp.setPropertyValue( "NumberFormat", - new Integer(iNumberFormatKey) ); + Integer.valueOf(iNumberFormatKey) ); } } catch( Exception e) { diff --git a/odk/examples/java/Spreadsheet/SCalc.java b/odk/examples/java/Spreadsheet/SCalc.java index a303fafabc65..0a8b705c7b17 100644 --- a/odk/examples/java/Spreadsheet/SCalc.java +++ b/odk/examples/java/Spreadsheet/SCalc.java @@ -139,15 +139,15 @@ public class SCalc { XPropertySet oCPS1 = UnoRuntime.queryInterface( XPropertySet.class, oInt1 ); oCPS1.setPropertyValue("IsCellBackgroundTransparent", Boolean.FALSE); - oCPS1.setPropertyValue("CellBackColor",new Integer(6710932)); - oCPS1.setPropertyValue("CharColor",new Integer(16777215)); + oCPS1.setPropertyValue("CellBackColor",Integer.valueOf(6710932)); + oCPS1.setPropertyValue("CharColor",Integer.valueOf(16777215)); XInterface oInt2 = (XInterface) oDocMSF.createInstance( "com.sun.star.style.CellStyle"); oStyleFamilyNameContainer.insertByName("My Style2", oInt2); XPropertySet oCPS2 = UnoRuntime.queryInterface( XPropertySet.class, oInt2 ); oCPS2.setPropertyValue("IsCellBackgroundTransparent", Boolean.FALSE); - oCPS2.setPropertyValue("CellBackColor",new Integer(13421823)); + oCPS2.setPropertyValue("CellBackColor",Integer.valueOf(13421823)); } catch (Exception e) { e.printStackTrace(System.err); } diff --git a/odk/examples/java/Storage/Test01.java b/odk/examples/java/Storage/Test01.java index 7ff1f4f498bc..b2e94b36ac44 100644 --- a/odk/examples/java/Storage/Test01.java +++ b/odk/examples/java/Storage/Test01.java @@ -95,7 +95,7 @@ public class Test01 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -119,7 +119,7 @@ public class Test01 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READWRITE ); + pArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Storage/Test02.java b/odk/examples/java/Storage/Test02.java index 10fda47a713a..5750f253939c 100644 --- a/odk/examples/java/Storage/Test02.java +++ b/odk/examples/java/Storage/Test02.java @@ -50,7 +50,7 @@ public class Test02 implements StorageTest { // create storage based on the temporary stream Object pArgs[] = new Object[2]; pArgs[0] = xTempFileStream; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempStorage = UnoRuntime.queryInterface( XStorage.class, oTempStorage ); diff --git a/odk/examples/java/Storage/Test04.java b/odk/examples/java/Storage/Test04.java index 89417471afa8..79a55dcb25a4 100644 --- a/odk/examples/java/Storage/Test04.java +++ b/odk/examples/java/Storage/Test04.java @@ -115,7 +115,7 @@ public class Test04 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -176,7 +176,7 @@ public class Test04 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READWRITE ); + pArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oResStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResStorage = UnoRuntime.queryInterface( XStorage.class, oResStorage ); if ( xResStorage == null ) diff --git a/odk/examples/java/Storage/Test05.java b/odk/examples/java/Storage/Test05.java index 99a7716994a1..b0c84ae11b9f 100644 --- a/odk/examples/java/Storage/Test05.java +++ b/odk/examples/java/Storage/Test05.java @@ -51,7 +51,7 @@ public class Test05 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -214,7 +214,7 @@ public class Test05 implements StorageTest { // now check all the written and copied information - pArgs[1] = new Integer( ElementModes.READ ); + pArgs[1] = Integer.valueOf( ElementModes.READ ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Storage/Test07.java b/odk/examples/java/Storage/Test07.java index ba92f649aafd..7ae850fab32c 100644 --- a/odk/examples/java/Storage/Test07.java +++ b/odk/examples/java/Storage/Test07.java @@ -73,7 +73,7 @@ public class Test07 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -97,7 +97,7 @@ public class Test07 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READWRITE ); + pArgs[1] = Integer.valueOf( ElementModes.READWRITE ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Storage/Test08.java b/odk/examples/java/Storage/Test08.java index 6e5aec84b3e0..adc911ccb95f 100644 --- a/odk/examples/java/Storage/Test08.java +++ b/odk/examples/java/Storage/Test08.java @@ -128,7 +128,7 @@ public class Test08 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -152,7 +152,7 @@ public class Test08 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READ ); + pArgs[1] = Integer.valueOf( ElementModes.READ ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Storage/Test09.java b/odk/examples/java/Storage/Test09.java index 4e7f5f2ba66c..171ce6f25627 100644 --- a/odk/examples/java/Storage/Test09.java +++ b/odk/examples/java/Storage/Test09.java @@ -70,7 +70,7 @@ public class Test09 implements StorageTest { // create temporary storage based on a previously created temporary file Object pArgs[] = new Object[2]; pArgs[0] = sTempFileURL; - pArgs[1] = new Integer( ElementModes.WRITE ); + pArgs[1] = Integer.valueOf( ElementModes.WRITE ); Object oTempFileStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xTempFileStorage = UnoRuntime.queryInterface( XStorage.class, oTempFileStorage ); @@ -104,7 +104,7 @@ public class Test09 implements StorageTest { // the temporary file must not be locked any more after storage disposing - pArgs[1] = new Integer( ElementModes.READ ); + pArgs[1] = Integer.valueOf( ElementModes.READ ); Object oResultStorage = m_xStorageFactory.createInstanceWithArguments( pArgs ); XStorage xResultStorage = UnoRuntime.queryInterface( XStorage.class, oResultStorage ); if ( xResultStorage == null ) diff --git a/odk/examples/java/Text/GraphicsInserter.java b/odk/examples/java/Text/GraphicsInserter.java index 0bcdcfa12443..82a263866e57 100644 --- a/odk/examples/java/Text/GraphicsInserter.java +++ b/odk/examples/java/Text/GraphicsInserter.java @@ -150,17 +150,17 @@ public class GraphicsInserter { // Setting the horizontal position xPropSet.setPropertyValue( "HoriOrientPosition", - new Integer( 5500 ) ); + Integer.valueOf( 5500 ) ); // Setting the vertical position xPropSet.setPropertyValue( "VertOrientPosition", - new Integer( 4200 ) ); + Integer.valueOf( 4200 ) ); // Setting the width - xPropSet.setPropertyValue( "Width", new Integer( 4400 ) ); + xPropSet.setPropertyValue( "Width", Integer.valueOf( 4400 ) ); // Setting the height - xPropSet.setPropertyValue( "Height", new Integer( 4000 ) ); + xPropSet.setPropertyValue( "Height", Integer.valueOf( 4000 ) ); } catch ( Exception exception ) { System.out.println( "Couldn't set property 'GraphicURL'" ); exception.printStackTrace( printwriterLog ); diff --git a/odk/examples/java/Text/HardFormatting.java b/odk/examples/java/Text/HardFormatting.java index 5f69d84acac4..6ed8296fa500 100644 --- a/odk/examples/java/Text/HardFormatting.java +++ b/odk/examples/java/Text/HardFormatting.java @@ -119,7 +119,7 @@ public class HardFormatting { com.sun.star.beans.XPropertySet.class, xWordCursor); xPropertySet.setPropertyValue("CharWeight", new Float(com.sun.star.awt.FontWeight.BOLD)); - xPropertySet.setPropertyValue("CharColor", new Integer( 255 ) ); + xPropertySet.setPropertyValue("CharColor", Integer.valueOf( 255 ) ); System.out.println( "Parastyle : " diff --git a/odk/examples/java/Text/SWriter.java b/odk/examples/java/Text/SWriter.java index 393edc1c01d5..4e65ae288fa8 100644 --- a/odk/examples/java/Text/SWriter.java +++ b/odk/examples/java/Text/SWriter.java @@ -156,9 +156,9 @@ public class SWriter { // Change the BackColor try { xTTPS.setPropertyValue("BackTransparent", Boolean.FALSE); - xTTPS.setPropertyValue("BackColor",new Integer(13421823)); + xTTPS.setPropertyValue("BackColor",Integer.valueOf(13421823)); xTTRowPS.setPropertyValue("BackTransparent", Boolean.FALSE); - xTTRowPS.setPropertyValue("BackColor",new Integer(6710932)); + xTTRowPS.setPropertyValue("BackColor",Integer.valueOf(6710932)); } catch (Exception e) { System.err.println("Couldn't change the color " + e); @@ -205,7 +205,7 @@ public class SWriter { // Change the CharColor and add a Shadow try { - xTCPS.setPropertyValue("CharColor",new Integer(255)); + xTCPS.setPropertyValue("CharColor",Integer.valueOf(255)); xTCPS.setPropertyValue("CharShadowed", Boolean.TRUE); } catch (Exception e) { System.err.println("Couldn't change the color " + e); @@ -315,7 +315,7 @@ public class SWriter { // Change the CharColor and add a Shadow try { - xTCPS.setPropertyValue("CharColor",new Integer(65536)); + xTCPS.setPropertyValue("CharColor",Integer.valueOf(65536)); xTCPS.setPropertyValue("CharShadowed", Boolean.FALSE); } catch (Exception e) { System.err.println("Couldn't change the color " + e); @@ -374,7 +374,7 @@ public class SWriter { com.sun.star.beans.XPropertySet xTPS = UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xTC); try { - xTPS.setPropertyValue("CharColor",new Integer(16777215)); + xTPS.setPropertyValue("CharColor",Integer.valueOf(16777215)); } catch (Exception e) { System.err.println(" Exception " + e); e.printStackTrace(System.err); diff --git a/odk/examples/java/Text/StyleCreation.java b/odk/examples/java/Text/StyleCreation.java index 04207407c41d..2861131aed0e 100644 --- a/odk/examples/java/Text/StyleCreation.java +++ b/odk/examples/java/Text/StyleCreation.java @@ -102,10 +102,10 @@ public class StyleCreation { 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 ) ); + Integer.valueOf( com.sun.star.style.ParagraphAdjust.CENTER_value ) ); System.out.println( "set the paragraph adjust to LEFT" ); - xPropertySet.setPropertyValue("ParaFirstLineIndent", new Integer( 0 ) ); + xPropertySet.setPropertyValue("ParaFirstLineIndent", Integer.valueOf( 0 ) ); System.out.println( "set the first line indent to 0 cm" ); xPropertySet.setPropertyValue("BreakType", diff --git a/odk/examples/java/Text/TextReplace.java b/odk/examples/java/Text/TextReplace.java index 4566130870b2..0e87656ebd0e 100644 --- a/odk/examples/java/Text/TextReplace.java +++ b/odk/examples/java/Text/TextReplace.java @@ -113,10 +113,10 @@ public class TextReplace { com.sun.star.beans.XPropertySet xCPS = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xTextCursor); // Set the word blue - xCPS.setPropertyValue( "CharColor", new Integer( 255 ) ); + xCPS.setPropertyValue( "CharColor", Integer.valueOf( 255 ) ); // Go to last character xTextCursor.gotoEnd(false); - xCPS.setPropertyValue( "CharColor", new Integer( 0 ) ); + xCPS.setPropertyValue( "CharColor", Integer.valueOf( 0 ) ); xText.insertString( xTextCursor, "in the alley. Like lightening he darted off to the left and disappeared between the two warehouses almost falling over the trash can lying in the ", false ); @@ -124,10 +124,10 @@ public class TextReplace { xCPS = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xTextCursor); // Set the word blue - xCPS.setPropertyValue( "CharColor", new Integer( 255 ) ); + xCPS.setPropertyValue( "CharColor", Integer.valueOf( 255 ) ); // Go to last character xTextCursor.gotoEnd(false); - xCPS.setPropertyValue( "CharColor", new Integer( 0 ) ); + xCPS.setPropertyValue( "CharColor", Integer.valueOf( 0 ) ); xText.insertString( xTextCursor, "of the sidewalk.", false ); diff --git a/odk/examples/java/ToDo/ToDo.java b/odk/examples/java/ToDo/ToDo.java index e40dfc8873f4..de80b92b213d 100644 --- a/odk/examples/java/ToDo/ToDo.java +++ b/odk/examples/java/ToDo/ToDo.java @@ -270,7 +270,7 @@ public class ToDo { // Changing the background color of the cell to white xpropertyset.setPropertyValue( "CellBackColor", - new Integer( 16777215 ) ); + Integer.valueOf( 16777215 ) ); // Getting the cell of the bug id XCell xcell = xcellrange.getCellByPosition( @@ -503,7 +503,7 @@ public class ToDo { // Changing the background color of the cell // to red xpropertyset.setPropertyValue( - "CellBackColor", new Integer( 16711680 ) ); + "CellBackColor", Integer.valueOf( 16711680 ) ); } else { // Querying for the interface XColumnRowRange // on the XCellRange @@ -720,7 +720,7 @@ public class ToDo { // Getting the Easter sunday Double dEasterSunday = ( Double ) xfunctionaccess.callFunction( - "EASTERSUNDAY", new Object[] { new Integer(intYear) }); + "EASTERSUNDAY", new Object[] { Integer.valueOf(intYear) }); int intEasterSunday = (int)Math.round( dEasterSunday.doubleValue()); @@ -729,9 +729,9 @@ public class ToDo { vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 1 ), - new Integer( 1 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 1 ), + Integer.valueOf( 1 ) } )); // Good Friday vectorHolidays.add( @@ -745,9 +745,9 @@ public class ToDo { vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 5 ), - new Integer( 1 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 5 ), + Integer.valueOf( 1 ) } )); // Ascension Day vectorHolidays.add(new Double(intEasterSunday + 39 )); @@ -759,25 +759,25 @@ public class ToDo { vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 10 ), - new Integer( 3 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 10 ), + Integer.valueOf( 3 ) } )); // Christmas Day First vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 12 ), - new Integer( 25 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 12 ), + Integer.valueOf( 25 ) } )); // Christmas Day Second vectorHolidays.add( xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( intYear ), - new Integer( 12 ), - new Integer( 26 ) } )); + Integer.valueOf( intYear ), + Integer.valueOf( 12 ), + Integer.valueOf( 26 ) } )); } } catch( Exception exception ) { @@ -805,14 +805,14 @@ public class ToDo { Double dDate = ( Double ) xfunctionaccess.callFunction( "DATE", new Object[] { - new Integer( gregCalStartDate.get( Calendar.YEAR ) ), - new Integer( gregCalStartDate.get( Calendar.MONTH ) + 1 ), - new Integer( gregCalStartDate.get( Calendar.DATE ) ) + Integer.valueOf( gregCalStartDate.get( Calendar.YEAR ) ), + Integer.valueOf( gregCalStartDate.get( Calendar.MONTH ) + 1 ), + Integer.valueOf( gregCalStartDate.get( Calendar.DATE ) ) } ); Double dWorkday = ( Double ) xfunctionaccess.callFunction( "com.sun.star.sheet.addin.Analysis.getWorkday", - new Object[] { dDate, new Integer( intDays ), objectHolidays } ); + new Object[] { dDate, Integer.valueOf( intDays ), objectHolidays } ); Double dYear = ( Double ) xfunctionaccess.callFunction( "YEAR", new Object[] { dWorkday } ); @@ -854,7 +854,7 @@ public class ToDo { while ( dHolidayStart != 0 ) { if ( dHolidayEnd == 0 ) { vectorHolidays.add( - new Integer( (int) Math.round( + Integer.valueOf( (int) Math.round( dHolidayStart ) ) ); } else { |