summaryrefslogtreecommitdiff
path: root/odk/examples/java
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/java')
-rw-r--r--odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java4
-rw-r--r--odk/examples/java/Inspector/ProtocolHandlerAddon.java2
-rw-r--r--odk/examples/java/Text/StyleCreation.java4
-rw-r--r--odk/examples/java/Text/StyleInitialization.java2
4 files changed, 6 insertions, 6 deletions
diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
index 80a09136986b..fda786241ac1 100644
--- a/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
+++ b/odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
@@ -251,7 +251,7 @@ public final class OwnEmbeddedObject extends WeakBase
XInputStream xInStream = xStream.getInputStream();
byte[][] aData = new byte[1][];
aData[0] = new byte[0];
- String aResult = new String();
+ String aResult = "";
int nLen = 0;
do
@@ -661,7 +661,7 @@ public final class OwnEmbeddedObject extends WeakBase
if ( m_bDisposed )
throw new com.sun.star.lang.DisposedException();
- return new String();
+ return "";
}
diff --git a/odk/examples/java/Inspector/ProtocolHandlerAddon.java b/odk/examples/java/Inspector/ProtocolHandlerAddon.java
index 1515759b4000..714593b496c6 100644
--- a/odk/examples/java/Inspector/ProtocolHandlerAddon.java
+++ b/odk/examples/java/Inspector/ProtocolHandlerAddon.java
@@ -208,7 +208,7 @@ public class ProtocolHandlerAddon {
// describe window properties.
WindowDescriptor aDescriptor = new WindowDescriptor();
aDescriptor.Type = WindowClass.MODALTOP;
- aDescriptor.WindowServiceName = new String( "infobox" );
+ aDescriptor.WindowServiceName = "infobox";
aDescriptor.ParentIndex = -1;
aDescriptor.Parent = UnoRuntime.queryInterface(
XWindowPeer.class, m_xFrame.getContainerWindow());
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;
}