From cb982f14796aa4dc4362bc6fde74161afa11777b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 2 Nov 2023 09:47:02 +0200 Subject: 'new Float' is deprecated in Java replace with Float.valueOf Change-Id: Ib6408b24dac2953789d0ec67e73b8be8aefca252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158784 Tested-by: Jenkins Reviewed-by: Noel Grandin --- odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java | 2 +- odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'odk/examples/DevelopersGuide/Spreadsheet') diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java index 0696a866cdc3..872337013c26 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetDocHelper.java @@ -244,7 +244,7 @@ public class SpreadsheetDocHelper xCell.setFormula( aHeadline ); xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell ); xPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0x003399 ) ); - xPropSet.setPropertyValue( "CharWeight", new Float( com.sun.star.awt.FontWeight.BOLD ) ); + xPropSet.setPropertyValue( "CharWeight", Float.valueOf( com.sun.star.awt.FontWeight.BOLD ) ); } diff --git a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java index ce65555289fc..bbf54af0eb22 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/SpreadsheetSample.java @@ -263,7 +263,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCell ); // from styles.CharacterProperties xPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0x003399 ) ); - xPropSet.setPropertyValue( "CharHeight", new Float( 20.0 ) ); + xPropSet.setPropertyValue( "CharHeight", Float.valueOf( 20.0f ) ); // from styles.ParagraphProperties xPropSet.setPropertyValue( "ParaLeftMargin", Integer.valueOf( 500 ) ); // from table.CellProperties @@ -314,7 +314,7 @@ public class SpreadsheetSample extends SpreadsheetDocHelper xPropSet = UnoRuntime.queryInterface( com.sun.star.beans.XPropertySet.class, xCellRange ); // from com.sun.star.styles.CharacterProperties xPropSet.setPropertyValue( "CharColor", Integer.valueOf( 0x003399 ) ); - xPropSet.setPropertyValue( "CharHeight", new Float( 20.0 ) ); + xPropSet.setPropertyValue( "CharHeight", Float.valueOf( 20.0f ) ); // from com.sun.star.styles.ParagraphProperties xPropSet.setPropertyValue( "ParaLeftMargin", Integer.valueOf( 500 ) ); // from com.sun.star.table.CellProperties -- cgit