summaryrefslogtreecommitdiff
path: root/scripting
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 /scripting
parentc552aac9f889b094caaa35c3fd9d12fe7c3fc73c (diff)
java: no need to instantiate String objects directly
Change-Id: I7610774c94bf673ed3b574ffce04c4ee6ca93c03
Diffstat (limited to 'scripting')
-rw-r--r--scripting/examples/java/Newsgroup/OfficeAttachment.java8
-rw-r--r--scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java2
-rw-r--r--scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java2
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/PathUtils.java2
4 files changed, 7 insertions, 7 deletions
diff --git a/scripting/examples/java/Newsgroup/OfficeAttachment.java b/scripting/examples/java/Newsgroup/OfficeAttachment.java
index 8e36d1fb47f1..8a008ae18ea8 100644
--- a/scripting/examples/java/Newsgroup/OfficeAttachment.java
+++ b/scripting/examples/java/Newsgroup/OfficeAttachment.java
@@ -104,11 +104,11 @@ public class OfficeAttachment
status.setStatus( 4, statusLine );
PropertyValue[] propertyvalue_html = new PropertyValue[2];
propertyvalue_html[0] = new PropertyValue();
- propertyvalue_html[0].Name = new String("Overwrite");
+ propertyvalue_html[0].Name = "Overwrite";
propertyvalue_html[0].Value = Boolean.TRUE;
propertyvalue_html[1] = new PropertyValue();
propertyvalue_html[1].Name = ("FilterName");
- propertyvalue_html[1].Value = new String("swriter: HTML (StarWriter)");
+ propertyvalue_html[1].Value = "swriter: HTML (StarWriter)";
storedDoc.storeAsURL( filenameURL + ".html", propertyvalue_html);
File homedir = new File( templocationSystem );
@@ -130,10 +130,10 @@ public class OfficeAttachment
status.setStatus( 4, statusLine );
PropertyValue[] propertyvalue_sxw = new PropertyValue[2];
propertyvalue_sxw[0] = new PropertyValue();
- propertyvalue_sxw[0].Name = new String("Overwrite");
+ propertyvalue_sxw[0].Name = "Overwrite";
propertyvalue_sxw[0].Value = Boolean.TRUE;
propertyvalue_sxw[1] = new PropertyValue();
- propertyvalue_sxw[1].Name = new String("Overwrite");
+ propertyvalue_sxw[1].Name = "Overwrite";
propertyvalue_sxw[1].Value = Boolean.TRUE;
storedDoc.storeAsURL( filenameURL + ".sxw", propertyvalue_sxw);
diff --git a/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java b/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
index dfba37555c99..b1bdfff645ad 100644
--- a/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
+++ b/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java
@@ -337,7 +337,7 @@ XInitialization {
xPSetCheckBox.setPropertyValue( "State", Short.valueOf((short)0) );
xPSetCheckBox.setPropertyValue( "Name", _checkBoxName );
xPSetCheckBox.setPropertyValue( "TabIndex", Short.valueOf( (short)1 ) );
- xPSetCheckBox.setPropertyValue( "Label", new String(_checkBoxString +checkBoxPath) );
+ xPSetCheckBox.setPropertyValue( "Label", _checkBoxString +checkBoxPath );
// insert the control models into the dialog model
xNameCont.insertByName( _label2Name, label2Model );
diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java
index 12be9bc19592..c2f966cbd23f 100644
--- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java
+++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java
@@ -214,7 +214,7 @@ public class ParcelBrowseNode extends PropertySet
}
else
{
- String source = new String(provider.getScriptEditor().getTemplate().getBytes());
+ String source = provider.getScriptEditor().getTemplate();
String languageName = newName + "." + provider.getScriptEditor().getExtension();
String language = container.getLanguage();
diff --git a/scripting/java/com/sun/star/script/framework/provider/PathUtils.java b/scripting/java/com/sun/star/script/framework/provider/PathUtils.java
index 307d3460b9ab..48ca6c9a7cf7 100644
--- a/scripting/java/com/sun/star/script/framework/provider/PathUtils.java
+++ b/scripting/java/com/sun/star/script/framework/provider/PathUtils.java
@@ -40,7 +40,7 @@ public class PathUtils {
}
public static String getOidForModel( XModel xModel )
{
- String oid = new String("");
+ String oid = "";
if ( xModel != null )
{
try