summaryrefslogtreecommitdiff
path: root/odk/examples/java/Text
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 15:27:21 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:18 +0200
commit4b4bff34027cca49fd13e82d33d1b399848838fa (patch)
tree361bde1ae9cf88160694bec9d5f3c1893d398f66 /odk/examples/java/Text
parentc552aac9f889b094caaa35c3fd9d12fe7c3fc73c (diff)
java: no need to instantiate String objects directly
Change-Id: I7610774c94bf673ed3b574ffce04c4ee6ca93c03
Diffstat (limited to 'odk/examples/java/Text')
-rw-r--r--odk/examples/java/Text/StyleCreation.java4
-rw-r--r--odk/examples/java/Text/StyleInitialization.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/odk/examples/java/Text/StyleCreation.java b/odk/examples/java/Text/StyleCreation.java
index 2861131aed0e..63f8825acd02 100644
--- a/odk/examples/java/Text/StyleCreation.java
+++ b/odk/examples/java/Text/StyleCreation.java
@@ -89,7 +89,7 @@ public class StyleCreation {
System.out.println( "create a PropertySet to set the properties for the new Paragraphstyle" );
// set some properties from the Paragraph style
- xPropertySet.setPropertyValue("CharFontName", new String( "Helvetica" ) );
+ xPropertySet.setPropertyValue("CharFontName", "Helvetica" );
System.out.println( "set name of the font to 'Helvetica'" );
xPropertySet.setPropertyValue("CharHeight", new Float( 36 ) );
@@ -129,7 +129,7 @@ public class StyleCreation {
// To run the sample with StarOffice 5.2 you'll have to change
// 'ParaStyleName' to 'ParaStyle' in the next line
xParagraphPropertySet.setPropertyValue("ParaStyleName",
- new String( "myheading" ) );
+ "myheading" );
System.out.println( "apply the new paragraph style");
}
catch( Exception e) {
diff --git a/odk/examples/java/Text/StyleInitialization.java b/odk/examples/java/Text/StyleInitialization.java
index 76d498df2173..be65e05bf6fa 100644
--- a/odk/examples/java/Text/StyleInitialization.java
+++ b/odk/examples/java/Text/StyleInitialization.java
@@ -212,7 +212,7 @@ public class StyleInitialization {
// To run the sample with StarOffice 5.2 you'll have to change 'ParaStyleName'
// to 'ParaStyle' in the next line
- xPropertySet.setPropertyValue("ParaStyleName", new String( sElementNames[iCounter] ) );
+ xPropertySet.setPropertyValue("ParaStyleName", sElementNames[iCounter] );
System.out.println( "Apply the paragraph style : " + sElementNames[iCounter] );
break;
}