summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
Diffstat (limited to 'ucb')
-rw-r--r--ucb/prj/build.lst4
-rwxr-xr-xucb/qa/complex/tdoc/CheckContentProvider.java247
-rwxr-xr-xucb/qa/complex/tdoc/CheckTransientDocumentsContent.java81
-rwxr-xr-xucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java83
-rwxr-xr-xucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java94
-rw-r--r--ucb/qa/complex/tdoc/TestDocument.java39
-rwxr-xr-xucb/qa/complex/tdoc/_XChild.java (renamed from ucb/qa/complex/tdoc/interfaces/_XChild.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java (renamed from ucb/qa/complex/tdoc/interfaces/_XCommandInfoChangeNotifier.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XCommandProcessor.java (renamed from ucb/qa/complex/tdoc/interfaces/_XCommandProcessor.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XComponent.java (renamed from ucb/qa/complex/tdoc/interfaces/_XComponent.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XContent.java (renamed from ucb/qa/complex/tdoc/interfaces/_XContent.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java (renamed from ucb/qa/complex/tdoc/interfaces/_XPropertiesChangeNotifier.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XPropertyContainer.java (renamed from ucb/qa/complex/tdoc/interfaces/_XPropertyContainer.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java (renamed from ucb/qa/complex/tdoc/interfaces/_XPropertySetInfoChangeNotifier.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XServiceInfo.java (renamed from ucb/qa/complex/tdoc/interfaces/_XServiceInfo.java)2
-rwxr-xr-xucb/qa/complex/tdoc/_XTypeProvider.java (renamed from ucb/qa/complex/tdoc/interfaces/_XTypeProvider.java)2
-rwxr-xr-xucb/qa/complex/tdoc/interfaces/makefile.mk4
-rwxr-xr-xucb/qa/complex/tdoc/makefile.mk83
-rw-r--r--ucb/qa/complex/tdoc/test_documents/Iterator.sxw (renamed from ucb/qa/complex/test_documents/Iterator.sxw)bin5627 -> 5627 bytes
-rw-r--r--ucb/qa/complex/tdoc/test_documents/chinese.sxw (renamed from ucb/qa/complex/test_documents/chinese.sxw)bin5757 -> 5757 bytes
-rw-r--r--ucb/qa/complex/tdoc/test_documents/filter.sxw (renamed from ucb/qa/complex/test_documents/filter.sxw)bin14359 -> 14359 bytes
-rwxr-xr-xucb/qa/complex/ucb/UCB.java171
-rwxr-xr-xucb/qa/complex/ucb/makefile.mk58
-rw-r--r--ucb/source/ucp/gio/gio_provider.cxx8
24 files changed, 513 insertions, 379 deletions
diff --git a/ucb/prj/build.lst b/ucb/prj/build.lst
index dad7921304..8d8c87f3ae 100644
--- a/ucb/prj/build.lst
+++ b/ucb/prj/build.lst
@@ -16,3 +16,7 @@ uc ucb\source\ucp\tdoc nmake - all uc_tdoc uc_inc NULL
uc ucb\source\ucp\expand nmake - all uc_expand uc_inc NULL
uc ucb\source\ucp\ext nmake - all uc_ext uc_inc NULL
uc ucb\qa\unoapi nmake - all uc_qa_unoapi NULL
+
+uc ucb\qa\complex\ucb nmake - all uc_complex_ucb uc_inc NULL
+# fails, please fix
+# uc ucb\qa\complex\tdoc nmake - all uc_complex_tdoc uc_complex_tdoc_interfaces uc_inc NULL
diff --git a/ucb/qa/complex/tdoc/CheckContentProvider.java b/ucb/qa/complex/tdoc/CheckContentProvider.java
index 86a6d08de7..5112f7da79 100755
--- a/ucb/qa/complex/tdoc/CheckContentProvider.java
+++ b/ucb/qa/complex/tdoc/CheckContentProvider.java
@@ -42,20 +42,15 @@ import com.sun.star.ucb.XContentIdentifier;
import com.sun.star.ucb.XContentIdentifierFactory;
import com.sun.star.ucb.XContentProvider;
import com.sun.star.uno.UnoRuntime;
-import complexlib.ComplexTestCase;
-import complex.tdoc.interfaces._XChild;
-import complex.tdoc.interfaces._XCommandInfoChangeNotifier;
-import complex.tdoc.interfaces._XComponent;
-import complex.tdoc.interfaces._XServiceInfo;
-import complex.tdoc.interfaces._XTypeProvider;
-import complex.tdoc.interfaces._XCommandProcessor;
-import complex.tdoc.interfaces._XContent;
-import complex.tdoc.interfaces._XPropertiesChangeNotifier;
-import complex.tdoc.interfaces._XPropertyContainer;
-import complex.tdoc.interfaces._XPropertySetInfoChangeNotifier;
-import lib.TestEnvironment;
import util.WriterTools;
-import util.utils;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
* Check the TransientDocumentsContentProvider (TDOC). Three documents are
@@ -66,7 +61,7 @@ import util.utils;
* with an accept parameter (writer is initially opened). Otherwise loaded
* documents are not found.
*/
-public class CheckContentProvider extends ComplexTestCase {
+public class CheckContentProvider {
private final String testDocuments[] = new String[]{"filter.sxw", "chinese.sxw", "Iterator.sxw"};
private final int countDocs = testDocuments.length;
private XMultiServiceFactory xMSF = null;
@@ -89,37 +84,38 @@ public class CheckContentProvider extends ComplexTestCase {
* Important is, that the test of the element comes first, then the test of
* its interfaces.
**/
- public String[] getTestMethodNames() {
- return new String[]{"checkTDOCRoot",
- "checkTDOCRootInterfaces",
- "checkTDOCDocument",
- "checkTDOCDocumentInterfaces",
- "checkTDOCFolder",
- "checkTDOCFolderInterfaces",
- "checkTDOCStream",
- "checkTDOCStreamInterfaces",
- };
- }
+// public String[] getTestMethodNames() {
+// return new String[]{"checkTDOCRoot",
+// "checkTDOCRootInterfaces",
+// "checkTDOCDocument",
+// "checkTDOCDocumentInterfaces",
+// "checkTDOCFolder",
+// "checkTDOCFolderInterfaces",
+// "checkTDOCStream",
+// "checkTDOCStreamInterfaces",
+// };
+// }
/**
* Open some documents before the test
*/
- public void before() {
- xMSF = (XMultiServiceFactory)param.getMSF();
+ @Before public void before() {
+ xMSF = getMSF();
xTextDoc = new XTextDocument[countDocs];
- log.println("Open some new documents.");
+ System.out.println("Open some new documents.");
for (int i=0; i<countDocs; i++) {
- String fileName = utils.getFullTestURL(testDocuments[i]);
+ String fileName = TestDocument.getUrl(testDocuments[i]);
System.out.println("Doc " + i + ": " + fileName);
xTextDoc[i] = WriterTools.loadTextDoc(xMSF, fileName);
+ assertNotNull("Can't load document " + fileName, xTextDoc[i]);
}
}
/**
* Close the documents
*/
- public void after() {
- log.println("Close all documents.");
+ @After public void after() {
+ System.out.println("Close all documents.");
for (int i=0; i<countDocs; i++) {
xTextDoc[i].dispose();
}
@@ -128,18 +124,16 @@ public class CheckContentProvider extends ComplexTestCase {
/**
* Check the tdcp root.
*/
- public void checkTDOCRoot() {
+ @Test public void checkTDOCRoot() {
try {
// create a content provider
Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsContentProvider");
XContentProvider xContentProvider =
- (XContentProvider)UnoRuntime.queryInterface(XContentProvider.class, o);
+ UnoRuntime.queryInterface(XContentProvider.class, o);
// create the ucb
XContentIdentifierFactory xContentIdentifierFactory =
- (XContentIdentifierFactory)UnoRuntime.queryInterface(
- XContentIdentifierFactory.class, xMSF.createInstance(
- "com.sun.star.ucb.UniversalContentBroker"));
+ UnoRuntime.queryInterface(XContentIdentifierFactory.class, xMSF.createInstance("com.sun.star.ucb.UniversalContentBroker"));
// create a content identifier from the ucb for tdoc
XContentIdentifier xContentIdentifier =
xContentIdentifierFactory.createContentIdentifier("vnd.sun.star.tdoc:/");
@@ -147,7 +141,7 @@ public class CheckContentProvider extends ComplexTestCase {
xContent = xContentProvider.queryContent(xContentIdentifier);
String content = xContent.getContentType();
- log.println("#### Content root: " + content);
+ System.out.println("#### Content root: " + content);
// try to get some documents: should be "countDocs" at least.
XContentIdentifier[] xContentId = new XContentIdentifier[countDocs+5];
@@ -160,66 +154,68 @@ public class CheckContentProvider extends ComplexTestCase {
int returnVal = xContentProvider.compareContentIds(xContentId[i], xContentIdentifier);
String cont = null;
if (xCont[i] != null)
+ {
cont = xCont[i].getContentType();
- log.println("Document Content " + i + ": " + cont + " compare with root: " + returnVal);
+ }
+ System.out.println("Document Content " + i + ": " + cont + " compare with root: " + returnVal);
xContentId[i] = xContentIdentifierFactory.createContentIdentifier("vnd.sun.star.tdoc:/" + i + "/content.xml");
// get content
xCont[i] = xContentProvider.queryContent(xContentId[i]);
cont = null;
if (xCont[i] != null)
+ {
cont = xCont[i].getContentType();
- log.println("\tContent.xml Content " + i + ": " + cont);
+ }
+ System.out.println("\tContent.xml Content " + i + ": " + cont);
}
util.dbg.printInterfaces(xContent);
}
catch(Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
- failed("Unexpected Exception: " + e.getMessage());
+ e.printStackTrace();
+ fail("Unexpected Exception: " + e.getMessage());
}
}
/**
* Check the interfaces of the root.
*/
- public void checkTDOCRootInterfaces() {
+ @Test public void checkTDOCRootInterfaces() {
checkInterfaces(false);
}
/**
* Check the tdcp document: document 3 is used.
*/
- public void checkTDOCDocument() {
+ @Test public void checkTDOCDocument() {
try {
xContent = null;
Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsContentProvider");
XContentProvider xContentProvider =
- (XContentProvider)UnoRuntime.queryInterface(XContentProvider.class, o);
+ UnoRuntime.queryInterface(XContentProvider.class, o);
// create the ucb
XContentIdentifierFactory xContentIdentifierFactory =
- (XContentIdentifierFactory)UnoRuntime.queryInterface(
- XContentIdentifierFactory.class, xMSF.createInstance(
- "com.sun.star.ucb.UniversalContentBroker"));
+ UnoRuntime.queryInterface(XContentIdentifierFactory.class, xMSF.createInstance("com.sun.star.ucb.UniversalContentBroker"));
// create a content identifier from the ucb for tdoc
XContentIdentifier xContentIdentifier =
xContentIdentifierFactory.createContentIdentifier("vnd.sun.star.tdoc:/3");
// get content
xContent = xContentProvider.queryContent(xContentIdentifier);
-
+ // assertNotNull(xContent);
String content = xContent.getContentType();
- log.println("#### Document root: " + content);
+ System.out.println("#### Document root: " + content);
}
catch(Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
- failed("Unexpected Exception: " + e.getMessage());
+ e.printStackTrace();
+ fail("Unexpected Exception: " + e.getMessage());
}
}
/**
* Check the interfaces on the document.
*/
- public void checkTDOCDocumentInterfaces() {
+ @Test public void checkTDOCDocumentInterfaces() {
checkInterfaces(true);
}
@@ -227,17 +223,15 @@ public class CheckContentProvider extends ComplexTestCase {
* Check a folder on document 2 (document 2 contains an embedded picture and
* therefore contans a subfolder "Pictures"
*/
- public void checkTDOCFolder() {
+ @Test public void checkTDOCFolder() {
try {
xContent = null;
Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsContentProvider");
XContentProvider xContentProvider =
- (XContentProvider)UnoRuntime.queryInterface(XContentProvider.class, o);
+ UnoRuntime.queryInterface(XContentProvider.class, o);
// create the ucb
XContentIdentifierFactory xContentIdentifierFactory =
- (XContentIdentifierFactory)UnoRuntime.queryInterface(
- XContentIdentifierFactory.class, xMSF.createInstance(
- "com.sun.star.ucb.UniversalContentBroker"));
+ UnoRuntime.queryInterface(XContentIdentifierFactory.class, xMSF.createInstance("com.sun.star.ucb.UniversalContentBroker"));
// create a content identifier from the ucb for tdoc
XContentIdentifier xContentIdentifier =
xContentIdentifierFactory.createContentIdentifier("vnd.sun.star.tdoc:/2/Pictures");
@@ -245,36 +239,34 @@ public class CheckContentProvider extends ComplexTestCase {
xContent = xContentProvider.queryContent(xContentIdentifier);
String content = xContent.getContentType();
- log.println("#### Folder type: " + content);
+ System.out.println("#### Folder type: " + content);
}
catch(Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
- failed("Unexpected Exception: " + e.getMessage());
+ e.printStackTrace();
+ fail("Unexpected Exception: " + e.getMessage());
}
}
/**
* Check the interfaces on the folder.
*/
- public void checkTDOCFolderInterfaces() {
+ @Test public void checkTDOCFolderInterfaces() {
checkInterfaces(true);
}
/**
* Open a stream to the embedded picture of document 1.
*/
- public void checkTDOCStream() {
+ @Test public void checkTDOCStream() {
try {
xContent = null;
Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsContentProvider");
XContentProvider xContentProvider =
- (XContentProvider)UnoRuntime.queryInterface(XContentProvider.class, o);
+ UnoRuntime.queryInterface(XContentProvider.class, o);
// create the ucb
XContentIdentifierFactory xContentIdentifierFactory =
- (XContentIdentifierFactory)UnoRuntime.queryInterface(
- XContentIdentifierFactory.class, xMSF.createInstance(
- "com.sun.star.ucb.UniversalContentBroker"));
+ UnoRuntime.queryInterface(XContentIdentifierFactory.class, xMSF.createInstance("com.sun.star.ucb.UniversalContentBroker"));
// create a content identifier from the ucb for tdoc
XContentIdentifier xContentIdentifier =
xContentIdentifierFactory.createContentIdentifier("vnd.sun.star.tdoc:/1/Pictures/10000000000000640000004B9C743800.gif");
@@ -282,18 +274,18 @@ public class CheckContentProvider extends ComplexTestCase {
xContent = xContentProvider.queryContent(xContentIdentifier);
String content = xContent.getContentType();
- log.println("#### Folder type: " + content);
+ System.out.println("#### Folder type: " + content);
}
catch(Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
- failed("Unexpected Exception: " + e.getMessage());
+ e.printStackTrace();
+ fail("Unexpected Exception: " + e.getMessage());
}
}
/**
* Check the interfaces on the stream.
*/
- public void checkTDOCStreamInterfaces() {
+ @Test public void checkTDOCStreamInterfaces() {
checkInterfaces(true);
}
@@ -319,80 +311,105 @@ public class CheckContentProvider extends ComplexTestCase {
private void checkInterfaces(boolean hasParent) {
// check the XTypeProvider interface
_XTypeProvider xTypeProvider = new _XTypeProvider();
- xTypeProvider.oObj = (XTypeProvider)UnoRuntime.queryInterface(XTypeProvider.class, xContent);
- xTypeProvider.log = log;
- assure("getImplementationId()", xTypeProvider._getImplementationId());
- assure("getTypes()", xTypeProvider._getTypes());
+ xTypeProvider.oObj = UnoRuntime.queryInterface(XTypeProvider.class, xContent);
+ // xTypeProvider.log = log;
+ assertNotNull("getImplementationId()", xTypeProvider._getImplementationId());
+ assertNotNull("getTypes()", xTypeProvider._getTypes());
// check the XSewrviceInfo interface
_XServiceInfo xServiceInfo = new _XServiceInfo();
- xServiceInfo.oObj = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, xContent);
- xServiceInfo.log = log;
- assure("getImplementationName()", xServiceInfo._getImplementationName());
- assure("getSupportedServiceNames()", xServiceInfo._getSupportedServiceNames());
- assure("supportsService()", xServiceInfo._supportsService());
+ xServiceInfo.oObj = UnoRuntime.queryInterface(XServiceInfo.class, xContent);
+ // xServiceInfo.log = log;
+ assertNotNull("getImplementationName()", xServiceInfo._getImplementationName());
+ assertNotNull("getSupportedServiceNames()", xServiceInfo._getSupportedServiceNames());
+ assertNotNull("supportsService()", xServiceInfo._supportsService());
// check the XCommandProcessor interface
_XCommandProcessor xCommandProcessor = new _XCommandProcessor();
- xCommandProcessor.oObj = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
- xCommandProcessor.log = log;
- xCommandProcessor.before((XMultiServiceFactory)param.getMSF());
- assure("createCommandIdentifier()", xCommandProcessor._createCommandIdentifier());
- assure("execute()", xCommandProcessor._execute());
- assure("abort()", xCommandProcessor._abort());
+ xCommandProcessor.oObj = UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
+ // xCommandProcessor.log = log;
+ xCommandProcessor.before(getMSF());
+ assertNotNull("createCommandIdentifier()", xCommandProcessor._createCommandIdentifier());
+ assertNotNull("execute()", xCommandProcessor._execute());
+ assertNotNull("abort()", xCommandProcessor._abort());
// check the XChild interface
_XChild xChild = new _XChild();
- xChild.oObj = (XChild)UnoRuntime.queryInterface(XChild.class, xContent);
- xChild.log = log;
+ xChild.oObj = UnoRuntime.queryInterface(XChild.class, xContent);
+ // xChild.log = log;
// hasParent dermines, if this content has a parent
- assure("getParent()", xChild._getParent(hasParent));
+ assertNotNull("getParent()", xChild._getParent(hasParent));
// parameter does dermine, if this funczion is supported: generally not supported with tdcp content
- assure("setParent()", xChild._setParent(false));
+ assertNotNull("setParent()", xChild._setParent(false));
// check the XPropertyChangeNotifier interface
_XPropertiesChangeNotifier xPropChange = new _XPropertiesChangeNotifier();
- xPropChange.oObj = (XPropertiesChangeNotifier)UnoRuntime.queryInterface(XPropertiesChangeNotifier.class, xContent);
- xPropChange.log = log;
- assure("addPropertiesChangeListener()", xPropChange._addPropertiesChangeListener());
- assure("removePropertiesChangeListener()", xPropChange._removePropertiesChangeListener());
+ xPropChange.oObj = UnoRuntime.queryInterface(XPropertiesChangeNotifier.class, xContent);
+ // xPropChange.log = log;
+ assertNotNull("addPropertiesChangeListener()", xPropChange._addPropertiesChangeListener());
+ assertNotNull("removePropertiesChangeListener()", xPropChange._removePropertiesChangeListener());
// check the XPropertySetInfoChangeNotifier interface
_XPropertySetInfoChangeNotifier xPropSetInfo = new _XPropertySetInfoChangeNotifier();
- xPropSetInfo.oObj = (XPropertySetInfoChangeNotifier)UnoRuntime.queryInterface(XPropertySetInfoChangeNotifier.class, xContent);
- xPropSetInfo.log = log;
- assure("addPropertiesChangeListener()", xPropSetInfo._addPropertiesChangeListener());
- assure("removePropertiesChangeListener()", xPropSetInfo._removePropertiesChangeListener());
+ xPropSetInfo.oObj = UnoRuntime.queryInterface(XPropertySetInfoChangeNotifier.class, xContent);
+ // xPropSetInfo.log = log;
+ assertNotNull("addPropertiesChangeListener()", xPropSetInfo._addPropertiesChangeListener());
+ assertNotNull("removePropertiesChangeListener()", xPropSetInfo._removePropertiesChangeListener());
// check the XCommandInfoChangeNotifier interface
_XCommandInfoChangeNotifier xCommandChange = new _XCommandInfoChangeNotifier();
- xCommandChange.oObj = (XCommandInfoChangeNotifier)UnoRuntime.queryInterface(XCommandInfoChangeNotifier.class, xContent);
- xCommandChange.log = log;
- assure("addCommandInfoChangeListener()", xCommandChange._addCommandInfoChangeListener());
- assure("removeCommandInfoChangeListener()", xCommandChange._removeCommandInfoChangeListener());
+ xCommandChange.oObj = UnoRuntime.queryInterface(XCommandInfoChangeNotifier.class, xContent);
+ // xCommandChange.log = log;
+ assertNotNull("addCommandInfoChangeListener()", xCommandChange._addCommandInfoChangeListener());
+ assertNotNull("removeCommandInfoChangeListener()", xCommandChange._removeCommandInfoChangeListener());
// check the XContent interface
_XContent xCont = new _XContent();
- xCont.oObj = (XContent)UnoRuntime.queryInterface(XContent.class, xContent);
- xCont.log = log;
- assure("addContentEventListener()", xCont._addContentEventListener());
- assure("getContentType()", xCont._getContentType());
- assure("getIdentifier()", xCont._getIdentifier());
- assure("removeContentEventListener()", xCont._removeContentEventListener());
+ xCont.oObj = UnoRuntime.queryInterface(XContent.class, xContent);
+ // xCont.log = log;
+ assertNotNull("addContentEventListener()", xCont._addContentEventListener());
+ assertNotNull("getContentType()", xCont._getContentType());
+ assertNotNull("getIdentifier()", xCont._getIdentifier());
+ assertNotNull("removeContentEventListener()", xCont._removeContentEventListener());
// check the XPropertyContainer interface
_XPropertyContainer xPropCont = new _XPropertyContainer();
- xPropCont.oObj = (XPropertyContainer)UnoRuntime.queryInterface(XPropertyContainer.class, xContent);
- xPropCont.log = log;
- assure("addProperty()", xPropCont._addProperty());
- assure("removeProperty()", xPropCont._removeProperty());
+ xPropCont.oObj = UnoRuntime.queryInterface(XPropertyContainer.class, xContent);
+ // xPropCont.log = log;
+ assertNotNull("addProperty()", xPropCont._addProperty());
+ assertNotNull("removeProperty()", xPropCont._removeProperty());
// check the XComponent interface
_XComponent xComponent = new _XComponent();
- xComponent.oObj = (XComponent)UnoRuntime.queryInterface(XComponent.class, xContent);
- xComponent.log = log;
- assure("addEventListener()", xComponent._addEventListener());
- assure("removeEventListener()", xComponent._removeEventListener());
+ xComponent.oObj = UnoRuntime.queryInterface(XComponent.class, xContent);
+ // xComponent.log = log;
+ assertNotNull("addEventListener()", xComponent._addEventListener());
+ assertNotNull("removeEventListener()", xComponent._removeEventListener());
// assure("dispose()", xComponent._dispose());
}
+
+
+
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java b/ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java
index 9d244af245..203cfbe996 100755
--- a/ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java
+++ b/ucb/qa/complex/tdoc/CheckTransientDocumentsContent.java
@@ -30,28 +30,28 @@ import com.sun.star.beans.Property;
import com.sun.star.beans.XPropertySetInfo;
import com.sun.star.frame.XModel;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.sdbc.XResultSet;
import com.sun.star.text.XTextDocument;
import com.sun.star.ucb.Command;
-import com.sun.star.ucb.OpenCommandArgument2;
-import com.sun.star.ucb.OpenMode;
import com.sun.star.ucb.XCommandProcessor;
import com.sun.star.ucb.XContent;
-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;
-import complexlib.ComplexTestCase;
import util.WriterTools;
-import util.utils;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
*
*/
-public class CheckTransientDocumentsContent extends ComplexTestCase{
+public class CheckTransientDocumentsContent {
+ // TODO: document doesn't exists
private final String testDocuments[] = new String[]{"sForm.sxw"};//, "chinese.sxw", "Iterator.sxw"};
private final int countDocs = testDocuments.length;
private XMultiServiceFactory xMSF = null;
@@ -61,17 +61,18 @@ public class CheckTransientDocumentsContent extends ComplexTestCase{
return new String[] {"checkTransientDocumentsContent"};
}
- public void before() {
- xMSF = (XMultiServiceFactory)param.getMSF();
+ @Before public void before() {
+ xMSF = getMSF();
xTextDoc = new XTextDocument[countDocs];
- log.println("Open some documents.");
+ System.out.println("Open some documents.");
for (int i=0; i<countDocs; i++) {
- String fileName = utils.getFullTestURL(testDocuments[i]);
+ String fileName = TestDocument.getUrl(testDocuments[i]);
xTextDoc[i] = WriterTools.loadTextDoc(xMSF, fileName);
+ assertNotNull("Can't load document " + fileName, xTextDoc[i]);
}
}
- public void after() {
- log.println("Close all documents.");
+ @After public void after() {
+ System.out.println("Close all documents.");
for (int i=0; i<countDocs; i++) {
xTextDoc[i].dispose();
}
@@ -80,15 +81,13 @@ public class CheckTransientDocumentsContent extends ComplexTestCase{
/**
* Check the content of one document
*/
- public void checkTransientDocumentsContent() {
+ @Test public void checkTransientDocumentsContent() {
try {
// create the ucb
XContentIdentifierFactory xContentIdentifierFactory =
- (XContentIdentifierFactory)UnoRuntime.queryInterface(
- XContentIdentifierFactory.class, xMSF.createInstance(
- "com.sun.star.ucb.UniversalContentBroker"));
+ UnoRuntime.queryInterface(XContentIdentifierFactory.class, xMSF.createInstance("com.sun.star.ucb.UniversalContentBroker"));
XContentProvider xContentProvider =
- (XContentProvider)UnoRuntime.queryInterface(XContentProvider.class, xContentIdentifierFactory);
+ UnoRuntime.queryInterface(XContentProvider.class, xContentIdentifierFactory);
// create a content identifier from the ucb for tdoc
XContentIdentifier xContentIdentifier =
xContentIdentifierFactory.createContentIdentifier("vnd.sun.star.tdoc:/1");
@@ -96,7 +95,7 @@ public class CheckTransientDocumentsContent extends ComplexTestCase{
XContent xContent = xContentProvider.queryContent(xContentIdentifier);
// actual test: commands to get some properties
- XCommandProcessor xCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
+ XCommandProcessor xCommandProcessor = UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
// build up the command
Command command = new Command();
command.Name = "getPropertySetInfo";
@@ -106,16 +105,16 @@ public class CheckTransientDocumentsContent extends ComplexTestCase{
Object result = xCommandProcessor.execute(command, 0, null);
// check the result
- log.println("Result: "+ result.getClass().toString());
- XPropertySetInfo xPropertySetInfo = (XPropertySetInfo)UnoRuntime.queryInterface(XPropertySetInfo.class, result);
+ System.out.println("Result: "+ result.getClass().toString());
+ XPropertySetInfo xPropertySetInfo = UnoRuntime.queryInterface(XPropertySetInfo.class, result);
Property[] props = xPropertySetInfo.getProperties();
boolean res = false;
for(int i=0; i<props.length; i++) {
String propName = props[i].Name;
res |= propName.equals("DocumentModel");
- log.println("Found property: " + propName + " type: " + props[i].Type.getTypeName());
+ System.out.println("Found property: " + propName + " type: " + props[i].Type.getTypeName());
}
- assure("Did not find property 'DocumentModel' in the Property array.", res);
+ assertNotNull("Did not find property 'DocumentModel' in the Property array.", res);
// get on property
command.Name = "getPropertyValues";
@@ -130,16 +129,38 @@ public class CheckTransientDocumentsContent extends ComplexTestCase{
result = xCommandProcessor.execute(command, 0, null);
// check the result
- log.println("Result: "+ result.getClass().toString());
+ System.out.println("Result: "+ result.getClass().toString());
- XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class, result);
- assure("Did not get property 'DocumentModel'.", xModel == null);
+ XModel xModel = UnoRuntime.queryInterface(XModel.class, result);
+ assertTrue("Did not get property 'DocumentModel'.", xModel == null);
}
catch (com.sun.star.uno.Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
- failed("Could not create test objects.");
+ e.printStackTrace();
+ fail("Could not create test objects.");
}
}
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java b/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java
index ba67a76b3e..2ac35777ed 100755
--- a/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java
+++ b/ucb/qa/complex/tdoc/CheckTransientDocumentsContentProvider.java
@@ -41,15 +41,23 @@ import com.sun.star.ucb.XContentIdentifierFactory;
import com.sun.star.ucb.XContentProvider;
import com.sun.star.ucb.XDynamicResultSet;
import com.sun.star.uno.UnoRuntime;
-import complexlib.ComplexTestCase;
+// import complexlib.ComplexTestCase;
import util.WriterTools;
-import util.utils;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
*
*/
-public class CheckTransientDocumentsContentProvider extends ComplexTestCase {
- private final String testDocuments[] = new String[]{"sForm.sxw", "chinese.sxw", "Iterator.sxw"};
+public class CheckTransientDocumentsContentProvider {
+ // TODO: document doesn't exists
+ private final String testDocuments[] = new String[]{/*"sForm.sxw",*/ "chinese.sxw", "Iterator.sxw"};
private final int countDocs = testDocuments.length;
private XMultiServiceFactory xMSF = null;
private XTextDocument[] xTextDoc = null;
@@ -58,17 +66,18 @@ public class CheckTransientDocumentsContentProvider extends ComplexTestCase {
return new String[]{"checkTransientDocumentsContentProvider"};
}
- public void before() {
- xMSF = (XMultiServiceFactory)param.getMSF();
+ @Before public void before() {
+ xMSF = getMSF();
xTextDoc = new XTextDocument[countDocs];
- log.println("Open some documents.");
+ System.out.println("Open some documents.");
for (int i=0; i<countDocs; i++) {
- String fileName = utils.getFullTestURL(testDocuments[i]);
+ String fileName = TestDocument.getUrl(testDocuments[i]);
xTextDoc[i] = WriterTools.loadTextDoc(xMSF, fileName);
+ assertNotNull("Can't load document " + fileName, xTextDoc[i]);
}
}
- public void after() {
- log.println("Close all documents.");
+ @After public void after() {
+ System.out.println("Close all documents.");
for (int i=0; i<countDocs; i++) {
xTextDoc[i].dispose();
}
@@ -78,18 +87,16 @@ public class CheckTransientDocumentsContentProvider extends ComplexTestCase {
* Check the provider of document content: open some documents
* and look if they are accessible.
*/
- public void checkTransientDocumentsContentProvider() {
+ @Test public void checkTransientDocumentsContentProvider() {
try {
// create a content provider
Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsContentProvider");
XContentProvider xContentProvider =
- (XContentProvider)UnoRuntime.queryInterface(XContentProvider.class, o);
+ UnoRuntime.queryInterface(XContentProvider.class, o);
// create the ucb
XContentIdentifierFactory xContentIdentifierFactory =
- (XContentIdentifierFactory)UnoRuntime.queryInterface(
- XContentIdentifierFactory.class, xMSF.createInstance(
- "com.sun.star.ucb.UniversalContentBroker"));
+ UnoRuntime.queryInterface(XContentIdentifierFactory.class, xMSF.createInstance("com.sun.star.ucb.UniversalContentBroker"));
// create a content identifier from the ucb for tdoc
XContentIdentifier xContentIdentifier =
xContentIdentifierFactory.createContentIdentifier("vnd.sun.star.tdoc:/");
@@ -97,7 +104,7 @@ public class CheckTransientDocumentsContentProvider extends ComplexTestCase {
XContent xContent = xContentProvider.queryContent(xContentIdentifier);
// actual test: execute an "open" command with the content
- XCommandProcessor xCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
+ XCommandProcessor xCommandProcessor = UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
// build up the command
Command command = new Command();
OpenCommandArgument2 commandarg2 = new OpenCommandArgument2();
@@ -109,35 +116,59 @@ public class CheckTransientDocumentsContentProvider extends ComplexTestCase {
Object result = xCommandProcessor.execute(command, 0, null);
// check the result
- log.println("Result: "+ result.getClass().toString());
- XDynamicResultSet xDynamicResultSet = (XDynamicResultSet)UnoRuntime.queryInterface(XDynamicResultSet.class, result);
+ System.out.println("Result: "+ result.getClass().toString());
+ XDynamicResultSet xDynamicResultSet = UnoRuntime.queryInterface(XDynamicResultSet.class, result);
// check bug of wrong returned service name.
- XServiceInfo xServiceInfo = (XServiceInfo)UnoRuntime.queryInterface(XServiceInfo.class, xDynamicResultSet);
+ XServiceInfo xServiceInfo = UnoRuntime.queryInterface(XServiceInfo.class, xDynamicResultSet);
String[] sNames = xServiceInfo.getSupportedServiceNames();
String serviceName = sNames[0];
if (sNames.length > 1)
- failed("Implementation has been changed. Check this test!");
- assure("The service name '" + serviceName + "' is not valid.", !serviceName.equals("com.sun.star.ucb.DynamicContentResultSet"), true);
+ {
+ fail("Implementation has been changed. Check this test!");
+ }
+ assertTrue("The service name '" + serviceName + "' is not valid.", !serviceName.equals("com.sun.star.ucb.DynamicContentResultSet"));
XResultSet xResultSet = xDynamicResultSet.getStaticResultSet();
- XContentAccess xContentAccess = (XContentAccess)UnoRuntime.queryInterface(XContentAccess.class, xResultSet);
+ XContentAccess xContentAccess = UnoRuntime.queryInterface(XContentAccess.class, xResultSet);
// iterate over the result: three docs were opened, we should have at least three content identifier strings
int countContentIdentifiers = 0;
while(xResultSet.next()) {
countContentIdentifiers++;
String identifier = xContentAccess.queryContentIdentifierString();
- log.println("Identifier of row " + xResultSet.getRow() + ": " + identifier);
+ System.out.println("Identifier of row " + xResultSet.getRow() + ": " + identifier);
}
// some feeble test: if the amount >2, we're ok.
// 2do: check better
- assure("Did only find " + countContentIdentifiers + " open documents." +
+ assertTrue("Did only find " + countContentIdentifiers + " open documents." +
" Should have been at least 3.", countContentIdentifiers>2);
}
catch (com.sun.star.uno.Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
- failed("Could not create test objects.");
+ e.printStackTrace();
+ fail("Could not create test objects.");
}
}
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java b/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java
index a89f948b19..0758ba7ef8 100755
--- a/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java
+++ b/ucb/qa/complex/tdoc/CheckTransientDocumentsDocumentContent.java
@@ -34,49 +34,50 @@ import com.sun.star.embed.XStorage;
import com.sun.star.frame.XModel;
import com.sun.star.frame.XTransientDocumentsDocumentContentFactory;
import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
import com.sun.star.sdbc.XResultSet;
import com.sun.star.sdbc.XRow;
import com.sun.star.text.XTextDocument;
import com.sun.star.ucb.Command;
import com.sun.star.ucb.ContentInfo;
-import com.sun.star.ucb.InsertCommandArgument;
import com.sun.star.ucb.OpenCommandArgument2;
import com.sun.star.ucb.OpenMode;
import com.sun.star.ucb.XCommandProcessor;
import com.sun.star.ucb.XContent;
-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;
-import complexlib.ComplexTestCase;
import util.WriterTools;
import util.utils;
-
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
*
*/
-public class CheckTransientDocumentsDocumentContent extends ComplexTestCase {
+public class CheckTransientDocumentsDocumentContent {
+ // TODO: document doesn't exists
private final String testDocuments = "sForm.sxw";
private final String folderName = "TestFolder";
private XMultiServiceFactory xMSF = null;
private XTextDocument xTextDoc = null;
- public String[] getTestMethodNames() {
- return new String[]{"checkTransientDocumentsDocumentContent"};
- }
+// public String[] getTestMethodNames() {
+// return new String[]{"checkTransientDocumentsDocumentContent"};
+// }
- public void before() {
- xMSF = (XMultiServiceFactory)param.getMSF();
- log.println("Open a document.");
- String fileName = utils.getFullTestURL(testDocuments);
+ @Before public void before() {
+ xMSF = getMSF();
+ System.out.println("Open a document.");
+ String fileName = TestDocument.getUrl(testDocuments);
xTextDoc = WriterTools.loadTextDoc(xMSF, fileName);
+ assertNotNull(xTextDoc);
}
- public void after() {
- log.println("Close all documents.");
+ @After public void after() {
+ System.out.println("Close all documents.");
xTextDoc.dispose();
}
@@ -84,30 +85,28 @@ public class CheckTransientDocumentsDocumentContent extends ComplexTestCase {
* Check the provider of document content: open some documents
* and look if they are accessible.
*/
- public void checkTransientDocumentsDocumentContent() {
+ @Test public void checkTransientDocumentsDocumentContent() {
try {
// create a content provider
Object o = xMSF.createInstance("com.sun.star.comp.ucb.TransientDocumentsDocumentContentFactory");
XTransientDocumentsDocumentContentFactory xTransientDocumentsDocumentContentFactory =
- (XTransientDocumentsDocumentContentFactory)UnoRuntime.queryInterface(
- XTransientDocumentsDocumentContentFactory.class, o);
+ UnoRuntime.queryInterface(XTransientDocumentsDocumentContentFactory.class, o);
// get the model from the opened document
XModel xModel = xTextDoc.getCurrentController().getModel();
// a little additional check for 114733
- XDocumentSubStorageSupplier xDocumentSubStorageSupplier = (XDocumentSubStorageSupplier)
- UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class, xModel);
+ XDocumentSubStorageSupplier xDocumentSubStorageSupplier = UnoRuntime.queryInterface(XDocumentSubStorageSupplier.class, xModel);
String[]names = xDocumentSubStorageSupplier.getDocumentSubStoragesNames();
for (int i=0; i<names.length; i++) {
- log.println("SubStorage names " + i + ": " +names[i]);
+ System.out.println("SubStorage names " + i + ": " +names[i]);
}
XStorage xStorage = xDocumentSubStorageSupplier.getDocumentSubStorage(names[0], ElementModes.READWRITE);
- assure("Could not get a storage from the XDocumentStorageSupplier.", xStorage != null);
+ assertTrue("Could not get a storage from the XDocumentStorageSupplier.", xStorage != null);
// get content
XContent xContent = xTransientDocumentsDocumentContentFactory.createDocumentContent(xModel);
// actual test: execute some commands
- XCommandProcessor xCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
+ XCommandProcessor xCommandProcessor = UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
// create the command and arguments
Command command = new Command();
@@ -123,19 +122,19 @@ public class CheckTransientDocumentsDocumentContent extends ComplexTestCase {
command.Argument = cmargs2;
Object result = xCommandProcessor.execute(command, 0, null);
- XDynamicResultSet xDynamicResultSet = (XDynamicResultSet)UnoRuntime.queryInterface(XDynamicResultSet.class, result);
+ XDynamicResultSet xDynamicResultSet = UnoRuntime.queryInterface(XDynamicResultSet.class, result);
XResultSet xResultSet = xDynamicResultSet.getStaticResultSet();
- XRow xRow = (XRow)UnoRuntime.queryInterface(XRow.class, xResultSet);
+ XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
// create the new folder 'folderName': first, check if it's already there
while(xResultSet.next()) {
String existingFolderName = xRow.getString(1);
- log.println("Found existing folder: '" + existingFolderName + "'");
+ System.out.println("Found existing folder: '" + existingFolderName + "'");
if (folderName.equals(existingFolderName)) {
- failed("Cannot create a new folder: folder already exists: adapt test or choose a different document.");
+ fail("Cannot create a new folder: folder already exists: adapt test or choose a different document.");
}
}
// create a folder
- log.println("Create new folder "+ folderName);
+ System.out.println("Create new folder "+ folderName);
ContentInfo contentInfo = new ContentInfo();
contentInfo.Type = "application/vnd.sun.star.tdoc-folder";
@@ -143,10 +142,10 @@ public class CheckTransientDocumentsDocumentContent extends ComplexTestCase {
command.Argument = contentInfo;
result = xCommandProcessor.execute(command, 0, null);
- XContent xNewFolder = (XContent)UnoRuntime.queryInterface(XContent.class, result);
+ XContent xNewFolder = UnoRuntime.queryInterface(XContent.class, result);
- XCommandProcessor xFolderCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xNewFolder);
- log.println("Got the new folder: " + utils.getImplName(xNewFolder));
+ XCommandProcessor xFolderCommandProcessor = UnoRuntime.queryInterface(XCommandProcessor.class, xNewFolder);
+ System.out.println("Got the new folder: " + utils.getImplName(xNewFolder));
// name the new folder
PropertyValue[] titleProp = new PropertyValue[1];
@@ -170,10 +169,33 @@ public class CheckTransientDocumentsDocumentContent extends ComplexTestCase {
xFolderCommandProcessor.execute(commitCommand, 0, null); */
}
catch (com.sun.star.uno.Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
- failed("Could not create test objects.");
+ e.printStackTrace();
+ fail("Could not create test objects.");
}
}
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+
}
diff --git a/ucb/qa/complex/tdoc/TestDocument.java b/ucb/qa/complex/tdoc/TestDocument.java
new file mode 100644
index 0000000000..875b75ccb0
--- /dev/null
+++ b/ucb/qa/complex/tdoc/TestDocument.java
@@ -0,0 +1,39 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package complex.tdoc;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+
+final class TestDocument {
+ public static String getUrl(String name) {
+ return OfficeFileUrl.getAbsolute(new File("test_documents", name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/ucb/qa/complex/tdoc/interfaces/_XChild.java b/ucb/qa/complex/tdoc/_XChild.java
index 1638c6aa6a..760fb32155 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XChild.java
+++ b/ucb/qa/complex/tdoc/_XChild.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import lib.MultiMethodTest;
import lib.Status;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XCommandInfoChangeNotifier.java b/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java
index 905dffee4b..cc0f51ede4 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XCommandInfoChangeNotifier.java
+++ b/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import com.sun.star.ucb.XCommandInfoChangeListener;
import com.sun.star.ucb.XCommandInfoChangeNotifier;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XCommandProcessor.java b/ucb/qa/complex/tdoc/_XCommandProcessor.java
index cb5a203820..fe6bbd517e 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XCommandProcessor.java
+++ b/ucb/qa/complex/tdoc/_XCommandProcessor.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import com.sun.star.beans.Property;
import com.sun.star.beans.XPropertySetInfo;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XComponent.java b/ucb/qa/complex/tdoc/_XComponent.java
index a37f14bbdf..c9765d56b0 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XComponent.java
+++ b/ucb/qa/complex/tdoc/_XComponent.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import com.sun.star.container.XNameContainer;
import lib.MultiMethodTest;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XContent.java b/ucb/qa/complex/tdoc/_XContent.java
index 929e9b2b0a..3ebca751c3 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XContent.java
+++ b/ucb/qa/complex/tdoc/_XContent.java
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import com.sun.star.ucb.XContent;
import com.sun.star.ucb.XContentEventListener;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XPropertiesChangeNotifier.java b/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java
index e182271107..98b96c889d 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XPropertiesChangeNotifier.java
+++ b/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import com.sun.star.beans.XPropertiesChangeListener;
import com.sun.star.beans.XPropertiesChangeNotifier;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XPropertyContainer.java b/ucb/qa/complex/tdoc/_XPropertyContainer.java
index 882fdd3877..67f13f02cf 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XPropertyContainer.java
+++ b/ucb/qa/complex/tdoc/_XPropertyContainer.java
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import com.sun.star.beans.XPropertyContainer;
import share.LogWriter;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XPropertySetInfoChangeNotifier.java b/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java
index a6de169cde..cdfd9dac58 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XPropertySetInfoChangeNotifier.java
+++ b/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import com.sun.star.beans.XPropertySetInfoChangeListener;
import com.sun.star.beans.XPropertySetInfoChangeNotifier;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XServiceInfo.java b/ucb/qa/complex/tdoc/_XServiceInfo.java
index 2fcf59d56f..7b3bce1ffd 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XServiceInfo.java
+++ b/ucb/qa/complex/tdoc/_XServiceInfo.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import lib.MultiMethodTest;
diff --git a/ucb/qa/complex/tdoc/interfaces/_XTypeProvider.java b/ucb/qa/complex/tdoc/_XTypeProvider.java
index 5f71388832..525800ad14 100755
--- a/ucb/qa/complex/tdoc/interfaces/_XTypeProvider.java
+++ b/ucb/qa/complex/tdoc/_XTypeProvider.java
@@ -25,7 +25,7 @@
*
************************************************************************/
-package complex.tdoc.interfaces;
+package complex.tdoc;
import lib.MultiMethodTest;
diff --git a/ucb/qa/complex/tdoc/interfaces/makefile.mk b/ucb/qa/complex/tdoc/interfaces/makefile.mk
index 3a57d1501c..5399383f19 100755
--- a/ucb/qa/complex/tdoc/interfaces/makefile.mk
+++ b/ucb/qa/complex/tdoc/interfaces/makefile.mk
@@ -25,10 +25,10 @@
#
#*************************************************************************
-PRJ = ..$/..$/..$/..
+PRJ = ../../../..
TARGET = TransientDocument
PRJNAME = $(TARGET)
-PACKAGE = complex$/tdoc$/interfaces
+PACKAGE = complex/tdoc/interfaces
# --- Settings -----------------------------------------------------
.INCLUDE: settings.mk
diff --git a/ucb/qa/complex/tdoc/makefile.mk b/ucb/qa/complex/tdoc/makefile.mk
index 175184de0f..01f8ec0f76 100755
--- a/ucb/qa/complex/tdoc/makefile.mk
+++ b/ucb/qa/complex/tdoc/makefile.mk
@@ -25,62 +25,49 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = TransientDocument
-PRJNAME = $(TARGET)
-PACKAGE = complex.tdoc
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CheckContentProvider.java \
- CheckTransientDocumentsContent.java \
- CheckTransientDocumentsContentProvider.java \
- CheckTransientDocumentsDocumentContent.java
-
-# CheckSimpleFileAccess.java \
-#----- make a jar from compiled files ------------------------------
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
-MAXLINELENGTH = 100000
+PRJ = ../../..
+PRJNAME = sc
+TARGET = qa_complex_tdoc
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/tdoc
-# --- Parameters for the test --------------------------------------
+JAVATESTFILES = \
+ CheckContentProvider.java \
+ CheckTransientDocumentsContent.java \
+ CheckTransientDocumentsContentProvider.java \
+ CheckTransientDocumentsDocumentContent.java
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand \
- "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
+JAVAFILES = $(JAVATESTFILES) \
+ TestDocument.java \
+ _XChild.java \
+ _XCommandInfoChangeNotifier.java \
+ _XCommandProcessor.java \
+ _XComponent.java \
+ _XContent.java \
+ _XPropertiesChangeNotifier.java \
+ _XPropertyContainer.java \
+ _XPropertySetInfoChangeNotifier.java \
+ _XServiceInfo.java \
+ _XTypeProvider.java
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
-# replace $/ with . in package name
-CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
-# start the runner application
-CT_APP = org.openoffice.Runner
+.END
-# test document path
-CT_TESTDOCS = -tdoc $(PWD)$/..$/test_documents
-
-# --- Targets ------------------------------------------------------
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-run: ALLTAR
- @echo .
- @echo "The followig tests are available:"
- @echo $(foreach,i,$(JAVAFILES) "dmake $(i:b) ")
+ALLTAR : javatest
-.INCLUDE : target.mk
+.END
-Check%:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_TESTDOCS) $(CT_APPEXECCOMMAND) $(CT_PACKAGE).$@
diff --git a/ucb/qa/complex/test_documents/Iterator.sxw b/ucb/qa/complex/tdoc/test_documents/Iterator.sxw
index 9a7f8961bb..9a7f8961bb 100644
--- a/ucb/qa/complex/test_documents/Iterator.sxw
+++ b/ucb/qa/complex/tdoc/test_documents/Iterator.sxw
Binary files differ
diff --git a/ucb/qa/complex/test_documents/chinese.sxw b/ucb/qa/complex/tdoc/test_documents/chinese.sxw
index 53b242a292..53b242a292 100644
--- a/ucb/qa/complex/test_documents/chinese.sxw
+++ b/ucb/qa/complex/tdoc/test_documents/chinese.sxw
Binary files differ
diff --git a/ucb/qa/complex/test_documents/filter.sxw b/ucb/qa/complex/tdoc/test_documents/filter.sxw
index e4b077c65f..e4b077c65f 100644
--- a/ucb/qa/complex/test_documents/filter.sxw
+++ b/ucb/qa/complex/tdoc/test_documents/filter.sxw
Binary files differ
diff --git a/ucb/qa/complex/ucb/UCB.java b/ucb/qa/complex/ucb/UCB.java
index d01b4fde15..7ae46c4f97 100755
--- a/ucb/qa/complex/ucb/UCB.java
+++ b/ucb/qa/complex/ucb/UCB.java
@@ -34,7 +34,6 @@ package complex.ucb;
* Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
*/
-import complexlib.ComplexTestCase;
import java.util.List;
import java.util.Vector;
@@ -42,13 +41,22 @@ 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.uno.XComponentContext;
+// import com.sun.star.uno.XComponentContext;
import com.sun.star.ucb.*;
-import com.sun.star.bridge.XUnoUrlResolver;
+// import com.sun.star.bridge.XUnoUrlResolver;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.beans.XPropertySet;
+// import com.sun.star.uno.XComponentContext;
+// import com.sun.star.lang.XMultiComponentFactory;
+// import com.sun.star.beans.XPropertySet;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
/**
* @author rpiterman
* This class is used to copy the content of a folder to
@@ -56,12 +64,12 @@ import com.sun.star.beans.XPropertySet;
* There is an incosistency with argument order.
* It should be always: dir,filename.
*/
-public class UCB extends ComplexTestCase {
+public class UCB {
private Object ucb;
- public String[] getTestMethodNames() {
- return new String[] {"checkWrongFtpConnection"};
- }
+// public String[] getTestMethodNames() {
+// return new String[] {"checkWrongFtpConnection"};
+// }
public void init(XMultiServiceFactory xmsf) throws Exception {
String[] keys = new String[2];
@@ -79,11 +87,13 @@ public class UCB extends ComplexTestCase {
/**
* target name can be "", in which case the name stays lige the source name
- * @param sourceDir
- * @param filename
- * @param targetDir
- * @param targetName
- * @return
+
+ * @param xContent
+ * @param aCommandName
+ * @param aArgument
+ * @return
+ * @throws com.sun.star.ucb.CommandAbortedException
+ * @throws com.sun.star.uno.Exception
*/
public Object executeCommand(
@@ -92,9 +102,7 @@ public class UCB extends ComplexTestCase {
Object aArgument)
throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception {
XCommandProcessor xCmdProcessor =
- (XCommandProcessor) UnoRuntime.queryInterface(
- XCommandProcessor.class,
- xContent);
+ UnoRuntime.queryInterface(XCommandProcessor.class, xContent);
Command aCommand = new Command();
aCommand.Name = aCommandName;
aCommand.Handle = -1; // not available
@@ -118,39 +126,44 @@ public class UCB extends ComplexTestCase {
XDynamicResultSet xSet;
xSet =
- (XDynamicResultSet) UnoRuntime.queryInterface(
- XDynamicResultSet.class,
- executeCommand(xContent, "open", aArg));
+ UnoRuntime.queryInterface(XDynamicResultSet.class, executeCommand(xContent, "open", aArg));
XResultSet xResultSet = xSet.getStaticResultSet();
List files = new Vector();
- if (xResultSet.first()) {
+ if (xResultSet.first())
+ {
// obtain XContentAccess interface for child content access and XRow for properties
- XContentAccess xContentAccess =
- (XContentAccess) UnoRuntime.queryInterface(
- XContentAccess.class,
- xResultSet);
- XRow xRow =
- (XRow) UnoRuntime.queryInterface(XRow.class, xResultSet);
- do {
+ XContentAccess xContentAccess = UnoRuntime.queryInterface(XContentAccess.class, xResultSet);
+ XRow xRow = UnoRuntime.queryInterface(XRow.class, xResultSet);
+ do
+ {
// Obtain URL of child.
String aId = xContentAccess.queryContentIdentifierString();
// First column: Title (column numbers are 1-based!)
String aTitle = xRow.getString(1);
- if (aTitle.length() == 0 && xRow.wasNull());
- //ignore
+ if (aTitle.length() == 0 && xRow.wasNull())
+ {
+ //ignore
+ }
else
- files.add(aTitle);
+ {
+ files.add(aTitle);
+ }
} while (xResultSet.next()); // next child
}
if (verifier != null)
- for (int i = 0; i < files.size(); i++)
- if (!verifier.verify(files.get(i)))
- files.remove(i--);
-
+ {
+ for (int i = 0; i < files.size(); i++)
+ {
+ if (!verifier.verify(files.get(i)))
+ {
+ files.remove(i--);
+ }
+ }
+ }
return files;
}
@@ -165,45 +178,46 @@ public class UCB extends ComplexTestCase {
pv[0].Handle = -1;
Object row = executeCommand(content, "getPropertyValues", pv);
- XRow xrow = (XRow) UnoRuntime.queryInterface(XRow.class, row);
+ XRow xrow = UnoRuntime.queryInterface(XRow.class, row);
if (type.equals(String.class))
- return xrow.getString(1);
+ {
+ return xrow.getString(1);
+ }
else if (type.equals(Boolean.class))
- return xrow.getBoolean(1) ? Boolean.TRUE : Boolean.FALSE;
+ {
+ return xrow.getBoolean(1) ? Boolean.TRUE : Boolean.FALSE;
+ }
else if (type.equals(Integer.class))
- return new Integer(xrow.getInt(1));
+ {
+ return new Integer(xrow.getInt(1));
+ }
else if (type.equals(Short.class))
- return new Short(xrow.getShort(1));
+ {
+ return new Short(xrow.getShort(1));
+ }
else
- return null;
+ {
+ return null;
+ }
}
- public Object getContent(String path) throws Exception {
- XContentIdentifier id =
- (
- (XContentIdentifierFactory) UnoRuntime.queryInterface(
- XContentIdentifierFactory.class,
- ucb)).createContentIdentifier(
- path);
-
- return (
- (XContentProvider) UnoRuntime.queryInterface(
- XContentProvider.class,
- ucb)).queryContent(
- id);
+ public Object getContent(String path) throws Exception
+ {
+ XContentIdentifier id = (UnoRuntime.queryInterface(XContentIdentifierFactory.class, ucb)).createContentIdentifier(path);
+ return (UnoRuntime.queryInterface(XContentProvider.class, ucb)).queryContent(id);
}
public static interface Verifier {
public boolean verify(Object object);
}
- public void checkWrongFtpConnection() {
+ @Test public void checkWrongFtpConnection() {
//localhost ;Lo-1.Germany.sun.com; 10.16.65.155
try {
- XMultiServiceFactory xLocMSF = (XMultiServiceFactory)param.getMSF();
+ XMultiServiceFactory xLocMSF = getMSF();
String acountUrl = "ftp://noname:nopasswd@nohost";
- log.println(acountUrl);
+ System.out.println(acountUrl);
init(xLocMSF);
Object content = getContent(acountUrl);
@@ -211,22 +225,45 @@ public class UCB extends ComplexTestCase {
aArg.Mode = OpenMode.ALL; // FOLDER, DOCUMENTS -> simple filter
aArg.Priority = 32768; // Ignored by most implementations
- log.println("now executing open");
+ System.out.println("now executing open");
executeCommand(content, "open", aArg);
- failed("Expected 'IllegalArgumentException' was not thrown.");
+ fail("Expected 'IllegalArgumentException' was not thrown.");
} catch (com.sun.star.lang.IllegalArgumentException ex) {
//TODO error message;
- log.println("Correct exception thrown: " + ex.getClass().toString());
- } catch(com.sun.star.ucb.InteractiveNetworkResolveNameException ex) {
- log.println("This Exception is correctly thrown when no Proxy in StarOffice is used.");
- log.println("To reproduce the bug behaviour, use a Proxy and try again.");
+ System.out.println("Correct exception thrown: " + ex.getClass().toString());
+ } catch(com.sun.star.ucb.InteractiveNetworkException ex) {
+ System.out.println("This Exception is correctly thrown when no Proxy in StarOffice is used.");
+ System.out.println("To reproduce the bug behaviour, use a Proxy and try again.");
} catch (Exception ex) {
- ex.printStackTrace((java.io.PrintWriter)log);
+ ex.printStackTrace();
String exceptionName = ex.toString();
- log.println("ExName: '"+exceptionName+"'");
- failed("Wrong exception thrown: " + exceptionName);
+ System.out.println("ExName: '"+exceptionName+"'");
+ fail("Wrong exception thrown: " + exceptionName);
}
// System.exit(0);
}
+
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
}
diff --git a/ucb/qa/complex/ucb/makefile.mk b/ucb/qa/complex/ucb/makefile.mk
index 4664bd3cfa..4ac3928c9e 100755
--- a/ucb/qa/complex/ucb/makefile.mk
+++ b/ucb/qa/complex/ucb/makefile.mk
@@ -25,54 +25,38 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = UCB
-PRJNAME = $(TARGET)
-PACKAGE = complex$/ucb
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = UCB.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
-#----- make a jar from compiled files ------------------------------
+PRJ = ../../..
+PRJNAME = UCB
+TARGET = qa_complex_ucb
-MAXLINELENGTH = 100000
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/ucb
+JAVATESTFILES = \
+ UCB.java
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
+JAVAFILES = $(JAVATESTFILES)
-# --- Parameters for the test --------------------------------------
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
+.END
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+ALLTAR : javatest
-# start the runner application
-CT_APP = org.openoffice.Runner
+.END
-# --- Targets ------------------------------------------------------
-.INCLUDE : target.mk
-RUN:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_TEST)
-run: RUN
diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx
index d84ea35bd3..72869dc46a 100644
--- a/ucb/source/ucp/gio/gio_provider.cxx
+++ b/ucb/source/ucp/gio/gio_provider.cxx
@@ -108,14 +108,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-extern "C" sal_Bool SAL_CALL component_writeInfo( void *, void *pRegistryKey )
-{
- return pRegistryKey &&
- writeInfo( pRegistryKey,
- ::gio::ContentProvider::getImplementationName_Static(),
- ::gio::ContentProvider::getSupportedServiceNames_Static() );
-}
-
extern "C" void * SAL_CALL component_getFactory( const sal_Char *pImplName,
void *pServiceManager, void * )
{