summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/common
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-03 14:49:28 +0200
committerNoel Grandin <noel@peralex.com>2013-05-06 11:45:51 +0200
commite527a340051b55a6f05d05f397d82ec797165163 (patch)
tree21e81a60ed0402b0f4e33685917b184b5b1bb32b /wizards/com/sun/star/wizards/common
parent587c59fbc931b12f4d63d077a78bcaa43ffbf83d (diff)
Java cleanup, convert more Vector to ArrayList
Change-Id: Icb807382eaf50f515f2c9dfada0c061414baed33
Diffstat (limited to 'wizards/com/sun/star/wizards/common')
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.java24
-rw-r--r--wizards/com/sun/star/wizards/common/JavaTools.java10
2 files changed, 17 insertions, 17 deletions
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.java b/wizards/com/sun/star/wizards/common/FileAccess.java
index 573e9fa9d889..c559a3ad2b5b 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.java
+++ b/wizards/com/sun/star/wizards/common/FileAccess.java
@@ -53,7 +53,7 @@ public class FileAccess
{
/**
- *
+ *
* @param xMSF
* @param sPath
* @param sAddPath
@@ -497,7 +497,7 @@ public class FileAccess
* @param xMSF
* @param FilterName the prefix of the filename. a "-" is added to the prefix !
* @param FolderName the folder (URL) to look for files...
- * @return an array with two array members. The first one, with document titles,
+ * @return an array with two array members. The first one, with document titles,
* the second with the corresponding URLs.
* @deprecated please use the getFolderTitles() with ArrayList
*/
@@ -506,8 +506,8 @@ public class FileAccess
String[][] LocLayoutFiles = new String[2][];
try
{
- java.util.Vector<String> TitleVector = null;
- java.util.Vector<String> NameVector = null;
+ java.util.ArrayList<String> TitleVector = null;
+ java.util.ArrayList<String> NameVector = null;
XInterface xDocInterface = (XInterface) xMSF.createInstance("com.sun.star.document.DocumentProperties");
XDocumentProperties xDocProps = UnoRuntime.queryInterface(XDocumentProperties.class, xDocInterface);
@@ -517,8 +517,8 @@ public class FileAccess
String[] nameList = xSimpleFileAccess.getFolderContents(FolderName, false);
- TitleVector = new java.util.Vector<String>(/*nameList.length*/);
- NameVector = new java.util.Vector<String>(nameList.length);
+ TitleVector = new java.util.ArrayList<String>(/*nameList.length*/);
+ NameVector = new java.util.ArrayList<String>(nameList.length);
FilterName = FilterName == null || FilterName.equals(PropertyNames.EMPTY_STRING) ? null : FilterName + "-";
@@ -531,15 +531,15 @@ public class FileAccess
if (FilterName == null || fileName.startsWith(FilterName))
{
xDocProps.loadFromMedium(nameList[i], noArgs);
- NameVector.addElement(nameList[i]);
- TitleVector.addElement(xDocProps.getTitle());
+ NameVector.add(nameList[i]);
+ TitleVector.add(xDocProps.getTitle());
}
}
String[] LocNameList = new String[NameVector.size()];
String[] LocTitleList = new String[TitleVector.size()];
- NameVector.copyInto(LocNameList);
- TitleVector.copyInto(LocTitleList);
+ NameVector.toArray(LocNameList);
+ TitleVector.toArray(LocTitleList);
LocLayoutFiles[1] = LocNameList;
LocLayoutFiles[0] = LocTitleList;
@@ -598,7 +598,7 @@ public class FileAccess
}
/**
- *
+ *
* @param xMSF
* @param _sStartFilterName
* @param FolderNames
@@ -1050,7 +1050,7 @@ public class FileAccess
}
/**
- * shortens a filename to a user displayable representation.
+ * shortens a filename to a user displayable representation.
* @param path
* @param maxLength
* @return
diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java b/wizards/com/sun/star/wizards/common/JavaTools.java
index 37004bd4efff..5436983d9167 100644
--- a/wizards/com/sun/star/wizards/common/JavaTools.java
+++ b/wizards/com/sun/star/wizards/common/JavaTools.java
@@ -92,11 +92,11 @@ public class JavaTools
/**converts a list of Integer values included in an Integer vector to a list of int values
*
- *
+ *
* @param _aIntegerVector
* @return
*/
- public static int[] IntegerTointList(Vector<Integer> _aIntegerVector)
+ public static int[] IntegerTointList(java.util.List<Integer> _aIntegerVector)
{
try
{
@@ -117,12 +117,12 @@ public class JavaTools
}
/**converts a list of Boolean values included in a Boolean vector to a list of boolean values
- *
- *
+ *
+ *
* @param _aBooleanVector
* @return
*/
- public static boolean[] BooleanTobooleanList(Vector<Boolean> _aBooleanVector)
+ public static boolean[] BooleanTobooleanList(java.util.List<Boolean> _aBooleanVector)
{
try
{