summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-20 17:05:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-08-20 19:04:33 +0100
commit8bfe47960f60e1dc2e6bcf0f3c3f7e43dfd3fc0b (patch)
tree12399f5232ff90f000bb58e213629140e564f0ce /filter
parentf906ac27761332580b769f5f90d1f6bbd7f93701 (diff)
Java5 updates - convert to generics
Change-Id: I039e51958865a7ea000034e7bf765f64d49689cd
Diffstat (limited to 'filter')
-rw-r--r--filter/qa/complex/filter/detection/typeDetection/Helper.java127
-rw-r--r--filter/qa/complex/filter/detection/typeDetection/TypeDetection.java72
-rw-r--r--filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java2
-rw-r--r--filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java30
-rw-r--r--filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java2
5 files changed, 114 insertions, 119 deletions
diff --git a/filter/qa/complex/filter/detection/typeDetection/Helper.java b/filter/qa/complex/filter/detection/typeDetection/Helper.java
index 2ed403f631b1..70cf7c4d86fd 100644
--- a/filter/qa/complex/filter/detection/typeDetection/Helper.java
+++ b/filter/qa/complex/filter/detection/typeDetection/Helper.java
@@ -27,9 +27,10 @@ import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.HashMap;
import java.util.StringTokenizer;
-import java.util.Vector;
+import java.util.ArrayList;
import lib.TestParameters;
import share.LogWriter;
import util.utils;
@@ -43,10 +44,10 @@ public class Helper {
/** The runner log writer
* @member m_log for log purposes
- * @member m_sTestDocPath directory for seraching files to load
- * @member m_vFiles list of all files describet in "files.csv"
- * @member m_hFileURLs contains the postition of a file name in the m_vFiles Vector
- * @member m_hFileTypes contains the postition of a file type in the m_vFiles Vector
+ * @member m_sTestDocPath directory for searching files to load
+ * @member m_vFiles list of all files described in "files.csv"
+ * @member m_hFileURLs contains the position of a file name in the m_vFiles Vector
+ * @member m_hFileTypes contains the position of a file type in the m_vFiles Vector
* @member m_param the test parameters
*/
@@ -54,11 +55,11 @@ public class Helper {
String m_sTestDocPath = null;
- Vector m_vFiles = null;
+ ArrayList<ArrayList<String>> m_vFiles = null;
- Hashtable m_hFileURLs = new Hashtable();
+ HashMap<String,String> m_hFileURLs = new HashMap<String,String>();
- Hashtable m_hFileTypes = new Hashtable();
+ HashMap<String,String> m_hFileTypes = new HashMap<String,String>();
TestParameters m_param = null;
@@ -89,22 +90,22 @@ public class Helper {
/** Reads a comma separated file (CSV). Every line of the file is
- * repesented by an <code>Vector</code> entry. Every data entry of a row is
+ * represented by an <code>Vector</code> entry. Every data entry of a row is
* also stored in a <code>Vector</code>. So the returned value is a
* <code>Vector[][]</code> where the first dimension represents a row
- * and the second dimenesion inclueds the data values.
+ * and the second dimension includes the data values.
* @param csvFileName the name of the csv file
* @return Vector filled with Vector filled with data of a row
*/
- public Vector getToDoList(String csvFileName){
+ public ArrayList<ArrayList<String>> getToDoList(String csvFileName){
try {
- Vector vAll = new Vector();
- Vector vFields = new Vector();
+ ArrayList<ArrayList<String>> vAll = new ArrayList<ArrayList<String>>();
+ ArrayList<String> vFields = new ArrayList<String>();
// get content of file
- Vector content = getCSVFileContent(csvFileName);
+ ArrayList<String> content = getCSVFileContent(csvFileName);
// remove superfluous content like "#" started lines
content = removeSuperfluousContent(content);
@@ -113,24 +114,24 @@ public class Helper {
content = replacePlaceHolder(content);
// create Enumeration
- Enumeration contentEnum = content.elements();
+ Iterator<String> contentEnum = content.iterator();
// the first line contains field names of the columns
// split line by ";"
StringTokenizer fields = new StringTokenizer(
- contentEnum.nextElement().toString(),";");
+ contentEnum.next(),";");
int fieldCount = 0;
while (fields.hasMoreElements()){
- vFields.add(fields.nextElement());
+ vFields.add(fields.nextToken());
fieldCount++;
}
// fill vData with data of CSV-row
- while (contentEnum.hasMoreElements()){
- Vector vData = new Vector();
+ while (contentEnum.hasNext()){
+ ArrayList<String> vData = new ArrayList<String>();
StringTokenizer data = new StringTokenizer(
- contentEnum.nextElement().toString(),";", true);
+ contentEnum.next(),";", true);
// example: data = "firstData;secondData;;forthData"
// => three tokens => missing one data because the imagine
@@ -139,7 +140,7 @@ public class Helper {
boolean nextIsData = false;
int dataCount = 0;
while (data.hasMoreTokens()) {
- Object myToken = data.nextToken();
+ String myToken = data.nextToken();
// if the "thirdData" will be recieved, myToken=";" but
// vData must add an empty String
if (myToken.equals(";")){
@@ -176,9 +177,9 @@ public class Helper {
* cannot be read
*/
- public Vector getCSVFileContent(String csvFileName) {
+ public ArrayList<String> getCSVFileContent(String csvFileName) {
try {
- Vector content = new Vector();
+ ArrayList<String> content = new ArrayList<String>();
BufferedReader br;
String line;
if ( m_param.DebugIsActive ) {
@@ -194,7 +195,7 @@ public class Helper {
br = new BufferedReader(new InputStreamReader(in));
try {
while( ( line = br.readLine() ) != null ) {
- content.addElement( line );
+ content.add( line );
}
} catch (IOException e) {
br.close();
@@ -230,34 +231,34 @@ public class Helper {
* @param content the content of a csv file
* @return changed file content
*/
- private Vector replacePlaceHolder(Vector content){
+ private ArrayList<String> replacePlaceHolder(ArrayList<String> content){
- Vector vReturn = new Vector();
+ ArrayList<String> vReturn = new ArrayList<String>();
- Vector placeHolders = new Vector();
- Enumeration m_params = m_param.keys();
+ ArrayList<String> placeHolders = new ArrayList<String>();
+ Iterator<String> m_params = m_param.keySet().iterator();
String placeHolder = (String)m_param.get("placeHolder");
- // get all place holdes from typeDetection.csv
- while (m_params.hasMoreElements()){
- String holderKey = (String) m_params.nextElement();
+ // get all place holders from typeDetection.csv
+ while (m_params.hasNext()){
+ String holderKey = m_params.next();
if (holderKey.startsWith(placeHolder)){
placeHolders.add(holderKey);
}
}
// replace all occurrences of place holders in 'CSVData'
- Enumeration cont = content.elements();
+ Iterator<String> cont = content.iterator();
- while( cont.hasMoreElements() ) {
+ while( cont.hasNext() ) {
- String line = (String) cont.nextElement();
+ String line = cont.next();
String newLine = line;
- Enumeration holders = placeHolders.elements();
+ Iterator<String> holders = placeHolders.iterator();
- while( holders.hasMoreElements() ) {
+ while( holders.hasNext() ) {
- String holder = (String) holders.nextElement();
+ String holder = holders.next();
int startPos = line.indexOf(holder);
if (startPos > -1){
@@ -280,29 +281,25 @@ public class Helper {
/** Removes lines of an ascii file content which starts with "#"
* or are empty
- * @param content content of a csv fiöe
+ * @param content content of a csv file
* @return a stripped Vector
*/
- public Vector removeSuperfluousContent(Vector content){
- try{
- Vector newContent = new Vector();
- Enumeration cont = content.elements();
- while( cont.hasMoreElements() ) {
- String line = (String) cont.nextElement();
- if (( ! line.startsWith( "#" ))&& ( line.length() != 0 )) {
- newContent.addElement( line );
- }
- }
- return newContent;
- } catch (ClassCastException e){
- return null;
+ public ArrayList<String> removeSuperfluousContent(ArrayList<String> content){
+ ArrayList<String> newContent = new ArrayList<String>();
+ Iterator<String> cont = content.iterator();
+ while( cont.hasNext() ) {
+ String line = cont.next();
+ if (( ! line.startsWith( "#" ))&& ( line.length() != 0 )) {
+ newContent.add( line );
+ }
}
+ return newContent;
}
/** returns a <code>MediaDescripto</code> filled with given properties and
* values.
- * @param propNames String Array of propertie names
- * @param values Objecr Array of propertie values
+ * @param propNames String Array of property names
+ * @param values Object Array of property values
* @return <code>PropertyValue[]<code>
* @see com.sun.star.beans.PropertyValue
* @see com.sun.star.document.MediaDescriptor
@@ -342,7 +339,7 @@ public class Helper {
public String getURLforfileAlias(String fileAlias)
throws FileAliasNotFoundException{
try{
- String fileURL = (String) m_hFileURLs.get(fileAlias).toString();
+ String fileURL = m_hFileURLs.get(fileAlias).toString();
return utils.getFullURL(ensureEndingFileSep(m_sTestDocPath) + fileURL);
} catch (java.lang.NullPointerException e){
throw new FileAliasNotFoundException(fileAlias);
@@ -358,25 +355,23 @@ public class Helper {
public String getTypeforfileAlias(String fileAlias)
throws FileAliasNotFoundException{
try{
- return (String) m_hFileTypes.get(fileAlias).toString();
+ return m_hFileTypes.get(fileAlias).toString();
} catch (java.lang.NullPointerException e){
throw new FileAliasNotFoundException(fileAlias);
}
}
/**
- * Filles the Hashtable m_hFileURLs with all file names and their URL
- * and the Hashtable m_hFilesTypes with all file names and thier file
- * typ name. This informations are extracted from "files.csv"
- * This is for faster acccess to get fileURL and fileType of fileAlias
+ * Fills the Hashtable m_hFileURLs with all file names and their URL
+ * and the Hashtable m_hFilesTypes with all file names and their file
+ * type name. This informations are extracted from "files.csv"
+ * This is for faster access to get fileURL and fileType of fileAlias
*/
public void createFilesList(){
for (int i = 0; i < m_vFiles.size();i++){
- Vector toDo = (Vector) m_vFiles.get(i);
- m_hFileURLs.put((String) toDo.get(0).toString(),
- (String) toDo.get(1).toString());
- m_hFileTypes.put((String) toDo.get(0).toString(),
- (String) toDo.get(2).toString());
+ ArrayList<String> toDo = m_vFiles.get(i);
+ m_hFileURLs.put(toDo.get(0), toDo.get(1));
+ m_hFileTypes.put(toDo.get(0), toDo.get(2));
}
}
@@ -423,7 +418,7 @@ public class Helper {
}
-/** This exeception should be thrown if a method seeks for an invalid alias name */
+/** This exception should be thrown if a method seeks for an invalid alias name */
class FileAliasNotFoundException extends java.lang.Exception{
/** throws error message with wrong alias name
* @param fileAlias the alias name
diff --git a/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java b/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
index 770dc98234ed..094a2ddd8d90 100644
--- a/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
+++ b/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java
@@ -27,9 +27,11 @@ import com.sun.star.uno.XInterface;
import complexlib.ComplexTestCase;
import java.io.File;
+import java.util.Iterator;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
+import java.util.ArrayList;
import util.utils;
@@ -218,11 +220,10 @@ public class TypeDetection extends ComplexTestCase {
XInterface oObj = (XInterface) oInterface ;
log.println("ImplName: "+utils.getImplName(oObj));
- m_xDetection = (XTypeDetection)
- UnoRuntime.queryInterface(XTypeDetection.class, oInterface);
- Enumeration k = param.keys();
- while (k.hasMoreElements()){
- String kName = ((String)k.nextElement()).toString();
+ m_xDetection = UnoRuntime.queryInterface(XTypeDetection.class, oInterface);
+ Iterator<String> k = param.keySet().iterator();
+ while (k.hasNext()){
+ String kName = k.next();
log.println(kName + ":" + param.get(kName).toString());
}
// create instrace of helper class
@@ -248,17 +249,17 @@ public class TypeDetection extends ComplexTestCase {
public void checkByURLonly() {
try{
log.println("### checkByURLonly() ###");
- Vector CSVData = helper.getToDoList(
+ ArrayList<ArrayList<String>> CSVData = helper.getToDoList(
(String)param.get("csv.files"));
- Enumeration allToDos = CSVData.elements();
+ Iterator<ArrayList<String>> allToDos = CSVData.iterator();
- while (allToDos.hasMoreElements()){
- Vector toDo = (Vector) allToDos.nextElement();
+ while (allToDos.hasNext()){
+ ArrayList<String> toDo = allToDos.next();
- String fileAlias = (String) toDo.get(0);
- String fileURL = (String) toDo.get(1);
- String URLfileType = (String) toDo.get(2);
- String StreamfileType = (String) toDo.get(3);
+ String fileAlias = toDo.get(0);
+ String fileURL = toDo.get(1);
+ String URLfileType = toDo.get(2);
+ String StreamfileType = toDo.get(3);
fileURL = utils.getFullURL(helper.ensureEndingFileSep(
(String)param.get("TestDocumentPath")) + fileURL);
@@ -350,18 +351,18 @@ public class TypeDetection extends ComplexTestCase {
try{
log.println("### checkPreselectedType() ###");
- Vector CSVData = helper.getToDoList(
+ ArrayList<ArrayList<String>> CSVData = helper.getToDoList(
(String)param.get("csv.preselectedType"));
- Enumeration allToDos = CSVData.elements();
+ Iterator<ArrayList<String>> allToDos = CSVData.iterator();
- while (allToDos.hasMoreElements()){
+ while (allToDos.hasNext()){
try{
- Vector toDo = (Vector) allToDos.nextElement();
+ ArrayList<String> toDo = allToDos.next();
- String fileAlias = (String) toDo.get(0);
+ String fileAlias = toDo.get(0);
String fileURL = helper.getURLforfileAlias(fileAlias);
- String preselectFileType = (String) toDo.get(1);
- String expectedFileType = (String) toDo.get(2);
+ String preselectFileType = toDo.get(1);
+ String expectedFileType = toDo.get(2);
PropertyValue[] MediaDescriptor = helper.createMediaDescriptor(
new String[] {"URL", "MediaType"},
@@ -399,21 +400,20 @@ public class TypeDetection extends ComplexTestCase {
try{
log.println("### checkPreselectedFilter() ###");
- Vector CSVData = helper.getToDoList(
+ ArrayList<ArrayList<String>> CSVData = helper.getToDoList(
(String)param.get("csv.preselectedFilter"));
+ Iterator<ArrayList<String>> allToDos = CSVData.iterator();
- Enumeration allToDos = CSVData.elements();
-
- while (allToDos.hasMoreElements()){
+ while (allToDos.hasNext()){
try{
- Vector toDo = (Vector) allToDos.nextElement();
+ ArrayList<String> toDo = allToDos.next();
- String fileAlias = (String) toDo.get(0);
+ String fileAlias = toDo.get(0);
String fileURL = helper.getURLforfileAlias(fileAlias);
- String filterName = (String) toDo.get(1);
- String filterOptions = (String) toDo.get(2);
- String filterData = (String) toDo.get(3);
- String expectedType = (String) toDo.get(4);
+ String filterName = toDo.get(1);
+ String filterOptions = toDo.get(2);
+ String filterData = toDo.get(3);
+ String expectedType = toDo.get(4);
PropertyValue[] MediaDescriptor = helper.createMediaDescriptor(
new String[] {"URL","FilterName",
@@ -452,16 +452,16 @@ public class TypeDetection extends ComplexTestCase {
try{
log.println("### checkPreselectedDocService() ###");
- Vector CSVData = helper.getToDoList((String)param.get("csv.serviceName"));
- Enumeration allToDos = CSVData.elements();
+ ArrayList<ArrayList<String>> CSVData = helper.getToDoList((String)param.get("csv.serviceName"));
+ Iterator<ArrayList<String>> allToDos = CSVData.iterator();
- while (allToDos.hasMoreElements()){
+ while (allToDos.hasNext()){
try{
- Vector toDo = (Vector) allToDos.nextElement();
+ ArrayList<String> toDo = allToDos.next();
- String fileAlias = (String) toDo.get(0);
+ String fileAlias = toDo.get(0);
String fileURL = helper.getURLforfileAlias(fileAlias);
- String serviceName = (String) toDo.get(1);
+ String serviceName = toDo.get(1);
String fileType = helper.getTypeforfileAlias(fileAlias);
PropertyValue[] MediaDescriptor = helper.createMediaDescriptor(
diff --git a/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java
index 1f8eca92c8b0..43e3f2525331 100644
--- a/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java
+++ b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java
@@ -1011,7 +1011,7 @@ public class Base64
if( bytes != null && bytes.length >= 4 )
{
- int head = ((int)bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
+ int head = (bytes[0] & 0xff) | ((bytes[1] << 8) & 0xff00);
if( java.util.zip.GZIPInputStream.GZIP_MAGIC == head )
{
java.io.ByteArrayInputStream bais = null;
diff --git a/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java
index 078e03135ced..a19e0e49d448 100644
--- a/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java
+++ b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTFilterOLEExtracter.java
@@ -113,7 +113,7 @@ public class XSLTFilterOLEExtracter {
if (aName.equals("oledata.mso")) {
try {
//get the length and seek to 0
- XSeekable xSeek = (XSeekable) UnoRuntime.queryInterface(XSeekable.class, m_RootStream);
+ XSeekable xSeek = UnoRuntime.queryInterface(XSeekable.class, m_RootStream);
int oleLength = (int) xSeek.getLength();
xSeek.seek(0);
xSeek = null;
@@ -142,14 +142,14 @@ public class XSLTFilterOLEExtracter {
if (oSubStream == null) {
return "Not Found:" + aName;
}
- XInputStream xSubStream = (XInputStream) UnoRuntime.queryInterface(XInputStream.class,
+ XInputStream xSubStream = UnoRuntime.queryInterface(XInputStream.class,
oSubStream);
if (xSubStream == null) {
return "Not Found:" + aName;
}
//The first four byte are the length of the uncompressed data
byte pLength[][] = new byte[1][4];
- XSeekable xSeek = (XSeekable) UnoRuntime.queryInterface(XSeekable.class, xSubStream);
+ XSeekable xSeek = UnoRuntime.queryInterface(XSeekable.class, xSubStream);
xSeek.seek(0);
xSeek = null;
//Get the uncompressed length
@@ -186,7 +186,7 @@ public class XSLTFilterOLEExtracter {
XStream xTempFileStream = null;
try {
Object oTempFile = xMSF.createInstance("com.sun.star.io.TempFile");
- xTempFileStream = (XStream) UnoRuntime.queryInterface(XStream.class, oTempFile);
+ xTempFileStream = UnoRuntime.queryInterface(XStream.class, oTempFile);
} catch (Exception e) {
}
@@ -207,18 +207,18 @@ public class XSLTFilterOLEExtracter {
xOutput.flush();
//Get the input stream and seek to begin
XInputStream xInput = m_RootStream.getInputStream();
- XSeekable xSeek = (XSeekable) UnoRuntime.queryInterface(XSeekable.class, xInput);
+ XSeekable xSeek = UnoRuntime.queryInterface(XSeekable.class, xInput);
xSeek.seek(0);
oledata = null;
xSeek = null;
//create an com.sun.star.embed.OLESimpleStorage from the temp stream
Object pArgs[] = new Object[1];
- pArgs[0] = (Object) xInput;
+ pArgs[0] = xInput;
Object oTempStorage = m_xMSF.createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", pArgs);
pArgs = null;
- m_Storage = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oTempStorage);
+ m_Storage = UnoRuntime.queryInterface(XNameContainer.class, oTempStorage);
} catch (Exception e) {
e.printStackTrace();
}
@@ -230,11 +230,11 @@ public class XSLTFilterOLEExtracter {
m_RootStream = CreateTempFileStream(m_xMSF);
Object pArgs[] = new Object[1];
- pArgs[0] = (Object) m_RootStream;
+ pArgs[0] = m_RootStream;
Object oTempStorage = m_xMSF.createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", pArgs);
pArgs = null;
- m_Storage = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, oTempStorage);
+ m_Storage = UnoRuntime.queryInterface(XNameContainer.class, oTempStorage);
} catch (Exception e) {
e.printStackTrace();
}
@@ -273,13 +273,13 @@ public class XSLTFilterOLEExtracter {
//write the compressed data to the temp stream
xOutput.writeBytes(compressedBytes);
//seek to 0
- XSeekable xSeek = (XSeekable) UnoRuntime.queryInterface(XSeekable.class, xInput);
+ XSeekable xSeek = UnoRuntime.queryInterface(XSeekable.class, xInput);
xSeek.seek(0);
xSeek = null;
oledata = null;
//insert the temp stream as a sub stream and use an XTransactedObject to commit it immediately
- XTransactedObject xTransact = (XTransactedObject) UnoRuntime.queryInterface(XTransactedObject.class, m_Storage);
+ XTransactedObject xTransact = UnoRuntime.queryInterface(XTransactedObject.class, m_Storage);
m_Storage.insertByName(aName, xInput);
xTransact.commit();
xTransact = null;
@@ -327,7 +327,7 @@ public class XSLTFilterOLEExtracter {
Object x = xComponentContext.getServiceManager().createInstanceWithContext(
"com.sun.star.connection.Connector", xComponentContext);
- XConnector xConnector = (XConnector) UnoRuntime.queryInterface(XConnector.class, x);
+ XConnector xConnector = UnoRuntime.queryInterface(XConnector.class, x);
String a[] = parseUnoUrl(sConnectionString);
if (null == a) {
@@ -340,7 +340,7 @@ public class XSLTFilterOLEExtracter {
x = xComponentContext.getServiceManager().createInstanceWithContext(
"com.sun.star.bridge.BridgeFactory", xComponentContext);
- XBridgeFactory xBridgeFactory = (XBridgeFactory) UnoRuntime.queryInterface(
+ XBridgeFactory xBridgeFactory = UnoRuntime.queryInterface(
XBridgeFactory.class, x);
// create a nameless bridge with no instance provider
@@ -348,7 +348,7 @@ public class XSLTFilterOLEExtracter {
XBridge bridge = xBridgeFactory.createBridge("", a[1], m_Connection, null);
// query for the XComponent interface and add this as event listener
- XComponent xComponent = (XComponent) UnoRuntime.queryInterface(
+ XComponent xComponent = UnoRuntime.queryInterface(
XComponent.class, bridge);
// get the remote instance
@@ -360,7 +360,7 @@ public class XSLTFilterOLEExtracter {
"Server didn't provide an instance for" + a[2], null);
}
- XMultiServiceFactory xFac = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, x);
+ XMultiServiceFactory xFac = UnoRuntime.queryInterface(XMultiServiceFactory.class, x);
return xFac;
}
protected static boolean DEBUG = false;
diff --git a/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java
index 265eed018365..1b776225d848 100644
--- a/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java
+++ b/filter/source/xsltfilter/com/sun/star/comp/xsltfilter/XSLTransformer.java
@@ -245,7 +245,7 @@ public class XSLTransformer
l.started();
}
- XSeekable xseek = (XSeekable) UnoRuntime.queryInterface(XSeekable.class, m_xis);
+ XSeekable xseek = UnoRuntime.queryInterface(XSeekable.class, m_xis);
if (xseek != null) {
xseek.seek(0);
}