summaryrefslogtreecommitdiff
path: root/framework/qa/complex/imageManager
diff options
context:
space:
mode:
Diffstat (limited to 'framework/qa/complex/imageManager')
-rwxr-xr-xframework/qa/complex/imageManager/CheckImageManager.java182
-rwxr-xr-xframework/qa/complex/imageManager/_XComponent.java (renamed from framework/qa/complex/imageManager/interfaces/_XComponent.java)32
-rwxr-xr-xframework/qa/complex/imageManager/_XImageManager.java (renamed from framework/qa/complex/imageManager/interfaces/_XImageManager.java)15
-rwxr-xr-xframework/qa/complex/imageManager/_XInitialization.java (renamed from framework/qa/complex/imageManager/interfaces/_XInitialization.java)13
-rwxr-xr-xframework/qa/complex/imageManager/_XTypeProvider.java (renamed from framework/qa/complex/imageManager/interfaces/_XTypeProvider.java)21
-rwxr-xr-xframework/qa/complex/imageManager/_XUIConfiguration.java (renamed from framework/qa/complex/imageManager/interfaces/_XUIConfiguration.java)13
-rwxr-xr-xframework/qa/complex/imageManager/_XUIConfigurationPersistence.java (renamed from framework/qa/complex/imageManager/interfaces/_XUIConfigurationPersistence.java)19
-rwxr-xr-xframework/qa/complex/imageManager/interfaces/makefile.mk16
-rwxr-xr-xframework/qa/complex/imageManager/makefile.mk122
9 files changed, 256 insertions, 177 deletions
diff --git a/framework/qa/complex/imageManager/CheckImageManager.java b/framework/qa/complex/imageManager/CheckImageManager.java
index 8f283a034e20..7db880958ab5 100755
--- a/framework/qa/complex/imageManager/CheckImageManager.java
+++ b/framework/qa/complex/imageManager/CheckImageManager.java
@@ -1,13 +1,5 @@
-package imageManager;
-
-import imageManager.interfaces._XComponent;
-import imageManager.interfaces._XImageManager;
-import imageManager.interfaces._XInitialization;
-import imageManager.interfaces._XTypeProvider;
-import imageManager.interfaces._XUIConfiguration;
-import imageManager.interfaces._XUIConfigurationPersistence;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.container.XIndexAccess;
+package complex.imageManager;
+
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XInitialization;
import com.sun.star.lang.XMultiServiceFactory;
@@ -15,125 +7,135 @@ import com.sun.star.lang.XTypeProvider;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
import com.sun.star.ui.XImageManager;
-import complexlib.ComplexTestCase;
import com.sun.star.ui.XModuleUIConfigurationManagerSupplier;
import com.sun.star.ui.XUIConfiguration;
import com.sun.star.ui.XUIConfigurationManager;
import com.sun.star.ui.XUIConfigurationPersistence;
-import java.io.PrintWriter;
-import share.LogWriter;
+
+
+// ---------- junit imports -----------------
+import lib.TestParameters;
+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 CheckImageManager extends ComplexTestCase {
+public class CheckImageManager {
boolean checkUIConfigManager = false;
XMultiServiceFactory xMSF = null;
-
- public void before() {
- xMSF = (XMultiServiceFactory)param.getMSF();
+ /**
+ * The test parameters
+ */
+ private static TestParameters param = null;
+
+ @Before public void before()
+ {
+ xMSF = getMSF();
+ param = new TestParameters();
+ param.put("ServiceFactory", xMSF); // some qadevOOo functions need the ServiceFactory
}
- public String[] getTestMethodNames() {
- return new String[]{"checkImageManagerFromModule"};//, "checkImageManager"};
- }
+// public String[] getTestMethodNames() {
+// return new String[]{"checkImageManagerFromModule"};//, "checkImageManager"};
+// }
- public void checkImageManagerFromModule() {
- log.println(" **** ImageManager from ModuleUIConfigurationManager *** ");
+ @Test public void checkImageManagerFromModule()
+ {
+ System.out.println(" **** ImageManager from ModuleUIConfigurationManager *** ");
XUIConfigurationManager xManager = null;
try {
Object o = (XInterface)xMSF.createInstance(
"com.sun.star.ui.ModuleUIConfigurationManagerSupplier");
XModuleUIConfigurationManagerSupplier xMUICMS =
- (XModuleUIConfigurationManagerSupplier)UnoRuntime.queryInterface(
- XModuleUIConfigurationManagerSupplier.class, o);
+ UnoRuntime.queryInterface(XModuleUIConfigurationManagerSupplier.class, o);
xManager = xMUICMS.getUIConfigurationManager(
"com.sun.star.text.TextDocument");
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace((PrintWriter)log);
- failed("Exception. " + e.getMessage());
+ fail("Exception. " + e.getMessage());
}
- XImageManager xImageManager = (XImageManager)UnoRuntime.queryInterface(
- XImageManager.class, xManager.getImageManager());
+ XImageManager xImageManager = UnoRuntime.queryInterface(XImageManager.class, xManager.getImageManager());
performChecks(xImageManager, "ModuleUIConfig", xManager);
}
public void checkImageManager() {
- log.println(" **** ImageManager from UIConfigurationManager *** ");
+ System.out.println(" **** ImageManager from UIConfigurationManager *** ");
XUIConfigurationManager xManager = null;
try {
- xManager = (XUIConfigurationManager)UnoRuntime.queryInterface(
- XUIConfigurationManager.class, xMSF.createInstance(
- "com.sun.star.comp.framework.UIConfigurationManager"));
+ xManager = UnoRuntime.queryInterface(XUIConfigurationManager.class, xMSF.createInstance("com.sun.star.comp.framework.UIConfigurationManager"));
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace((PrintWriter)log);
- failed("Exception. " + e.getMessage());
+ fail("Exception. " + e.getMessage());
}
- XImageManager xImageManager = (XImageManager)UnoRuntime.queryInterface(
- XImageManager.class, xManager.getImageManager());
+ XImageManager xImageManager = UnoRuntime.queryInterface(XImageManager.class, xManager.getImageManager());
performChecks(xImageManager, "UIConfig", xManager);
}
private void performChecks(XImageManager xImageManager, String testObjectName, XUIConfigurationManager xManager) {
util.dbg.printInterfaces(xImageManager);
- OXUIConfigurationListenerImpl configListener = new OXUIConfigurationListenerImpl(log, xManager, xMSF);
+ OXUIConfigurationListenerImpl configListener = new OXUIConfigurationListenerImpl(xManager, xMSF);
param.put("XUIConfiguration.XUIConfigurationListenerImpl", configListener);
- XInitialization xInit = (XInitialization)UnoRuntime.queryInterface(XInitialization.class, xImageManager);
- _XInitialization _xInit = new _XInitialization(log, param, xInit);
- assure(testObjectName + "::XInitialization.initialize", _xInit._initialize(), true);
+ XInitialization xInit = UnoRuntime.queryInterface(XInitialization.class, xImageManager);
+ _XInitialization _xInit = new _XInitialization(param, xInit);
+ assertTrue(testObjectName + "::XInitialization.initialize", _xInit._initialize());
// xImageManager is already there, just write a test ;-)
- _XImageManager _xImage = new _XImageManager(log, param, xImageManager);
- assure(testObjectName + "::XImageManager.getAllImageNames", _xImage._getAllImageNames(), true);
- assure(testObjectName + "::XImageManager.getImages", _xImage._getImages(), true);
- assure(testObjectName + "::XImageManager.hasImage", _xImage._hasImage(), true);
- assure(testObjectName + "::XImageManager.insertImages", _xImage._insertImages(), true);
- assure(testObjectName + "::XImageManager.removeImages", _xImage._removeImages(), true);
- assure(testObjectName + "::XImageManager.replaceImages", _xImage._replaceImages(), true);
- assure(testObjectName + "::XImageManager.reset", _xImage._reset(), true);
-
- XTypeProvider xType = (XTypeProvider)UnoRuntime.queryInterface(XTypeProvider.class, xImageManager);
- _XTypeProvider _xType = new _XTypeProvider(log,param,xType);
- assure(testObjectName + "::XTypeProvider.getImplementationId", _xType._getImplementationId(), true);
- assure(testObjectName + "::XTypeProvider.getTypes", _xType._getTypes(), true);
-
- XUIConfiguration xUIConfig = (XUIConfiguration)UnoRuntime.queryInterface(XUIConfiguration.class, xImageManager);
- _XUIConfiguration _xUIConfig = new _XUIConfiguration(log, param, xUIConfig);
+ _XImageManager _xImage = new _XImageManager(param, xImageManager);
+ assertTrue(testObjectName + "::XImageManager.getAllImageNames", _xImage._getAllImageNames());
+ assertTrue(testObjectName + "::XImageManager.getImages", _xImage._getImages());
+ assertTrue(testObjectName + "::XImageManager.hasImage", _xImage._hasImage());
+ assertTrue(testObjectName + "::XImageManager.insertImages", _xImage._insertImages());
+ assertTrue(testObjectName + "::XImageManager.removeImages", _xImage._removeImages());
+ assertTrue(testObjectName + "::XImageManager.replaceImages", _xImage._replaceImages());
+ assertTrue(testObjectName + "::XImageManager.reset", _xImage._reset());
+
+ XTypeProvider xType = UnoRuntime.queryInterface(XTypeProvider.class, xImageManager);
+ _XTypeProvider _xType = new _XTypeProvider(param, xType);
+ assertTrue(testObjectName + "::XTypeProvider.getImplementationId", _xType._getImplementationId());
+ assertTrue(testObjectName + "::XTypeProvider.getTypes", _xType._getTypes());
+
+ XUIConfiguration xUIConfig = UnoRuntime.queryInterface(XUIConfiguration.class, xImageManager);
+ _XUIConfiguration _xUIConfig = new _XUIConfiguration(param, xUIConfig);
_xUIConfig.before();
- assure(testObjectName + "::XUIConfig.addConfigurationListener", _xUIConfig._addConfigurationListener(), true);
- assure(testObjectName + "::XUIConfig.removeConfigurationListener", _xUIConfig._removeConfigurationListener(), true);
+ assertTrue(testObjectName + "::XUIConfig.addConfigurationListener", _xUIConfig._addConfigurationListener());
+ assertTrue(testObjectName + "::XUIConfig.removeConfigurationListener", _xUIConfig._removeConfigurationListener());
XUIConfigurationPersistence xUIConfigPersistence = (XUIConfigurationPersistence)UnoRuntime.queryInterface(XUIConfiguration.class, xImageManager);
- _XUIConfigurationPersistence _xUIConfigPersistence = new _XUIConfigurationPersistence(log, param, xUIConfigPersistence);
+ _XUIConfigurationPersistence _xUIConfigPersistence = new _XUIConfigurationPersistence(param, xUIConfigPersistence);
_xUIConfigPersistence.before();
- assure(testObjectName + "::XUIConfigPersistence.isModified", _xUIConfigPersistence._isModified(), true);
- assure(testObjectName + "::XUIConfigPersistence.isReadOnly", _xUIConfigPersistence._isReadOnly(), true);
- assure(testObjectName + "::XUIConfigPersistence.reload", _xUIConfigPersistence._reload(), true);
- assure(testObjectName + "::XUIConfigPersistence.store", _xUIConfigPersistence._store(), true);
- assure(testObjectName + "::XUIConfigPersistence.storeToStorage", _xUIConfigPersistence._storeToStorage(), true);
-
- XComponent xComp = (XComponent)UnoRuntime.queryInterface(XComponent.class, xImageManager);
- _XComponent _xComp = new _XComponent(log, param, xComp);
+ assertTrue(testObjectName + "::XUIConfigPersistence.isModified", _xUIConfigPersistence._isModified());
+ // System.out.println(testObjectName + "::XUIConfigPersistence.isReadOnly "+ _xUIConfigPersistence._isReadOnly());
+ assertTrue(testObjectName + "::XUIConfigPersistence.isReadOnly", _xUIConfigPersistence._isReadOnly());
+ assertTrue(testObjectName + "::XUIConfigPersistence.reload", _xUIConfigPersistence._reload());
+ assertTrue(testObjectName + "::XUIConfigPersistence.store", _xUIConfigPersistence._store());
+ assertTrue(testObjectName + "::XUIConfigPersistence.storeToStorage", _xUIConfigPersistence._storeToStorage());
+
+ XComponent xComp = UnoRuntime.queryInterface(XComponent.class, xImageManager);
+ _XComponent _xComp = new _XComponent(param, xComp);
_xComp.before();
- assure(testObjectName + "::XComponent.addEventListener", _xComp._addEventListener(), true);
- assure(testObjectName + "::XComponent.removeEventListener", _xComp._removeEventListener(), true);
- assure(testObjectName + "::XComponent.dispose", _xComp._dispose(), true);
+ assertTrue(testObjectName + "::XComponent.addEventListener", _xComp._addEventListener());
+ assertTrue(testObjectName + "::XComponent.removeEventListener", _xComp._removeEventListener());
+ assertTrue(testObjectName + "::XComponent.dispose", _xComp._dispose());
}
class OXUIConfigurationListenerImpl implements _XUIConfiguration.XUIConfigurationListenerImpl {
private boolean triggered = false;
- private LogWriter log = null;
private XUIConfigurationManager xUIManager = null;
private XMultiServiceFactory xMSF = null;
- public OXUIConfigurationListenerImpl(LogWriter _log, XUIConfigurationManager xUIManager, XMultiServiceFactory xMSF) {
- log = _log;
+ public OXUIConfigurationListenerImpl(XUIConfigurationManager xUIManager, XMultiServiceFactory xMSF) {
+
this.xUIManager = xUIManager;
this.xMSF = xMSF;
}
@@ -167,23 +169,23 @@ public class CheckImageManager extends ComplexTestCase {
}
catch(com.sun.star.container.NoSuchElementException e) {
- log.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
+ System.out.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
e.printStackTrace((java.io.PrintWriter)log);
}
catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
+ System.out.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
e.printStackTrace((java.io.PrintWriter)log);
}
catch(com.sun.star.lang.IllegalAccessException e) {
- log.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
+ System.out.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
e.printStackTrace((java.io.PrintWriter)log);
}
catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
+ System.out.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
e.printStackTrace((java.io.PrintWriter)log);
}
catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
+ System.out.println("_XUIConfiguration.XUIConfigurationListenerImpl: Exception.");
e.printStackTrace((java.io.PrintWriter)log);
} */
}
@@ -194,4 +196,28 @@ public class CheckImageManager extends ComplexTestCase {
}
}
+
+ 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/framework/qa/complex/imageManager/interfaces/_XComponent.java b/framework/qa/complex/imageManager/_XComponent.java
index 4e30848b28d2..9affbb9499b5 100755
--- a/framework/qa/complex/imageManager/interfaces/_XComponent.java
+++ b/framework/qa/complex/imageManager/_XComponent.java
@@ -25,11 +25,9 @@
*
************************************************************************/
-package imageManager.interfaces;
+package complex.imageManager;
import com.sun.star.container.XNameContainer;
-import share.LogWriter;
-
import com.sun.star.frame.XDesktop;
import com.sun.star.lang.EventObject;
import com.sun.star.lang.XComponent;
@@ -54,7 +52,6 @@ public class _XComponent {
private XNameContainer xContainer = null;
private XComponent altDispose = null;
TestParameters tEnv = null;
- LogWriter log = null;
boolean listenerDisposed[] = new boolean[2];
String[] Loutput = new String[2];
@@ -78,8 +75,7 @@ public class _XComponent {
XEventListener listener1 = new MyEventListener(0, "EV1");
XEventListener listener2 = new MyEventListener(1, "EV2");
- public _XComponent(LogWriter log, TestParameters tEnv, XComponent oObj) {
- this.log = log;
+ public _XComponent(TestParameters tEnv, XComponent oObj) {
this.tEnv = tEnv;
this.oObj = oObj;
}
@@ -119,10 +115,14 @@ public class _XComponent {
* <code>dispose</code> method call.
*/
public boolean _removeEventListener() {
- if (disposed) return false;
+ if (disposed)
+ {
+ System.out.println("Hint: already disposed.");
+ return false;
+ }
// the second listener should not be called
oObj.removeEventListener( listener2 );
- log.println(Thread.currentThread() + " is removing EL " + listener2);
+ System.out.println(Thread.currentThread() + " is removing EL " + listener2);
return true;
} // finished _removeEventListener()
@@ -142,24 +142,32 @@ public class _XComponent {
public boolean _dispose() {
disposed = false;
- log.println( "begin dispose" + Thread.currentThread());
+ System.out.println( "begin dispose" + Thread.currentThread());
XDesktop oDesk = (XDesktop) tEnv.get("Desktop");
if (oDesk !=null) {
oDesk.terminate();
}
else {
if (altDispose == null)
+ {
oObj.dispose();
+ }
else
+ {
altDispose.dispose();
+ }
}
try {
Thread.sleep(500) ;
} catch (InterruptedException e) {}
- if (Loutput[0]!=null) log.println(Loutput[0]);
- if (Loutput[1]!=null) log.println(Loutput[1]);
- log.println( "end dispose" + Thread.currentThread());
+ if (Loutput[0]!=null){
+ System.out.println(Loutput[0]);
+ }
+ if (Loutput[1]!=null) {
+ System.out.println(Loutput[1]);
+ }
+ System.out.println( "end dispose" + Thread.currentThread());
disposed = true;
// check that dispose() works OK.
diff --git a/framework/qa/complex/imageManager/interfaces/_XImageManager.java b/framework/qa/complex/imageManager/_XImageManager.java
index ccba1464c106..5887fd8fa0d8 100755
--- a/framework/qa/complex/imageManager/interfaces/_XImageManager.java
+++ b/framework/qa/complex/imageManager/_XImageManager.java
@@ -24,26 +24,26 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-package imageManager.interfaces;
+package complex.imageManager;
import com.sun.star.graphic.XGraphic;
import com.sun.star.ui.ImageType;
import com.sun.star.ui.XImageManager;
import lib.TestParameters;
-import share.LogWriter;
+
/**
*
*/
public class _XImageManager {
- LogWriter log = null;
+
TestParameters tEnv = null;
String[]imageNames = null;
XGraphic[] xGraphicArray = null;
public XImageManager oObj;
- public _XImageManager(LogWriter log, TestParameters tEnv, XImageManager oObj) {
- this.log = log;
+ public _XImageManager( TestParameters tEnv, XImageManager oObj) {
+
this.tEnv = tEnv;
this.oObj = oObj;
}
@@ -52,7 +52,9 @@ public class _XImageManager {
short s = ImageType.COLOR_NORMAL + ImageType.SIZE_DEFAULT;
imageNames = oObj.getAllImageNames(s);
for (int i=0; i<(imageNames.length>10?10:imageNames.length); i++)
+ {
System.out.println("###### Image: " + imageNames[i]);
+ }
return imageNames != null;
}
@@ -71,10 +73,11 @@ public class _XImageManager {
short s = ImageType.COLOR_NORMAL + ImageType.SIZE_DEFAULT;
try { // check the first image names, 10 at max
for (int i=0; i<(imageNames.length>10?10:imageNames.length); i++)
+ {
result &= oObj.hasImage(s, imageNames[i]);
+ }
}
catch(com.sun.star.lang.IllegalArgumentException e) {
- e.printStackTrace((java.io.PrintWriter)log);
result = false;
}
return result;
diff --git a/framework/qa/complex/imageManager/interfaces/_XInitialization.java b/framework/qa/complex/imageManager/_XInitialization.java
index da957331671b..fcfaf5f981d3 100755
--- a/framework/qa/complex/imageManager/interfaces/_XInitialization.java
+++ b/framework/qa/complex/imageManager/_XInitialization.java
@@ -25,9 +25,9 @@
*
************************************************************************/
-package imageManager.interfaces;
+package complex.imageManager;
+
-import share.LogWriter;
import com.sun.star.lang.XInitialization;
@@ -48,12 +48,12 @@ import lib.TestParameters;
*/
public class _XInitialization {
- LogWriter log = null;
+
TestParameters tEnv = null;
public static XInitialization oObj = null;
- public _XInitialization(LogWriter log, TestParameters tEnv, XInitialization oObj) {
- this.log = log;
+ public _XInitialization(TestParameters tEnv, XInitialization oObj) {
+
this.tEnv = tEnv;
this.oObj = oObj;
}
@@ -75,8 +75,7 @@ public class _XInitialization {
}
} catch (com.sun.star.uno.Exception e) {
- log.println("Exception occured while method calling.") ;
- e.printStackTrace((java.io.PrintWriter)log) ;
+ System.out.println("Exception occured while method calling.") ;
result = false ;
}
diff --git a/framework/qa/complex/imageManager/interfaces/_XTypeProvider.java b/framework/qa/complex/imageManager/_XTypeProvider.java
index 7ea641ca63d5..08b810198d9b 100755
--- a/framework/qa/complex/imageManager/interfaces/_XTypeProvider.java
+++ b/framework/qa/complex/imageManager/_XTypeProvider.java
@@ -25,9 +25,8 @@
*
************************************************************************/
-package imageManager.interfaces;
+package complex.imageManager;
-import share.LogWriter;
import com.sun.star.lang.XTypeProvider;
@@ -46,13 +45,13 @@ import lib.TestParameters;
*/
public class _XTypeProvider {
- LogWriter log = null;
+
TestParameters tEnv = null;
public static XTypeProvider oObj = null;
public static Type[] types = null;
- public _XTypeProvider(LogWriter log, TestParameters tEnv, XTypeProvider oObj) {
- this.log = log;
+ public _XTypeProvider(TestParameters tEnv, XTypeProvider oObj) {
+
this.tEnv = tEnv;
this.oObj = oObj;
}
@@ -63,9 +62,9 @@ public class _XTypeProvider {
*/
public boolean _getImplementationId() {
boolean result = true;
- log.println("testing getImplementationId() ... ");
+ System.out.println("testing getImplementationId() ... ");
- log.println("The ImplementationId is "+oObj.getImplementationId());
+ System.out.println("The ImplementationId is "+oObj.getImplementationId());
result = true;
return result;
@@ -74,24 +73,24 @@ public class _XTypeProvider {
/**
- * Ņalls the method and checks the return value.<p>
+ * Calls the method and checks the return value.<p>
* Has <b>OK</b> status if one of the return value equals to the
* type <code>com.sun.star.lang.XTypeProvider</code>.
*/
public boolean _getTypes() {
boolean result = false;
- log.println("getting Types...");
+ System.out.println("getting Types...");
types = oObj.getTypes();
for (int i=0;i<types.length;i++) {
int k = i+1;
- log.println(k+". Type is "+types[i].toString());
+ System.out.println(k+". Type is "+types[i].toString());
if (types[i].toString().equals
("Type[com.sun.star.lang.XTypeProvider]")) {
result = true;
}
}
if (!result) {
- log.println("Component must provide Type "
+ System.out.println("Component must provide Type "
+"<com.sun.star.lang.XTypeProvider>");
}
diff --git a/framework/qa/complex/imageManager/interfaces/_XUIConfiguration.java b/framework/qa/complex/imageManager/_XUIConfiguration.java
index a1e9e75cabd3..ec9d5f3fc634 100755
--- a/framework/qa/complex/imageManager/interfaces/_XUIConfiguration.java
+++ b/framework/qa/complex/imageManager/_XUIConfiguration.java
@@ -25,20 +25,18 @@
*
************************************************************************/
-package imageManager.interfaces;
+package complex.imageManager;
+
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.ui.XModuleUIConfigurationManagerSupplier;
import com.sun.star.ui.XUIConfiguration;
import com.sun.star.ui.XUIConfigurationListener;
import lib.TestParameters;
-import share.LogWriter;
+
public class _XUIConfiguration {
- LogWriter log = null;
+
TestParameters tEnv = null;
public XUIConfiguration oObj;
XUIConfigurationListenerImpl xListener = null;
@@ -51,8 +49,7 @@ public class _XUIConfiguration {
}
- public _XUIConfiguration(LogWriter log, TestParameters tEnv, XUIConfiguration oObj) {
- this.log = log;
+ public _XUIConfiguration(TestParameters tEnv, XUIConfiguration oObj) {
this.tEnv = tEnv;
this.oObj = oObj;
}
diff --git a/framework/qa/complex/imageManager/interfaces/_XUIConfigurationPersistence.java b/framework/qa/complex/imageManager/_XUIConfigurationPersistence.java
index 0e029deb4204..1dec01ad0660 100755
--- a/framework/qa/complex/imageManager/interfaces/_XUIConfigurationPersistence.java
+++ b/framework/qa/complex/imageManager/_XUIConfigurationPersistence.java
@@ -25,26 +25,23 @@
*
************************************************************************/
-package imageManager.interfaces;
+package complex.imageManager;
import com.sun.star.embed.XStorage;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.ui.XModuleUIConfigurationManagerSupplier;
import com.sun.star.ui.XUIConfigurationPersistence;
import lib.TestParameters;
-import share.LogWriter;
+
public class _XUIConfigurationPersistence {
- LogWriter log = null;
+
TestParameters tEnv = null;
public XUIConfigurationPersistence oObj;
private XStorage xStore = null;
- public _XUIConfigurationPersistence(LogWriter log, TestParameters tEnv, XUIConfigurationPersistence oObj) {
- this.log = log;
+ public _XUIConfigurationPersistence(TestParameters tEnv, XUIConfigurationPersistence oObj) {
+
this.tEnv = tEnv;
this.oObj = oObj;
}
@@ -58,7 +55,7 @@ public class _XUIConfigurationPersistence {
oObj.reload();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
+
}
return true;
}
@@ -68,7 +65,7 @@ public class _XUIConfigurationPersistence {
oObj.store();
}
catch(com.sun.star.uno.Exception e) {
- e.printStackTrace((java.io.PrintWriter)log);
+
}
return true;
}
@@ -80,7 +77,7 @@ public class _XUIConfigurationPersistence {
}
catch(com.sun.star.uno.Exception e) {
result = false;
- e.printStackTrace((java.io.PrintWriter)log);
+
}
return result;
}
diff --git a/framework/qa/complex/imageManager/interfaces/makefile.mk b/framework/qa/complex/imageManager/interfaces/makefile.mk
index 039eba576069..f7b6f5ebf035 100755
--- a/framework/qa/complex/imageManager/interfaces/makefile.mk
+++ b/framework/qa/complex/imageManager/interfaces/makefile.mk
@@ -25,10 +25,10 @@
#
#*************************************************************************
-PRJ = ..$/..$/..$/..
+PRJ = ../../../..
TARGET = ImageManager
PRJNAME = framework
-PACKAGE = imageManager$/interfaces
+PACKAGE = complex/imageManager/interfaces
# --- Settings -----------------------------------------------------
.INCLUDE: settings.mk
@@ -37,10 +37,16 @@ PACKAGE = imageManager$/interfaces
#----- compile .java files -----------------------------------------
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = _XComponent.java _XUIConfiguration.java _XImageManager.java \
- _XUIConfigurationPersistence.java _XInitialization.java _XTypeProvider.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+JAVAFILES = \
+_XComponent.java \
+_XUIConfiguration.java \
+_XImageManager.java \
+_XUIConfigurationPersistence.java \
+_XInitialization.java \
+_XTypeProvider.java
+
+JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class)
#----- make a jar from compiled files ------------------------------
diff --git a/framework/qa/complex/imageManager/makefile.mk b/framework/qa/complex/imageManager/makefile.mk
index 3b508b718d31..133e522b13b4 100755
--- a/framework/qa/complex/imageManager/makefile.mk
+++ b/framework/qa/complex/imageManager/makefile.mk
@@ -25,55 +25,99 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = ImageManager
-PRJNAME = framework
-PACKAGE = imageManager
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CheckImageManager.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
-MAXLINELENGTH = 100000
+PRJ = ../../..
+PRJNAME = framework
+TARGET = qa_complex_imageManager
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/imageManager
-# --- Parameters for the test --------------------------------------
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+ CheckImageManager.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
+# put here all other files
+JAVAFILES = $(JAVATESTFILES) \
+ _XComponent.java \
+ _XImageManager.java \
+ _XInitialization.java \
+ _XTypeProvider.java \
+ _XUIConfiguration.java \
+ _XUIConfigurationPersistence.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
-# --- Targets ------------------------------------------------------
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-.INCLUDE : target.mk
+ALLTAR : javatest
-RUN: run
+.END
-run:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_PACKAGE).CheckImageManager
+#
+#
+# PRJ = ..$/..$/..
+# TARGET = ImageManager
+# PRJNAME = framework
+# PACKAGE = imageManager
+#
+# # --- Settings -----------------------------------------------------
+# .INCLUDE: settings.mk
+#
+#
+# #----- compile .java files -----------------------------------------
+#
+# JARFILES = mysql.jar mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+# JAVAFILES = CheckImageManager.java
+# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+#
+# #----- make a jar from compiled files ------------------------------
+#
+# MAXLINELENGTH = 100000
+#
+# JARCLASSDIRS = $(PACKAGE)
+# JARTARGET = $(TARGET).jar
+# JARCOMPRESS = TRUE
+#
+# # --- Parameters for the test --------------------------------------
+#
+# # 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
+#
+# # test base is java complex
+# CT_TESTBASE = -TestBase java_complex
+#
+# # replace $/ with . in package name
+# CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
+#
+# # start the runner application
+# CT_APP = org.openoffice.Runner
+#
+# # --- Targets ------------------------------------------------------
+#
+# .INCLUDE : target.mk
+#
+# RUN: run
+#
+# run:
+# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_PACKAGE).CheckImageManager
+#
+#