summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/source/java/org/openoffice/test/tools/DocumentType.java4
-rw-r--r--test/source/java/org/openoffice/test/tools/OfficeDocument.java8
2 files changed, 12 insertions, 0 deletions
diff --git a/test/source/java/org/openoffice/test/tools/DocumentType.java b/test/source/java/org/openoffice/test/tools/DocumentType.java
index cccf803cec81..bf310c5ed0fa 100644
--- a/test/source/java/org/openoffice/test/tools/DocumentType.java
+++ b/test/source/java/org/openoffice/test/tools/DocumentType.java
@@ -44,6 +44,8 @@ public class DocumentType extends com.sun.star.uno.Enum
public static final DocumentType CALC = new DocumentType(1);
public static final DocumentType DRAWING = new DocumentType(2);
public static final DocumentType XMLFORM = new DocumentType(3);
+ public static final DocumentType PRESENTATION = new DocumentType(4);
+ public static final DocumentType FORMULA = new DocumentType(5);
public static final DocumentType UNKNOWN = new DocumentType(-1);
public static DocumentType fromInt(int value)
@@ -54,6 +56,8 @@ public class DocumentType extends com.sun.star.uno.Enum
case 1: return CALC;
case 2: return DRAWING;
case 3: return XMLFORM;
+ case 4: return PRESENTATION;
+ case 5: return FORMULA;
default: return UNKNOWN;
}
}
diff --git a/test/source/java/org/openoffice/test/tools/OfficeDocument.java b/test/source/java/org/openoffice/test/tools/OfficeDocument.java
index 2a051fddad46..bfb76a347e1c 100644
--- a/test/source/java/org/openoffice/test/tools/OfficeDocument.java
+++ b/test/source/java/org/openoffice/test/tools/OfficeDocument.java
@@ -226,6 +226,10 @@ public class OfficeDocument
return "private:factory/sdraw";
if ( eType == DocumentType.XMLFORM )
return "private:factory/swriter?slot=21053";
+ if ( eType == DocumentType.PRESENTATION )
+ return "private:factory/simpress";
+ if ( eType == DocumentType.FORMULA )
+ return "private:factory/smath";
return "private:factory/swriter";
}
@@ -242,6 +246,10 @@ public class OfficeDocument
return DocumentType.CALC;
else if ( xSI.supportsService( "com.sun.star.drawing.DrawingDocument" ) )
return DocumentType.DRAWING;
+ else if ( xSI.supportsService( "com.sun.star.presentation.PresentationDocument" ) )
+ return DocumentType.PRESENTATION;
+ else if ( xSI.supportsService( "com.sun.star.formula.FormulaProperties" ) )
+ return DocumentType.FORMULA;
return DocumentType.UNKNOWN;
}