summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/document
diff options
context:
space:
mode:
authorOcke.Janssen <Ocke.Janssen@oracle.com>2011-01-20 15:58:09 +0100
committerOcke.Janssen <Ocke.Janssen@oracle.com>2011-01-20 15:58:09 +0100
commit9840529f8ad4c8f3ed8932db1af2c11b662b18c7 (patch)
tree513478e8b707a8ea08e8e023315ad3645645b2c4 /wizards/com/sun/star/wizards/document
parente0c1daa9561ff447351135f3318d1a1183077212 (diff)
dba34d: some refactoring
Diffstat (limited to 'wizards/com/sun/star/wizards/document')
-rw-r--r--wizards/com/sun/star/wizards/document/Control.java4
-rw-r--r--wizards/com/sun/star/wizards/document/DatabaseControl.java2
-rw-r--r--wizards/com/sun/star/wizards/document/GridControl.java2
-rw-r--r--wizards/com/sun/star/wizards/document/OfficeDocument.java10
-rw-r--r--wizards/com/sun/star/wizards/document/TimeStampControl.java4
5 files changed, 11 insertions, 11 deletions
diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java
index b5ec0ec4ff63..8a7b10f2cefd 100644
--- a/wizards/com/sun/star/wizards/document/Control.java
+++ b/wizards/com/sun/star/wizards/document/Control.java
@@ -145,7 +145,7 @@ public class Control extends Shape
public String getControlName(String _fieldname)
{
- String controlname = "";
+ String controlname = PropertyNames.EMPTY_STRING;
switch (getControlType())
{
case FormHandler.SOLABEL:
@@ -338,7 +338,7 @@ public class Control extends Shape
}
xPropertySet.setPropertyValue("Text", stext);
aPreferredSize = getPeer().getPreferredSize();
- xPropertySet.setPropertyValue("Text", "");
+ xPropertySet.setPropertyValue("Text", PropertyNames.EMPTY_STRING);
}
return aPreferredSize;
}
diff --git a/wizards/com/sun/star/wizards/document/DatabaseControl.java b/wizards/com/sun/star/wizards/document/DatabaseControl.java
index e26449bc4632..22b0af405b17 100644
--- a/wizards/com/sun/star/wizards/document/DatabaseControl.java
+++ b/wizards/com/sun/star/wizards/document/DatabaseControl.java
@@ -152,7 +152,7 @@ public class DatabaseControl extends Control
return FormHandler.oControlData[i].GridColumnName;
}
}
- return "";
+ return PropertyNames.EMPTY_STRING;
}
public int getControlHeight()
diff --git a/wizards/com/sun/star/wizards/document/GridControl.java b/wizards/com/sun/star/wizards/document/GridControl.java
index ef13d5c12a66..284dc5ef4309 100644
--- a/wizards/com/sun/star/wizards/document/GridControl.java
+++ b/wizards/com/sun/star/wizards/document/GridControl.java
@@ -76,7 +76,7 @@ public class GridControl extends Shape
FieldColumn curfieldcolumn = fieldcolumns[i];
if (curfieldcolumn.getFieldType() == DataType.TIMESTAMP)
{
- TimeStampControl oControl = new TimeStampControl(new Resource(_xMSF, "", "dbw"), this, curfieldcolumn);
+ TimeStampControl oControl = new TimeStampControl(new Resource(_xMSF, PropertyNames.EMPTY_STRING, "dbw"), this, curfieldcolumn);
}
else
{
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.java b/wizards/com/sun/star/wizards/document/OfficeDocument.java
index ea132453bb30..5e745dee7963 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.java
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.java
@@ -87,7 +87,7 @@ public class OfficeDocument
oEventProperties[0].Name = "EventType";
oEventProperties[0].Value = EventType; // "Service", "StarBasic"
oEventProperties[1] = new PropertyValue();
- oEventProperties[1].Name = "Script"; //"URL";
+ oEventProperties[1].Name = "Script"; //PropertyNames.URL;
oEventProperties[1].Value = EventURL;
xEventsSuppl.getEvents().replaceByName(EventName, oEventProperties);
}
@@ -131,7 +131,7 @@ public class OfficeDocument
PropertyValue[] loadValues = new PropertyValue[2];
loadValues[0] = new PropertyValue();
- loadValues[0].Name = "ReadOnly";
+ loadValues[0].Name = PropertyNames.READ_ONLY;
loadValues[0].Value = readonly ? Boolean.TRUE : Boolean.FALSE;
loadValues[1] = new PropertyValue();
loadValues[1].Name = "Preview";
@@ -145,7 +145,7 @@ public class OfficeDocument
try
{
xComponentLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, frame);
- /*if (frame.getName() == null || frame.getName().equals(""));
+ /*if (frame.getName() == null || frame.getName().equals(PropertyNames.EMPTY_STRING));
frame.setName("T" + System.currentTimeMillis());*/
XComponent xComponent = xComponentLoader.loadComponentFromURL(sURL, "_self", 0, loadValues);
@@ -389,13 +389,13 @@ public class OfficeDocument
PropertyValue[][] mediaDescr = new PropertyValue[1][1];
mediaDescr[0][0] = new PropertyValue();
- mediaDescr[0][0].Name = "URL";
+ mediaDescr[0][0].Name = PropertyNames.URL;
mediaDescr[0][0].Value = url;
String type = ((XTypeDetection) UnoRuntime.queryInterface(XTypeDetection.class, typeDetect)).queryTypeByDescriptor(mediaDescr, true);
XNameAccess xNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, typeDetect);
- if (type.equals(""))
+ if (type.equals(PropertyNames.EMPTY_STRING))
{
return null;
}
diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java
index 88733ee883c1..0ca625062e67 100644
--- a/wizards/com/sun/star/wizards/document/TimeStampControl.java
+++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java
@@ -105,8 +105,8 @@ public class TimeStampControl extends DatabaseControl
oResource = _oResource;
sDateAppendix = oResource.getResText(UIConsts.RID_FORM + 88);
sTimeAppendix = oResource.getResText(UIConsts.RID_FORM + 89);
- oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + " " + sDateAppendix);
- oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + " " + sTimeAppendix);
+ oDateControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.DATE, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sDateAppendix);
+ oTimeControl = new DatabaseControl(_oGridControl, _curfieldcolumn, DataType.TIME, _curfieldcolumn.getFieldTitle() + PropertyNames.SPACE + sTimeAppendix);
}
public void setPropertyValue(String _sPropertyName, Object _aPropertyValue) throws Exception