summaryrefslogtreecommitdiff
path: root/extensions/qa
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/qa')
-rw-r--r--extensions/qa/complex/extensions/OfficeResourceLoader.java157
-rw-r--r--extensions/qa/complex/extensions/extensions_all.sce1
-rw-r--r--extensions/qa/complex/extensions/makefile.mk98
-rw-r--r--extensions/qa/complex/extensions/orl_de.src31
-rw-r--r--extensions/qa/complex/extensions/orl_en-US.src31
-rw-r--r--extensions/qa/integration/extensions/ComponentFactory.java106
-rw-r--r--extensions/qa/integration/extensions/ConsoleWait.java128
-rw-r--r--extensions/qa/integration/extensions/Frame.java226
-rw-r--r--extensions/qa/integration/extensions/HelpTextProvider.java50
-rw-r--r--extensions/qa/integration/extensions/MethodHandler.java239
-rw-r--r--extensions/qa/integration/extensions/ObjectInspector.java176
-rw-r--r--extensions/qa/integration/extensions/ServicesHandler.java228
-rw-r--r--extensions/qa/integration/extensions/TestSkeleton.java71
-rw-r--r--extensions/qa/integration/extensions/extensions_complex.sce1
-rw-r--r--extensions/qa/integration/extensions/makefile.mk83
-rw-r--r--extensions/qa/unoapi/Test.java50
-rw-r--r--extensions/qa/unoapi/extensions.sce5
-rw-r--r--extensions/qa/unoapi/makefile.mk48
18 files changed, 0 insertions, 1729 deletions
diff --git a/extensions/qa/complex/extensions/OfficeResourceLoader.java b/extensions/qa/complex/extensions/OfficeResourceLoader.java
deleted file mode 100644
index 6d5df80f8..000000000
--- a/extensions/qa/complex/extensions/OfficeResourceLoader.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*************************************************************************
- *
- * 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.extensions;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.UnoRuntime;
-
-import com.sun.star.resource.XResourceBundle;
-import com.sun.star.resource.XResourceBundleLoader;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.Locale;
-
-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 OfficeResourceLoader
-{
- XResourceBundleLoader m_loader;
- XResourceBundle m_bundle;
-
- /** Creates a new instance of ValueBinding */
- public OfficeResourceLoader()
- {
- }
-
- /* ------------------------------------------------------------------ */
-// public String[] getTestMethodNames()
-// {
-// return new String[] {
-// "checkSimpleStringAccess",
-// "checkLocales"
-// };
-// }
-
- /* ------------------------------------------------------------------ */
-// public String getTestObjectName()
-// {
-// return "Extensions - OfficeResourceLoader";
-// }
-
- /* ------------------------------------------------------------------ */
- @Before public void before() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- XPropertySet orb = UnoRuntime.queryInterface(XPropertySet.class, getMSF());
- XComponentContext context = UnoRuntime.queryInterface(XComponentContext.class, orb.getPropertyValue("DefaultContext"));
-
- m_loader = com.sun.star.resource.OfficeResourceLoader.get( context );
- }
-
- /* ------------------------------------------------------------------ */
- @After public void after() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- }
-
- /* ------------------------------------------------------------------ */
- @Test public void checkSimpleStringAccess() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- // default bundle (UI locale)
- m_bundle = m_loader.loadBundle_Default( "orl" );
-
- Locale resourceLocale = m_bundle.getLocale();
-
- String testString = (String)m_bundle.getByName( "string:1000" );
-
- if ( resourceLocale.Language.equals( "en" )
- && resourceLocale.Country.equals( "US" )
- && resourceLocale.Variant.equals( "" )
- )
- {
- assertTrue( "invalid 'en-US' string", testString.equals( "Dummy String" ) );
- }
-
- if ( resourceLocale.Language.equals( "de" )
- && resourceLocale.Country.equals( "" )
- && resourceLocale.Variant.equals( "" )
- )
- {
- assertTrue( "invalid 'de' string", testString.equals( "Attrappen-Zeichenkette" ) );
- }
-
- if ( resourceLocale.Language.equals( "" )
- && resourceLocale.Country.equals( "" )
- && resourceLocale.Variant.equals( "" )
- )
- {
- assertTrue( "invalid unlocalized string", testString.equals( "unlocalized string" ) );
- }
- }
-
- /* ------------------------------------------------------------------ */
- @Test public void checkLocales() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- // en-US bundle (should always be built and thus present and thus found)
- m_bundle = m_loader.loadBundle( "orl", new Locale( "en", "US", "" ) );
- Locale resourceLocale = m_bundle.getLocale();
- assertTrue( "'en-US' could not be loaded",
- resourceLocale.Language.equals( "en" ) && resourceLocale.Country.equals( "US" ) && resourceLocale.Variant.equals( "" ) );
-
- // some (invalid) locale which is usually no built, and should thus fallback to en-US
- m_bundle = m_loader.loadBundle( "orl", new Locale( "inv", "al", "id" ) );
- resourceLocale = m_bundle.getLocale();
- assertTrue( "non-existing locale request does not fallback to en-US",
- resourceLocale.Language.equals( "en" ) && resourceLocale.Country.equals( "US" ) && resourceLocale.Variant.equals( "" ) );
- }
-
-
- 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/extensions/qa/complex/extensions/extensions_all.sce b/extensions/qa/complex/extensions/extensions_all.sce
deleted file mode 100644
index 2d23dd7a1..000000000
--- a/extensions/qa/complex/extensions/extensions_all.sce
+++ /dev/null
@@ -1 +0,0 @@
--o complex.extensions.OfficeResourceLoader
diff --git a/extensions/qa/complex/extensions/makefile.mk b/extensions/qa/complex/extensions/makefile.mk
deleted file mode 100644
index 281960b32..000000000
--- a/extensions/qa/complex/extensions/makefile.mk
+++ /dev/null
@@ -1,98 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../../..
-PRJNAME = extensions
-TARGET = qa_complex_extensions
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = complex/extensions
-JAVATESTFILES = \
- OfficeResourceLoader.java
-
-JAVAFILES = $(JAVATESTFILES)
-
-JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar ConnectivityTools.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-
-
-.IF "$(GUI)"=="WNT"
-command_seperator=&&
-.ELSE
-command_seperator=;
-.ENDIF
-
-
-.INCLUDE: settings.mk
-
-#----- resource files for the OfficeResourceLoader test ------------
-RES_TARGET = orl
-
-SRS1NAME=$(RES_TARGET)_A_
-SRC1FILES= \
- $(RES_TARGET)_en-US.src
-
-RES1FILELIST=\
- $(SRS)$/$(RES_TARGET)_A_.srs
-
-RESLIB1NAME=$(RES_TARGET)_A_
-RESLIB1SRSFILES=$(RES1FILELIST)
-
-
-
-SRS2NAME=$(RES_TARGET)_B_
-SRC2FILES= \
- $(RES_TARGET)_de.src
-
-RES2FILELIST=\
- $(SRS)$/$(RES_TARGET)_B_.srs
-
-RESLIB2NAME=$(RES_TARGET)_B_
-RESLIB2SRSFILES=$(RES2FILELIST)
-
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-
-#----- resource files for the OfficeResourceLoader test ------------
-
-
-ALLTAR : copy_resources javatest
-
-copy_resources: $(RESLIB1TARGETN) $(RESLIB2TARGETN)
- $(foreach,i,$(RESLIB1TARGETN) $(COPY) $i $(i:s/de/invalid/:s/_A_//) $(command_seperator)) echo
- $(foreach,i,$(RESLIB2TARGETN) $(COPY) $i $(i:s/en-US/invalid/:s/_B_//) $(command_seperator)) echo
-
-
-.END
-
diff --git a/extensions/qa/complex/extensions/orl_de.src b/extensions/qa/complex/extensions/orl_de.src
deleted file mode 100644
index e92ac818a..000000000
--- a/extensions/qa/complex/extensions/orl_de.src
+++ /dev/null
@@ -1,31 +0,0 @@
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-String 1000
-{
- Text = "Attrappen-Zeichenkette";
-};
diff --git a/extensions/qa/complex/extensions/orl_en-US.src b/extensions/qa/complex/extensions/orl_en-US.src
deleted file mode 100644
index bdeaac39a..000000000
--- a/extensions/qa/complex/extensions/orl_en-US.src
+++ /dev/null
@@ -1,31 +0,0 @@
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-String 1000
-{
- Text = "Dummy String";
-};
diff --git a/extensions/qa/integration/extensions/ComponentFactory.java b/extensions/qa/integration/extensions/ComponentFactory.java
deleted file mode 100644
index 5edeb1bb6..000000000
--- a/extensions/qa/integration/extensions/ComponentFactory.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*************************************************************************
- *
- * 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 integration.extensions;
-
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.lang.XSingleComponentFactory;
-import java.lang.reflect.Constructor;
-
-/**
- *
- * @author fs93730
- */
-public class ComponentFactory implements XSingleComponentFactory
-{
- private Class m_handlerClass;
- private Constructor m_defaultConstructor;
- private Constructor m_initConstructor;
-
- public ComponentFactory( Class _handlerClass )
- {
- m_handlerClass = _handlerClass;
-
- Class objectArrayClass = null;
- try
- {
- objectArrayClass = Class.forName("[Ljava.lang.Object;");
- }
- catch ( java.lang.ClassNotFoundException e ) { }
-
- Constructor ctors[] = _handlerClass.getConstructors();
- for ( int i = 0; i < ctors.length && ctors != null; ++i)
- {
- Class ctorParams[] = ctors[i].getParameterTypes();
- if ( ( ctorParams.length == 1 ) && ( ctorParams[0].equals( XComponentContext.class ) ) )
- m_defaultConstructor = ctors[i];
- if ( ( ctorParams.length == 2 )
- && ( ctorParams[0].equals( XComponentContext.class ) )
- && ( ctorParams[1].equals( objectArrayClass ) )
- )
- m_initConstructor = ctors[i];
- }
- if ( m_defaultConstructor == null )
- throw new java.lang.IllegalArgumentException();
- }
-
- private Object ipml_createInstance( Constructor _ctor, Object[] _arguments )
- {
- Object newInstance = null;
- try
- {
- newInstance = _ctor.newInstance( _arguments );
- }
- catch( InstantiationException e )
- {
- System.err.println( "InstantiationException: Could not instantiate an instance of " + m_handlerClass.getName() );
- }
- catch( IllegalAccessException e )
- {
- System.err.println( "IllegalAccessException: Could not instantiate an instance of " + m_handlerClass.getName() );
- }
- catch( java.lang.reflect.InvocationTargetException e )
- {
- System.err.println( "InvocationTargetException: Could not instantiate an instance of " + m_handlerClass.getName() );
- }
- return newInstance;
- }
-
- public Object createInstanceWithArgumentsAndContext(Object[] _arguments, XComponentContext _componentContext) throws com.sun.star.uno.Exception
- {
- if ( m_initConstructor != null )
- return ipml_createInstance( m_initConstructor, new Object[] { _componentContext, _arguments } );
- else
- return createInstanceWithContext( _componentContext );
- }
-
- public Object createInstanceWithContext(XComponentContext _componentContext) throws com.sun.star.uno.Exception
- {
- return ipml_createInstance( m_defaultConstructor, new Object[] { _componentContext } );
- }
-}
-
diff --git a/extensions/qa/integration/extensions/ConsoleWait.java b/extensions/qa/integration/extensions/ConsoleWait.java
deleted file mode 100644
index 4c4a43491..000000000
--- a/extensions/qa/integration/extensions/ConsoleWait.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*************************************************************************
- *
- * 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 integration.extensions;
-
-import com.sun.star.uno.*;
-import com.sun.star.lang.XComponent;
-
-public class ConsoleWait implements com.sun.star.lang.XEventListener
-{
- private Object m_disposable;
-
- /** a helper class which waits for a console ENTER key event in a dedicated thread,
- and notifies a ConsoleWait object if this event happened
- */
- private class WaitForEnter extends java.lang.Thread
- {
- private ConsoleWait m_toNotify;
- private boolean m_done;
-
- public WaitForEnter( ConsoleWait _toNotify )
- {
- m_toNotify = _toNotify;
- m_done = false;
- }
-
- public boolean isDone()
- {
- return m_done;
- }
-
- public void run()
- {
- try
- {
- System.out.println( "\npress enter to exit" );
- System.in.read();
-
- m_done = true;
- // notify that the user pressed the key
- synchronized ( m_toNotify )
- {
- m_toNotify.notify();
- }
- }
- catch( java.lang.Exception e )
- {
- // not really interested in
- System.err.println( e );
- }
- }
- };
-
- /** creates a ConsoleWait instance
- * @param _disposable
- * a component whose disposal should be monitored. When this component dies,
- * the ConsoleWait also returns from an waitForConsole call, even if the user
- * did not yet press the enter key
- */
- public ConsoleWait( Object _disposable )
- {
- m_disposable = _disposable;
- XComponent component = (XComponent)UnoRuntime.queryInterface( XComponent.class, _disposable );
- if ( component != null )
- component.addEventListener( this );
- }
-
- /** waits for the user to press the ENTER key (on the console where she started the java program)
- or the disposable component to be closed by the user.
- @return
- TRUE if the user pressed a key on the console, FALSE if she closed the document
- */
- public boolean waitForUserInput() throws java.lang.Exception
- {
- synchronized (this)
- {
- WaitForEnter keyWaiter = new WaitForEnter( this );
- keyWaiter.start();
- wait();
-
- // if the waiter thread is done, the user pressed enter
- boolean bKeyPressed = keyWaiter.isDone();
- if ( !bKeyPressed )
- keyWaiter.interrupt();
-
- return bKeyPressed;
- }
- }
-
- /* ------------------------------------------------------------------ */
- /* XEventListener overridables */
- /* ------------------------------------------------------------------ */
- public void disposing( com.sun.star.lang.EventObject eventObject )
- {
- if ( eventObject.Source.equals( m_disposable ) )
- {
- // notify ourself that we can stop waiting for user input
- synchronized (this)
- {
- notify();
- }
- }
- }
-} \ No newline at end of file
diff --git a/extensions/qa/integration/extensions/Frame.java b/extensions/qa/integration/extensions/Frame.java
deleted file mode 100644
index a53fe65a2..000000000
--- a/extensions/qa/integration/extensions/Frame.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*************************************************************************
- *
- * 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 integration.extensions;
-
-import com.sun.star.uno.*;
-import com.sun.star.frame.*;
-import com.sun.star.task.XStatusIndicatorFactory;
-import com.sun.star.util.XCloseable;
-
-/** wraps the coms.sun.star.frame.Frame service
- *
- * @author fs93730
- */
-public class Frame implements XFrame,
- XDispatchProvider,
- XDispatchProviderInterception,
- XFramesSupplier,
- XStatusIndicatorFactory,
- XCloseable
-{
- private XFrame m_frame;
- private XDispatchProvider m_dispatchProvider;
- private XDispatchProviderInterception m_dispatchProviderInterception;
- private XFramesSupplier m_framesSupplier;
- private XStatusIndicatorFactory m_statusIndicatorFactory;
- private XCloseable m_closeable;
-
- /** Creates a new instance of Frame */
- public Frame( Object _frameComponent )
- {
- if ( _frameComponent != null )
- {
- m_frame = (XFrame)UnoRuntime.queryInterface( XFrame.class, _frameComponent );
- m_dispatchProvider = (XDispatchProvider)UnoRuntime.queryInterface( XDispatchProvider.class, _frameComponent );
- m_dispatchProviderInterception = (XDispatchProviderInterception)UnoRuntime.queryInterface( XDispatchProviderInterception.class, _frameComponent );
- m_framesSupplier = (XFramesSupplier)UnoRuntime.queryInterface( XFramesSupplier.class, _frameComponent );
- m_statusIndicatorFactory = (XStatusIndicatorFactory)UnoRuntime.queryInterface( XStatusIndicatorFactory.class, _frameComponent );
- m_closeable = (XCloseable)UnoRuntime.queryInterface( XCloseable.class, _frameComponent );
- }
- }
-
- public XFrame getXFrame()
- {
- return m_frame;
- }
-
- public void activate()
- {
- m_frame.activate();
- }
-
- public void addEventListener(com.sun.star.lang.XEventListener _eventListener)
- {
- m_frame.addEventListener( _eventListener );
- }
-
- public void addFrameActionListener(XFrameActionListener _frameActionListener)
- {
- m_frame.addFrameActionListener( _frameActionListener );
- }
-
- public void contextChanged()
- {
- m_frame.contextChanged();
- }
-
- public com.sun.star.task.XStatusIndicator createStatusIndicator()
- {
- return m_statusIndicatorFactory.createStatusIndicator();
- }
-
- public void deactivate()
- {
- m_frame.deactivate();
- }
-
- public void dispose()
- {
- m_frame.dispose();
- }
-
- public XFrame findFrame(String str, int param)
- {
- return m_frame.findFrame( str, param );
- }
-
- public XFrame getActiveFrame()
- {
- return m_framesSupplier.getActiveFrame();
- }
-
- public com.sun.star.awt.XWindow getComponentWindow()
- {
- return m_frame.getComponentWindow();
- }
-
- public com.sun.star.awt.XWindow getContainerWindow()
- {
- return m_frame.getContainerWindow();
- }
-
- public XController getController()
- {
- return m_frame.getController();
- }
-
- public XFramesSupplier getCreator()
- {
- return m_frame.getCreator();
- }
-
- public XFrames getFrames()
- {
- return m_framesSupplier.getFrames();
- }
-
- public String getName()
- {
- return m_frame.getName();
- }
-
- public void initialize(com.sun.star.awt.XWindow _window)
- {
- m_frame.initialize( _window );
- }
-
- public boolean isActive()
- {
- return m_frame.isActive();
- }
-
- public boolean isTop()
- {
- return m_frame.isTop();
- }
-
- public XDispatch queryDispatch(com.sun.star.util.URL _url, String _str, int _param)
- {
- return m_dispatchProvider.queryDispatch( _url, _str, _param );
- }
-
- public XDispatch[] queryDispatches(DispatchDescriptor[] dispatchDescriptor)
- {
- return m_dispatchProvider.queryDispatches( dispatchDescriptor );
- }
-
- public void registerDispatchProviderInterceptor(XDispatchProviderInterceptor _dispatchProviderInterceptor)
- {
- m_dispatchProviderInterception.registerDispatchProviderInterceptor( _dispatchProviderInterceptor );
- }
-
- public void releaseDispatchProviderInterceptor(XDispatchProviderInterceptor _dispatchProviderInterceptor)
- {
- m_dispatchProviderInterception.releaseDispatchProviderInterceptor( _dispatchProviderInterceptor );
- }
-
- public void removeEventListener(com.sun.star.lang.XEventListener _eventListener)
- {
- m_frame.removeEventListener( _eventListener );
- }
-
- public void removeFrameActionListener(XFrameActionListener _frameActionListener)
- {
- m_frame.removeFrameActionListener( _frameActionListener );
- }
-
- public void setActiveFrame(XFrame _frame)
- {
- m_framesSupplier.setActiveFrame( _frame );
- }
-
- public boolean setComponent(com.sun.star.awt.XWindow _window, XController _controller)
- {
- return m_frame.setComponent( _window, _controller );
- }
-
- public void setCreator(XFramesSupplier _framesSupplier)
- {
- m_frame.setCreator( _framesSupplier );
- }
-
- public void setName(String str)
- {
- m_frame.setName( str );
- }
-
- public void close(boolean _deliverOwnership) throws com.sun.star.util.CloseVetoException
- {
- m_closeable.close( _deliverOwnership );
- }
-
- public void removeCloseListener(com.sun.star.util.XCloseListener _closeListener)
- {
- m_closeable.removeCloseListener( _closeListener );
- }
-
- public void addCloseListener(com.sun.star.util.XCloseListener _closeListener)
- {
- m_closeable.addCloseListener( _closeListener );
- }
-}
diff --git a/extensions/qa/integration/extensions/HelpTextProvider.java b/extensions/qa/integration/extensions/HelpTextProvider.java
deleted file mode 100644
index 857b019ee..000000000
--- a/extensions/qa/integration/extensions/HelpTextProvider.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * HelpTextProvider.java
- *
- * Created on 16. November 2006, 09:44
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-
-package integration.extensions;
-
-import com.sun.star.inspection.XObjectInspectorUI;
-import com.sun.star.inspection.XPropertyControl;
-import com.sun.star.inspection.XPropertyControlObserver;
-import com.sun.star.lang.NoSupportException;
-
-/** displays help text for the currently selected method
- */
-public class HelpTextProvider implements XPropertyControlObserver
-{
- private XObjectInspectorUI m_inspectorUI;
-
- /**
- * Creates a new instance of HelpTextProvider
- */
- public HelpTextProvider( XObjectInspectorUI _inspectorUI )
- {
- m_inspectorUI = _inspectorUI;
- m_inspectorUI.registerControlObserver( this );
- }
-
- public void focusGained( XPropertyControl _propertyControl )
- {
- try
- {
- String helpText = "here could be the help for:\n";
- helpText += _propertyControl.getValue().toString();
- m_inspectorUI.setHelpSectionText( helpText );
- }
- catch (NoSupportException ex)
- {
- ex.printStackTrace();
- }
- }
-
- public void valueChanged( XPropertyControl _propertyControl )
- {
- // not interested in
- }
-}
diff --git a/extensions/qa/integration/extensions/MethodHandler.java b/extensions/qa/integration/extensions/MethodHandler.java
deleted file mode 100644
index e75e0205e..000000000
--- a/extensions/qa/integration/extensions/MethodHandler.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*************************************************************************
- *
- * 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 integration.extensions;
-
-import com.sun.star.uno.*;
-import com.sun.star.lang.*;
-import com.sun.star.beans.*;
-import com.sun.star.reflection.*;
-import com.sun.star.inspection.*;
-
-/**
- *
- * @author fs93730
- */
-public class MethodHandler implements XPropertyHandler
-{
- private XComponentContext m_context;
- private XIntrospection m_introspection;
- private XIntrospectionAccess m_introspectionAccess;
- private XIdlClass m_idlClass;
- private XIdlMethod[] m_methods;
- private java.util.HashMap m_methodsHash;
-
- /** Creates a new instance of MethodHandler */
- public MethodHandler( XComponentContext _context )
- {
- m_context = _context;
- m_methodsHash = new java.util.HashMap();
-
- try
- {
- m_introspection = (XIntrospection)UnoRuntime.queryInterface( XIntrospection.class,
- m_context.getServiceManager().createInstanceWithContext( "com.sun.star.beans.Introspection", m_context )
- );
- }
- catch( com.sun.star.uno.Exception e )
- {
- System.err.println( "MethodHandler: could not create a Introspection service, not much functionality will be available." );
- }
- }
-
- static public XSingleComponentFactory getFactory()
- {
- return new ComponentFactory( MethodHandler.class );
- }
-
- public void actuatingPropertyChanged(String _propertyName, Object _newValue, Object _oldValue, com.sun.star.inspection.XObjectInspectorUI _objectInspectorUI, boolean _firstTimeInit) throws com.sun.star.lang.NullPointerException
- {
- // not interested in
- }
-
- public void addEventListener(com.sun.star.lang.XEventListener _eventListener)
- {
- // ingnoring this
- }
-
- public void addPropertyChangeListener(com.sun.star.beans.XPropertyChangeListener _propertyChangeListener) throws com.sun.star.lang.NullPointerException
- {
- // ingnoring this
- }
-
- public Object convertToControlValue(String _propertyName, Object _propertyValue, com.sun.star.uno.Type type) throws com.sun.star.beans.UnknownPropertyException
- {
- return _propertyValue;
- }
-
- public Object convertToPropertyValue(String _propertyName, Object _controlValue) throws com.sun.star.beans.UnknownPropertyException
- {
- return _controlValue;
- }
-
- public com.sun.star.inspection.LineDescriptor describePropertyLine(String _propertyName, com.sun.star.inspection.XPropertyControlFactory _propertyControlFactory) throws com.sun.star.beans.UnknownPropertyException, com.sun.star.lang.NullPointerException
- {
- com.sun.star.inspection.LineDescriptor descriptor = new com.sun.star.inspection.LineDescriptor();
-
- descriptor = new LineDescriptor();
- descriptor.Category = "Methods";
- descriptor.DisplayName = "has method";
- descriptor.HasPrimaryButton = descriptor.HasSecondaryButton = false;
- descriptor.IndentLevel = 0;
- try
- {
- XPropertyControl control = (XPropertyControl)UnoRuntime.queryInterface(
- XPropertyControl.class, _propertyControlFactory.createPropertyControl(
- PropertyControlType.TextField, true ) );
-
- descriptor.Control = control;
- }
- catch( com.sun.star.lang.IllegalArgumentException e )
- {
- }
- return descriptor;
- }
-
- public void dispose()
- {
- // nothing to do
- }
-
- public String[] getActuatingProperties()
- {
- // none
- return new String[] { };
- }
-
- public com.sun.star.beans.PropertyState getPropertyState(String _propertyName) throws com.sun.star.beans.UnknownPropertyException
- {
- return com.sun.star.beans.PropertyState.DIRECT_VALUE;
- }
-
- public Object getPropertyValue(String _propertyName) throws com.sun.star.beans.UnknownPropertyException
- {
- XIdlMethod method = impl_getMethod( _propertyName );
-
- String signature = new String();
- signature += method.getReturnType().getName();
- signature += " ";
- signature += method.getName();
-
- signature += "(";
-
- XIdlClass[] parameterTypes = method.getParameterTypes();
- for ( int param = 0; param<parameterTypes.length; ++param )
- {
- signature += ( param == 0 ) ? " " : ", ";
- signature += parameterTypes[param].getName();
- }
-
- signature += " )";
- return signature;
- }
-
- public String[] getSupersededProperties()
- {
- return new String[] { };
- }
-
- public com.sun.star.beans.Property[] getSupportedProperties()
- {
- Property[] properties = new Property[] { };
- if ( m_methods != null )
- {
- properties = new Property[ m_methods.length ];
- for ( int i=0; i<m_methods.length; ++i )
- {
- properties[i] = new Property( m_methods[i].getName(), 0, new Type( String.class ), (short)0 );
- m_methodsHash.put( m_methods[i].getName(), m_methods[i] );
- }
- }
- return properties;
- }
-
- public void inspect(Object _component) throws com.sun.star.lang.NullPointerException
- {
- if ( m_introspection == null )
- return;
-
- m_introspectionAccess = null;
- m_methods = null;
- m_methodsHash = new java.util.HashMap();
-
- m_introspectionAccess = m_introspection.inspect( _component );
- if ( m_introspectionAccess == null )
- return;
-
- m_methods = m_introspectionAccess.getMethods( MethodConcept.ALL );
- }
-
- public boolean isComposable(String _propertyName) throws com.sun.star.beans.UnknownPropertyException
- {
- return true;
- }
-
- public com.sun.star.inspection.InteractiveSelectionResult onInteractivePropertySelection(String str, boolean param, Object[] obj, com.sun.star.inspection.XObjectInspectorUI xObjectInspectorUI) throws com.sun.star.beans.UnknownPropertyException, com.sun.star.lang.NullPointerException
- {
- return InteractiveSelectionResult.Cancelled;
- }
-
- public void removeEventListener(com.sun.star.lang.XEventListener _eventListener)
- {
- // ignoring this
- }
-
- public void removePropertyChangeListener(com.sun.star.beans.XPropertyChangeListener _propertyChangeListener)
- {
- // ignoring this
- }
-
- public void setPropertyValue(String str, Object obj) throws com.sun.star.beans.UnknownPropertyException
- {
- // we declared our properties as readonly
- throw new java.lang.RuntimeException();
- }
-
- public boolean suspend(boolean param)
- {
- return true;
- }
-
- /** returns the descriptor for the method with the given name
- * @param _propertyName
- * the name of the method whose descriptor should be obtained
- * @throws com.sun.star.beans.UnknownPropertyException
- * if we don't have a method hash, or the given property name does not denote a method of our inspectee
- */
- private XIdlMethod impl_getMethod( String _methodName ) throws UnknownPropertyException
- {
- XIdlMethod method = (XIdlMethod)m_methodsHash.get( _methodName );
- if ( method == null )
- throw new com.sun.star.beans.UnknownPropertyException();
-
- return method;
- }
-}
diff --git a/extensions/qa/integration/extensions/ObjectInspector.java b/extensions/qa/integration/extensions/ObjectInspector.java
deleted file mode 100644
index e6799dfa9..000000000
--- a/extensions/qa/integration/extensions/ObjectInspector.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*************************************************************************
- *
- * 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 integration.extensions;
-
-import com.sun.star.uno.XComponentContext;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XMultiServiceFactory;
-
-import com.sun.star.frame.*;
-import com.sun.star.inspection.*;
-import com.sun.star.beans.*;
-
-import integration.extensions.Frame;
-
-public class ObjectInspector extends complexlib.ComplexTestCase
-{
- private XComponentContext m_context;
- private XMultiServiceFactory m_orb;
- private Frame m_desktop;
-
- final private String m_inspectorFrameName = new String( "ObjectInspector" );
-
- /** Creates a new instance of ValueBinding */
- public ObjectInspector()
- {
- }
-
- /* ------------------------------------------------------------------ */
- public String[] getTestMethodNames()
- {
- return new String[] {
- "interactiveObjectInspector"
- };
- }
-
- /* ------------------------------------------------------------------ */
- public String getTestObjectName()
- {
- return "Test Skeleton";
- }
-
- /* ------------------------------------------------------------------ */
- public void before() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- m_orb = (XMultiServiceFactory)param.getMSF();
- m_context = (XComponentContext)UnoRuntime.queryInterface( XComponentContext.class,
- ((XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, m_orb )).getPropertyValue( "DefaultContext" ) );
- m_desktop = new Frame( m_orb.createInstance( "com.sun.star.frame.Desktop" ) );
- }
-
- /* ------------------------------------------------------------------ */
- public void after() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- closeExistentInspector();
- }
-
- /* ------------------------------------------------------------------ */
- public void interactiveObjectInspector() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- closeExistentInspector();
-
- // the to-be-inspected object
- XFrame inspectee = m_desktop.getActiveFrame();
-
- // the inspector
- XObjectInspector inspector = createObjectInspector();
-
- // do inspect
- inspector.inspect( new Object[] { inspectee } );
-
- ConsoleWait keyWaiter = new ConsoleWait( inspector );
- keyWaiter.waitForUserInput();
- }
-
- /* ------------------------------------------------------------------ */
- private XObjectInspector createObjectInspector() throws com.sun.star.uno.Exception
- {
- com.sun.star.awt.XWindow floatingWindow = createFloatingWindow();
-
- Frame inspectorFrame = new Frame( m_orb.createInstance( "com.sun.star.frame.Frame" ) );
- inspectorFrame.setName( m_inspectorFrameName );
- inspectorFrame.initialize( floatingWindow );
- m_desktop.getFrames().append( inspectorFrame.getXFrame() );
-
- // handler factories:
- Object[] handlerFactories = new Object[] {
- "com.sun.star.inspection.GenericPropertyHandler",
- new ComponentFactory( ServicesHandler.class ),
- new ComponentFactory( MethodHandler.class )
- };
- // a model
- XObjectInspectorModel model = ObjectInspectorModel.createWithHandlerFactoriesAndHelpSection(
- m_context, handlerFactories, 4, 4 );
-
- // create the ObjectInspector
- XObjectInspector inspector = com.sun.star.inspection.ObjectInspector.createWithModel(
- m_context, model );
-
- // add an observer which will emit help texts
- new HelpTextProvider( inspector.getInspectorUI() );
-
- // plug it into the frame
- inspector.attachFrame( inspectorFrame.getXFrame() );
-
- // make the window visible
- floatingWindow.setVisible( true );
-
- // outta here
- return inspector;
- }
-
- /* ------------------------------------------------------------------ */
- private void closeExistentInspector()
- {
- Frame existentInspectorFrame = new Frame( m_desktop.findFrame( m_inspectorFrameName, 255 ) );
- if ( existentInspectorFrame != null )
- {
- try
- {
- existentInspectorFrame.close( true );
- }
- catch( com.sun.star.util.CloseVetoException e )
- {
- failed( "could not close the existent inspector frame" );
- }
- }
- }
-
- /* ------------------------------------------------------------------ */
- private com.sun.star.awt.XWindow createFloatingWindow() throws com.sun.star.uno.Exception
- {
- com.sun.star.awt.XToolkit toolkit = (com.sun.star.awt.XToolkit)UnoRuntime.queryInterface(
- com.sun.star.awt.XToolkit.class, m_orb.createInstance( "com.sun.star.awt.Toolkit" ) );
-
- com.sun.star.awt.WindowDescriptor windowDescriptor = new com.sun.star.awt.WindowDescriptor();
- windowDescriptor.Type = com.sun.star.awt.WindowClass.TOP;
- windowDescriptor.WindowServiceName = "modelessdialog"; // "floatingwindow" would need a parent
- windowDescriptor.ParentIndex = -1;
- //windowDescriptor.Parent = null;
-
- windowDescriptor.Bounds = new com.sun.star.awt.Rectangle( 500, 100, 400, 600 );
- windowDescriptor.WindowAttributes = com.sun.star.awt.WindowAttribute.BORDER
- + com.sun.star.awt.WindowAttribute.MOVEABLE
- + com.sun.star.awt.WindowAttribute.SIZEABLE
- + com.sun.star.awt.WindowAttribute.CLOSEABLE
- + com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN;
-
- return (com.sun.star.awt.XWindow)UnoRuntime.queryInterface( com.sun.star.awt.XWindow.class,
- toolkit.createWindow( windowDescriptor ) );
- }
-}
diff --git a/extensions/qa/integration/extensions/ServicesHandler.java b/extensions/qa/integration/extensions/ServicesHandler.java
deleted file mode 100644
index 0340a988a..000000000
--- a/extensions/qa/integration/extensions/ServicesHandler.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*************************************************************************
- *
- * 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 integration.extensions;
-
-import com.sun.star.lang.ClassNotFoundException;
-import com.sun.star.uno.*;
-import com.sun.star.beans.*;
-import com.sun.star.inspection.*;
-import com.sun.star.frame.*;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleComponentFactory;
-
-/**
- *
- * @author fs93730
- */
-public class ServicesHandler implements XPropertyHandler
-{
- private XComponentContext m_context;
- private String[] m_supportedServices;
-
- private class ClickHandler implements com.sun.star.awt.XActionListener
- {
- XComponentContext m_context;
- private String m_serviceName;
-
- public ClickHandler( XComponentContext _context, String _serviceName )
- {
- m_context = _context;
- m_serviceName = _serviceName;
- }
-
- public void disposing(com.sun.star.lang.EventObject eventObject)
- {
- // not interested in
- }
-
- public void actionPerformed(com.sun.star.awt.ActionEvent actionEvent)
- {
- try
- {
- // translate the service name into a URL to dispatch
- String documentationURL = "http://api.openoffice.org/docs/common/ref/" + m_serviceName.replace('.','/') + ".html";
- System.out.println( documentationURL );
-
- // the OpenHyperlink command, to be dispatched to the Desktop
- com.sun.star.util.URL dispatchURL[] = { new com.sun.star.util.URL() };
- dispatchURL[0].Complete = ".uno:OpenHyperlink";
- com.sun.star.util.XURLTransformer transformer = (com.sun.star.util.XURLTransformer)UnoRuntime.queryInterface(
- com.sun.star.util.XURLTransformer.class,
- m_context.getServiceManager().createInstanceWithContext( "com.sun.star.util.URLTransformer", m_context ) );
- transformer.parseStrict( dispatchURL );
-
- // the dispatcher for the OpenHyperlink command
- Frame desktop = new Frame(
- m_context.getServiceManager().createInstanceWithContext( "com.sun.star.frame.Desktop", m_context ) );
- XDispatch dispatcher = desktop.queryDispatch(dispatchURL[0],"",0);
-
- // the arguments for the OpenHyperlink command
- PropertyValue dispatchArgs[] = new PropertyValue[] { new PropertyValue() };
- dispatchArgs[0].Name = "URL";
- dispatchArgs[0].Value = documentationURL;
-
- dispatcher.dispatch(dispatchURL[0], dispatchArgs );
- }
- catch( com.sun.star.uno.Exception e )
- {
- e.printStackTrace( System.err );
- }
- }
- }
-
- /** Creates a new instance of ServicesHandler */
- public ServicesHandler( XComponentContext _context )
- {
- m_context = _context;
- m_supportedServices = new String[] { };
- }
-
- public void actuatingPropertyChanged(String _propertyName, Object _newValue, Object _oldValue, com.sun.star.inspection.XObjectInspectorUI _objectInspectorUI, boolean _firstTimeInit) throws com.sun.star.lang.NullPointerException
- {
- // not interested in
- }
-
- public void addEventListener(com.sun.star.lang.XEventListener _eventListener)
- {
- // ingnoring this
- }
-
- public void addPropertyChangeListener(com.sun.star.beans.XPropertyChangeListener _propertyChangeListener) throws com.sun.star.lang.NullPointerException
- {
- // ingnoring this
- }
-
- public Object convertToControlValue(String _propertyName, Object _propertyValue, com.sun.star.uno.Type type) throws com.sun.star.beans.UnknownPropertyException
- {
- return _propertyValue;
- }
-
- public Object convertToPropertyValue(String _propertyName, Object _controlValue) throws com.sun.star.beans.UnknownPropertyException
- {
- return _controlValue;
- }
-
- public com.sun.star.inspection.LineDescriptor describePropertyLine(String _propertyName, com.sun.star.inspection.XPropertyControlFactory _propertyControlFactory) throws com.sun.star.beans.UnknownPropertyException, com.sun.star.lang.NullPointerException
- {
- com.sun.star.inspection.LineDescriptor descriptor = new com.sun.star.inspection.LineDescriptor();
-
- descriptor = new LineDescriptor();
- descriptor.Category = "Services";
- descriptor.DisplayName = "supports service";
- descriptor.HasPrimaryButton = descriptor.HasSecondaryButton = false;
- descriptor.IndentLevel = 0;
- try
- {
- XHyperlinkControl hyperlinkControl = (XHyperlinkControl)UnoRuntime.queryInterface(
- XHyperlinkControl.class, _propertyControlFactory.createPropertyControl( PropertyControlType.HyperlinkField, true ) );
- hyperlinkControl.addActionListener( new ClickHandler( m_context, _propertyName ) );
-
- descriptor.Control = hyperlinkControl;
- }
- catch( com.sun.star.lang.IllegalArgumentException e )
- {
- }
- return descriptor;
- }
-
- public void dispose()
- {
- // nothing to do
- }
-
- public String[] getActuatingProperties()
- {
- // none
- return new String[] { };
- }
-
- public com.sun.star.beans.PropertyState getPropertyState(String _propertyName) throws com.sun.star.beans.UnknownPropertyException
- {
- return com.sun.star.beans.PropertyState.DIRECT_VALUE;
- }
-
- public Object getPropertyValue(String _propertyName) throws com.sun.star.beans.UnknownPropertyException
- {
- return _propertyName;
- }
-
- public String[] getSupersededProperties()
- {
- return new String[] { "SupportedServiceNames" };
- // we're used in conjunction with a GenericPropertyHandler, which (via inspection) finds
- // a property SupportedServiceNames, resulting from the XServiceInfo.getSupportedServiceNames
- // method. Since we handle those ourself, we supersede them.
- }
-
- public com.sun.star.beans.Property[] getSupportedProperties()
- {
- Property[] properties = new Property[ m_supportedServices.length ];
- for ( int i=0; i<m_supportedServices.length; ++i )
- properties[i] = new Property( m_supportedServices[i], 0, new Type( String.class ), (short)0 );
- return properties;
- }
-
- public void inspect(Object _component) throws com.sun.star.lang.NullPointerException
- {
- XServiceInfo serviceInfo = (XServiceInfo)UnoRuntime.queryInterface( XServiceInfo.class, _component );
- if ( serviceInfo != null )
- m_supportedServices = serviceInfo.getSupportedServiceNames();
- }
-
- public boolean isComposable(String _propertyName) throws com.sun.star.beans.UnknownPropertyException
- {
- return true;
- }
-
- public com.sun.star.inspection.InteractiveSelectionResult onInteractivePropertySelection(String str, boolean param, Object[] obj, com.sun.star.inspection.XObjectInspectorUI xObjectInspectorUI) throws com.sun.star.beans.UnknownPropertyException, com.sun.star.lang.NullPointerException
- {
- return InteractiveSelectionResult.Cancelled;
- }
-
- public void removeEventListener(com.sun.star.lang.XEventListener _eventListener)
- {
- // ignoring this
- }
-
- public void removePropertyChangeListener(com.sun.star.beans.XPropertyChangeListener _propertyChangeListener)
- {
- // ignoring this
- }
-
- public void setPropertyValue(String str, Object obj) throws com.sun.star.beans.UnknownPropertyException
- {
- // we declared our properties as readonly
- throw new java.lang.RuntimeException();
- }
-
- public boolean suspend(boolean param)
- {
- return true;
- }
-}
diff --git a/extensions/qa/integration/extensions/TestSkeleton.java b/extensions/qa/integration/extensions/TestSkeleton.java
deleted file mode 100644
index 833f06b36..000000000
--- a/extensions/qa/integration/extensions/TestSkeleton.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*************************************************************************
- *
- * 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 integration.extensions;
-
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.lang.XMultiServiceFactory;
-
-public class TestSkeleton extends complexlib.ComplexTestCase
-{
- private XMultiServiceFactory m_orb;
-
- /** Creates a new instance of ValueBinding */
- public TestSkeleton()
- {
- }
-
- /* ------------------------------------------------------------------ */
- public String[] getTestMethodNames()
- {
- return new String[] {
- "checkSomething"
- };
- }
-
- /* ------------------------------------------------------------------ */
- public String getTestObjectName()
- {
- return "Test Skeleton";
- }
-
- /* ------------------------------------------------------------------ */
- public void before() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- m_orb = (XMultiServiceFactory)param.getMSF();
- }
-
- /* ------------------------------------------------------------------ */
- public void after() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- }
-
- /* ------------------------------------------------------------------ */
- public void checkSomething() throws com.sun.star.uno.Exception, java.lang.Exception
- {
- }
-}
diff --git a/extensions/qa/integration/extensions/extensions_complex.sce b/extensions/qa/integration/extensions/extensions_complex.sce
deleted file mode 100644
index 563376c72..000000000
--- a/extensions/qa/integration/extensions/extensions_complex.sce
+++ /dev/null
@@ -1 +0,0 @@
-#-o integration.extensions.ObjectInspector \ No newline at end of file
diff --git a/extensions/qa/integration/extensions/makefile.mk b/extensions/qa/integration/extensions/makefile.mk
deleted file mode 100644
index 98e46fde1..000000000
--- a/extensions/qa/integration/extensions/makefile.mk
+++ /dev/null
@@ -1,83 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = ExtensionsIntegrationTests
-PRJNAME = extensions
-PACKAGE = integration$/$(PRJNAME)
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES := $(shell @$(FIND) .$/*.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
-
-# --- Runner Settings ----------------------------------------------
-
-# create connection string for OOoRunner
-.IF "$(RUNNER_CONNECTION_STRING)" == ""
- .IF "$(OOO_RUNNER_PORT)" == ""
- OOO_RUNNER_PORT=8100
- .ENDIF
- .IF "$(OOO_RUNNER_HOST)" == ""
- OOO_RUNNER_HOST=localhost
- .ENDIF
- RUNNER_CONNECTION_STRING=socket,host=$(OOO_RUNNER_HOST),port=$(OOO_RUNNER_PORT)
-.ENDIF
-
-# classpath and argument list
-RUNNER_CLASSPATH = -cp $(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/OOoRunner.jar$(PATH_SEPERATOR)$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)$/ConnectivityTools.jar
-RUNNER_ARGS = org.openoffice.Runner -TestBase java_complex -cs $(RUNNER_CONNECTION_STRING)
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL : ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-run:
- +java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -sce extensions_complex.sce
-
-run_%:
- +java $(RUNNER_CLASSPATH) $(RUNNER_ARGS) -o integration.$(PRJNAME).$(@:s/run_//)
-
diff --git a/extensions/qa/unoapi/Test.java b/extensions/qa/unoapi/Test.java
deleted file mode 100644
index c997cb9de..000000000
--- a/extensions/qa/unoapi/Test.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
-* 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 org.openoffice.extensions.qa.unoapi;
-
-import org.openoffice.Runner;
-import org.openoffice.test.OfficeConnection;
-import static org.junit.Assert.*;
-
-public final class Test {
- @org.junit.Before public void setUp() throws Exception {
- connection.setUp();
- }
-
- @org.junit.After public void tearDown()
- throws InterruptedException, com.sun.star.uno.Exception
- {
- connection.tearDown();
- }
-
- @org.junit.Test public void test() {
- assertTrue(
- Runner.run(
- "-sce", "extensions.sce", "-cs", connection.getDescription()));
- }
-
- private final OfficeConnection connection = new OfficeConnection();
-}
diff --git a/extensions/qa/unoapi/extensions.sce b/extensions/qa/unoapi/extensions.sce
deleted file mode 100644
index cb338fed5..000000000
--- a/extensions/qa/unoapi/extensions.sce
+++ /dev/null
@@ -1,5 +0,0 @@
--o pcr.ObjectInspector
-# this object must be tests twice since it is the onle one in this module
-# The runner only prints "[0-9]+? of [0-9]+? tests failed"
-# if more then one tests is executed. This is needed by cwscheckapi.
--o pcr.ObjectInspector
diff --git a/extensions/qa/unoapi/makefile.mk b/extensions/qa/unoapi/makefile.mk
deleted file mode 100644
index a869a3c10..000000000
--- a/extensions/qa/unoapi/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-# 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.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = extensions
-TARGET = qa_unoapi
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = org/openoffice/extensions/qa/unoapi
-JAVATESTFILES = Test.java
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END