summaryrefslogtreecommitdiff
path: root/odk/examples/java/Text
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/java/Text')
-rw-r--r--odk/examples/java/Text/GraphicsInserter.java8
-rw-r--r--odk/examples/java/Text/HardFormatting.java2
-rw-r--r--odk/examples/java/Text/SWriter.java10
-rw-r--r--odk/examples/java/Text/StyleCreation.java4
-rw-r--r--odk/examples/java/Text/TextReplace.java8
5 files changed, 16 insertions, 16 deletions
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 );