diff options
Diffstat (limited to 'wizards')
30 files changed, 293 insertions, 249 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java index 82d5ec15e97b..b8eaccd6741e 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.java @@ -154,7 +154,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data /** * A temporary variable used to list all items and map them. */ - List _allItems = new Vector(); + List _allItems = new ArrayList(); /** * keep a reference on some static items in the document, * so when their content is changed (through the user), we @@ -943,7 +943,7 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data /** * the items in the table. */ - List items = new Vector(6); + List items = new ArrayList(6); public ItemsTable(Object section_, Object table_) { @@ -1119,21 +1119,21 @@ public class AgendaTemplate extends TextDocument implements TemplateConsts, Data /** * A List of Cell Formatters for the first row. */ - List firstRowFormat = new Vector(); + List firstRowFormat = new ArrayList(); /** * A List of Cell Formatters for the last row. * (will contain them in reverse order) */ - List lastRowFormat = new Vector(); + List lastRowFormat = new ArrayList(); /** * the format of the cell of each topic cell. */ - List topicCellFormats = new Vector(); + List topicCellFormats = new ArrayList(); /** * for each topic cell there is * a member in this vector */ - List topicCells = new Vector(); + List topicCells = new ArrayList(); 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 Vector(); + List writtenTopics = new ArrayList(); /** * Analyze the structure of the Topics table. diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java index 33bb00ec6790..52b053c1047e 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.java @@ -18,7 +18,7 @@ package com.sun.star.wizards.agenda; -import java.util.Vector; +import java.util.ArrayList; import com.sun.star.awt.ItemEvent; import com.sun.star.awt.VclWindowPeerAttribute; @@ -37,16 +37,16 @@ import com.sun.star.util.XCloseable; import com.sun.star.wizards.common.Configuration; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.NoValidPathException; -import com.sun.star.wizards.common.SystemDialog; -import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.document.OfficeDocument; import com.sun.star.wizards.text.ViewHandler; import com.sun.star.wizards.ui.PathSelection; import com.sun.star.wizards.ui.XPathSelectionListener; -import com.sun.star.wizards.ui.event.DataAware; +import com.sun.star.wizards.ui.event.DataAware; import com.sun.star.wizards.ui.event.RadioDataAware; import com.sun.star.wizards.ui.event.UnoDataAware; @@ -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 Vector()); + agendaTemplate.load(agendaTemplates[1][agenda.cp_AgendaType] , new ArrayList()); // 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 b34d53b05b91..3a2a10972565 100644 --- a/wizards/com/sun/star/wizards/agenda/TopicsControl.java +++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.java @@ -496,7 +496,7 @@ public class TopicsControl extends ControlScroller implements XFocusListener protected void insertControlGroup(int _index, int npos) { ControlRow oControlRow = new ControlRow((AgendaWizardDialog) CurUnoDialog, iCompPosX, npos, _index, tabIndex); - ControlGroupVector.addElement(oControlRow); + ControlGroupVector.add(oControlRow); tabIndex += 4; } diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.java b/wizards/com/sun/star/wizards/common/ConfigSet.java index 73ca3c2e05da..7971551e78f0 100644 --- a/wizards/com/sun/star/wizards/common/ConfigSet.java +++ b/wizards/com/sun/star/wizards/common/ConfigSet.java @@ -34,7 +34,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel private Class childClass; private Map childrenMap = new HashMap(); - private List childrenList = new Vector(); + private List childrenList = new ArrayList(); public Object root; /** * After reading the configuration set items, @@ -404,7 +404,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel * to a vector, ordered by there index property */ String[] names = Configuration.getChildrenNames(confView); - Vector v = new Vector(names.length); + ArrayList v = new ArrayList(names.length); Object member = null; int index = 0; for (int i = 0; i < names.length; i++) @@ -417,7 +417,7 @@ public class ConfigSet implements ConfigNode, XMLProvider, ListModel { v.add(null); } - v.setElementAt(member, index); + v.set(index, member); } /** diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java b/wizards/com/sun/star/wizards/common/JavaTools.java index af417b9b1525..da92a7a97c34 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)) { - Vector StringVector = new Vector(); + ArrayList StringVector = new ArrayList(); String LocString = null; int iIndex; do @@ -375,18 +375,18 @@ public class JavaTools iIndex = MainString.indexOf(Token); if (iIndex < 0) { - StringVector.addElement(MainString); + StringVector.add(MainString); } else { - StringVector.addElement(MainString.substring(0, iIndex)); + StringVector.add(MainString.substring(0, iIndex)); MainString = MainString.substring(iIndex + 1, MainString.length()); } } while (iIndex >= 0); int FieldCount = StringVector.size(); StringArray = new String[FieldCount]; - StringVector.copyInto(StringArray); + StringVector.toArray(StringArray); } else { @@ -501,7 +501,7 @@ public class JavaTools }; if ((baselist != null) && (_complist != null)) { - Vector retvector = new Vector(); + ArrayList retvector = new ArrayList(); // 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) { - Vector retvector = new Vector(); + ArrayList retvector = new ArrayList(); 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) { - Vector tempbaselist = new Vector(); + ArrayList tempbaselist = new ArrayList(); for (int i = 0; i < _sbaselist.length; i++) { if (FieldInList(_sdellist, _sbaselist[i]) == -1) diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java index 847e7ac265fc..69b7a53645d0 100644 --- a/wizards/com/sun/star/wizards/common/UCB.java +++ b/wizards/com/sun/star/wizards/common/UCB.java @@ -18,14 +18,25 @@ package com.sun.star.wizards.common; +import java.util.ArrayList; import java.util.List; -import java.util.Vector; import com.sun.star.beans.Property; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.sdbc.XResultSet; import com.sun.star.sdbc.XRow; -import com.sun.star.ucb.*; +import com.sun.star.ucb.Command; +import com.sun.star.ucb.GlobalTransferCommandArgument; +import com.sun.star.ucb.NameClash; +import com.sun.star.ucb.OpenCommandArgument2; +import com.sun.star.ucb.OpenMode; +import com.sun.star.ucb.TransferCommandOperation; +import com.sun.star.ucb.XCommandProcessor; +import com.sun.star.ucb.XContentAccess; +import com.sun.star.ucb.XContentIdentifier; +import com.sun.star.ucb.XContentIdentifierFactory; +import com.sun.star.ucb.XContentProvider; +import com.sun.star.ucb.XDynamicResultSet; import com.sun.star.uno.UnoRuntime; /** @@ -163,7 +174,7 @@ public class UCB XResultSet xResultSet = xSet.getStaticResultSet(); - List files = new Vector(); + List files = new ArrayList(); if (xResultSet.first()) { diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index b827e68ed451..8133074e7375 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -17,14 +17,12 @@ */ package com.sun.star.wizards.db; -import com.sun.star.awt.XWindow; -import com.sun.star.lang.XInitialization; -import com.sun.star.ui.dialogs.XExecutableDialog; +import java.util.ArrayList; +import java.util.logging.Level; +import java.util.logging.Logger; -import com.sun.star.lang.IllegalArgumentException; -import com.sun.star.lang.WrappedTargetException; -import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.awt.VclWindowPeerAttribute; +import com.sun.star.awt.XWindow; import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.UnknownPropertyException; @@ -35,35 +33,39 @@ import com.sun.star.container.XNameAccess; import com.sun.star.container.XNameContainer; import com.sun.star.frame.XModel; import com.sun.star.frame.XStorable; +import com.sun.star.lang.IllegalArgumentException; +import com.sun.star.lang.Locale; +import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XComponent; -import com.sun.star.sdbc.DataType; -import com.sun.star.sdb.XOfficeDatabaseDocument; +import com.sun.star.lang.XInitialization; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XSingleServiceFactory; +import com.sun.star.sdb.XCompletedConnection; import com.sun.star.sdb.XDocumentDataSource; -import com.sun.star.sdb.tools.XConnectionTools; -import com.sun.star.sdbcx.XColumnsSupplier; - -import com.sun.star.ucb.XSimpleFileAccess; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.uno.AnyConverter; -import com.sun.star.util.XCloseable; -import com.sun.star.util.XNumberFormatsSupplier; - -import com.sun.star.task.XInteractionHandler; import com.sun.star.sdb.XFormDocumentsSupplier; +import com.sun.star.sdb.XOfficeDatabaseDocument; +import com.sun.star.sdb.XQueriesSupplier; import com.sun.star.sdb.XQueryDefinitionsSupplier; import com.sun.star.sdb.XReportDocumentsSupplier; +import com.sun.star.sdb.tools.XConnectionTools; +import com.sun.star.sdbc.DataType; import com.sun.star.sdbc.SQLException; -import com.sun.star.sdbc.XDatabaseMetaData; +import com.sun.star.sdbc.XConnection; import com.sun.star.sdbc.XDataSource; +import com.sun.star.sdbc.XDatabaseMetaData; import com.sun.star.sdbc.XResultSet; import com.sun.star.sdbc.XRow; -import com.sun.star.sdb.XCompletedConnection; -import com.sun.star.lang.Locale; -import com.sun.star.lang.XSingleServiceFactory; -import com.sun.star.sdb.XQueriesSupplier; -import com.sun.star.sdbc.XConnection; +import com.sun.star.sdbcx.XColumnsSupplier; import com.sun.star.sdbcx.XTablesSupplier; +import com.sun.star.task.XInteractionHandler; +import com.sun.star.ucb.XSimpleFileAccess; +import com.sun.star.ui.dialogs.XExecutableDialog; +import com.sun.star.uno.Any; +import com.sun.star.uno.AnyConverter; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XInterface; +import com.sun.star.util.XCloseable; +import com.sun.star.util.XNumberFormatsSupplier; import com.sun.star.wizards.common.Configuration; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.FileAccess; @@ -71,13 +73,9 @@ import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.NamedValueCollection; import com.sun.star.wizards.common.NumberFormatter; import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.common.SystemDialog; -import com.sun.star.uno.Any; -import com.sun.star.wizards.common.PropertyNames; -import java.util.Vector; -import java.util.logging.Level; -import java.util.logging.Logger; public class DBMetaData { @@ -89,7 +87,7 @@ public class DBMetaData private XPropertySet xDataSourcePropertySet; public String[] DataSourceNames; public String[] CommandNames; - public java.util.Vector CommandObjects = new Vector(1); + public java.util.ArrayList CommandObjects = new ArrayList(1); public Locale aLocale; public int[] CommandTypes; public String DataSourceName; @@ -246,7 +244,7 @@ public class DBMetaData public void setTableByName(String _tableName) { CommandObject oTableObject = new CommandObject(_tableName, com.sun.star.sdb.CommandType.TABLE); - this.CommandObjects.addElement(oTableObject); + this.CommandObjects.add(oTableObject); } public CommandObject getTableByName(String _tablename) @@ -264,7 +262,7 @@ public class DBMetaData CommandObject oCommand = null; for (int i = 0; i < CommandObjects.size(); i++) { - oCommand = (CommandObject) CommandObjects.elementAt(i); + oCommand = (CommandObject) CommandObjects.get(i); if ((oCommand.Name.equals(_commandname)) && (oCommand.CommandType == _commandtype)) { return oCommand; @@ -273,7 +271,7 @@ public class DBMetaData if (oCommand == null) { oCommand = new CommandObject(_commandname, _commandtype); - CommandObjects.addElement(oCommand); + CommandObjects.add(oCommand); } return oCommand; } @@ -281,7 +279,7 @@ public class DBMetaData public void setQueryByName(String _QueryName) { CommandObject oQueryObject = new CommandObject(_QueryName, com.sun.star.sdb.CommandType.QUERY); - this.CommandObjects.addElement(oQueryObject); + this.CommandObjects.add(oQueryObject); } public class CommandObject @@ -964,10 +962,10 @@ public class DBMetaData try { XRow xRow = UnoRuntime.queryInterface( XRow.class, _xResultSet ); - Vector aColVector = new Vector(); + ArrayList aColVector = new ArrayList(); while (_xResultSet.next()) { - aColVector.addElement(xRow.getString(_icol)); + aColVector.add(xRow.getString(_icol)); } sColValues = new String[aColVector.size()]; aColVector.toArray(sColValues); diff --git a/wizards/com/sun/star/wizards/db/RecordParser.java b/wizards/com/sun/star/wizards/db/RecordParser.java index ea1079fce5ce..e19f18bf8ba3 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.Vector DataVector) + public boolean getcurrentRecordData(java.util.ArrayList DataVector) { Object[] RecordValueArray = new Object[RecordFieldColumns.length]; for (int i = 0; i < RecordFieldColumns.length; i++) @@ -283,7 +283,7 @@ public class RecordParser extends QueryMetaData FieldColumn CurDBFieldColumn = this.RecordFieldColumns[i]; RecordValueArray[i] = getColumnValue(CurDBFieldColumn.ColIndex, CurDBFieldColumn.getFieldType()); //FinalColIndex } - DataVector.addElement(RecordValueArray); + DataVector.add(RecordValueArray); return true; } diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java index 9d4183d7c142..cb331fb5e872 100644 --- a/wizards/com/sun/star/wizards/db/RelationController.java +++ b/wizards/com/sun/star/wizards/db/RelationController.java @@ -17,7 +17,7 @@ */ package com.sun.star.wizards.db; -import java.util.Vector; +import java.util.ArrayList; import com.sun.star.sdbc.SQLException; import com.sun.star.sdbc.XResultSet; @@ -62,7 +62,7 @@ public class RelationController extends CommandName try { String[] sTableNames = super.getCommandMetaData().getTableNames(); - Vector aReferencedTableVector = new Vector(); + ArrayList aReferencedTableVector = new ArrayList(); 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; - Vector aMasterFieldNamesVector = new Vector(); - Vector aSlaveFieldNamesVector = new Vector(); + ArrayList aMasterFieldNamesVector = new ArrayList(); + ArrayList aSlaveFieldNamesVector = new ArrayList(); 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 83440c904367..e1b12dac85fe 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -17,18 +17,15 @@ */ package com.sun.star.wizards.db; -import com.sun.star.awt.XWindow; -import com.sun.star.beans.PropertyVetoException; -import com.sun.star.beans.UnknownPropertyException; -import com.sun.star.lang.IllegalArgumentException; -import com.sun.star.lang.WrappedTargetException; -import com.sun.star.sdbc.SQLException; -import com.sun.star.wizards.common.JavaTools; +import java.util.ArrayList; import java.util.Vector; import com.sun.star.awt.VclWindowPeerAttribute; +import com.sun.star.awt.XWindow; import com.sun.star.beans.Property; import com.sun.star.beans.PropertyValue; +import com.sun.star.beans.PropertyVetoException; +import com.sun.star.beans.UnknownPropertyException; import com.sun.star.beans.XPropertySet; import com.sun.star.container.ContainerEvent; import com.sun.star.container.XContainer; @@ -37,7 +34,10 @@ import com.sun.star.container.XHierarchicalNameAccess; import com.sun.star.container.XIndexAccess; import com.sun.star.container.XNameAccess; import com.sun.star.lang.EventObject; +import com.sun.star.lang.IllegalArgumentException; +import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.sdbc.SQLException; import com.sun.star.sdbcx.KeyType; import com.sun.star.sdbcx.XAppend; import com.sun.star.sdbcx.XColumnsSupplier; @@ -47,6 +47,7 @@ import com.sun.star.sdbcx.XKeysSupplier; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.UnoRuntime; import com.sun.star.wizards.common.Desktop; +import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.common.PropertyNames; @@ -64,8 +65,8 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen private XAppend xKeyAppend; private XDrop xKeyDrop; private String[] sTableFilters = null; - private Vector columncontainer; - private Vector keycolumncontainer; + private ArrayList columncontainer; + private ArrayList keycolumncontainer; public XHierarchicalNameAccess xTableHierarchicalNameAccess; private CommandName ComposedTableName; private XAppend xKeyColAppend; @@ -83,8 +84,8 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen public TableDescriptor(XMultiServiceFactory xMSF, XWindow _xWindow, String _sColumnAlreadyExistsMessage) { super(xMSF); - columncontainer = new Vector(); - keycolumncontainer = new Vector(); + columncontainer = new ArrayList(); + keycolumncontainer = new ArrayList(); sColumnAlreadyExistsMessage = _sColumnAlreadyExistsMessage; xWindow = _xWindow; } @@ -410,7 +411,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen oColumnDescriptor.Name = (String) _oValue; } columncontainer.remove(i); - columncontainer.insertElementAt(oColumnDescriptor, i); + columncontainer.add(i, oColumnDescriptor); return true; } } @@ -449,7 +450,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen oColumnDescriptor.xColPropertySet = _xColPropertySet; oColumnDescriptor.Name = (String) _xColPropertySet.getPropertyValue(PropertyNames.PROPERTY_NAME); columncontainer.remove(i); - columncontainer.insertElementAt(oColumnDescriptor, i); + columncontainer.add(i, oColumnDescriptor); return true; } } @@ -711,7 +712,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen public String[] getNonBinaryFieldNames() { - Vector NonBinaryFieldNameVector = new Vector(); + ArrayList NonBinaryFieldNameVector = new ArrayList(); try { for (int i = 0; i < columncontainer.size(); i++) @@ -725,7 +726,7 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen itype = AnyConverter.toInt(xColPropertySet.getPropertyValue("Type")); if (!isBinaryDataType(itype)) { - NonBinaryFieldNameVector.addElement(oColumnDescriptor.Name); + NonBinaryFieldNameVector.add(oColumnDescriptor.Name); } } catch (Exception e) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java index 69a0ce2e6516..42f3ddc2c946 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java @@ -17,36 +17,44 @@ */ package com.sun.star.wizards.fax; -import java.util.Vector; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.wizards.common.Desktop; -import com.sun.star.wizards.common.NoValidPathException; -import com.sun.star.wizards.common.SystemDialog; +import java.util.ArrayList; + import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextComponent; import com.sun.star.awt.XWindow; import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.PropertyValue; +import com.sun.star.document.MacroExecMode; import com.sun.star.document.XDocumentProperties; import com.sun.star.document.XDocumentPropertiesSupplier; -import com.sun.star.graphic.XGraphicProvider; import com.sun.star.graphic.XGraphic; +import com.sun.star.graphic.XGraphicProvider; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.task.XInteractionHandler; +import com.sun.star.text.XTextDocument; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.uno.RuntimeException; import com.sun.star.uno.UnoRuntime; -import com.sun.star.wizards.text.*; -import com.sun.star.wizards.common.*; -import com.sun.star.task.XInteractionHandler; -import com.sun.star.text.XTextDocument; import com.sun.star.uno.XInterface; import com.sun.star.util.CloseVetoException; import com.sun.star.util.XCloseable; -import com.sun.star.wizards.document.*; -import com.sun.star.wizards.ui.*; -import com.sun.star.wizards.ui.event.*; +import com.sun.star.wizards.common.Configuration; +import com.sun.star.wizards.common.Desktop; +import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.Helper; -import com.sun.star.document.MacroExecMode; +import com.sun.star.wizards.common.NoValidPathException; +import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.common.SystemDialog; +import com.sun.star.wizards.document.OfficeDocument; +import com.sun.star.wizards.text.TextFieldHandler; +import com.sun.star.wizards.text.ViewHandler; +import com.sun.star.wizards.ui.PathSelection; +import com.sun.star.wizards.ui.XPathSelectionListener; +import com.sun.star.wizards.ui.event.DataAware; +import com.sun.star.wizards.ui.event.RadioDataAware; +import com.sun.star.wizards.ui.event.UnoDataAware; public class FaxWizardDialogImpl extends FaxWizardDialog { @@ -63,8 +71,8 @@ public class FaxWizardDialogImpl extends FaxWizardDialog XTextDocument xTextDocument; PathSelection myPathSelection; CGFaxWizard myConfig; - Vector mainDA = new Vector(); - Vector faxDA = new Vector(); + ArrayList mainDA = new ArrayList(); + ArrayList faxDA = new ArrayList(); 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 83e48f15c5bd..974b74551702 100644 --- a/wizards/com/sun/star/wizards/form/FormDocument.java +++ b/wizards/com/sun/star/wizards/form/FormDocument.java @@ -26,9 +26,8 @@ ************************************************************************/ package com.sun.star.wizards.form; -import java.util.Vector; +import java.util.ArrayList; -import com.sun.star.wizards.text.TextDocument; import com.sun.star.awt.Point; import com.sun.star.awt.Size; import com.sun.star.beans.PropertyValue; @@ -37,19 +36,20 @@ import com.sun.star.container.XNameContainer; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; -import com.sun.star.wizards.db.*; -import com.sun.star.wizards.common.*; -import com.sun.star.wizards.ui.*; -import com.sun.star.wizards.text.TextStyleHandler; -import com.sun.star.wizards.text.ViewHandler; +import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.db.CommandMetaData; import com.sun.star.wizards.document.Control; import com.sun.star.wizards.document.DatabaseControl; import com.sun.star.wizards.document.FormHandler; import com.sun.star.wizards.document.GridControl; +import com.sun.star.wizards.text.TextDocument; +import com.sun.star.wizards.text.TextStyleHandler; +import com.sun.star.wizards.text.ViewHandler; public class FormDocument extends TextDocument { - protected Vector oControlForms = new Vector(); + protected ArrayList oControlForms = new ArrayList(); protected CommandMetaData oMainFormDBMetaData; protected CommandMetaData oSubFormDBMetaData; protected String[][] LinkFieldNames; @@ -153,7 +153,7 @@ public class FormDocument extends TextDocument if (oControlForms.size() == 0) { final ControlForm aMainControlForm = new ControlForm(this, SOMAINFORM, aMainFormPoint, getMainFormSize(FormWizard.AS_GRID)); - oControlForms.addElement(aMainControlForm); + oControlForms.add(aMainControlForm); } else { @@ -168,7 +168,7 @@ public class FormDocument extends TextDocument { adjustMainFormSize(_NBorderType); final ControlForm aSubControlForm = new ControlForm(this, SOSUBFORM, getSubFormPoint(), getSubFormSize()); - oControlForms.addElement(aSubControlForm); + oControlForms.add(aSubControlForm); /* ((ControlForm) oControlForms.get(1))*/ aSubControlForm.initialize(curUIControlArranger.getSelectedArrangement(1), _NBorderType); } diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java index a89d84a9c8a1..4f2fb72d23e8 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java @@ -17,17 +17,10 @@ */ package com.sun.star.wizards.letter; +import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; -import java.util.Vector; -import com.sun.star.lang.IllegalArgumentException; -import com.sun.star.lang.WrappedTargetException; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.wizards.common.Configuration; -import com.sun.star.wizards.common.Desktop; -import com.sun.star.wizards.common.NoValidPathException; -import com.sun.star.wizards.common.SystemDialog; -import com.sun.star.wizards.common.PropertyNames; + import com.sun.star.awt.VclWindowPeerAttribute; import com.sun.star.awt.XTextComponent; import com.sun.star.awt.XWindow; @@ -37,22 +30,36 @@ import com.sun.star.container.NoSuchElementException; import com.sun.star.document.MacroExecMode; import com.sun.star.document.XDocumentProperties; import com.sun.star.document.XDocumentPropertiesSupplier; +import com.sun.star.lang.IllegalArgumentException; +import com.sun.star.lang.WrappedTargetException; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.task.XInteractionHandler; +import com.sun.star.text.XTextDocument; +import com.sun.star.text.XTextFrame; import com.sun.star.ucb.CommandAbortedException; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; -import com.sun.star.wizards.text.*; -import com.sun.star.wizards.common.*; -import com.sun.star.task.XInteractionHandler; -import com.sun.star.text.XTextFrame; -import com.sun.star.text.XTextDocument; import com.sun.star.uno.XInterface; import com.sun.star.util.CloseVetoException; import com.sun.star.util.XCloseable; -import com.sun.star.wizards.document.*; -import com.sun.star.wizards.ui.*; -import com.sun.star.wizards.ui.event.*; +import com.sun.star.wizards.common.Configuration; +import com.sun.star.wizards.common.Desktop; +import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.NoValidPathException; +import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.common.SystemDialog; +import com.sun.star.wizards.document.OfficeDocument; +import com.sun.star.wizards.text.TextFieldHandler; +import com.sun.star.wizards.text.TextFrameHandler; +import com.sun.star.wizards.text.ViewHandler; +import com.sun.star.wizards.ui.PathSelection; +import com.sun.star.wizards.ui.XPathSelectionListener; +import com.sun.star.wizards.ui.event.DataAware; +import com.sun.star.wizards.ui.event.RadioDataAware; +import com.sun.star.wizards.ui.event.UnoDataAware; public class LetterWizardDialogImpl extends LetterWizardDialog { @@ -84,9 +91,9 @@ public class LetterWizardDialogImpl extends LetterWizardDialog XTextDocument xTextDocument; PathSelection myPathSelection; CGLetterWizard myConfig; - Vector mainDA = new Vector(); - Vector letterDA = new Vector(); - Vector businessDA = new Vector(); + ArrayList mainDA = new ArrayList(); + ArrayList letterDA = new ArrayList(); + ArrayList businessDA = new ArrayList(); String[][] BusinessFiles; String[][] OfficialFiles; String[][] PrivateFiles; @@ -1125,7 +1132,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog { PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING }; - Vector allPaths = new Vector(); + ArrayList allPaths = new ArrayList(); String sLetterSubPath = "/wizard/letter/"; try @@ -1169,7 +1176,7 @@ public class LetterWizardDialogImpl extends LetterWizardDialog e.printStackTrace(); } - Vector StringsVector = new Vector(); + ArrayList StringsVector = new ArrayList(); String[] LanguageLabels; @@ -1222,9 +1229,9 @@ public class LetterWizardDialogImpl extends LetterWizardDialog LanguageLabels = new String[StringsVector.size()]; for(int i = 0; i<StringsVector.size(); i++) { - Norms[i] = ((Strings)StringsVector.elementAt(i)).Norm; - NormPaths[i] = ((Strings)StringsVector.elementAt(i)).NormPath; - LanguageLabels[i] = ((Strings)StringsVector.elementAt(i)).LanguageLabel; + Norms[i] = ((Strings)StringsVector.get(i)).Norm; + NormPaths[i] = ((Strings)StringsVector.get(i)).NormPath; + LanguageLabels[i] = ((Strings)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 c92e0ae2167d..0e5e016fab54 100644 --- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java +++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java @@ -17,18 +17,21 @@ */ package com.sun.star.wizards.report; +import java.util.ArrayList; + import com.sun.star.wizards.common.JavaTools; import com.sun.star.wizards.common.PropertyNames; -import com.sun.star.wizards.ui.*; -import com.sun.star.wizards.db.*; - -import java.util.Vector; +import com.sun.star.wizards.db.CommandMetaData; +import com.sun.star.wizards.db.QueryMetaData; +import com.sun.star.wizards.ui.FieldSelection; +import com.sun.star.wizards.ui.UIConsts; +import com.sun.star.wizards.ui.WizardDialog; public class GroupFieldHandler extends FieldSelection { private IReportDocument CurReportDocument; - private Vector GroupFieldVector = new Vector(); + private ArrayList GroupFieldVector = new ArrayList(); private QueryMetaData CurDBMetaData; private WizardDialog oWizardDialog; private static final short MAXSELFIELDS = 4; @@ -73,8 +76,8 @@ public class GroupFieldHandler extends FieldSelection { try { - Vector NormalFieldsVector = new Vector(); - Vector SelFieldsVector = new Vector(); + ArrayList NormalFieldsVector = new ArrayList(); + ArrayList SelFieldsVector = new ArrayList(); String[] sFieldNames = CurDBMetaData.getFieldNames(); for (int i = 0; i < sFieldNames.length; i++) { @@ -103,14 +106,14 @@ public class GroupFieldHandler extends FieldSelection public void removeGroupFieldNames() { emptyFieldsListBoxes(); - GroupFieldVector.removeAllElements(); + GroupFieldVector.clear(); CurUnoDialog.setControlProperty("lblBlindTextNote_1", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE); } public void getGroupFieldNames(CommandMetaData CurDBMetaData) { String[] GroupFieldNames = new String[GroupFieldVector.size()]; - GroupFieldVector.copyInto(GroupFieldNames); + GroupFieldVector.toArray(GroupFieldNames); CurDBMetaData.GroupFieldNames = GroupFieldNames; } // @Override diff --git a/wizards/com/sun/star/wizards/report/IReportDocument.java b/wizards/com/sun/star/wizards/report/IReportDocument.java index ac9f8b64cad2..1e8d2b8b8b94 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, Vector GroupFieldVector, ArrayList ReportPath, int iSelCount); + public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList GroupFieldVector, ArrayList 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.Vector GroupFieldVector); + public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, java.util.ArrayList GroupFieldVector); /** * set the list how to group diff --git a/wizards/com/sun/star/wizards/report/ReportTextDocument.java b/wizards/com/sun/star/wizards/report/ReportTextDocument.java index c7735c8232ee..78140cb52d9f 100644 --- a/wizards/com/sun/star/wizards/report/ReportTextDocument.java +++ b/wizards/com/sun/star/wizards/report/ReportTextDocument.java @@ -61,7 +61,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen private int PageWidth; private Rectangle PosSize; // private String ReportFolderName; - public Vector DBColumnsVector; + public ArrayList 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.Vector(); + DBColumnsVector = new java.util.ArrayList(); 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.elementAt(i); + DBColumn CurDBColumn = (DBColumn) 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.elementAt(i)).insertColumnData(oTextFieldHandler, this.bIsCurLandscape); + ((DBColumn) DBColumnsVector.get(i)).insertColumnData(oTextFieldHandler, this.bIsCurLandscape); } } @@ -385,7 +385,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen OldDBColumn = (DBColumn) DBColumnsVector.get(i); CurDBColumn = new DBColumn(oTextTableHandler, CurDBMetaData, SelGroupNames[i], i, TableName, OldDBColumn); CurDBColumn.formatValueCell(); - DBColumnsVector.setElementAt(CurDBColumn, i); + DBColumnsVector.set(i, CurDBColumn); CurDBColumn.insertColumnData(oTextFieldHandler, this.bIsCurLandscape); } } @@ -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.elementAt(i)).insertColumnData(oTextFieldHandler, this.bIsCurLandscape); + ((DBColumn) 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, Vector GroupFieldVector, ArrayList ReportPath, int iSelCount) + public boolean addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList GroupFieldVector, ArrayList ReportPath, int iSelCount) { DBColumn CurDBColumn = null; int GroupCount = GroupFieldVector.size(); @@ -473,7 +473,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { removeGroupNamesofRecordTable(iSelCount); FieldColumn CurFieldColumn = CurDBMetaData.getFieldColumnByTitle(CurGroupTitle); - GroupFieldVector.addElement(CurFieldColumn.getFieldName()); + GroupFieldVector.add(CurFieldColumn.getFieldName()); GroupCount += 1; try { @@ -481,7 +481,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen oTextSectionHandler.insertTextSection(GROUPSECTION + GroupCount, sPath, GroupCount == 1); CurDBColumn = new DBColumn(oTextTableHandler, CurDBMetaData, CurFieldColumn.getFieldName(), GroupCount - 1, TBLGROUPSECTION + (GroupCount)); CurDBColumn.formatValueCell(); - DBColumnsVector.addElement(CurDBColumn); + DBColumnsVector.add(CurDBColumn); replaceFieldValueInGroupTable(CurDBColumn, GroupCount - 1); } catch (Exception exception) @@ -494,11 +494,11 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen return (CurDBColumn != null); } - public void removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, java.util.Vector GroupFieldVector) + public void removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, java.util.ArrayList GroupFieldVector) { removeGroupNamesofRecordTable(NewSelGroupNames.length + 1); FieldColumn CurFieldColumn = CurDBMetaData.getFieldColumnByTitle(CurGroupTitle); - GroupFieldVector.removeElement(CurFieldColumn.getFieldName()); + GroupFieldVector.remove(CurFieldColumn.getFieldName()); try { oTextSectionHandler.removeLastTextSection(); @@ -525,7 +525,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen { for (int i = CurFieldCount - 1; i >= GroupFieldCount; i--) { - DBColumnsVector.removeElementAt(i); + DBColumnsVector.remove(i); } } } @@ -559,7 +559,7 @@ class ReportTextDocument extends com.sun.star.wizards.text.TextDocument implemen } if (CurDBColumn.xNameCell != null) { - DBColumnsVector.addElement(CurDBColumn); + DBColumnsVector.add(CurDBColumn); } else { diff --git a/wizards/com/sun/star/wizards/report/ReportTextImplementation.java b/wizards/com/sun/star/wizards/report/ReportTextImplementation.java index 8a8a7ed266d3..e3dc075dfbf8 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 Vector(); + getDoc().DBColumnsVector = new ArrayList(); } protected ReportTextImplementation( XMultiServiceFactory i_serviceFactory ) @@ -351,7 +351,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme int ColIndex; boolean breset; Object oTable; - Vector DataVector = new Vector(); + ArrayList DataVector = new ArrayList(); 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.elementAt(ColIndex); + CurDBColumn = (DBColumn) 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.elementAt(ColIndex); + CurDBColumn = (DBColumn) 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.elementAt(ColIndex); + CurDBColumn = (DBColumn) getDoc().DBColumnsVector.get(ColIndex); Object oValue = PropertyNames.EMPTY_STRING; addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFGROUPSECTION + Integer.toString(ColIndex + 1), CurDBColumn, oValue); } @@ -450,14 +450,14 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme getDoc().removeLayoutTextTables(); } - private void insertDataToRecordTable(XTextCursor xTextCursor, Vector DataVector, int FieldCount) + private void insertDataToRecordTable(XTextCursor xTextCursor, ArrayList DataVector, int FieldCount) { int DataLength = DataVector.size(); if ((FieldCount > 0) && (DataLength > 0)) { addLinkedTextSection(xTextCursor, ReportTextDocument.COPYOFRECORDSECTION, null, null); Object[][] RecordArray = new Object[DataLength][FieldCount]; - DataVector.copyInto(RecordArray); + DataVector.toArray(RecordArray); XTextTable xTextTable = getDoc().oTextTableHandler.getlastTextTable(); if (DataLength > 1) { @@ -465,7 +465,7 @@ public class ReportTextImplementation extends ReportImplementationHelper impleme } OfficeDocument.ArraytoCellRange(RecordArray, xTextTable, 0, 1); } - DataVector.removeAllElements(); + DataVector.clear(); } // public void updateProgressDisplay(int iCounter) // { @@ -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.elementAt(i); + CurDBColumn = (DBColumn) 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, Vector GroupFieldVector, ArrayList ReportPath, int iSelCount) + public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList GroupFieldVector, ArrayList 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, Vector GroupFieldVector) + public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, ArrayList GroupFieldVector) { getDoc().removeGroupName(NewSelGroupNames, CurGroupTitle, GroupFieldVector); } diff --git a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java index 5cc5a3a17d5d..e439167652b7 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java +++ b/wizards/com/sun/star/wizards/reportbuilder/ReportBuilderImplementation.java @@ -274,13 +274,13 @@ public class ReportBuilderImplementation extends ReportImplementationHelper aNameContainer.insertByHierarchicalName(Name, m_documentDefinition); } - public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, Vector GroupFieldVector, ArrayList ReportPath, int iSelCount) + public boolean liveupdate_addGroupNametoDocument(String[] GroupNames, String CurGroupTitle, ArrayList GroupFieldVector, ArrayList ReportPath, int iSelCount) { final int GroupCount = GroupFieldVector.size(); if (GroupCount < MAXIMUM_GROUPCOUNT) { final FieldColumn CurFieldColumn = getRecordParser().getFieldColumnByTitle(CurGroupTitle); - GroupFieldVector.addElement(CurFieldColumn.getFieldName()); + GroupFieldVector.add(CurFieldColumn.getFieldName()); } return true; } @@ -289,10 +289,10 @@ public class ReportBuilderImplementation extends ReportImplementationHelper { } - public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, Vector GroupFieldVector) + public void liveupdate_removeGroupName(String[] NewSelGroupNames, String CurGroupTitle, ArrayList GroupFieldVector) { final FieldColumn CurFieldColumn = getRecordParser().getFieldColumnByTitle(CurGroupTitle); - GroupFieldVector.removeElement(CurFieldColumn.getFieldName()); + GroupFieldVector.remove(CurFieldColumn.getFieldName()); } private void setPageOrientation(int nOrientation, boolean bDoLayout) diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java index b23efa00261b..78ef5ca2786c 100644 --- a/wizards/com/sun/star/wizards/table/FieldDescription.java +++ b/wizards/com/sun/star/wizards/table/FieldDescription.java @@ -17,7 +17,7 @@ */ package com.sun.star.wizards.table; -import java.util.Vector; +import java.util.ArrayList; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.XPropertySet; @@ -36,7 +36,7 @@ public class FieldDescription private String keyname; private XNameAccess xNameAccessTableNode; private XPropertySet xPropertySet; - private Vector aPropertyValues; + private ArrayList 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 Vector(); + aPropertyValues = new ArrayList(); xNameAccessTableNode = _curscenarioselector.oCGTable.xNameAccessFieldsNode; XNameAccess xNameAccessFieldNode; if (_curscenarioselector.bcolumnnameislimited) @@ -70,10 +70,10 @@ public class FieldDescription public FieldDescription(String _fieldname) { Name = _fieldname; - aPropertyValues = new Vector(); + aPropertyValues = new ArrayList(); Type = new Integer(com.sun.star.sdbc.DataType.VARCHAR); - aPropertyValues.addElement(Properties.createProperty(PropertyNames.PROPERTY_NAME, _fieldname)); - aPropertyValues.addElement(Properties.createProperty("Type", Type)); + aPropertyValues.add(Properties.createProperty(PropertyNames.PROPERTY_NAME, _fieldname)); + aPropertyValues.add(Properties.createProperty("Type", Type)); } public void setName(String _newfieldname) @@ -127,25 +127,25 @@ public class FieldDescription // Integer Index = (Integer) xPropertySet.getPropertyValue("Index"); if (propertyexists(PropertyNames.PROPERTY_NAME)) { - aPropertyValues.addElement(Properties.createProperty(PropertyNames.PROPERTY_NAME, Name)); + aPropertyValues.add(Properties.createProperty(PropertyNames.PROPERTY_NAME, Name)); } if (propertyexists("Type")) { - aPropertyValues.addElement(Properties.createProperty("Type", xPropertySet.getPropertyValue("Type"))); + aPropertyValues.add(Properties.createProperty("Type", xPropertySet.getPropertyValue("Type"))); } if (propertyexists("Scale")) { - aPropertyValues.addElement(Properties.createProperty("Scale", xPropertySet.getPropertyValue("Scale"))); + aPropertyValues.add(Properties.createProperty("Scale", xPropertySet.getPropertyValue("Scale"))); // Scale = } if (propertyexists("Precision")) { - aPropertyValues.addElement(Properties.createProperty("Precision", xPropertySet.getPropertyValue("Precision"))); + aPropertyValues.add(Properties.createProperty("Precision", xPropertySet.getPropertyValue("Precision"))); // Precision = (Integer) xPropertySet.getPropertyValue("Precision"); } if (propertyexists("DefaultValue")) { - aPropertyValues.addElement(Properties.createProperty("DefaultValue", xPropertySet.getPropertyValue("DefaultValue")));// DefaultValue = (Boolean) xPropertySet.getPropertyValue("DefaultValue"); + aPropertyValues.add(Properties.createProperty("DefaultValue", xPropertySet.getPropertyValue("DefaultValue")));// DefaultValue = (Boolean) xPropertySet.getPropertyValue("DefaultValue"); //Type = 4; // TODO wo ist der Fehler?(Integer) xPropertySet.getPropertyValue("Type"); } } diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java index c31ed6efd20c..bd4fd60b31c5 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java @@ -17,21 +17,21 @@ */ package com.sun.star.wizards.text; +import java.util.ArrayList; import java.util.Calendar; import java.util.GregorianCalendar; -import java.util.Vector; +import com.sun.star.beans.XPropertySet; +import com.sun.star.container.XEnumeration; +import com.sun.star.lang.XComponent; +import com.sun.star.lang.XMultiServiceFactory; +import com.sun.star.lang.XServiceInfo; import com.sun.star.text.XDependentTextField; import com.sun.star.text.XTextContent; import com.sun.star.text.XTextCursor; import com.sun.star.text.XTextDocument; import com.sun.star.text.XTextFieldsSupplier; import com.sun.star.text.XTextRange; -import com.sun.star.beans.XPropertySet; -import com.sun.star.container.XEnumeration; -import com.sun.star.lang.XComponent; -import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lang.XServiceInfo; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; @@ -143,7 +143,7 @@ public class TextFieldHandler try { XDependentTextField[] xDependentFields; - Vector xDependentVector = new Vector(); + ArrayList xDependentVector = new ArrayList(); if (xTextFieldsSupplier.getTextFields().hasElements()) { XEnumeration xEnum = xTextFieldsSupplier.getTextFields().createEnumeration(); @@ -163,7 +163,7 @@ public class TextFieldHandler String sValue = AnyConverter.toString(oValue); if (sValue.equals(_aPropertyValue)) { - xDependentVector.addElement(xDependent); + xDependentVector.add(xDependent); } } } @@ -175,7 +175,7 @@ public class TextFieldHandler short ishortValue = AnyConverter.toShort(oValue); if (ishortValue == iShortParam) { - xDependentVector.addElement(xDependent); + xDependentVector.add(xDependent); } } } diff --git a/wizards/com/sun/star/wizards/ui/AggregateComponent.java b/wizards/com/sun/star/wizards/ui/AggregateComponent.java index c02034dbb492..88ffdd9577e6 100644 --- a/wizards/com/sun/star/wizards/ui/AggregateComponent.java +++ b/wizards/com/sun/star/wizards/ui/AggregateComponent.java @@ -18,15 +18,22 @@ package com.sun.star.wizards.ui; import java.util.ArrayList; -import java.util.Vector; -import com.sun.star.wizards.common.*; -import com.sun.star.wizards.db.*; + +import com.sun.star.awt.FontDescriptor; +import com.sun.star.awt.VclWindowPeerAttribute; +import com.sun.star.awt.XButton; +import com.sun.star.awt.XListBox; +import com.sun.star.beans.PropertyValue; import com.sun.star.lang.EventObject; -import com.sun.star.beans.*; import com.sun.star.sdbc.SQLException; import com.sun.star.uno.AnyConverter; - -import com.sun.star.awt.*; +import com.sun.star.wizards.common.HelpIds; +import com.sun.star.wizards.common.Helper; +import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.common.Resource; +import com.sun.star.wizards.db.QueryMetaData; public class AggregateComponent extends ControlScroller { @@ -49,7 +56,7 @@ public class AggregateComponent extends ControlScroller final int SOADDROW = 1; final int SOREMOVEROW = 2; final int CONTROLROWDIST = 18; - Vector ControlRowVector; + ArrayList ControlRowVector; String OPTIONBUTTONDETAILQUERY_ITEM_CHANGED = "toggleComponent"; String OPTIONBUTTONSUMMARYQUERY_ITEM_CHANGED = "toggleComponent"; String LISTBOXFUNCTIONS_ACTION_PERFORMED; @@ -58,7 +65,7 @@ public class AggregateComponent extends ControlScroller String LISTBOXFIELDNAMES_ITEM_CHANGED; String COMMANDBUTTONPLUS_ACTION_PERFORMED = "addRow"; String COMMANDBUTTONMINUS_ACTION_PERFORMED = "removeRow"; - Vector ControlRows; + ArrayList ControlRows; int curHelpID; int lastHelpIndex; @@ -206,7 +213,7 @@ public class AggregateComponent extends ControlScroller } if (ControlRowVector == null) { - ControlRowVector = new Vector(); + ControlRowVector = new ArrayList(); } int locHelpID = curHelpIndex + (i * 2); ControlRow oControlRow = new ControlRow(i, ypos, locHelpID); @@ -215,7 +222,7 @@ public class AggregateComponent extends ControlScroller protected void setControlGroupVisible(int _index, boolean _bIsVisible) { - ControlRow oControlRow = (ControlRow) ControlRowVector.elementAt(_index); + ControlRow oControlRow = (ControlRow) ControlRowVector.get(_index); oControlRow.setVisible(_bIsVisible); if (_index >= (this.CurDBMetaData.AggregateFieldNames.length)) { @@ -229,13 +236,13 @@ public class AggregateComponent extends ControlScroller registerControlGroupAtIndex(fieldcount); if (fieldcount < super.getBlockIncrementation()) { - ControlRow oControlRow = (ControlRow) ControlRowVector.elementAt(fieldcount); + ControlRow oControlRow = (ControlRow) ControlRowVector.get(fieldcount); oControlRow.setVisible(true); oControlRow.settovoid(); } else { - ControlRow oControlRow = (ControlRow) ControlRowVector.elementAt(super.getBlockIncrementation() - 1); + ControlRow oControlRow = (ControlRow) ControlRowVector.get(super.getBlockIncrementation() - 1); super.setScrollValue(getScrollValue() + 1, (fieldcount + 1)); oControlRow.settovoid(); } @@ -254,7 +261,7 @@ public class AggregateComponent extends ControlScroller fieldcount--; if ((fieldcount + 1) <= super.getBlockIncrementation()) { - oControlRow = (ControlRow) ControlRowVector.elementAt(fieldcount); + oControlRow = (ControlRow) ControlRowVector.get(fieldcount); oControlRow.setVisible(false); } super.setScrollValue(getScrollValue() - 1, (fieldcount)); @@ -274,7 +281,7 @@ public class AggregateComponent extends ControlScroller int fieldcount = super.getCurFieldCount(); if (fieldcount > 0) { - curcontrolrow = (ControlRow) ControlRowVector.elementAt(super.getCurFieldCount() - 1); + curcontrolrow = (ControlRow) ControlRowVector.get(super.getCurFieldCount() - 1); biscomplete = curcontrolrow.isComplete(); } CurUnoDialog.setControlProperty("btnplus", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(biscomplete && (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY))); @@ -343,7 +350,7 @@ public class AggregateComponent extends ControlScroller { for (int i = _index; i < ControlRowVector.size(); i++) { - ControlRow oControlRow = (ControlRow) ControlRowVector.elementAt(i); + ControlRow oControlRow = (ControlRow) ControlRowVector.get(i); // if (i == _index) // oControlRow.settovoid(); // else @@ -438,7 +445,7 @@ public class AggregateComponent extends ControlScroller { for (int i = 0; i < this.getBlockIncrementation(); i++) { - curControlRow = (ControlRow) ControlRowVector.elementAt(i); + curControlRow = (ControlRow) ControlRowVector.get(i); curControlRow.insertFieldNames(); } for (int i = 0; i <= CurDBMetaData.AggregateFieldNames.length; i++) @@ -492,7 +499,7 @@ public class AggregateComponent extends ControlScroller int maxfieldcount = super.getCurFieldCount(); if (maxfieldcount > 0) { - ControlRow curcontrolrow = (ControlRow) this.ControlRowVector.elementAt(maxfieldcount - 1); + ControlRow curcontrolrow = (ControlRow) this.ControlRowVector.get(maxfieldcount - 1); return curcontrolrow.isComplete(); } else diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java index 21f2a68acf7c..db27a97570ae 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.java +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java @@ -36,7 +36,7 @@ public abstract class ControlScroller protected int nscrollvalue = 0; protected int ntotfieldcount; XScrollBar xScrollBar; - protected Vector scrollfields; + protected ArrayList scrollfields; protected Integer ICompPosX; protected int iCompPosX; protected Integer ICompPosY; @@ -54,7 +54,7 @@ public abstract class ControlScroller int SORELFIRSTPOSY = 3; protected int curHelpIndex; String sIncSuffix; - protected Vector ControlGroupVector = new Vector(); + protected ArrayList ControlGroupVector = new ArrayList(); protected PeerConfig oTitlePeerConfig; class AdjustmentListenerImpl implements com.sun.star.awt.XAdjustmentListener @@ -113,7 +113,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 Vector(); + scrollfields = new ArrayList(); int ypos = iStartPosY + SORELFIRSTPOSY; for (int i = 0; i < nblockincrement; i++) { @@ -274,7 +274,7 @@ public abstract class ControlScroller { for (int n = 0; n < scrollfields.size(); n++) { - PropertyValue[] curproperties = (PropertyValue[]) scrollfields.elementAt(n); + PropertyValue[] curproperties = (PropertyValue[]) scrollfields.get(n); for (int m = 0; m < curproperties.length; m++) { PropertyValue curproperty = curproperties[m]; @@ -364,8 +364,8 @@ public abstract class ControlScroller if (guiRow + nscrollvalue < scrollfields.size()) { return fieldInfo( - ((PropertyValue[]) scrollfields.elementAt(guiRow + nscrollvalue))[column], - ((PropertyValue[]) scrollfields.elementAt(guiRow))[column]); + ((PropertyValue[]) scrollfields.get(guiRow + nscrollvalue))[column], + ((PropertyValue[]) scrollfields.get(guiRow))[column]); //System.out.println("getting field info for : " + guiRow + "/" + column + ":" + pv.Value + "(" + pv.Name + ")" ); } else @@ -396,21 +396,21 @@ public abstract class ControlScroller { if (_i == 0) { - scrollfields.removeAllElements(); + scrollfields.clear(); } if (_i >= scrollfields.size()) { - scrollfields.addElement(_currowproperties); + scrollfields.add(_currowproperties); } else { - scrollfields.setElementAt(_currowproperties, _i); + scrollfields.set(_i, _currowproperties); } } protected PropertyValue[] getControlGroupInfo(int _i) { - return (PropertyValue[]) scrollfields.elementAt(_i); + return (PropertyValue[]) scrollfields.get(_i); } protected void setControlData(String controlname, Object newvalue) @@ -447,7 +447,7 @@ public abstract class ControlScroller { for (int i = 0; i < scrollfields.size(); i++) { - curproperties = (PropertyValue[]) scrollfields.elementAt(i); + curproperties = (PropertyValue[]) scrollfields.get(i); retproperties[i] = curproperties; } return retproperties; diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.java b/wizards/com/sun/star/wizards/ui/PeerConfig.java index 8f5644931cb7..a87c902383ef 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.java +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.java @@ -17,9 +17,12 @@ */ package com.sun.star.wizards.ui; -import java.util.Vector; +import java.util.ArrayList; -import com.sun.star.awt.*; +import com.sun.star.awt.WindowEvent; +import com.sun.star.awt.XControl; +import com.sun.star.awt.XVclWindowPeer; +import com.sun.star.awt.XWindowListener; import com.sun.star.lang.EventObject; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.UnoRuntime; @@ -35,9 +38,9 @@ import com.sun.star.wizards.common.PropertyNames; public class PeerConfig implements XWindowListener { - private Vector m_aPeerTasks = new Vector(); - Vector aControlTasks = new Vector(); - Vector aImageUrlTasks = new Vector(); + private ArrayList m_aPeerTasks = new ArrayList(); + ArrayList aControlTasks = new ArrayList(); + ArrayList aImageUrlTasks = new ArrayList(); UnoDialog oUnoDialog = null; public PeerConfig(UnoDialog _oUnoDialog) @@ -105,7 +108,7 @@ public class PeerConfig implements XWindowListener { for (int i = 0; i < this.m_aPeerTasks.size(); i++) { - PeerTask aPeerTask = (PeerTask) m_aPeerTasks.elementAt(i); + PeerTask aPeerTask = (PeerTask) m_aPeerTasks.get(i); XVclWindowPeer xVclWindowPeer = UnoRuntime.queryInterface(XVclWindowPeer.class, aPeerTask.xControl.getPeer()); for (int n = 0; n < aPeerTask.propnames.length; n++) { @@ -114,12 +117,12 @@ public class PeerConfig implements XWindowListener } for (int i = 0; i < this.aControlTasks.size(); i++) { - ControlTask aControlTask = (ControlTask) aControlTasks.elementAt(i); + ControlTask aControlTask = (ControlTask) aControlTasks.get(i); Helper.setUnoPropertyValue(aControlTask.oModel, aControlTask.propname, aControlTask.propvalue); } for (int i = 0; i < this.aImageUrlTasks.size(); i++) { - ImageUrlTask aImageUrlTask = (ImageUrlTask) aImageUrlTasks.elementAt(i); + ImageUrlTask aImageUrlTask = (ImageUrlTask) 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 1a3af2944621..9d9868270f35 100644 --- a/wizards/com/sun/star/wizards/ui/TitlesComponent.java +++ b/wizards/com/sun/star/wizards/ui/TitlesComponent.java @@ -61,7 +61,7 @@ public class TitlesComponent extends ControlScroller { iLabelPosX = iCompPosX + iRelLabelPosXDist; ControlRow oControlRow = new ControlRow(i, ypos); - ControlGroupVector.addElement(oControlRow); + ControlGroupVector.add(oControlRow); } @@ -75,7 +75,7 @@ public class TitlesComponent extends ControlScroller { for (int i = 0; i < super.ControlGroupVector.size(); i++) { - ControlRow curControlRow = (ControlRow) ControlGroupVector.elementAt(i); + ControlRow curControlRow = (ControlRow) ControlGroupVector.get(i); XTextComponent xTextBox = curControlRow.xTextComponent; if ((xTextBox != null) && (_xTextListener != null)) { diff --git a/wizards/com/sun/star/wizards/ui/event/Task.java b/wizards/com/sun/star/wizards/ui/event/Task.java index 83b4e507c61b..50268c8233b8 100644 --- a/wizards/com/sun/star/wizards/ui/event/Task.java +++ b/wizards/com/sun/star/wizards/ui/event/Task.java @@ -17,8 +17,8 @@ */ package com.sun.star.wizards.ui.event; +import java.util.ArrayList; import java.util.List; -import java.util.Vector; /** * @author rpiterman @@ -33,7 +33,7 @@ public class Task private int failed = 0; private int max = 0; private String taskName; - private List listeners = new Vector(); + private List listeners = new ArrayList(); private String subtaskName; public Task(String taskName_, String subtaskName_, int max_) diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.java b/wizards/com/sun/star/wizards/web/FTPDialog.java index f22222eb1e66..67d2eb77593c 100644 --- a/wizards/com/sun/star/wizards/web/FTPDialog.java +++ b/wizards/com/sun/star/wizards/web/FTPDialog.java @@ -17,8 +17,8 @@ */ package com.sun.star.wizards.web; +import java.util.ArrayList; import java.util.List; -import java.util.Vector; import com.sun.star.awt.PushButtonType; import com.sun.star.awt.XButton; @@ -34,9 +34,10 @@ import com.sun.star.ucb.OpenCommandArgument2; import com.sun.star.ucb.OpenMode; import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.FileAccess; +import com.sun.star.wizards.common.HelpIds; import com.sun.star.wizards.common.Helper; -import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.common.PropertyNames; +import com.sun.star.wizards.common.SystemDialog; import com.sun.star.wizards.common.UCB; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.wizards.ui.UnoDialog; @@ -45,7 +46,6 @@ import com.sun.star.wizards.ui.event.DataAware; import com.sun.star.wizards.ui.event.UnoDataAware; import com.sun.star.wizards.web.data.CGPublish; import com.sun.star.wizards.web.data.CGSettings; -import com.sun.star.wizards.common.HelpIds; /** * This is the FTP Dialog. <br/> @@ -143,7 +143,7 @@ public class FTPDialog extends UnoDialog2 implements UIConsts, WWHID //Resources Object private FTPDialogResources resources; - private List dataAware = new Vector(); + private List dataAware = new ArrayList(); public String username = PropertyNames.EMPTY_STRING; public String password = PropertyNames.EMPTY_STRING; /** diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.java b/wizards/com/sun/star/wizards/web/WWD_Startup.java index 34f369b5b139..e17aa64bb22e 100644 --- a/wizards/com/sun/star/wizards/web/WWD_Startup.java +++ b/wizards/com/sun/star/wizards/web/WWD_Startup.java @@ -20,6 +20,7 @@ package com.sun.star.wizards.web; //import com.sun.star.awt.ItemEvent; //import com.sun.star.awt.XItemListener; import java.io.FileNotFoundException; +import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Vector; @@ -124,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 Vector(); + protected List docAware = new ArrayList(); /** * The Vector containing DataAware objects * which relay on the session's generalInfo * Object (CGSession.cp_GeneralInfo) as * DataObject (or model). */ - protected List genAware = new Vector(); + protected List genAware = new ArrayList(); /** * The vector containing DataAware objectscm25npd .. * which relay on the session's Design Object @@ -139,7 +140,7 @@ public abstract class WWD_Startup extends WWD_General * (or model). * */ - protected List designAware = new Vector(); + protected List designAware = new ArrayList(); /** * A Vector containig the DataAware objects * which relay on Publishing Objects. @@ -148,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 Vector(3); + protected List pubAware = new ArrayList(3); /** * The DataAware object which handles * the documents-list events. diff --git a/wizards/com/sun/star/wizards/web/data/CGSettings.java b/wizards/com/sun/star/wizards/web/data/CGSettings.java index 36258b691457..4ac054c5989b 100644 --- a/wizards/com/sun/star/wizards/web/data/CGSettings.java +++ b/wizards/com/sun/star/wizards/web/data/CGSettings.java @@ -23,9 +23,9 @@ */ package com.sun.star.wizards.web.data; +import java.util.ArrayList; import java.util.Hashtable; import java.util.Map; -import java.util.Vector; import com.sun.star.beans.PropertyValue; import com.sun.star.container.NoSuchElementException; @@ -35,8 +35,13 @@ import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRuntime; import com.sun.star.util.DateTime; -import com.sun.star.wizards.common.*; +import com.sun.star.wizards.common.ConfigGroup; +import com.sun.star.wizards.common.ConfigSet; +import com.sun.star.wizards.common.FileAccess; import com.sun.star.wizards.common.Helper.DateUtils; +import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.Properties; +import com.sun.star.wizards.common.PropertyNames; /** * @author rpiterman @@ -99,7 +104,7 @@ public class CGSettings extends ConfigGroup private CGExporter[] createExporters(String mime) { Object[] exporters = cp_Exporters.items(); - Vector v = new Vector(); + ArrayList v = new ArrayList(); for (int i = 0; i < exporters.length; i++) { if (((CGExporter) exporters[i]).supports(mime)) diff --git a/wizards/com/sun/star/wizards/web/status/ErrorLog.java b/wizards/com/sun/star/wizards/web/status/ErrorLog.java index 79a356c0642e..ef751398eb54 100644 --- a/wizards/com/sun/star/wizards/web/status/ErrorLog.java +++ b/wizards/com/sun/star/wizards/web/status/ErrorLog.java @@ -18,8 +18,8 @@ package com.sun.star.wizards.web.status; +import java.util.ArrayList; import java.util.List; -import java.util.Vector; /** * @author rpiterman @@ -30,7 +30,7 @@ import java.util.Vector; public class ErrorLog implements ErrorReporter { - private List errors = new Vector(); + private List errors = new ArrayList(); 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 8f89504fb682..af6033ae723b 100644 --- a/wizards/com/sun/star/wizards/web/status/Task.java +++ b/wizards/com/sun/star/wizards/web/status/Task.java @@ -18,8 +18,8 @@ package com.sun.star.wizards.web.status; +import java.util.ArrayList; import java.util.List; -import java.util.Vector; /** * @author rpiterman @@ -34,7 +34,7 @@ public class Task private int failed = 0; private int max = 0; private String taskName; - private List listeners = new Vector(); + private List listeners = new ArrayList(); private String subtaskName; public Task(String taskName_, String subtaskName_, int max_) |