summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaTemplate.java62
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java2
-rw-r--r--wizards/com/sun/star/wizards/agenda/TopicsControl.java20
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigGroup.java4
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigSet.java18
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.java14
-rw-r--r--wizards/com/sun/star/wizards/common/Helper.java4
-rw-r--r--wizards/com/sun/star/wizards/common/JavaTools.java8
-rw-r--r--wizards/com/sun/star/wizards/common/NamedValueCollection.java5
-rw-r--r--wizards/com/sun/star/wizards/common/NumericalHelper.java2
-rw-r--r--wizards/com/sun/star/wizards/common/Properties.java10
-rw-r--r--wizards/com/sun/star/wizards/common/Resource.java6
-rw-r--r--wizards/com/sun/star/wizards/common/UCB.java14
-rw-r--r--wizards/com/sun/star/wizards/db/CommandMetaData.java10
-rw-r--r--wizards/com/sun/star/wizards/db/DBMetaData.java7
-rw-r--r--wizards/com/sun/star/wizards/db/QueryMetaData.java2
-rw-r--r--wizards/com/sun/star/wizards/db/RecordParser.java2
-rw-r--r--wizards/com/sun/star/wizards/db/RelationController.java6
-rw-r--r--wizards/com/sun/star/wizards/db/TableDescriptor.java30
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java4
-rw-r--r--wizards/com/sun/star/wizards/form/FormDocument.java30
-rw-r--r--wizards/com/sun/star/wizards/form/StyleApplier.java4
-rw-r--r--wizards/com/sun/star/wizards/form/UIControlArranger.java4
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java26
-rw-r--r--wizards/com/sun/star/wizards/report/GroupFieldHandler.java6
-rw-r--r--wizards/com/sun/star/wizards/report/IReportDocument.java6
-rw-r--r--wizards/com/sun/star/wizards/report/ReportTextDocument.java24
-rw-r--r--wizards/com/sun/star/wizards/report/ReportTextImplementation.java30
-rw-r--r--wizards/com/sun/star/wizards/report/ReportWizard.java4
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java32
-rw-r--r--wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java4
-rw-r--r--wizards/com/sun/star/wizards/table/FieldDescription.java8
-rw-r--r--wizards/com/sun/star/wizards/table/FieldFormatter.java2
-rw-r--r--wizards/com/sun/star/wizards/table/ScenarioSelector.java6
-rw-r--r--wizards/com/sun/star/wizards/table/TableWizard.java4
-rw-r--r--wizards/com/sun/star/wizards/text/TextDocument.java6
-rw-r--r--wizards/com/sun/star/wizards/text/TextFieldHandler.java2
-rw-r--r--wizards/com/sun/star/wizards/text/TextTableHandler.java2
-rw-r--r--wizards/com/sun/star/wizards/ui/AggregateComponent.java22
-rw-r--r--wizards/com/sun/star/wizards/ui/ButtonList.java7
-rw-r--r--wizards/com/sun/star/wizards/ui/CommandFieldSelection.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/ControlScroller.java23
-rw-r--r--wizards/com/sun/star/wizards/ui/ImageList.java11
-rw-r--r--wizards/com/sun/star/wizards/ui/PeerConfig.java12
-rw-r--r--wizards/com/sun/star/wizards/ui/TitlesComponent.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog.java11
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog2.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/event/AbstractListener.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/event/DataAware.java24
-rw-r--r--wizards/com/sun/star/wizards/ui/event/DataAwareFields.java24
-rw-r--r--wizards/com/sun/star/wizards/ui/event/MethodInvocation.java4
-rw-r--r--wizards/com/sun/star/wizards/ui/event/Task.java12
-rw-r--r--wizards/com/sun/star/wizards/web/FTPDialog.java4
-rw-r--r--wizards/com/sun/star/wizards/web/Process.java12
-rw-r--r--wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java4
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Events.java4
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Startup.java18
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGLayout.java6
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGSettings.java8
-rw-r--r--wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java4
-rw-r--r--wizards/com/sun/star/wizards/web/status/ErrorLog.java2
-rw-r--r--wizards/com/sun/star/wizards/web/status/Task.java10
62 files changed, 331 insertions, 337 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
index 963ea7feaf20..55e112c72e31 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java
@@ -143,18 +143,18 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* Stores reusable OOo Placeholder TextFields to insert to the document.
*/
- Map itemsCache;
+ Map<String, AgendaItem> itemsCache;
/**
* This map is used to find which tables contains a certain Item, so
* the keys are the different Items, the Objects are the ItemTable controllers.
* When an Item must be redrawn (because the user checked or uncheced it),
* the controller is retrieved from this Map, and a redraw is issued on this controller.
*/
- Map itemsMap = new HashMap(11);
+ Map<String, ItemsTable> itemsMap = new HashMap<String, ItemsTable>(11);
/**
* A temporary variable used to list all items and map them.
*/
- List _allItems = new ArrayList();
+ List<XTextRange> _allItems = new ArrayList<XTextRange>();
/**
* keep a reference on some static items in the document,
* so when their content is changed (through the user), we
@@ -184,7 +184,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* @see AgendaTemplate.initialize()
* @see AgendaTemplate.initializeData()
*/
- public synchronized void load(String templateURL, List topics)
+ public synchronized void load(String templateURL, List<PropertyValue[]> topics)
{
template = calcTemplateName(templateURL);
document = loadAsPreview(templateURL, false);
@@ -216,7 +216,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* information (it is only actualized on save) the given list
* supplies this information.
*/
- private void initializeData(List topicsData)
+ private void initializeData(List<PropertyValue[]> topicsData)
{
for (int i = 0; i < itemsTables.length; i++)
{
@@ -359,7 +359,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
private void initItemsCache()
{
- itemsCache = new HashMap(11);
+ itemsCache = new HashMap<String, AgendaItem>(11);
XMultiServiceFactory xmsf = UnoRuntime.queryInterface(XMultiServiceFactory.class, document);
// Headings
@@ -489,7 +489,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
for (int i = 0; i < _allItems.size(); i++)
{
- item = (XTextRange) _allItems.get(i);
+ item = _allItems.get(i);
String text = item.getString().trim().toLowerCase();
if (text.equals(FILLIN_TITLE))
{
@@ -533,7 +533,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* searches the document for items in the format "&gt;*&lt;"
* @return a vector containing the XTextRanges of the found items
*/
- private List searchFillInItems()
+ private List<XTextRange> searchFillInItems()
{
try
{
@@ -545,7 +545,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
XIndexAccess ia = xSearchable.findAll(sd);
- List l = new ArrayList<XTextRange>(ia.getCount());
+ List<XTextRange> l = new ArrayList<XTextRange>(ia.getCount());
for (int i = 0; i < ia.getCount(); i++)
{
try
@@ -696,7 +696,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* F I N I S H
*********************************************/
/** the user clicked finish **/
- public synchronized void finish(List topics)
+ public synchronized void finish(List<PropertyValue[]> topics)
{
createMinutes(topics);
deleteHiddenSections();
@@ -737,7 +737,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* specified not to create minuts, the minutes section will be removed,
* @param topicsData supplies PropertyValue arrays containing the values for the topics.
*/
- public synchronized void createMinutes(List topicsData)
+ public synchronized void createMinutes(List<PropertyValue[]> topicsData)
{
// if the minutes section should be removed (the
@@ -809,7 +809,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
for (int i = 0; i < topicsData.size() - 1; i++)
{
- PropertyValue[] topic = (PropertyValue[]) topicsData.get(i);
+ PropertyValue[] topic = topicsData.get(i);
items = searchFillInItems();
for (int itemIndex = 0; itemIndex < items.size(); itemIndex++)
@@ -943,7 +943,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* the items in the table.
*/
- List items = new ArrayList(6);
+ List<AgendaItem> items = new ArrayList<AgendaItem>(6);
public ItemsTable(Object section_, Object table_)
{
@@ -963,12 +963,12 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
for (int i = 0; i < _allItems.size(); i++)
{
- item = (XTextRange) _allItems.get(i);
+ item = _allItems.get(i);
Object t = Helper.getUnoPropertyValue(item, "TextTable");
if ((t instanceof Any) && ((Any) t).getObject() == table)
{
iText = item.getString().toLowerCase().trim();
- ai = (AgendaItem) itemsCache.get(item.getString().toLowerCase().trim());
+ ai = itemsCache.get(item.getString().toLowerCase().trim());
if (ai != null)
{
items.add(ai);
@@ -1023,7 +1023,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
*/
for (int i = 0; i < items.size(); i++)
{
- ai = (AgendaItem) items.get(i);
+ ai = items.get(i);
if (isShowItem(ai.name))
{
visible = true;
@@ -1119,21 +1119,21 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
/**
* A List of Cell Formatters for the first row.
*/
- List firstRowFormat = new ArrayList();
+ List<TableCellFormatter> firstRowFormat = new ArrayList<TableCellFormatter>();
/**
* A List of Cell Formatters for the last row.
* (will contain them in reverse order)
*/
- List lastRowFormat = new ArrayList();
+ List<TableCellFormatter> lastRowFormat = new ArrayList<TableCellFormatter>();
/**
* the format of the cell of each topic cell.
*/
- List topicCellFormats = new ArrayList();
+ List<TableCellFormatter> topicCellFormats = new ArrayList<TableCellFormatter>();
/**
* for each topic cell there is
* a member in this vector
*/
- List topicCells = new ArrayList();
+ List<AgendaElement> topicCells = new ArrayList<AgendaElement>();
int rowsPerTopic;
/**
* fields which hold the number of the
@@ -1151,7 +1151,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* empty strings for topics which were written (though any other
* object would also do - i check only if it is a null or not...);
*/
- List writtenTopics = new ArrayList();
+ List<String> writtenTopics = new ArrayList<String>();
/**
* Analyze the structure of the Topics table.
@@ -1175,7 +1175,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
{
Object t;
- Map topicItems = new HashMap(4);
+ Map<String, AgendaElement> topicItems = new HashMap<String, AgendaElement>(4);
// This is the topics table. say hallo :-)
try
@@ -1198,13 +1198,13 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* cell by cell, I check in this map to know
* if a cell contains a <*> or not.
*/
- HashMap items = new HashMap();
+ HashMap<Object, XTextRange> items = new HashMap<Object, XTextRange>();
XTextRange item;
Object cell;
for (int i = 0; i < _allItems.size(); i++)
{
- item = (XTextRange) _allItems.get(i);
+ item = _allItems.get(i);
t = Helper.getUnoPropertyValue(item, "TextTable");
if ((t instanceof Any) && ((Any) t).getObject() == table)
{
@@ -1240,7 +1240,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
// if the cell contains a relevant <...>
// i add the text element to the hash,
// so it's text can be updated later.
- range = (XTextRange) items.get(cell);
+ range = items.get(cell);
if (range != null)
{
topicItems.put(xTextRange.getString().toLowerCase().trim(), ae);
@@ -1325,7 +1325,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
for (int i = 0; i < topicCells.size(); i++)
{
- ((AgendaElement) topicCells.get(i)).write(table.getCellByName(cursor.getRangeName()));
+ topicCells.get(i).write(table.getCellByName(cursor.getRangeName()));
cursor.goRight((short) 1, false);
}
@@ -1407,7 +1407,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
XCell xc = table.getCellByName(cursor.getRangeName());
// and write it !
te.write(xc);
- ((TableCellFormatter) topicCellFormats.get(cursorMoves)).format(xc);
+ topicCellFormats.get(cursorMoves).format(xc);
}
}
}
@@ -1447,13 +1447,13 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* Writes all the topics to thetopics table.
* @param topicsData a List containing all Topic's Data.
*/
- public void writeAll(List topicsData)
+ public void writeAll(List<PropertyValue[]> topicsData)
{
try
{
for (int i = 0; i < topicsData.size() - 1; i++)
{
- write2(i, (PropertyValue[]) topicsData.get(i));
+ write2(i, topicsData.get(i));
}
formatLastRow();
}
@@ -1550,11 +1550,11 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data
* @param formats a List containing TableCellFormatter objects. Each will format one cell in the direction specified.
* @param reverse if true the cursor will move left, formatting in reverse order (used for the last row).
*/
- private void formatTable(XTextTableCursor cursor, List formats, boolean reverse)
+ private void formatTable(XTextTableCursor cursor, List<TableCellFormatter> formats, boolean reverse)
{
for (int i = 0; i < formats.size(); i++)
{
- ((TableCellFormatter) formats.get(i)).format(table.getCellByName(cursor.getRangeName()));
+ formats.get(i).format(table.getCellByName(cursor.getRangeName()));
if (reverse)
{
cursor.goLeft((short) 1, false);
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
index 52b053c1047e..318a607c678e 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java
@@ -131,7 +131,7 @@ public class AgendaWizardDialogImpl extends AgendaWizardDialog
agendaTemplate = new AgendaTemplate(xMSF, agenda, resources, this);
initializeTemplates();
- agendaTemplate.load(agendaTemplates[1][agenda.cp_AgendaType] , new ArrayList());
+ agendaTemplate.load(agendaTemplates[1][agenda.cp_AgendaType] , new ArrayList<PropertyValue[]>());
// build the dialog.
buildStep1();
diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.java b/wizards/com/sun/star/wizards/agenda/TopicsControl.java
index 3a2a10972565..b8bc07d12948 100644
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.java
+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.java
@@ -408,8 +408,8 @@ public class TopicsControl extends ControlScroller implements XFocusListener
lockDoc();
for (int i = lastFocusRow; i < scrollfields.size() - 1; i++)
{
- PropertyValue[] pv1 = (PropertyValue[]) scrollfields.get(i);
- PropertyValue[] pv2 = (PropertyValue[]) scrollfields.get(i + 1);
+ PropertyValue[] pv1 = scrollfields.get(i);
+ PropertyValue[] pv2 = scrollfields.get(i + 1);
pv1[1].Value = pv2[1].Value;
pv1[2].Value = pv2[2].Value;
pv1[3].Value = pv2[3].Value;
@@ -439,8 +439,8 @@ public class TopicsControl extends ControlScroller implements XFocusListener
insertRowAtEnd();
for (int i = scrollfields.size() - 2; i > lastFocusRow; i--)
{
- PropertyValue[] pv1 = (PropertyValue[]) scrollfields.get(i);
- PropertyValue[] pv2 = (PropertyValue[]) scrollfields.get(i - 1);
+ PropertyValue[] pv1 = scrollfields.get(i);
+ PropertyValue[] pv2 = scrollfields.get(i - 1);
pv1[1].Value = pv2[1].Value;
pv1[2].Value = pv2[2].Value;
pv1[3].Value = pv2[3].Value;
@@ -453,7 +453,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
// after rotating all the properties from this row on,
// we clear the row, so it is practically a new one...
- PropertyValue[] pv1 = (PropertyValue[]) scrollfields.get(lastFocusRow);
+ PropertyValue[] pv1 = scrollfields.get(lastFocusRow);
pv1[1].Value = PropertyNames.EMPTY_STRING;
pv1[2].Value = PropertyNames.EMPTY_STRING;
pv1[3].Value = PropertyNames.EMPTY_STRING;
@@ -636,7 +636,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
{
if (topic < scrollfields.size())
{
- return (PropertyValue[]) scrollfields.get(topic);
+ return scrollfields.get(topic);
}
else
{
@@ -818,8 +818,8 @@ public class TopicsControl extends ControlScroller implements XFocusListener
*/
private void switchRows(int row1, int row2)
{
- PropertyValue[] o1 = (PropertyValue[]) scrollfields.get(row1 + nscrollvalue);
- PropertyValue[] o2 = (PropertyValue[]) scrollfields.get(row2 + nscrollvalue);
+ PropertyValue[] o1 = scrollfields.get(row1 + nscrollvalue);
+ PropertyValue[] o2 = scrollfields.get(row2 + nscrollvalue);
Object temp = null;
for (int i = 1; i < o1.length; i++)
@@ -961,7 +961,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
*/
private void updateDocumentRow(int row)
{
- updateDocumentRow(row, (PropertyValue[]) scrollfields.get(row));
+ updateDocumentRow(row, scrollfields.get(row));
}
/**
@@ -1022,7 +1022,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener
* needed to make this data poblic.
* @return the List containing the topics data.
*/
- public List getTopicsData()
+ public List<PropertyValue[]> getTopicsData()
{
return scrollfields;
}
diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.java b/wizards/com/sun/star/wizards/common/ConfigGroup.java
index 97d38019fb4d..4a48caa464d2 100644
--- a/wizards/com/sun/star/wizards/common/ConfigGroup.java
+++ b/wizards/com/sun/star/wizards/common/ConfigGroup.java
@@ -52,7 +52,7 @@ public class ConfigGroup implements ConfigNode
{
String propertyName = field.getName().substring(prefix.length());
//System.out.println("Going to save:" + propertyName);
- Class fieldType = field.getType();
+ Class<?> fieldType = field.getType();
if (ConfigNode.class.isAssignableFrom(fieldType))
{
Object childView = Configuration.addConfigNode(configView, propertyName);
@@ -127,7 +127,7 @@ public class ConfigGroup implements ConfigNode
{
String propertyName = field.getName().substring(prefix.length());
- Class fieldType = field.getType();
+ Class<?> fieldType = field.getType();
if (ConfigNode.class.isAssignableFrom(fieldType))
{
ConfigNode child = (ConfigNode) field.get(this);
diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.java b/wizards/com/sun/star/wizards/common/ConfigSet.java
index 7971551e78f0..334f0c610c53 100644
--- a/wizards/com/sun/star/wizards/common/ConfigSet.java
+++ b/wizards/com/sun/star/wizards/common/ConfigSet.java
@@ -32,9 +32,9 @@ import org.w3c.dom.*;
public class ConfigSet implements ConfigNode, XMLProvider, ListModel
{
- private Class childClass;
- private Map childrenMap = new HashMap();
- private List childrenList = new ArrayList();
+ private Class<?> childClass;
+ private Map<String, Object> childrenMap = new HashMap<String, Object>();
+ private List<Object> childrenList = new ArrayList<Object>();
public Object root;
/**
* After reading the configuration set items,
@@ -48,7 +48,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel
/** Utility field used by event firing mechanism. */
private javax.swing.event.EventListenerList listenerList = null;
- public ConfigSet(Class childType)
+ public ConfigSet(Class<?> childType)
{
childClass = childType;
}
@@ -236,10 +236,10 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel
public Object getKey(Object object)
{
- for (Iterator i = childrenMap.entrySet().iterator(); i.hasNext();)
+ for (Iterator<Map.Entry<String,Object>> i = childrenMap.entrySet().iterator(); i.hasNext();)
{
- Map.Entry me = (Map.Entry) i.next();
+ Map.Entry<String,Object> me = i.next();
if (me.getValue() == object)
{
return me.getKey();
@@ -377,7 +377,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel
return childrenList.size();
}
- public Set keys()
+ public Set<String> keys()
{
return childrenMap.keySet();
}
@@ -404,7 +404,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel
* to a vector, ordered by there index property
*/
String[] names = Configuration.getChildrenNames(confView);
- ArrayList v = new ArrayList(names.length);
+ ArrayList<Object> v = new ArrayList<Object>(names.length);
Object member = null;
int index = 0;
for (int i = 0; i < names.length; i++)
@@ -436,7 +436,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel
}
- public void sort(Comparator comparator)
+ public void sort(Comparator<Object> comparator)
{
Collections.sort(this.childrenList, comparator);
}
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java
index c13bae131a80..9ec373a29e8e 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -402,11 +402,11 @@ public class FileAccess
return ResultPath;
}
**/
- public static void combinePaths(XMultiServiceFactory xMSF, ArrayList _aFirstPath, String _sSecondPath) throws NoValidPathException
+ public static void combinePaths(XMultiServiceFactory xMSF, ArrayList<String> _aFirstPath, String _sSecondPath) throws NoValidPathException
{
for (int i = 0; i < _aFirstPath.size(); ++i)
{
- String sOnePath = (String) _aFirstPath.get(i);
+ String sOnePath = _aFirstPath.get(i);
sOnePath = addPath(sOnePath, _sSecondPath);
if (isPathValid(xMSF, sOnePath))
{
@@ -658,7 +658,7 @@ public class FileAccess
return sNewPath;
}
- public static String getPathFromList(XMultiServiceFactory xMSF, ArrayList _aList, String _sFile)
+ public static String getPathFromList(XMultiServiceFactory xMSF, ArrayList<String> _aList, String _sFile)
{
String sFoundFile = PropertyNames.EMPTY_STRING;
try
@@ -668,7 +668,7 @@ public class FileAccess
for (int i = 0; i < _aList.size(); i++)
{
- String sPath = (String) _aList.get(i);
+ String sPath = _aList.get(i);
sPath = addPath(sPath, _sFile);
if (xSimpleFileAccess.exists(sPath))
{
@@ -690,7 +690,7 @@ public class FileAccess
* @return
* @throws com.sun.star.wizards.common.NoValidPathException
*/
- public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String _sStartFilterName, ArrayList FolderNames)
+ public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String _sStartFilterName, ArrayList<String> FolderNames)
throws NoValidPathException
{
return getFolderTitles(xMSF, _sStartFilterName, FolderNames, PropertyNames.EMPTY_STRING);
@@ -713,7 +713,7 @@ public class FileAccess
return sTitle;
}
- public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String _sStartFilterName, ArrayList FolderName, String _sEndFilterName)
+ public static String[][] getFolderTitles(com.sun.star.lang.XMultiServiceFactory xMSF, String _sStartFilterName, ArrayList<String> FolderName, String _sEndFilterName)
throws NoValidPathException
{
String[][] LocLayoutFiles = new String[2][]; //{PropertyNames.EMPTY_STRING,PropertyNames.EMPTY_STRING}{PropertyNames.EMPTY_STRING};
@@ -738,7 +738,7 @@ public class FileAccess
for (int j = 0; j < FolderName.size(); j++)
{
- String sFolderName = (String) FolderName.get(j);
+ String sFolderName = FolderName.get(j);
try
{
diff --git a/wizards/com/sun/star/wizards/common/Helper.java b/wizards/com/sun/star/wizards/common/Helper.java
index 1306784f8e7b..8dfc4c98691a 100644
--- a/wizards/com/sun/star/wizards/common/Helper.java
+++ b/wizards/com/sun/star/wizards/common/Helper.java
@@ -110,7 +110,7 @@ public class Helper
throw new RuntimeException();
}
- public static Object getUnoPropertyValue(Object oUnoObject, String PropertyName, java.lang.Class xClass)
+ public static Object getUnoPropertyValue(Object oUnoObject, String PropertyName, java.lang.Class<?> xClass)
{
try
{
@@ -157,7 +157,7 @@ public class Helper
return null;
}
- public static Object getPropertyValuefromAny(Object[] CurPropertyValue, String PropertyName, java.lang.Class xClass)
+ public static Object getPropertyValuefromAny(Object[] CurPropertyValue, String PropertyName, java.lang.Class<?> xClass)
{
try
{
diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java b/wizards/com/sun/star/wizards/common/JavaTools.java
index da92a7a97c34..ad68fc8d5289 100644
--- a/wizards/com/sun/star/wizards/common/JavaTools.java
+++ b/wizards/com/sun/star/wizards/common/JavaTools.java
@@ -367,7 +367,7 @@ public class JavaTools
String[] StringArray;
if (!MainString.equals(PropertyNames.EMPTY_STRING))
{
- ArrayList StringVector = new ArrayList();
+ ArrayList<String> StringVector = new ArrayList<String>();
String LocString = null;
int iIndex;
do
@@ -501,7 +501,7 @@ public class JavaTools
};
if ((baselist != null) && (_complist != null))
{
- ArrayList retvector = new ArrayList();
+ ArrayList<String> retvector = new ArrayList<String>();
// String[] orderedcomplist = new String[_complist.length];
// System.arraycopy(_complist, 0, orderedcomplist, 0, _complist.length);
for (int i = 0; i < baselist.length; i++)
@@ -528,7 +528,7 @@ public class JavaTools
{
if (baselist.length > 0)
{
- ArrayList retvector = new ArrayList();
+ ArrayList<String[]> retvector = new ArrayList<String[]>();
for (int i = 0; i < baselist.length; i++)
{
String sValue = baselist[i][_compindex];
@@ -718,7 +718,7 @@ public class JavaTools
public static String[] removefromList(String[] _sbaselist, String[] _sdellist)
{
- ArrayList tempbaselist = new ArrayList();
+ ArrayList<String> tempbaselist = new ArrayList<String>();
for (int i = 0; i < _sbaselist.length; i++)
{
if (FieldInList(_sdellist, _sbaselist[i]) == -1)
diff --git a/wizards/com/sun/star/wizards/common/NamedValueCollection.java b/wizards/com/sun/star/wizards/common/NamedValueCollection.java
index c6226cb83770..0f04d0c89a09 100644
--- a/wizards/com/sun/star/wizards/common/NamedValueCollection.java
+++ b/wizards/com/sun/star/wizards/common/NamedValueCollection.java
@@ -65,13 +65,12 @@ public class NamedValueCollection
return i_default;
}
- @SuppressWarnings("unchecked")
- public final < T extends XInterface > T queryOrDefault( final String i_key, final T i_default, Class i_interfaceClass )
+ public final < T extends XInterface > T queryOrDefault( final String i_key, final T i_default, Class<T> i_interfaceClass )
{
if ( m_values.containsKey( i_key ) )
{
final Object value = m_values.get( i_key );
- return (T)UnoRuntime.queryInterface( i_interfaceClass, value );
+ return UnoRuntime.queryInterface( i_interfaceClass, value );
}
return i_default;
}
diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java
index d0df9e0d79ca..140cab96e131 100644
--- a/wizards/com/sun/star/wizards/common/NumericalHelper.java
+++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java
@@ -1401,7 +1401,7 @@ public class NumericalHelper
TypeObject destObject = new TypeObject();
Object array = sourceObject.aValue;
destObject.iType = ARRAY_TYPE;
- Class c = array.getClass();
+ Class<?> c = array.getClass();
Object[] aShortVal = null;
if (c.equals(byte[].class))
{
diff --git a/wizards/com/sun/star/wizards/common/Properties.java b/wizards/com/sun/star/wizards/common/Properties.java
index e367cf4690ce..1d310957f58b 100644
--- a/wizards/com/sun/star/wizards/common/Properties.java
+++ b/wizards/com/sun/star/wizards/common/Properties.java
@@ -33,7 +33,7 @@ import java.util.*;
* When finished, call the getProperties() method to get an array of the set properties.
* @author rp
*/
-public class Properties extends HashMap
+public class Properties extends HashMap<String,Object>
{
public static Object getPropertyValue(PropertyValue[] props, String propName)
@@ -65,19 +65,19 @@ public class Properties extends HashMap
return getProperties(this);
}
- public static PropertyValue[] getProperties(Map map)
+ public static PropertyValue[] getProperties(Map<String,Object> map)
{
PropertyValue[] pv = new PropertyValue[map.size()];
- Iterator it = map.keySet().iterator();
+ Iterator<String> it = map.keySet().iterator();
for (int i = 0; i < pv.length; i++)
{
- pv[i] = createProperty((String) it.next(), map);
+ pv[i] = createProperty(it.next(), map);
}
return pv;
}
- public static PropertyValue createProperty(String name, Map map)
+ public static PropertyValue createProperty(String name, Map<String,Object> map)
{
return createProperty(name, map.get(name));
}
diff --git a/wizards/com/sun/star/wizards/common/Resource.java b/wizards/com/sun/star/wizards/common/Resource.java
index 89033d3086d3..787df1bec3f3 100644
--- a/wizards/com/sun/star/wizards/common/Resource.java
+++ b/wizards/com/sun/star/wizards/common/Resource.java
@@ -54,15 +54,15 @@ public class Resource
aArgs);
if (xResource == null)
throw new Exception("could not initialize ResourceIndexAccess");
- XNameAccess xNameAccess = (XNameAccess)UnoRuntime.queryInterface(
+ XNameAccess xNameAccess = UnoRuntime.queryInterface(
XNameAccess.class,
xResource);
if (xNameAccess == null)
throw new Exception("ResourceIndexAccess is no XNameAccess");
- this.xStringIndexAccess = (XIndexAccess)UnoRuntime.queryInterface(
+ this.xStringIndexAccess = UnoRuntime.queryInterface(
XIndexAccess.class,
xNameAccess.getByName("String"));
- this.xStringListIndexAccess = (XIndexAccess)UnoRuntime.queryInterface(
+ this.xStringListIndexAccess = UnoRuntime.queryInterface(
XIndexAccess.class,
xNameAccess.getByName("StringList"));
if(this.xStringListIndexAccess == null)
diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java
index 69b7a53645d0..6a3dc53cd38f 100644
--- a/wizards/com/sun/star/wizards/common/UCB.java
+++ b/wizards/com/sun/star/wizards/common/UCB.java
@@ -69,10 +69,10 @@ public class UCB
{
return;
}
- List l = listFiles(dir,null);
+ List<String> l = listFiles(dir,null);
for (int i = 0; i<l.size(); i++)
{
- delete(FileAccess.connectURLs(dir ,(String)l.get(i)));
+ delete(FileAccess.connectURLs(dir ,l.get(i)));
}
}
@@ -89,10 +89,10 @@ public class UCB
public void copy(String sourceDir, String targetDir, Verifier verifier) throws Exception
{
- List files = listFiles(sourceDir,verifier);
+ List<String> files = listFiles(sourceDir,verifier);
for (int i = 0; i<files.size(); i++)
{
- copy(sourceDir, (String)files.get(i), targetDir);
+ copy(sourceDir, files.get(i), targetDir);
}
}
@@ -153,7 +153,7 @@ public class UCB
return xCmdProcessor.execute(aCommand, 0, null);
}
- public List listFiles(String path, Verifier verifier) throws Exception
+ public List<String> listFiles(String path, Verifier verifier) throws Exception
{
Object xContent = getContent(path);
@@ -174,7 +174,7 @@ public class UCB
XResultSet xResultSet = xSet.getStaticResultSet();
- List files = new ArrayList();
+ List<String> files = new ArrayList<String>();
if (xResultSet.first())
{
@@ -214,7 +214,7 @@ public class UCB
return files;
}
- public Object getContentProperty(Object content, String propName, Class type)
+ public Object getContentProperty(Object content, String propName, Class<?> type)
throws Exception
{
Property[] pv = new Property[1];
diff --git a/wizards/com/sun/star/wizards/db/CommandMetaData.java b/wizards/com/sun/star/wizards/db/CommandMetaData.java
index 39a7f2373c28..b29bbd48c1e7 100644
--- a/wizards/com/sun/star/wizards/db/CommandMetaData.java
+++ b/wizards/com/sun/star/wizards/db/CommandMetaData.java
@@ -41,7 +41,7 @@ import java.util.Map;
public class CommandMetaData extends DBMetaData
{
- public Map FieldTitleSet = new HashMap();
+ public Map<String, String> FieldTitleSet = new HashMap<String, String>();
public String[] m_aAllFieldNames = new String[]
{
};
@@ -114,7 +114,7 @@ public class CommandMetaData extends DBMetaData
FieldColumns[i] = new FieldColumn(this, _FieldNames[i], _CommandName, false);
if (FieldTitleSet != null && FieldTitleSet.containsKey(_FieldNames[i]))
{
- FieldColumns[i].setFieldTitle((String) FieldTitleSet.get(_FieldNames[i]));
+ FieldColumns[i].setFieldTitle(FieldTitleSet.get(_FieldNames[i]));
if (FieldColumns[i].getFieldTitle() == null)
{
FieldColumns[i].setFieldTitle(_FieldNames[i]);
@@ -124,7 +124,7 @@ public class CommandMetaData extends DBMetaData
}
}
- public Map getFieldTitleSet()
+ public Map<String, String> getFieldTitleSet()
{
return FieldTitleSet;
}
@@ -157,7 +157,7 @@ public class CommandMetaData extends DBMetaData
// @SuppressWarnings("unchecked")
public void prependSortFieldNames(String[] _fieldnames)
{
- ArrayList aSortFields = new ArrayList();
+ ArrayList<String[]> aSortFields = new ArrayList<String[]>();
for (int i = 0; i < _fieldnames.length; i++)
{
String[] sSortFieldName = new String[2];
@@ -503,7 +503,7 @@ public class CommandMetaData extends DBMetaData
String FieldTitle = FieldName;
if (this.FieldTitleSet != null)
{
- FieldTitle = (String) this.FieldTitleSet.get(FieldName); //FieldTitles[TitleIndex];
+ FieldTitle = this.FieldTitleSet.get(FieldName); //FieldTitles[TitleIndex];
if (FieldTitle == null)
{
return FieldName;
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java
index 8133074e7375..f8a40fafa44a 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -87,7 +87,7 @@ public class DBMetaData
private XPropertySet xDataSourcePropertySet;
public String[] DataSourceNames;
public String[] CommandNames;
- public java.util.ArrayList CommandObjects = new ArrayList(1);
+ public java.util.ArrayList<CommandObject> CommandObjects = new ArrayList<CommandObject>(1);
public Locale aLocale;
public int[] CommandTypes;
public String DataSourceName;
@@ -240,7 +240,6 @@ public class DBMetaData
return getTableNamesAsNameAccess().hasByName(_stablename);
}
- @SuppressWarnings("unchecked")
public void setTableByName(String _tableName)
{
CommandObject oTableObject = new CommandObject(_tableName, com.sun.star.sdb.CommandType.TABLE);
@@ -262,7 +261,7 @@ public class DBMetaData
CommandObject oCommand = null;
for (int i = 0; i < CommandObjects.size(); i++)
{
- oCommand = (CommandObject) CommandObjects.get(i);
+ oCommand = CommandObjects.get(i);
if ((oCommand.Name.equals(_commandname)) && (oCommand.CommandType == _commandtype))
{
return oCommand;
@@ -962,7 +961,7 @@ public class DBMetaData
try
{
XRow xRow = UnoRuntime.queryInterface( XRow.class, _xResultSet );
- ArrayList aColVector = new ArrayList();
+ ArrayList<String> aColVector = new ArrayList<String>();
while (_xResultSet.next())
{
aColVector.add(xRow.getString(_icol));
diff --git a/wizards/com/sun/star/wizards/db/QueryMetaData.java b/wizards/com/sun/star/wizards/db/QueryMetaData.java
index 5c4f7f0f02d5..4eca49d317c8 100644
--- a/wizards/com/sun/star/wizards/db/QueryMetaData.java
+++ b/wizards/com/sun/star/wizards/db/QueryMetaData.java
@@ -219,7 +219,7 @@ public class QueryMetaData extends CommandMetaData
// this.getIncludedCommandNames(); // fills the var CommandNamesV indirectly :-(
if (FieldTitleSet == null)
{
- FieldTitleSet = new HashMap();
+ FieldTitleSet = new HashMap<String, String>();
}
String[] aCommandNames = getIncludedCommandNames();
for (int i = 0; i < aCommandNames.length; i++)
diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java
index e19f18bf8ba3..205409c8098d 100644
--- a/wizards/com/sun/star/wizards/db/RecordParser.java
+++ b/wizards/com/sun/star/wizards/db/RecordParser.java
@@ -275,7 +275,7 @@ public class RecordParser extends QueryMetaData
return getColumnValue(CurDBFieldColumn.ColIndex, CurDBFieldColumn.getFieldType());
}
- public boolean getcurrentRecordData(java.util.ArrayList DataVector)
+ public boolean getcurrentRecordData(java.util.ArrayList<Object[]> DataVector)
{
Object[] RecordValueArray = new Object[RecordFieldColumns.length];
for (int i = 0; i < RecordFieldColumns.length; i++)
diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java
index cb331fb5e872..a147b24d8594 100644
--- a/wizards/com/sun/star/wizards/db/RelationController.java
+++ b/wizards/com/sun/star/wizards/db/RelationController.java
@@ -62,7 +62,7 @@ public class RelationController extends CommandName
try
{
String[] sTableNames = super.getCommandMetaData().getTableNames();
- ArrayList aReferencedTableVector = new ArrayList();
+ ArrayList<String> aReferencedTableVector = new ArrayList<String>();
XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getExportedKeys((getCatalogName(this)), getSchemaName(), getTableName());
XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
while (xResultSet.next())
@@ -107,8 +107,8 @@ public class RelationController extends CommandName
XResultSet xResultSet = super.getCommandMetaData().xDBMetaData.getImportedKeys(getCatalogName(oLocCommandName), oLocCommandName.getSchemaName(), oLocCommandName.getTableName());
XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
boolean bleaveLoop = false;
- ArrayList aMasterFieldNamesVector = new ArrayList();
- ArrayList aSlaveFieldNamesVector = new ArrayList();
+ ArrayList<String> aMasterFieldNamesVector = new ArrayList<String>();
+ ArrayList<String> aSlaveFieldNamesVector = new ArrayList<String>();
while (xResultSet.next() && !bleaveLoop)
{
String sPrimaryCatalog = null;
diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java
index e1b12dac85fe..f4ea1a6b9d72 100644
--- a/wizards/com/sun/star/wizards/db/TableDescriptor.java
+++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java
@@ -65,8 +65,8 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
private XAppend xKeyAppend;
private XDrop xKeyDrop;
private String[] sTableFilters = null;
- private ArrayList columncontainer;
- private ArrayList keycolumncontainer;
+ private ArrayList<ColumnDescriptor> columncontainer;
+ private ArrayList<XPropertySet> keycolumncontainer;
public XHierarchicalNameAccess xTableHierarchicalNameAccess;
private CommandName ComposedTableName;
private XAppend xKeyColAppend;
@@ -84,8 +84,8 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
public TableDescriptor(XMultiServiceFactory xMSF, XWindow _xWindow, String _sColumnAlreadyExistsMessage)
{
super(xMSF);
- columncontainer = new ArrayList();
- keycolumncontainer = new ArrayList();
+ columncontainer = new ArrayList<ColumnDescriptor>();
+ keycolumncontainer = new ArrayList<XPropertySet>();
sColumnAlreadyExistsMessage = _sColumnAlreadyExistsMessage;
xWindow = _xWindow;
}
@@ -267,7 +267,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
for (int i = 0; i < keycolumncontainer.size(); i++)
{
- XPropertySet xKeyColPropertySet = (XPropertySet) keycolumncontainer.get(i);
+ XPropertySet xKeyColPropertySet = keycolumncontainer.get(i);
if (!isColunnNameDuplicate(xKeyColumnSupplier.getColumns(), xKeyColPropertySet))
{
xKeyColAppend.appendByDescriptor(xKeyColPropertySet);
@@ -402,7 +402,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
for (int i = 0; i < columncontainer.size(); i++)
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) columncontainer.get(i);
+ ColumnDescriptor oColumnDescriptor = columncontainer.get(i);
if (oColumnDescriptor.Name.equals(_sname))
{
oColumnDescriptor.xColPropertySet.setPropertyValue(_spropname, _oValue);
@@ -444,7 +444,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
for (int i = 0; i < columncontainer.size(); i++)
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) columncontainer.get(i);
+ ColumnDescriptor oColumnDescriptor = columncontainer.get(i);
if (oColumnDescriptor.Name.equals(_sname))
{
oColumnDescriptor.xColPropertySet = _xColPropertySet;
@@ -471,7 +471,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
for (int i = 0; i < columncontainer.size(); i++)
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) columncontainer.get(i);
+ ColumnDescriptor oColumnDescriptor = columncontainer.get(i);
if (oColumnDescriptor != null)
{
if (oColumnDescriptor.Name.equals(_sname))
@@ -497,7 +497,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
String[] fieldnames = new String[columncontainer.size()];
for (int i = 0; i < columncontainer.size(); i++)
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) columncontainer.get(i);
+ ColumnDescriptor oColumnDescriptor = columncontainer.get(i);
fieldnames[i] = oColumnDescriptor.Name;
}
return fieldnames;
@@ -520,7 +520,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
for (int i = 0; i < columncontainer.size(); i++)
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) columncontainer.get(i);
+ ColumnDescriptor oColumnDescriptor = columncontainer.get(i);
if (oColumnDescriptor.Name.equals(_fieldname))
{
return true;
@@ -543,7 +543,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
for (int i = 0; i < columncontainer.size(); i++)
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) columncontainer.get(i);
+ ColumnDescriptor oColumnDescriptor = columncontainer.get(i);
if (oColumnDescriptor.Name.equals(_fieldname))
{
return oColumnDescriptor;
@@ -577,7 +577,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
if (columncontainer.size() > _index)
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) columncontainer.get(_index);
+ ColumnDescriptor oColumnDescriptor = columncontainer.get(_index);
return oColumnDescriptor.xColPropertySet;
}
}
@@ -638,7 +638,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
{
try
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) this.columncontainer.get(_nOldIndex);
+ ColumnDescriptor oColumnDescriptor = this.columncontainer.get(_nOldIndex);
this.columncontainer.remove(_nOldIndex);
columncontainer.add(_nNewIndex, oColumnDescriptor);
return true;
@@ -712,12 +712,12 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen
public String[] getNonBinaryFieldNames()
{
- ArrayList NonBinaryFieldNameVector = new ArrayList();
+ ArrayList<String> NonBinaryFieldNameVector = new ArrayList<String>();
try
{
for (int i = 0; i < columncontainer.size(); i++)
{
- ColumnDescriptor oColumnDescriptor = (ColumnDescriptor) columncontainer.get(i);
+ ColumnDescriptor oColumnDescriptor = columncontainer.get(i);
XPropertySet xColPropertySet = getByName(oColumnDescriptor.Name);
Property[] aProperties = xColPropertySet.getPropertySetInfo().getProperties();
int itype;
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
index 42f3ddc2c946..d5c2cd0304ad 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
@@ -71,8 +71,8 @@ public class FaxWizardDialogImpl extends FaxWizardDialog
XTextDocument xTextDocument;
PathSelection myPathSelection;
CGFaxWizard myConfig;
- ArrayList mainDA = new ArrayList();
- ArrayList faxDA = new ArrayList();
+ ArrayList<DataAware> mainDA = new ArrayList<DataAware>();
+ ArrayList<DataAware> faxDA = new ArrayList<DataAware>();
String[][] BusinessFiles;
String[][] PrivateFiles;
String sTemplatePath;
diff --git a/wizards/com/sun/star/wizards/form/FormDocument.java b/wizards/com/sun/star/wizards/form/FormDocument.java
index 974b74551702..2ae46232c9e8 100644
--- a/wizards/com/sun/star/wizards/form/FormDocument.java
+++ b/wizards/com/sun/star/wizards/form/FormDocument.java
@@ -49,7 +49,7 @@ import com.sun.star.wizards.text.ViewHandler;
public class FormDocument extends TextDocument
{
- protected ArrayList oControlForms = new ArrayList();
+ protected ArrayList<ControlForm> oControlForms = new ArrayList<ControlForm>();
protected CommandMetaData oMainFormDBMetaData;
protected CommandMetaData oSubFormDBMetaData;
protected String[][] LinkFieldNames;
@@ -158,9 +158,9 @@ public class FormDocument extends TextDocument
else
{
oFormHandler.removeControlsofForm(SOMAINFORM);
- ((ControlForm) oControlForms.get(0)).oFormController = null;
+ oControlForms.get(0).oFormController = null;
}
- ((ControlForm) oControlForms.get(0)).initialize(curUIControlArranger.getSelectedArrangement(0), _NBorderType);
+ oControlForms.get(0).initialize(curUIControlArranger.getSelectedArrangement(0), _NBorderType);
}
if (_bShouldHaveSubForm)
{
@@ -177,21 +177,21 @@ public class FormDocument extends TextDocument
if (oControlForms.size() > 1)
{
oFormHandler.removeControlsofForm(SOSUBFORM);
- ((ControlForm) oControlForms.get(1)).oFormController = null;
- ((ControlForm) oControlForms.get(1)).initialize(curUIControlArranger.getSelectedArrangement(1), _NBorderType);
+ oControlForms.get(1).oFormController = null;
+ oControlForms.get(1).initialize(curUIControlArranger.getSelectedArrangement(1), _NBorderType);
}
}
}
else
{
- ControlForm aMainForm = (ControlForm) oControlForms.get(0);
+ ControlForm aMainForm = oControlForms.get(0);
// boolean bHasSubForm = aMainForm.xFormContainer.hasByName(SOSUBFORM);
// WRONG if (oFormHandler.hasFormByName(SOSUBFORM))
if (aMainForm.xFormContainer != null && aMainForm.xFormContainer.hasByName(SOSUBFORM))
{
oFormHandler.removeControlsofForm(SOSUBFORM);
oFormHandler.removeElement( aMainForm.xFormContainer, SOSUBFORM );
- ((ControlForm) oControlForms.get(1)).oFormController = null;
+ oControlForms.get(1).oFormController = null;
// aMainForm.xFormContainer = null; // .removeFormByName(SOSUBFORM);
oControlForms.remove(1);
adjustMainFormSize(_NBorderType);
@@ -231,20 +231,20 @@ public class FormDocument extends TextDocument
// int nSubFormHeight = (int) ((double)nFormHeight/2) - SOFORMGAP;
// int nSubFormFieldCount = this.oSubFormDBMetaData.FieldNames.length;
// int totfieldcount = oMainFormDBMetaData.FieldNames.length + nSubFormFieldCount;
- int nMainFormHeight = ((ControlForm) oControlForms.get(0)).getActualFormHeight();
+ int nMainFormHeight = oControlForms.get(0).getActualFormHeight();
return new Size(nFormWidth, nFormHeight - nMainFormHeight - SOFORMGAP);
}
private Point getSubFormPoint()
{
- ControlForm curMainControlForm = ((ControlForm) oControlForms.get(0));
+ ControlForm curMainControlForm = oControlForms.get(0);
return new Point(curMainControlForm.aStartPoint.X,
(curMainControlForm.aStartPoint.Y + curMainControlForm.getFormSize().Height + SOFORMGAP));
}
private void adjustMainFormSize(Short _NBorderType)
{
- ControlForm oMainControlForm = (ControlForm) oControlForms.get(0);
+ ControlForm oMainControlForm = oControlForms.get(0);
oMainControlForm.setFormSize(getMainFormSize(oMainControlForm.curArrangement));
if (oMainControlForm.curArrangement == FormWizard.AS_GRID)
{
@@ -261,8 +261,8 @@ public class FormDocument extends TextDocument
private void adjustSubFormPosSize(Short _NBorderType)
{
- ControlForm oMainControlForm = (ControlForm) oControlForms.get(0);
- ControlForm oSubControlForm = (ControlForm) oControlForms.get(1);
+ ControlForm oMainControlForm = oControlForms.get(0);
+ ControlForm oSubControlForm = oControlForms.get(1);
oSubControlForm.setFormSize(new Size(nFormWidth, nFormHeight - oMainControlForm.getFormSize().Height));
if (oSubControlForm.curArrangement == FormWizard.AS_GRID)
{
@@ -284,7 +284,7 @@ public class FormDocument extends TextDocument
{
for (int i = 0; i < oControlForms.size(); i++)
{
- ControlForm curControlForm = ((ControlForm) oControlForms.get(i));
+ ControlForm curControlForm = oControlForms.get(i);
if (curControlForm.Name.equals(_sname))
{
return curControlForm;
@@ -369,7 +369,7 @@ public class FormDocument extends TextDocument
Name = _sname;
if (_sname.equals(SOSUBFORM))
{
- ControlForm oMainControlForm = ((ControlForm) oControlForms.get(0));
+ ControlForm oMainControlForm = oControlForms.get(0);
xFormContainer = oFormHandler.insertFormbyName(_sname, oMainControlForm.xFormContainer);
}
else
@@ -426,7 +426,7 @@ public class FormDocument extends TextDocument
}
if ((Name.equals(SOMAINFORM)) && (oControlForms.size() > 1))
{
- ControlForm curSubControlForm = ((ControlForm) oControlForms.get(1));
+ ControlForm curSubControlForm = oControlForms.get(1);
if (curSubControlForm != null)
{
adjustSubFormPosSize(_NBorderType);
diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java
index 433384cfecb1..b3424cec3bfc 100644
--- a/wizards/com/sun/star/wizards/form/StyleApplier.java
+++ b/wizards/com/sun/star/wizards/form/StyleApplier.java
@@ -280,7 +280,7 @@ public class StyleApplier
}
for (int m = 0; m < curFormDocument.oControlForms.size(); m++)
{
- FormDocument.ControlForm curControlForm = ((FormDocument.ControlForm) curFormDocument.oControlForms.get(m));
+ FormDocument.ControlForm curControlForm = curFormDocument.oControlForms.get(m);
if (curControlForm.getArrangemode() == FormWizard.AS_GRID)
{
GridControl oGridControl = curControlForm.getGridControl();
@@ -438,7 +438,7 @@ public class StyleApplier
{
for (int m = 0; m < curFormDocument.oControlForms.size(); m++)
{
- FormDocument.ControlForm curControlForm = ((FormDocument.ControlForm) curFormDocument.oControlForms.get(m));
+ FormDocument.ControlForm curControlForm = curFormDocument.oControlForms.get(m);
if (curControlForm.getArrangemode() == FormWizard.AS_GRID)
{
if (_iStyleColors[SOLABELTEXTCOLOR] > -1)
diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java
index dd238cb6d001..08efc4dea404 100644
--- a/wizards/com/sun/star/wizards/form/UIControlArranger.java
+++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java
@@ -207,7 +207,7 @@ public class UIControlArranger
short iAlignValue = getAlignValue();
for (int m = 0; m < curFormDocument.oControlForms.size(); m++)
{
- FormDocument.ControlForm curControlForm = (FormDocument.ControlForm) curFormDocument.oControlForms.get(m);
+ FormDocument.ControlForm curControlForm = curFormDocument.oControlForms.get(m);
if (curControlForm.getArrangemode() == FormWizard.COLUMNAR_LEFT)
{
Control[] LabelControls = curControlForm.getLabelControls();
@@ -443,7 +443,7 @@ public class UIControlArranger
enableAlignControlGroup(bEnableAlignControlGroup);
final Short nBorderType = CurUnoDialog.getBorderType();
final int nSelected = m_aButtonList.getSelected() + 1;
- ((FormDocument.ControlForm) curFormDocument.oControlForms.get(formindex)).initialize(nSelected, nBorderType);
+ curFormDocument.oControlForms.get(formindex).initialize(nSelected, nBorderType);
}
}
catch (RuntimeException e)
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
index 4f2fb72d23e8..6adfc6ea3c6c 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
@@ -91,9 +91,9 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
XTextDocument xTextDocument;
PathSelection myPathSelection;
CGLetterWizard myConfig;
- ArrayList mainDA = new ArrayList();
- ArrayList letterDA = new ArrayList();
- ArrayList businessDA = new ArrayList();
+ ArrayList<DataAware> mainDA = new ArrayList<DataAware>();
+ ArrayList<DataAware> letterDA = new ArrayList<DataAware>();
+ ArrayList<DataAware> businessDA = new ArrayList<DataAware>();
String[][] BusinessFiles;
String[][] OfficialFiles;
String[][] PrivateFiles;
@@ -1132,7 +1132,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
{
PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING
};
- ArrayList allPaths = new ArrayList();
+ ArrayList<String> allPaths = new ArrayList<String>();
String sLetterSubPath = "/wizard/letter/";
try
@@ -1176,7 +1176,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
e.printStackTrace();
}
- ArrayList StringsVector = new ArrayList();
+ ArrayList<Strings> StringsVector = new ArrayList<Strings>();
String[] LanguageLabels;
@@ -1218,20 +1218,20 @@ public class LetterWizardDialogImpl extends LetterWizardDialog
}
}
- Collections.sort(StringsVector, new Comparator() {
- public int compare(Object a, Object b) {
- return ((Strings)a).LanguageLabel.compareTo(((Strings)b).LanguageLabel);
- }
- });
+ Collections.sort(StringsVector, new Comparator<Strings>() {
+ public int compare(Strings a, Strings b) {
+ return a.LanguageLabel.compareTo(b.LanguageLabel);
+ }
+ });
Norms = new String[StringsVector.size()];
NormPaths = new String[StringsVector.size()];
LanguageLabels = new String[StringsVector.size()];
for(int i = 0; i<StringsVector.size(); i++) {
- Norms[i] = ((Strings)StringsVector.get(i)).Norm;
- NormPaths[i] = ((Strings)StringsVector.get(i)).NormPath;
- LanguageLabels[i] = ((Strings)StringsVector.get(i)).LanguageLabel;
+ Norms[i] = StringsVector.get(i).Norm;
+ NormPaths[i] = StringsVector.get(i).NormPath;
+ LanguageLabels[i] = StringsVector.get(i).LanguageLabel;
}
setControlProperty("lstLetterNorm", PropertyNames.STRING_ITEM_LIST, LanguageLabels);
diff --git a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java
index 0e5e016fab54..18afc19732eb 100644
--- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java
+++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java
@@ -31,7 +31,7 @@ public class GroupFieldHandler extends FieldSelection
{
private IReportDocument CurReportDocument;
- private ArrayList GroupFieldVector = new ArrayList();
+ private ArrayList<String> GroupFieldVector = new ArrayList<String>();
private QueryMetaData CurDBMetaData;
private WizardDialog oWizardDialog;
private static final short MAXSELFIELDS = 4;
@@ -76,8 +76,8 @@ public class GroupFieldHandler extends FieldSelection
{
try
{
- ArrayList NormalFieldsVector = new ArrayList();
- ArrayList SelFieldsVector = new ArrayList();
+ ArrayList<String> NormalFieldsVector = new ArrayList<String>();
+ ArrayList<String> SelFieldsVector = new ArrayList<String>();
String[] sFieldNames = CurDBMetaData.getFieldNames();
for (int i = 0; i < sFieldNames.length; i++)
{
diff --git a/wizards/com/sun/star/wizards/report/IReportDocument.java b/wizards/com/sun/star/wizards/report/IReportDocument.java
index 1e8d2b8b8b94..1ef0e9300847 100644
--- a/wizards/com/sun/star/wizards/report/IReportDocument.java
+++ b/wizards/com/sun/star/wizards/report/IReportDocument.java
@@ -119,7 +119,7 @@ public interface IReportDocument
* @param iSelCount
* @return
*/
- public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList GroupFieldVector, ArrayList ReportPath, int iSelCount);
+ public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList<String> GroupFieldVector, ArrayList<String> ReportPath, int iSelCount);
public void refreshGroupFields(String[] _sNewNames);
// public boolean isGroupField(String _FieldName);
@@ -129,7 +129,7 @@ public interface IReportDocument
* @param CurGroupTitle
* @param GroupFieldVector
*/
- public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, java.util.ArrayList GroupFieldVector);
+ public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, java.util.ArrayList<String> GroupFieldVector);
/**
* set the list how to group
@@ -152,7 +152,7 @@ public interface IReportDocument
public int getDefaultPageOrientation();
- public ArrayList getReportPath();
+ public ArrayList<String> getReportPath();
public String getLayoutPath();
diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java
index 78140cb52d9f..b65d67e0a405 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java
@@ -47,7 +47,7 @@ import com.sun.star.wizards.document.FormHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
-class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implements Comparator
+class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implements Comparator<FieldColumn>
{
private static final String ISLANDSCAPE = "IsLandscape";
@@ -61,7 +61,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
private int PageWidth;
private Rectangle PosSize;
// private String ReportFolderName;
- public ArrayList DBColumnsVector;
+ public ArrayList<DBColumn> DBColumnsVector;
private RecordTable CurRecordTable;
private String sMsgTableNotExisting;
private String sMsgCommonReportError;
@@ -108,7 +108,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
oTextStyleHandler = new TextStyleHandler(xMSFDoc, xTextDocument);
oViewHandler = new ViewHandler(xMSFDoc, xTextDocument);
oTextFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument);
- DBColumnsVector = new java.util.ArrayList();
+ DBColumnsVector = new java.util.ArrayList<DBColumn>();
oNumberFormatter = oTextTableHandler.getNumberFormatter();
// CurDBMetaData = new RecordParser(xMSF); //, CharLocale, oNumberFormatter);
CurDBMetaData = _aRecordParser;
@@ -348,7 +348,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
int nSize = DBColumnsVector.size();
for (int i = 0; i < nSize; i++)
{
- DBColumn CurDBColumn = (DBColumn) DBColumnsVector.get(i);
+ DBColumn CurDBColumn = DBColumnsVector.get(i);
String sFieldName = CurDBColumn.CurDBField.getFieldName();
if (!sFieldName.equals(_sNewNames[i]))
{
@@ -368,7 +368,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
int FieldCount = CurDBMetaData.getFieldNames().length;
for (int i = GroupCount; i < FieldCount; i++)
{
- ((DBColumn) DBColumnsVector.get(i)).insertColumnData(oTextFieldHandler, this.bIsCurLandscape);
+ DBColumnsVector.get(i).insertColumnData(oTextFieldHandler, this.bIsCurLandscape);
}
}
@@ -382,7 +382,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
for (int i = 0; i < GroupFieldCount; i++)
{
TableName = TBLGROUPSECTION + Integer.toString(i + 1);
- OldDBColumn = (DBColumn) DBColumnsVector.get(i);
+ OldDBColumn = DBColumnsVector.get(i);
CurDBColumn = new DBColumn(oTextTableHandler, CurDBMetaData, SelGroupNames[i], i, TableName, OldDBColumn);
CurDBColumn.formatValueCell();
DBColumnsVector.set(i, CurDBColumn);
@@ -415,7 +415,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
int RecordCount = CurDBMetaData.getRecordFieldNames().length;
for (int i = GroupCount; i < RecordCount; i++)
{
- ((DBColumn) DBColumnsVector.get(i)).insertColumnData(oTextFieldHandler, this.bIsCurLandscape);
+ DBColumnsVector.get(i).insertColumnData(oTextFieldHandler, this.bIsCurLandscape);
}
}
@@ -465,7 +465,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
}
}
- public boolean addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList GroupFieldVector, ArrayList ReportPath, int iSelCount)
+ public boolean addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList<String> GroupFieldVector, ArrayList<String> ReportPath, int iSelCount)
{
DBColumn CurDBColumn = null;
int GroupCount = GroupFieldVector.size();
@@ -494,7 +494,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
return (CurDBColumn != null);
}
- public void removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, java.util.ArrayList GroupFieldVector)
+ public void removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, java.util.ArrayList<String> GroupFieldVector)
{
removeGroupNamesofRecordTable(NewSelGroupNames.length + 1);
FieldColumn CurFieldColumn = CurDBMetaData.getFieldColumnByTitle(CurGroupTitle);
@@ -596,10 +596,8 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
}
}
- public int compare(Object _oObject1, Object _oObject2)
+ public int compare(FieldColumn oFieldColumn1, FieldColumn oFieldColumn2)
{
- FieldColumn oFieldColumn1 = (FieldColumn) _oObject1;
- FieldColumn oFieldColumn2 = (FieldColumn) _oObject2;
DBColumn oDBColumn1 = getDBColumnByName(oFieldColumn1.getFieldName());
DBColumn oDBColumn2 = getDBColumnByName(oFieldColumn2.getFieldName());
if (oDBColumn1.ValColumn < oDBColumn2.ValColumn)
@@ -620,7 +618,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen
{
for (int i = 0; i < DBColumnsVector.size(); i++)
{
- DBColumn oDBColumn = (DBColumn) DBColumnsVector.get(i);
+ DBColumn oDBColumn = DBColumnsVector.get(i);
if (oDBColumn.CurDBField.getFieldName().equals(_FieldName))
{
return oDBColumn;
diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
index e3dc075dfbf8..c47561f394fa 100644
--- a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
+++ b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java
@@ -109,7 +109,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
{
getDoc().oTextSectionHandler.removeAllTextSections();
getDoc().oTextTableHandler.removeAllTextTables();
- getDoc().DBColumnsVector = new ArrayList();
+ getDoc().DBColumnsVector = new ArrayList<DBColumn>();
}
protected ReportTextImplementation( XMultiServiceFactory i_serviceFactory )
@@ -351,7 +351,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
int ColIndex;
boolean breset;
Object oTable;
- ArrayList DataVector = new ArrayList();
+ ArrayList<Object[]> DataVector = new ArrayList<Object[]>();
DBColumn CurDBColumn;
Object CurGroupValue;
String CurGroupTableName;
@@ -381,7 +381,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
xGroupBaseTables[ColIndex] = UnoRuntime.queryInterface( XTextTable.class, oTable );
CurGroupValue = getRecordParser().getGroupColumnValue(ColIndex);
OldGroupFieldValues[ColIndex] = CurGroupValue;
- CurDBColumn = (DBColumn) getDoc().DBColumnsVector.get(ColIndex);
+ CurDBColumn = getDoc().DBColumnsVector.get(ColIndex);
addLinkedTextSection(xTextCursor, ReportTextDocument.GROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, CurGroupValue); //COPYOF!!!!
}
if (getRecordParser().getcurrentRecordData(DataVector))
@@ -399,7 +399,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
{
breset = true;
insertDataToRecordTable(xTextCursor, DataVector, RecordFieldCount);
- CurDBColumn = (DBColumn) getDoc().DBColumnsVector.get(ColIndex);
+ CurDBColumn = getDoc().DBColumnsVector.get(ColIndex);
addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFGROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, CurGroupValue);
OldGroupFieldValues[ColIndex] = CurGroupValue;
breset = !(ColIndex == GroupFieldCount - 1);
@@ -420,7 +420,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
{
for (ColIndex = 0; ColIndex < GroupFieldCount; ColIndex++)
{
- CurDBColumn = (DBColumn) getDoc().DBColumnsVector.get(ColIndex);
+ CurDBColumn = getDoc().DBColumnsVector.get(ColIndex);
Object oValue = PropertyNames.EMPTY_STRING;
addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFGROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, oValue);
}
@@ -450,7 +450,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
getDoc().removeLayoutTextTables();
}
- private void insertDataToRecordTable(XTextCursor xTextCursor, ArrayList DataVector, int FieldCount)
+ private void insertDataToRecordTable(XTextCursor xTextCursor, ArrayList<Object[]> DataVector, int FieldCount)
{
int DataLength = DataVector.size();
if ((FieldCount > 0) && (DataLength > 0))
@@ -491,7 +491,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
int iCount = getDoc().DBColumnsVector.size();
for (int i = 0; i < iCount; i++)
{
- CurDBColumn = (DBColumn) getDoc().DBColumnsVector.get(i);
+ CurDBColumn = getDoc().DBColumnsVector.get(i);
xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.xNameCell);
xNameCellCursor.gotoStart(false);
FieldContent = getDoc().oTextFieldHandler.getUserFieldContent(xNameCellCursor);
@@ -526,7 +526,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
}
}
- public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList GroupFieldVector, ArrayList ReportPath, int iSelCount)
+ public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList<String> GroupFieldVector, ArrayList<String> ReportPath, int iSelCount)
{
return getDoc().addGroupNametoDocument(GroupNames, CurGroupTitle, GroupFieldVector, ReportPath, iSelCount);
}
@@ -540,7 +540,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
// {
// return getDoc().isGroupField(_FieldName);
// }
- public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, ArrayList GroupFieldVector)
+ public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, ArrayList<String> GroupFieldVector)
{
getDoc().removeGroupName(NewSelGroupNames, CurGroupTitle, GroupFieldVector);
}
@@ -647,9 +647,9 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
}
// TODO: we have to change to String List!!!!
- private ArrayList m_aReportPath = null;
+ private ArrayList<String> m_aReportPath = null;
- public ArrayList getReportPath()
+ public ArrayList<String> getReportPath()
{
if (m_aReportPath == null)
{
@@ -670,10 +670,10 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
public String getContentPath()
{
- ArrayList aReportPath = getReportPath();
+ ArrayList<String> aReportPath = getReportPath();
for (int i = 0; i < aReportPath.size(); i++)
{
- String sPath = (String) aReportPath.get(i);
+ String sPath = aReportPath.get(i);
sPath += "/cnt-default.ott";
if (FileAccess.isPathValid(getMSF(), sPath))
{
@@ -685,10 +685,10 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme
public String getLayoutPath()
{
- ArrayList aReportPath = getReportPath();
+ ArrayList<String> aReportPath = getReportPath();
for (int i = 0; i < aReportPath.size(); i++)
{
- String sPath = (String) aReportPath.get(i);
+ String sPath = aReportPath.get(i);
sPath += "/stl-default.ott";
if (FileAccess.isPathValid(getMSF(), sPath))
{
diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java
index ec00faef9a4b..af717356403f 100644
--- a/wizards/com/sun/star/wizards/report/ReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/ReportWizard.java
@@ -141,7 +141,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
case SOTITLEPAGE:
String[] aFieldNames = m_reportDocument.getRecordParser().getFieldNames();
- Map aFieldTitleSet = m_reportDocument.getRecordParser().getFieldTitleSet();
+ Map<String, String> aFieldTitleSet = m_reportDocument.getRecordParser().getFieldTitleSet();
CurTitlesComponent.initialize(aFieldNames, aFieldTitleSet);
break;
@@ -451,7 +451,7 @@ public class ReportWizard extends DatabaseObjectWizard implements XTextListener,
URL[] aURLs = new URL[1];
aURLs[0] = aLocationURI.toURL();
URLClassLoader aClassLoader = new URLClassLoader(aURLs, this.getClass().getClassLoader());
- Class a = aClassLoader.loadClass("com.sun.star.wizards.reportbuilder.ReportBuilderImplementation");
+ Class<?> a = aClassLoader.loadClass("com.sun.star.wizards.reportbuilder.ReportBuilderImplementation");
Method aMethod = a.getMethod("create", new Class[]
{
XMultiServiceFactory.class
diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
index e439167652b7..14326ded92ea 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java
@@ -110,7 +110,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
*/
private IReportBuilderLayouter getReportBuilderLayouter()
{
- return (IReportBuilderLayouter) getLayoutMap().get(m_sReportBuilderLayoutName);
+ return getLayoutMap().get(m_sReportBuilderLayoutName);
}
private Object m_aReportDocument;
private XPropertySet m_documentDefinition;
@@ -274,7 +274,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
aNameContainer.insertByHierarchicalName(Name, m_documentDefinition);
}
- public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList GroupFieldVector, ArrayList ReportPath, int iSelCount)
+ public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList<String> GroupFieldVector, ArrayList<String> ReportPath, int iSelCount)
{
final int GroupCount = GroupFieldVector.size();
if (GroupCount < MAXIMUM_GROUPCOUNT)
@@ -289,7 +289,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
{
}
- public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, ArrayList GroupFieldVector)
+ public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, ArrayList<String> GroupFieldVector)
{
final FieldColumn CurFieldColumn = getRecordParser().getFieldColumnByTitle(CurGroupTitle);
GroupFieldVector.remove(CurFieldColumn.getFieldName());
@@ -326,7 +326,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
public void setReportBuilderLayouterName(String _sName)
{
final IReportBuilderLayouter aCurrentLayouter = getReportBuilderLayouter();
- final IReportBuilderLayouter aNewLayouter = (IReportBuilderLayouter) m_aLayoutMap.get(_sName);
+ final IReportBuilderLayouter aNewLayouter = m_aLayoutMap.get(_sName);
if (aNewLayouter != null)
{
m_sReportBuilderLayoutName = _sName;
@@ -523,9 +523,9 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
{
return "default";
}
- private ArrayList m_aReportPath;
+ private ArrayList<String> m_aReportPath;
- public ArrayList getReportPath()
+ public ArrayList<String> getReportPath()
{
if (m_aReportPath == null)
{
@@ -564,9 +564,9 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
try
{
// TODO: Use Package.getPackages(...)
- final Class a = Class.forName(_sClassName);
+ final Class<?> a = Class.forName(_sClassName);
- final Constructor cTor = a.getConstructor(new Class[]
+ final Constructor<?> cTor = a.getConstructor(new Class[]
{
IReportDefinitionReadAccess.class, Resource.class
});
@@ -581,7 +581,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
}
return null;
}
- private LinkedHashMap m_aLayoutMap = null;
+ private LinkedHashMap<String, IReportBuilderLayouter> m_aLayoutMap = null;
private void insertIntoLayoutMap(IReportBuilderLayouter _aLayout)
{
@@ -604,12 +604,12 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
/**
* Initialize all well known com.sun.star.wizards.report.layout.ReportBuilderLayouter Objects and create exact one instance.
*/
- private LinkedHashMap getLayoutMap()
+ private LinkedHashMap<String, IReportBuilderLayouter> getLayoutMap()
{
if (m_aLayoutMap == null)
{
// The LayoutMap is empty, so we create a new LinkedHashMap
- m_aLayoutMap = new LinkedHashMap();
+ m_aLayoutMap = new LinkedHashMap<String, IReportBuilderLayouter>();
// TODO: We must know the name of a layouts, There should be a way to say where to find, not the names.
IReportBuilderLayouter aLayout = getLayoutInstanceFrom("com.sun.star.wizards.reportbuilder.layout.Tabular");
@@ -642,14 +642,14 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
String[] b = new String[getLayoutMap().size()];
// run through the whole layoutmap and
- final Set aKeys = getLayoutMap().keySet();
- final Iterator aKeyIterator = aKeys.iterator();
+ final Set<String> aKeys = getLayoutMap().keySet();
+ final Iterator<String> aKeyIterator = aKeys.iterator();
int i = 0;
while (aKeyIterator.hasNext())
{
- final String sKey = (String) aKeyIterator.next();
+ final String sKey = aKeyIterator.next();
a[i] = sKey;
- final IReportBuilderLayouter aLayouter = (IReportBuilderLayouter) m_aLayoutMap.get(sKey);
+ final IReportBuilderLayouter aLayouter = m_aLayoutMap.get(sKey);
b[i++] = aLayouter.getLocalizedName();
}
@@ -665,7 +665,7 @@ public class ReportBuilderImplementation extends ReportImplementationHelper
try
{
// TODO: check different languages in header layouts
- ArrayList aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard");
+ ArrayList<String> aReportPath = FileAccess.getOfficePaths(getMSF(), "Template", "share", "/wizard");
FileAccess.combinePaths(getMSF(), aReportPath, "/wizard/report");
LayoutFiles = FileAccess.getFolderTitles(getMSF(), null, aReportPath, ".otr");
diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
index b4f3d91e2b74..4c1a175a5a1f 100644
--- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
+++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java
@@ -1546,7 +1546,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
return getLabelWidth(_sLabel, 0.0f, 0.0f);
}
XFixedText m_aFixedTextHelper = null;
- HashMap m_aLabelWidthMap;
+ HashMap<String, Integer> m_aLabelWidthMap;
protected int getLabelWidth(String _sLabel, FontDescriptor _aFD)
{
@@ -1566,7 +1566,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter
if (m_aLabelWidthMap == null)
{
- m_aLabelWidthMap = new HashMap();
+ m_aLabelWidthMap = new HashMap<String, Integer>();
}
// At first, try to get the Width out of a HashMap (Cache)
StringBuffer aKey = new StringBuffer(40);
diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java
index 78ef5ca2786c..c941464c0959 100644
--- a/wizards/com/sun/star/wizards/table/FieldDescription.java
+++ b/wizards/com/sun/star/wizards/table/FieldDescription.java
@@ -36,7 +36,7 @@ public class FieldDescription
private String keyname;
private XNameAccess xNameAccessTableNode;
private XPropertySet xPropertySet;
- private ArrayList aPropertyValues;
+ private ArrayList<PropertyValue> aPropertyValues;
// PropertyValue[] aPropertyValues;
private Integer Type;
private Integer Scale;
@@ -53,7 +53,7 @@ public class FieldDescription
tablename = _curscenarioselector.getTableName();
Name = _fieldname;
keyname = _keyname;
- aPropertyValues = new ArrayList();
+ aPropertyValues = new ArrayList<PropertyValue>();
xNameAccessTableNode = _curscenarioselector.oCGTable.xNameAccessFieldsNode;
XNameAccess xNameAccessFieldNode;
if (_curscenarioselector.bcolumnnameislimited)
@@ -70,7 +70,7 @@ public class FieldDescription
public FieldDescription(String _fieldname)
{
Name = _fieldname;
- aPropertyValues = new ArrayList();
+ aPropertyValues = new ArrayList<PropertyValue>();
Type = new Integer(com.sun.star.sdbc.DataType.VARCHAR);
aPropertyValues.add(Properties.createProperty(PropertyNames.PROPERTY_NAME, _fieldname));
aPropertyValues.add(Properties.createProperty("Type", Type));
@@ -80,7 +80,7 @@ public class FieldDescription
{
for (int i = 0; i < aPropertyValues.size(); i++)
{
- PropertyValue aPropertyValue = (PropertyValue) aPropertyValues.get(i);
+ PropertyValue aPropertyValue = aPropertyValues.get(i);
if (aPropertyValue.Name.equals(PropertyNames.PROPERTY_NAME))
{
aPropertyValue.Value = _newfieldname;
diff --git a/wizards/com/sun/star/wizards/table/FieldFormatter.java b/wizards/com/sun/star/wizards/table/FieldFormatter.java
index 4b10b71fb030..e3dc0626a428 100644
--- a/wizards/com/sun/star/wizards/table/FieldFormatter.java
+++ b/wizards/com/sun/star/wizards/table/FieldFormatter.java
@@ -307,7 +307,7 @@ public class FieldFormatter implements XItemListener
{
Object oColumn = Helper.getUnoPropertyValue(oColumnDescriptorModel, "Column");
Helper.setUnoPropertyValue(oColumn, PropertyNames.PROPERTY_NAME, newfieldname);
- FieldDescription curfielddescription = (FieldDescription) CurUnoDialog.fielditems.get(oldfieldname);
+ FieldDescription curfielddescription = CurUnoDialog.fielditems.get(oldfieldname);
CurUnoDialog.fielditems.remove(oldfieldname);
curfielddescription.setName(newfieldname);
CurUnoDialog.fielditems.put(newfieldname, curfielddescription);
diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
index 41a6994756a0..53d8c6c8be6e 100644
--- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java
+++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java
@@ -204,7 +204,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
{
try
{
- FieldDescription ofielddescription = (FieldDescription) CurTableWizardUnoDialog.fielditems.get(displayfieldnames[i]);
+ FieldDescription ofielddescription = CurTableWizardUnoDialog.fielditems.get(displayfieldnames[i]);
if (ofielddescription != null)
{
afieldnameVector.add(ofielddescription.getName());
@@ -232,7 +232,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
{
try
{
- FieldDescription curfielddescription = (FieldDescription) CurTableWizardUnoDialog.fielditems.get(fieldnames[i]);
+ FieldDescription curfielddescription = CurTableWizardUnoDialog.fielditems.get(fieldnames[i]);
PropertyValue[] aProperties = curfielddescription.getPropertyValues();
this.curtabledescriptor.addColumn(aProperties);
}
@@ -258,7 +258,7 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X
String stablename = PropertyNames.EMPTY_STRING;
try
{
- FieldDescription ofielddescription = (FieldDescription) CurTableWizardUnoDialog.fielditems.get(fieldnames[i]);
+ FieldDescription ofielddescription = CurTableWizardUnoDialog.fielditems.get(fieldnames[i]);
stablename = ofielddescription.gettablename();
}
catch (RuntimeException e)
diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java b/wizards/com/sun/star/wizards/table/TableWizard.java
index 5a5166ab242e..16f2062ef218 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -45,7 +45,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
FieldFormatter curFieldFormatter;
PrimaryKeyHandler curPrimaryKeyHandler;
String sMsgWizardName = PropertyNames.EMPTY_STRING;
- public HashMap fielditems;
+ public HashMap<String, FieldDescription> fielditems;
int wizardmode;
String tablename;
String serrToManyFields;
@@ -77,7 +77,7 @@ public class TableWizard extends DatabaseObjectWizard implements XTextListener,
218, Boolean.TRUE, "DialogTable", 102, 41, 1, new Short((short) 0), sTitle, 330
});
drawNaviBar();
- fielditems = new HashMap();
+ fielditems = new HashMap<String, FieldDescription>();
//TODO if reportResouces cannot be gotten dispose officedocument
if (getTableResources())
{
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java
index 4a7b7d0f0d41..4bf853bd8bf5 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.java
+++ b/wizards/com/sun/star/wizards/text/TextDocument.java
@@ -211,7 +211,7 @@ public class TextDocument
XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
m_xDocProps = xDocPropsSuppl.getDocumentProperties();
- CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
+ CharLocale = (Locale) Helper.getUnoStructValue(xComponent, "CharLocale");
xText = xTextDocument.getText();
}
@@ -222,7 +222,7 @@ public class TextDocument
xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
m_xDocProps = xDocPropsSuppl.getDocumentProperties();
- CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
+ CharLocale = (Locale) Helper.getUnoStructValue(xComponent, "CharLocale");
xStorable = UnoRuntime.queryInterface(XStorable.class, xTextDocument);
xText = xTextDocument.getText();
}
@@ -322,7 +322,7 @@ public class TextDocument
XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
m_xDocProps = xDocPropsSuppl.getDocumentProperties();
- CharLocale = (Locale) Helper.getUnoStructValue((Object) xComponent, "CharLocale");
+ CharLocale = (Locale) Helper.getUnoStructValue(xComponent, "CharLocale");
}
public static XTextCursor createTextCursor(Object oCursorContainer)
diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java
index bd4fd60b31c5..32b5255b9366 100644
--- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java
@@ -143,7 +143,7 @@ public class TextFieldHandler
try
{
XDependentTextField[] xDependentFields;
- ArrayList xDependentVector = new ArrayList();
+ ArrayList<XDependentTextField> xDependentVector = new ArrayList<XDependentTextField>();
if (xTextFieldsSupplier.getTextFields().hasElements())
{
XEnumeration xEnum = xTextFieldsSupplier.getTextFields().createEnumeration();
diff --git a/wizards/com/sun/star/wizards/text/TextTableHandler.java b/wizards/com/sun/star/wizards/text/TextTableHandler.java
index c0a1ecb56456..42dde2f4b36f 100644
--- a/wizards/com/sun/star/wizards/text/TextTableHandler.java
+++ b/wizards/com/sun/star/wizards/text/TextTableHandler.java
@@ -63,7 +63,7 @@ public class TextTableHandler
xTextTablesSupplier = UnoRuntime.queryInterface(XTextTablesSupplier.class, xTextDocument);
xSimpleText = UnoRuntime.queryInterface(XSimpleText.class, xTextDocument.getText());
XNumberFormatsSupplier xNumberFormatsSupplier = UnoRuntime.queryInterface(XNumberFormatsSupplier.class, xTextDocument);
- aCharLocale = (Locale) Helper.getUnoStructValue((Object) xTextDocument, "CharLocale");
+ aCharLocale = (Locale) Helper.getUnoStructValue(xTextDocument, "CharLocale");
oNumberFormatter = new NumberFormatter(xNumberFormatsSupplier, aCharLocale);
}
catch (java.lang.Exception e)
diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
index 88ffdd9577e6..5afc462d846b 100644
--- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java
+++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java
@@ -56,7 +56,7 @@ public class AggregateComponent extends ControlScroller
final int SOADDROW = 1;
final int SOREMOVEROW = 2;
final int CONTROLROWDIST = 18;
- ArrayList ControlRowVector;
+ ArrayList<ControlRow> ControlRowVector;
String OPTIONBUTTONDETAILQUERY_ITEM_CHANGED = "toggleComponent";
String OPTIONBUTTONSUMMARYQUERY_ITEM_CHANGED = "toggleComponent";
String LISTBOXFUNCTIONS_ACTION_PERFORMED;
@@ -65,7 +65,7 @@ public class AggregateComponent extends ControlScroller
String LISTBOXFIELDNAMES_ITEM_CHANGED;
String COMMANDBUTTONPLUS_ACTION_PERFORMED = "addRow";
String COMMANDBUTTONMINUS_ACTION_PERFORMED = "removeRow";
- ArrayList ControlRows;
+ ArrayList<String> ControlRows;
int curHelpID;
int lastHelpIndex;
@@ -213,7 +213,7 @@ public class AggregateComponent extends ControlScroller
}
if (ControlRowVector == null)
{
- ControlRowVector = new ArrayList();
+ ControlRowVector = new ArrayList<ControlRow>();
}
int locHelpID = curHelpIndex + (i * 2);
ControlRow oControlRow = new ControlRow(i, ypos, locHelpID);
@@ -222,7 +222,7 @@ public class AggregateComponent extends ControlScroller
protected void setControlGroupVisible(int _index, boolean _bIsVisible)
{
- ControlRow oControlRow = (ControlRow) ControlRowVector.get(_index);
+ ControlRow oControlRow = ControlRowVector.get(_index);
oControlRow.setVisible(_bIsVisible);
if (_index >= (this.CurDBMetaData.AggregateFieldNames.length))
{
@@ -236,13 +236,13 @@ public class AggregateComponent extends ControlScroller
registerControlGroupAtIndex(fieldcount);
if (fieldcount < super.getBlockIncrementation())
{
- ControlRow oControlRow = (ControlRow) ControlRowVector.get(fieldcount);
+ ControlRow oControlRow = ControlRowVector.get(fieldcount);
oControlRow.setVisible(true);
oControlRow.settovoid();
}
else
{
- ControlRow oControlRow = (ControlRow) ControlRowVector.get(super.getBlockIncrementation() - 1);
+ ControlRow oControlRow = ControlRowVector.get(super.getBlockIncrementation() - 1);
super.setScrollValue(getScrollValue() + 1, (fieldcount + 1));
oControlRow.settovoid();
}
@@ -261,7 +261,7 @@ public class AggregateComponent extends ControlScroller
fieldcount--;
if ((fieldcount + 1) <= super.getBlockIncrementation())
{
- oControlRow = (ControlRow) ControlRowVector.get(fieldcount);
+ oControlRow = ControlRowVector.get(fieldcount);
oControlRow.setVisible(false);
}
super.setScrollValue(getScrollValue() - 1, (fieldcount));
@@ -281,7 +281,7 @@ public class AggregateComponent extends ControlScroller
int fieldcount = super.getCurFieldCount();
if (fieldcount > 0)
{
- curcontrolrow = (ControlRow) ControlRowVector.get(super.getCurFieldCount() - 1);
+ curcontrolrow = ControlRowVector.get(super.getCurFieldCount() - 1);
biscomplete = curcontrolrow.isComplete();
}
CurUnoDialog.setControlProperty("btnplus", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(biscomplete && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY)));
@@ -350,7 +350,7 @@ public class AggregateComponent extends ControlScroller
{
for (int i = _index; i < ControlRowVector.size(); i++)
{
- ControlRow oControlRow = (ControlRow) ControlRowVector.get(i);
+ ControlRow oControlRow = ControlRowVector.get(i);
// if (i == _index)
// oControlRow.settovoid();
// else
@@ -445,7 +445,7 @@ public class AggregateComponent extends ControlScroller
{
for (int i = 0; i < this.getBlockIncrementation(); i++)
{
- curControlRow = (ControlRow) ControlRowVector.get(i);
+ curControlRow = ControlRowVector.get(i);
curControlRow.insertFieldNames();
}
for (int i = 0; i <= CurDBMetaData.AggregateFieldNames.length; i++)
@@ -499,7 +499,7 @@ public class AggregateComponent extends ControlScroller
int maxfieldcount = super.getCurFieldCount();
if (maxfieldcount > 0)
{
- ControlRow curcontrolrow = (ControlRow) this.ControlRowVector.get(maxfieldcount - 1);
+ ControlRow curcontrolrow = this.ControlRowVector.get(maxfieldcount - 1);
return curcontrolrow.isComplete();
}
else
diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java
index 6321d0bdc1fc..67b1c63d11d0 100644
--- a/wizards/com/sun/star/wizards/ui/ButtonList.java
+++ b/wizards/com/sun/star/wizards/ui/ButtonList.java
@@ -439,22 +439,23 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
* @param event The event to be fired
*
*/
+ @SuppressWarnings("unchecked")
private void fireItemSelected()
{
// java.awt.event.ItemEvent event = new java.awt.event.ItemEvent(this, 0,
// getSelectedObject(), java.awt.event.ItemEvent.SELECTED);
- java.util.ArrayList list;
+ java.util.ArrayList<XItemListener> list;
synchronized(this)
{
if (m_aItemListenerList == null)
{
return;
}
- list = (java.util.ArrayList) m_aItemListenerList.clone();
+ list = (java.util.ArrayList<XItemListener>) m_aItemListenerList.clone();
}
for (int i = 0; i < list.size(); i++)
{
- ((com.sun.star.awt.XItemListener) list.get(i)).itemStateChanged(null);
+ list.get(i).itemStateChanged(null);
}
}
diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
index 5921d5b98c81..1993035b5a10 100644
--- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
+++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java
@@ -30,7 +30,7 @@ import com.sun.star.beans.PropertyValue;
import java.text.Collator;
import java.util.Comparator;
-public class CommandFieldSelection extends FieldSelection implements Comparator
+public class CommandFieldSelection extends FieldSelection implements Comparator<String>
{
private CommandMetaData CurDBMetaData;
@@ -335,7 +335,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator
return aCollator;
}
- public int compare(Object _oObject1, Object _oObject2)
+ public int compare(String _oObject1, String _oObject2)
{
return this.getCollator().compare(_oObject1, _oObject2);
}
diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java
index db27a97570ae..06de7c4c18ab 100644
--- a/wizards/com/sun/star/wizards/ui/ControlScroller.java
+++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java
@@ -21,7 +21,6 @@ import com.sun.star.beans.*;
import com.sun.star.awt.*;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.wizards.common.*;
-import com.sun.star.wizards.common.HelpIds;
import java.util.*;
@@ -36,7 +35,7 @@ public abstract class ControlScroller
protected int nscrollvalue = 0;
protected int ntotfieldcount;
XScrollBar xScrollBar;
- protected ArrayList scrollfields;
+ protected ArrayList<PropertyValue[]> scrollfields;
protected Integer ICompPosX;
protected int iCompPosX;
protected Integer ICompPosY;
@@ -54,7 +53,7 @@ public abstract class ControlScroller
int SORELFIRSTPOSY = 3;
protected int curHelpIndex;
String sIncSuffix;
- protected ArrayList ControlGroupVector = new ArrayList();
+ protected ArrayList<Object> ControlGroupVector = new ArrayList<Object>();
protected PeerConfig oTitlePeerConfig;
class AdjustmentListenerImpl implements com.sun.star.awt.XAdjustmentListener
@@ -113,7 +112,7 @@ public abstract class ControlScroller
{
new Short((short) 0), Boolean.TRUE, new Integer(ScrollHeight), HelpIds.getHelpIdString(curHelpIndex), new Integer(ScrollBarOrientation.VERTICAL), new Integer(iCompPosX + iCompWidth - iScrollBarWidth - 1), new Integer(iCompPosY + 1), IStep, new Integer(iScrollBarWidth)
});
- scrollfields = new ArrayList();
+ scrollfields = new ArrayList<PropertyValue[]>();
int ypos = iStartPosY + SORELFIRSTPOSY;
for (int i = 0; i < nblockincrement; i++)
{
@@ -192,8 +191,8 @@ public abstract class ControlScroller
protected void fillupControls(int guiRow)
{
- PropertyValue[] nameProps = (PropertyValue[]) scrollfields.get(guiRow);
- PropertyValue[] valueProps = (PropertyValue[]) scrollfields.get(guiRow + nscrollvalue);
+ PropertyValue[] nameProps = scrollfields.get(guiRow);
+ PropertyValue[] valueProps = scrollfields.get(guiRow + nscrollvalue);
for (int n = 0; n < nameProps.length; n++)
{
if (CurUnoDialog.getDlgNameAccess().hasByName(nameProps[n].Name))
@@ -274,7 +273,7 @@ public abstract class ControlScroller
{
for (int n = 0; n < scrollfields.size(); n++)
{
- PropertyValue[] curproperties = (PropertyValue[]) scrollfields.get(n);
+ PropertyValue[] curproperties = scrollfields.get(n);
for (int m = 0; m < curproperties.length; m++)
{
PropertyValue curproperty = curproperties[m];
@@ -340,7 +339,7 @@ public abstract class ControlScroller
{
int cols =
scrollfields.size() > 0
- ? ((PropertyValue[]) scrollfields.get(0)).length
+ ? scrollfields.get(0).length
: 0;
for (int a = 0; a < ncurfieldcount; a++)
{
@@ -364,8 +363,8 @@ public abstract class ControlScroller
if (guiRow + nscrollvalue < scrollfields.size())
{
return fieldInfo(
- ((PropertyValue[]) scrollfields.get(guiRow + nscrollvalue))[column],
- ((PropertyValue[]) scrollfields.get(guiRow))[column]);
+ scrollfields.get(guiRow + nscrollvalue)[column],
+ scrollfields.get(guiRow)[column]);
//System.out.println("getting field info for : " + guiRow + "/" + column + ":" + pv.Value + "(" + pv.Name + ")" );
}
else
@@ -410,7 +409,7 @@ public abstract class ControlScroller
protected PropertyValue[] getControlGroupInfo(int _i)
{
- return (PropertyValue[]) scrollfields.get(_i);
+ return scrollfields.get(_i);
}
protected void setControlData(String controlname, Object newvalue)
@@ -447,7 +446,7 @@ public abstract class ControlScroller
{
for (int i = 0; i < scrollfields.size(); i++)
{
- curproperties = (PropertyValue[]) scrollfields.get(i);
+ curproperties = scrollfields.get(i);
retproperties[i] = curproperties;
}
return retproperties;
diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java
index 9829315e9674..59769592acbb 100644
--- a/wizards/com/sun/star/wizards/ui/ImageList.java
+++ b/wizards/com/sun/star/wizards/ui/ImageList.java
@@ -457,7 +457,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
};
private Object[] MOVE_SELECTION_VALS = new Object[3];
/** Utility field holding list of ItemListeners. */
- private transient java.util.ArrayList itemListenerList;
+ private transient java.util.ArrayList<XItemListener> itemListenerList;
private void moveSelection(int image)
{
@@ -567,7 +567,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
{
if (itemListenerList == null)
{
- itemListenerList = new java.util.ArrayList();
+ itemListenerList = new java.util.ArrayList<XItemListener>();
}
itemListenerList.add(listener);
}
@@ -589,22 +589,23 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener
* @param event The event to be fired
*
*/
+ @SuppressWarnings("unchecked")
private void fireItemSelected()
{
// java.awt.event.ItemEvent event = new java.awt.event.ItemEvent(this, 0,
// getSelectedObject(), java.awt.event.ItemEvent.SELECTED);
- java.util.ArrayList list;
+ java.util.ArrayList<XItemListener> list;
synchronized(this)
{
if (itemListenerList == null)
{
return;
}
- list = (java.util.ArrayList) itemListenerList.clone();
+ list = (java.util.ArrayList<XItemListener>) itemListenerList.clone();
}
for (int i = 0; i < list.size(); i++)
{
- ((com.sun.star.awt.XItemListener) list.get(i)).itemStateChanged(null);
+ list.get(i).itemStateChanged(null);
}
}
diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.java b/wizards/com/sun/star/wizards/ui/PeerConfig.java
index a87c902383ef..6cc4c64b4f0e 100644
--- a/wizards/com/sun/star/wizards/ui/PeerConfig.java
+++ b/wizards/com/sun/star/wizards/ui/PeerConfig.java
@@ -38,9 +38,9 @@ import com.sun.star.wizards.common.PropertyNames;
public class PeerConfig implements XWindowListener
{
- private ArrayList m_aPeerTasks = new ArrayList();
- ArrayList aControlTasks = new ArrayList();
- ArrayList aImageUrlTasks = new ArrayList();
+ private ArrayList<PeerTask> m_aPeerTasks = new ArrayList<PeerTask>();
+ ArrayList<ControlTask> aControlTasks = new ArrayList<ControlTask>();
+ ArrayList<ImageUrlTask> aImageUrlTasks = new ArrayList<ImageUrlTask>();
UnoDialog oUnoDialog = null;
public PeerConfig(UnoDialog _oUnoDialog)
@@ -108,7 +108,7 @@ public class PeerConfig implements XWindowListener
{
for (int i = 0; i < this.m_aPeerTasks.size(); i++)
{
- PeerTask aPeerTask = (PeerTask) m_aPeerTasks.get(i);
+ PeerTask aPeerTask = m_aPeerTasks.get(i);
XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, aPeerTask.xControl.getPeer());
for (int n = 0; n < aPeerTask.propnames.length; n++)
{
@@ -117,12 +117,12 @@ public class PeerConfig implements XWindowListener
}
for (int i = 0; i < this.aControlTasks.size(); i++)
{
- ControlTask aControlTask = (ControlTask) aControlTasks.get(i);
+ ControlTask aControlTask = aControlTasks.get(i);
Helper.setUnoPropertyValue(aControlTask.oModel, aControlTask.propname, aControlTask.propvalue);
}
for (int i = 0; i < this.aImageUrlTasks.size(); i++)
{
- ImageUrlTask aImageUrlTask = (ImageUrlTask) aImageUrlTasks.get(i);
+ ImageUrlTask aImageUrlTask = aImageUrlTasks.get(i);
String sImageUrl = PropertyNames.EMPTY_STRING;
if (AnyConverter.isInt(aImageUrlTask.oResource))
{
diff --git a/wizards/com/sun/star/wizards/ui/TitlesComponent.java b/wizards/com/sun/star/wizards/ui/TitlesComponent.java
index 9d9868270f35..bcdc8552d9c3 100644
--- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java
+++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java
@@ -32,7 +32,7 @@ public class TitlesComponent extends ControlScroller
int iLabelPosX;
final int iRelLabelPosXDist = 6;
public String[] fieldnames;
- public Map fieldtitleset;
+ public Map<String, String> fieldtitleset;
public String[] fieldtitles;
public XTextListener xTextListener;
final String SOLABELPREFIX = "lblColumnName_";
@@ -162,7 +162,7 @@ public class TitlesComponent extends ControlScroller
CurUnoDialog.setControlProperty("lblColumnTitles", PropertyNames.PROPERTY_POSITION_X, TitlePosX);
}
- public void initialize(String[] _fieldnames, Map _fieldtitleset)
+ public void initialize(String[] _fieldnames, Map<String, String> _fieldtitleset)
{
this.fieldnames = _fieldnames;
this.fieldtitleset = _fieldtitleset;
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java
index a9bdc4fb1b74..c451392dbf36 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java
@@ -18,7 +18,6 @@
package com.sun.star.wizards.ui;
import com.sun.star.awt.*;
-import com.sun.star.awt.XReschedule;
import com.sun.star.beans.Property;
import com.sun.star.beans.XMultiPropertySet;
@@ -32,8 +31,6 @@ import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.*;
import com.sun.star.wizards.common.*;
-import com.sun.star.wizards.common.Desktop;
-import com.sun.star.wizards.common.Helper;
import com.sun.star.wizards.ui.event.*;
import java.util.HashMap;
@@ -55,7 +52,7 @@ public class UnoDialog implements EventNames
public XInterface xUnoDialog;
public XPropertySet xPSetDlg;
public XVclWindowPeer xVclWindowPeer;
- public HashMap ControlList;
+ public HashMap<String, Integer> ControlList;
public Resource m_oResource;
public XWindowPeer xWindowPeer = null;
private PeerConfig m_oPeerConfig;
@@ -71,7 +68,7 @@ public class UnoDialog implements EventNames
try
{
this.xMSF = xMSF;
- ControlList = new HashMap();
+ ControlList = new HashMap<String, Integer>();
xDialogModel = (XInterface) xMSF.createInstance("com.sun.star.awt.UnoControlDialogModel");
XMultiPropertySet xMultiPSetDlg = UnoRuntime.queryInterface(XMultiPropertySet.class, xDialogModel);
xMultiPSetDlg.setPropertyValues(PropertyNames, PropertyValues);
@@ -95,7 +92,7 @@ public class UnoDialog implements EventNames
}
}
- public int getControlKey(Object EventObject, HashMap ControlList)
+ public int getControlKey(Object EventObject, HashMap<String, Integer> ControlList)
{
int iKey;
XControl xContrl = UnoRuntime.queryInterface(XControl.class, EventObject);
@@ -104,7 +101,7 @@ public class UnoDialog implements EventNames
try
{
String sName = (String) xPSet.getPropertyValue(PropertyNames.PROPERTY_NAME);
- Integer KeyObject = (Integer) ControlList.get(sName);
+ Integer KeyObject = ControlList.get(sName);
iKey = KeyObject.intValue();
}
catch (com.sun.star.uno.Exception exception)
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
index ec16a472d493..482d1b780ef3 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java
@@ -214,7 +214,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames
* This method is used for creating Edit, Currency, Date, Formatted, Pattern, File
* and Time edit components.
*/
- private Object insertEditField(String sName, String sTextChanged, Object eventTarget, String sModelClass, String[] sPropNames, Object[] oPropValues, Class type)
+ private Object insertEditField(String sName, String sTextChanged, Object eventTarget, String sModelClass, String[] sPropNames, Object[] oPropValues, Class<? extends XInterface> type)
{
XTextComponent xField = (XTextComponent) insertControlModel2(sModelClass, sName, sPropNames, oPropValues, XTextComponent.class);
if (sTextChanged != null)
@@ -352,7 +352,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames
}
- public Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues, Class type)
+ public Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues, Class<? extends XInterface> type)
{
return UnoRuntime.queryInterface(type, insertControlModel2(serviceName, componentName, sPropNames, oPropValues));
}
diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
index df12e04ba765..5aad67a3a34a 100644
--- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
+++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java
@@ -42,7 +42,7 @@ import java.util.HashMap;
public class AbstractListener
{
- private HashMap mHashtable = new HashMap();
+ private HashMap<String,MethodInvocation> mHashtable = new HashMap<String,MethodInvocation>();
/** Creates a new instance of AbstractListener */
public AbstractListener()
@@ -68,7 +68,7 @@ public class AbstractListener
public MethodInvocation get(String componentName, String eventName)
{
- return (MethodInvocation) mHashtable.get(componentName + eventName);
+ return mHashtable.get(componentName + eventName);
}
public Object invoke(String componentName, String eventName, Object param)
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java
index 659a72b903ed..68c2efcd9b51 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.java
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java
@@ -191,14 +191,14 @@ public abstract class DataAware {
* calls updateUI() on each memebr of the collection.
* @param dataAwares a collection containing DataAware objects.
*/
- public static void updateUI(Collection dataAwares) {
- for (Iterator i = dataAwares.iterator(); i.hasNext();)
- ((DataAware) i.next()).updateUI();
+ public static void updateUI(Collection<DataAware> dataAwares) {
+ for (Iterator<DataAware> i = dataAwares.iterator(); i.hasNext();)
+ i.next().updateUI();
}
- public static void updateData(Collection dataAwares) {
- for (Iterator i = dataAwares.iterator(); i.hasNext();)
- ((DataAware) i.next()).updateData();
+ public static void updateData(Collection<DataAware> dataAwares) {
+ for (Iterator<DataAware> i = dataAwares.iterator(); i.hasNext();)
+ i.next().updateData();
}
/**
@@ -209,9 +209,9 @@ public abstract class DataAware {
* @param dataAwares a collection of DataAware objects.
* @param dataObject new data object to set to the DataAware objects in the given collection.
* @param updateUI if true, calls updateUI() on each DataAware object.
- */public static void setDataObject(Collection dataAwares, Object dataObject, boolean updateUI) {
- for (Iterator i = dataAwares.iterator(); i.hasNext();)
- ((DataAware) i.next()).setDataObject(dataObject, updateUI);
+ */public static void setDataObject(Collection<DataAware> dataAwares, Object dataObject, boolean updateUI) {
+ for (Iterator<DataAware> i = dataAwares.iterator(); i.hasNext();)
+ i.next().setDataObject(dataObject, updateUI);
}
/**
@@ -244,7 +244,7 @@ public abstract class DataAware {
* @return true if the given class is acceptible for
* the Value object. False if not.
*/
- public boolean isAssignable(Class type);
+ public boolean isAssignable(Class<?> type);
}
/**
@@ -320,7 +320,7 @@ public abstract class DataAware {
return null;
}
- protected Method createSetMethod(String propName, Object obj, Class paramClass) {
+ protected Method createSetMethod(String propName, Object obj, Class<?> paramClass) {
Method m = null;
try {
m = obj.getClass().getMethod("set" + propName, paramClass);
@@ -346,7 +346,7 @@ public abstract class DataAware {
/* (non-Javadoc)
* @see com.sun.star.wizards.ui.event.DataAware.Value#isAssignable(java.lang.Class)
*/
- public boolean isAssignable(Class type) {
+ public boolean isAssignable(Class<?> type) {
return getMethod.getDeclaringClass().isAssignableFrom(type) &&
setMethod.getDeclaringClass().isAssignableFrom(type);
}
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
index 03aec576ed25..c3a48b8a0c2e 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
+++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java
@@ -51,8 +51,8 @@ public class DataAwareFields
{
Field f = owner.getClass().getField(fieldname);
- Class c = f.getType();
- Class c2 = value.getClass();
+ Class<?> c = f.getType();
+ Class<?> c2 = value.getClass();
if (c.equals(Boolean.TYPE))
{
return new BooleanFieldValue(f, c2);
@@ -95,7 +95,7 @@ public class DataAwareFields
field = field_;
}
- public boolean isAssignable(Class type)
+ public boolean isAssignable(Class<?> type)
{
return field.getDeclaringClass().isAssignableFrom(type);
}
@@ -104,9 +104,9 @@ public class DataAwareFields
private static class BooleanFieldValue extends FieldValue
{
- private Class convertTo;
+ private Class<?> convertTo;
- public BooleanFieldValue(Field f, Class convertTo_)
+ public BooleanFieldValue(Field f, Class<?> convertTo_)
{
super(f);
convertTo = convertTo_;
@@ -164,9 +164,9 @@ public class DataAwareFields
private static class IntFieldValue extends FieldValue
{
- private Class convertTo;
+ private Class<?> convertTo;
- public IntFieldValue(Field f, Class convertTo_)
+ public IntFieldValue(Field f, Class<?> convertTo_)
{
super(f);
convertTo = convertTo_;
@@ -224,9 +224,9 @@ public class DataAwareFields
private static class DoubleFieldValue extends FieldValue
{
- private Class convertTo;
+ private Class<?> convertTo;
- public DoubleFieldValue(Field f, Class convertTo_)
+ public DoubleFieldValue(Field f, Class<?> convertTo_)
{
super(f);
convertTo = convertTo_;
@@ -284,9 +284,9 @@ public class DataAwareFields
private static class ConvertedStringValue extends FieldValue
{
- private Class convertTo;
+ private Class<?> convertTo;
- public ConvertedStringValue(Field f, Class convertTo_)
+ public ConvertedStringValue(Field f, Class<?> convertTo_)
{
super(f);
convertTo = convertTo_;
@@ -476,7 +476,7 @@ public class DataAwareFields
};
}
- private static Number toNumber(double i, Class c)
+ private static Number toNumber(double i, Class<?> c)
{
if (c.equals(Integer.class))
{
diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
index 78a923ccc429..30cb57467ebb 100644
--- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
+++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
@@ -51,12 +51,12 @@ public class MethodInvocation
this(method, obj, null);
}
- public MethodInvocation(String methodName, Object obj, Class paramClass) throws NoSuchMethodException
+ public MethodInvocation(String methodName, Object obj, Class<?> paramClass) throws NoSuchMethodException
{
this(paramClass == null ? obj.getClass().getMethod(methodName) : obj.getClass().getMethod(methodName, paramClass), obj, paramClass);
}
- public MethodInvocation(Method method, Object obj, Class paramClass)
+ public MethodInvocation(Method method, Object obj, Class<?> paramClass)
{
mMethod = method;
mObject = obj;
diff --git a/wizards/com/sun/star/wizards/ui/event/Task.java b/wizards/com/sun/star/wizards/ui/event/Task.java
index 50268c8233b8..f4f5394792ac 100644
--- a/wizards/com/sun/star/wizards/ui/event/Task.java
+++ b/wizards/com/sun/star/wizards/ui/event/Task.java
@@ -33,7 +33,7 @@ public class Task
private int failed = 0;
private int max = 0;
private String taskName;
- private List listeners = new ArrayList();
+ private List<TaskListener> listeners = new ArrayList<TaskListener>();
private String subtaskName;
public Task(String taskName_, String subtaskName_, int max_)
@@ -108,7 +108,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).taskStatusChanged(te);
+ listeners.get(i).taskStatusChanged(te);
}
}
@@ -118,7 +118,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).taskStarted(te);
+ listeners.get(i).taskStarted(te);
}
}
@@ -128,7 +128,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).taskFinished(te);
+ listeners.get(i).taskFinished(te);
}
}
@@ -138,7 +138,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).taskFinished(te);
+ listeners.get(i).taskFinished(te);
}
}
@@ -148,7 +148,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).subtaskNameChanged(te);
+ listeners.get(i).subtaskNameChanged(te);
}
}
diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.java b/wizards/com/sun/star/wizards/web/FTPDialog.java
index 67d2eb77593c..3bd54189ea6e 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialog.java
+++ b/wizards/com/sun/star/wizards/web/FTPDialog.java
@@ -143,7 +143,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
//Resources Object
private FTPDialogResources resources;
- private List dataAware = new ArrayList();
+ private List<DataAware> dataAware = new ArrayList<DataAware>();
public String username = PropertyNames.EMPTY_STRING;
public String password = PropertyNames.EMPTY_STRING;
/**
@@ -573,7 +573,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID
Object content = ucb.getContent(acountUrl);
//list files in the content.
- List l = ucb.listFiles(acountUrl, null);
+ List<String> l = ucb.listFiles(acountUrl, null);
//open the content
OpenCommandArgument2 aArg = new OpenCommandArgument2();
diff --git a/wizards/com/sun/star/wizards/web/Process.java b/wizards/com/sun/star/wizards/web/Process.java
index 89c763c60c09..fa8bc53309eb 100644
--- a/wizards/com/sun/star/wizards/web/Process.java
+++ b/wizards/com/sun/star/wizards/web/Process.java
@@ -100,7 +100,7 @@ public class Process implements WebWizardConst, ProcessErrors
* This is a cache for exporters, so I do not need to
* instanciate the same exporter more than once.
*/
- private Map exporters = new HashMap(3);
+ private Map<CGExporter, Exporter> exporters = new HashMap<CGExporter, Exporter>(3);
private boolean result;
public Process(
@@ -499,21 +499,21 @@ public class Process implements WebWizardConst, ProcessErrors
/*
* a map that contains xsl templates. the keys are the xsl file names.
*/
- Map templates = layout.getTemplates(xmsf);
+ Map<String, Templates> templates = layout.getTemplates(xmsf);
task.advance(true, TASK_GENERATE_XSL);
/*
* each template generates a page.
*/
- for (Iterator i = templates.keySet().iterator(); i.hasNext();)
+ for (Iterator<String> i = templates.keySet().iterator(); i.hasNext();)
{
String key = PropertyNames.EMPTY_STRING;
- key = (String) i.next();
+ key = i.next();
- Transformer transformer = ((Templates) templates.get(key)).newTransformer();
+ Transformer transformer = templates.get(key).newTransformer();
doc.normalize();
task.advance(true);
@@ -814,7 +814,7 @@ public class Process implements WebWizardConst, ProcessErrors
IllegalAccessException,
InstantiationException
{
- Exporter exp = (Exporter) exporters.get(export);
+ Exporter exp = exporters.get(export);
if (exp == null)
{
exp = createExporter(export);
diff --git a/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java b/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java
index 6a50044ed310..aec70c806654 100644
--- a/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java
+++ b/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.java
@@ -33,7 +33,7 @@ import com.sun.star.wizards.common.IRenderer;
public class ProcessStatusRenderer implements IRenderer, WebWizardConst
{
- Map strings = new HashMap(12);
+ Map<String, String> strings = new HashMap<String, String>(12);
public ProcessStatusRenderer(WebWizardDialogResources res)
{
@@ -54,6 +54,6 @@ public class ProcessStatusRenderer implements IRenderer, WebWizardConst
public String render(Object object)
{
- return (String) strings.get(object);
+ return strings.get(object);
}
}
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.java b/wizards/com/sun/star/wizards/web/WWD_Events.java
index 5fa4b1d77db3..3fdb536b91db 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.java
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.java
@@ -523,8 +523,8 @@ public abstract class WWD_Events extends WWD_Startup
*/
private void updatePublishUI(int number)
{
- ((DataAware) pubAware.get(number)).updateUI();
- ((DataAware) pubAware.get(number + 1)).updateUI();
+ pubAware.get(number).updateUI();
+ pubAware.get(number + 1).updateUI();
checkPublish();
}
diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.java b/wizards/com/sun/star/wizards/web/WWD_Startup.java
index e17aa64bb22e..442f9a4e4269 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Startup.java
+++ b/wizards/com/sun/star/wizards/web/WWD_Startup.java
@@ -125,14 +125,14 @@ public abstract class WWD_Startup extends WWD_General
* which relay on the selected document
* as DataObject (or Model).
*/
- protected List docAware = new ArrayList();
+ protected List<DataAware> docAware = new ArrayList<DataAware>();
/**
* The Vector containing DataAware objects
* which relay on the session's generalInfo
* Object (CGSession.cp_GeneralInfo) as
* DataObject (or model).
*/
- protected List genAware = new ArrayList();
+ protected List<DataAware> genAware = new ArrayList<DataAware>();
/**
* The vector containing DataAware objectscm25npd ..
* which relay on the session's Design Object
@@ -140,7 +140,7 @@ public abstract class WWD_Startup extends WWD_General
* (or model).
*
*/
- protected List designAware = new ArrayList();
+ protected List<DataAware> designAware = new ArrayList<DataAware>();
/**
* A Vector containig the DataAware objects
* which relay on Publishing Objects.
@@ -149,7 +149,7 @@ public abstract class WWD_Startup extends WWD_General
* on a <b>different</b> CGPublish object,
* So they are handled with more care.
*/
- protected List pubAware = new ArrayList(3);
+ protected List<DataAware> pubAware = new ArrayList<DataAware>(3);
/**
* The DataAware object which handles
* the documents-list events.
@@ -746,8 +746,8 @@ public abstract class WWD_Startup extends WWD_General
*/
private void mount(Object data, int i)
{
- ((DataAware) pubAware.get(i * 2)).setDataObject(data, true);
- ((DataAware) pubAware.get(i * 2 + 1)).setDataObject(data, true);
+ pubAware.get(i * 2).setDataObject(data, true);
+ pubAware.get(i * 2 + 1).setDataObject(data, true);
}
/**
@@ -769,11 +769,11 @@ public abstract class WWD_Startup extends WWD_General
* @param data
* @param list
*/
- protected void mount(Object data, List list)
+ protected void mount(Object data, List<DataAware> list)
{
for (int i = 0; i < list.size(); i++)
{
- ((DataAware) list.get(i)).setDataObject(data, true);
+ list.get(i).setDataObject(data, true);
}
}
@@ -954,7 +954,7 @@ public abstract class WWD_Startup extends WWD_General
}
}
- private class StylesComparator implements Comparator
+ private class StylesComparator implements Comparator<Object>
{
/* (non-Javadoc)
diff --git a/wizards/com/sun/star/wizards/web/data/CGLayout.java b/wizards/com/sun/star/wizards/web/data/CGLayout.java
index da76594e134d..c4c26c0e4968 100644
--- a/wizards/com/sun/star/wizards/web/data/CGLayout.java
+++ b/wizards/com/sun/star/wizards/web/data/CGLayout.java
@@ -32,12 +32,12 @@ public class CGLayout extends ConfigSetItem
public String cp_Name;
public String cp_FSName;
- private Map templates;
+ private Map<String, Templates> templates;
private void createTemplates(XMultiServiceFactory xmsf) throws Exception
{
- templates = new HashMap(3);
+ templates = new HashMap<String, Templates>(3);
TransformerFactory tf = TransformerFactory.newInstance();
@@ -66,7 +66,7 @@ public class CGLayout extends ConfigSetItem
};
}
- public Map getTemplates(XMultiServiceFactory xmsf) throws Exception
+ public Map<String, Templates> getTemplates(XMultiServiceFactory xmsf) throws Exception
{
// TODO uncomment...
diff --git a/wizards/com/sun/star/wizards/web/data/CGSettings.java b/wizards/com/sun/star/wizards/web/data/CGSettings.java
index 09764e8c42fd..c3dfd6815b29 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSettings.java
+++ b/wizards/com/sun/star/wizards/web/data/CGSettings.java
@@ -63,7 +63,7 @@ public class CGSettings extends ConfigGroup
public ConfigSet savedSessions = new ConfigSet(CGSessionName.class);
public CGSession cp_DefaultSession = new CGSession();
public String cp_LastSavedSession;
- private Map exportersMap = new HashMap();
+ private Map<String, CGExporter[]> exportersMap = new HashMap<String, CGExporter[]>();
private XMultiServiceFactory xmsf;
String[] resources;
public Formatter formatter;
@@ -93,7 +93,7 @@ public class CGSettings extends ConfigGroup
public CGExporter[] getExporters(String mime)
{
- CGExporter[] exps = (CGExporter[]) exportersMap.get(mime);
+ CGExporter[] exps = exportersMap.get(mime);
if (exps == null)
{
exportersMap.put(mime, exps = createExporters(mime));
@@ -104,7 +104,7 @@ public class CGSettings extends ConfigGroup
private CGExporter[] createExporters(String mime)
{
Object[] exporters = cp_Exporters.items();
- ArrayList v = new ArrayList();
+ ArrayList<Object> v = new ArrayList<Object>();
for (int i = 0; i < exporters.length; i++)
{
if (((CGExporter) exporters[i]).supports(mime))
@@ -119,7 +119,7 @@ public class CGSettings extends ConfigGroup
}
}
}
- return (CGExporter[]) v.toArray(new CGExporter[v.size()]);
+ return v.toArray(new CGExporter[v.size()]);
}
/**
diff --git a/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java b/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java
index 7f3fb6d91851..8c6cc45986ee 100644
--- a/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java
+++ b/wizards/com/sun/star/wizards/web/export/ConfiguredExporter.java
@@ -38,9 +38,9 @@ public class ConfiguredExporter extends FilterExporter
public void init(CGExporter exporter)
{
super.init(exporter);
- for (Iterator i = exporter.cp_Arguments.keys().iterator(); i.hasNext();)
+ for (Iterator<String> i = exporter.cp_Arguments.keys().iterator(); i.hasNext();)
{
- Object key = i.next();
+ String key = i.next();
if (!key.equals("Filter"))
{
Object value = exporter.cp_Arguments.getElement(key);
diff --git a/wizards/com/sun/star/wizards/web/status/ErrorLog.java b/wizards/com/sun/star/wizards/web/status/ErrorLog.java
index ef751398eb54..d095e740e953 100644
--- a/wizards/com/sun/star/wizards/web/status/ErrorLog.java
+++ b/wizards/com/sun/star/wizards/web/status/ErrorLog.java
@@ -30,7 +30,7 @@ import java.util.List;
public class ErrorLog implements ErrorReporter
{
- private List errors = new ArrayList();
+ private List<Err> errors = new ArrayList<Err>();
public void error(Exception ex, Object obj, String s)
{
diff --git a/wizards/com/sun/star/wizards/web/status/Task.java b/wizards/com/sun/star/wizards/web/status/Task.java
index af6033ae723b..92338b9a514e 100644
--- a/wizards/com/sun/star/wizards/web/status/Task.java
+++ b/wizards/com/sun/star/wizards/web/status/Task.java
@@ -34,7 +34,7 @@ public class Task
private int failed = 0;
private int max = 0;
private String taskName;
- private List listeners = new ArrayList();
+ private List<TaskListener> listeners = new ArrayList<TaskListener>();
private String subtaskName;
public Task(String taskName_, String subtaskName_, int max_)
@@ -104,7 +104,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).taskStatusChanged(te);
+ listeners.get(i).taskStatusChanged(te);
}
}
@@ -114,7 +114,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).taskStarted(te);
+ listeners.get(i).taskStarted(te);
}
}
@@ -124,7 +124,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).taskFinished(te);
+ listeners.get(i).taskFinished(te);
}
}
@@ -134,7 +134,7 @@ public class Task
for (int i = 0; i < listeners.size(); i++)
{
- ((TaskListener) listeners.get(i)).subtaskNameChanged(te);
+ listeners.get(i).subtaskNameChanged(te);
}
}