summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-01-31 15:15:49 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-01-31 15:15:49 +0000
commit360f16b46b384618314de018ec85b4c8c76595dc (patch)
treeb4bff55cb8985306f269fcb4e953c88335cb282b
parentfd489e99907aa065f58739c8e694e4672044af93 (diff)
INTEGRATION: CWS sdksample (1.3.124); FILE MERGED
2004/06/30 09:10:26 jsc 1.3.124.1: #i29308# use of new UNO features
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java9
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java9
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java51
3 files changed, 32 insertions, 37 deletions
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
index fa61a9b73b8d..e0b8b8d62a96 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
@@ -2,9 +2,9 @@
*
* $RCSfile: TestComponentA.java,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2003-06-30 15:14:13 $
+ * last change: $Author: rt $ $Date: 2005-01-31 16:15:10 $
*
* The Contents of this file are made available subject to the terms of
* the BSD license.
@@ -37,9 +37,6 @@
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*************************************************************************/
-
-package JavaComp;
-
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lib.uno.helper.WeakBase;
import com.sun.star.lang.XServiceInfo;
@@ -48,7 +45,7 @@ import com.sun.star.uno.Type;
// TestComponentA use the implementation helper WeakBase
public class TestComponentA extends WeakBase implements XServiceInfo, XSomethingA {
- static final String __serviceName= "JavaTestComponentA";
+ static final String __serviceName= "com.sun.star.test.SomethingA";
static byte[] _implementationId;
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java
index c861551be535..df1678b568f1 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java
@@ -2,9 +2,9 @@
*
* $RCSfile: TestComponentB.java,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2003-06-30 15:14:25 $
+ * last change: $Author: rt $ $Date: 2005-01-31 16:15:25 $
*
* The Contents of this file are made available subject to the terms of
* the BSD license.
@@ -37,9 +37,6 @@
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*************************************************************************/
-
-package JavaComp;
-
import com.sun.star.uno.XComponentContext;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.lang.XServiceInfo;
@@ -50,7 +47,7 @@ import com.sun.star.uno.Type;
// for demonstration. More convenient is to use the impelmentation WeakBase or
// ComponentBase, see implementation of TestComponentA.
public class TestComponentB implements XTypeProvider, XServiceInfo, XSomethingB {
- static final String __serviceName= "JavaTestComponentB";
+ static final String __serviceName= "com.sun.star.test.SomethingB";
static byte[] _implementationId;
private XComponentContext context;
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
index 220992b94fe8..5d3ca23112c2 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
@@ -2,9 +2,9 @@
*
* $RCSfile: TestServiceProvider.java,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: hr $ $Date: 2003-06-30 15:14:37 $
+ * last change: $Author: rt $ $Date: 2005-01-31 16:15:49 $
*
* The Contents of this file are made available subject to the terms of
* the BSD license.
@@ -37,9 +37,6 @@
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*************************************************************************/
-
-package JavaComp;
-
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.registry.XRegistryKey;
@@ -47,30 +44,34 @@ import com.sun.star.lang.XTypeProvider;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.comp.loader.FactoryHelper;
-
public class TestServiceProvider
{
- public static XSingleServiceFactory __getServiceFactory(String implName,
- XMultiServiceFactory multiFactory,
- XRegistryKey regKey) {
- XSingleServiceFactory xSingleServiceFactory = null;
+ public static XSingleServiceFactory __getServiceFactory(
+ String implName,
+ XMultiServiceFactory multiFactory,
+ XRegistryKey regKey) {
+ XSingleServiceFactory xSingleServiceFactory = null;
- if (implName.equals( TestComponentA.class.getName()) )
- xSingleServiceFactory = FactoryHelper.getServiceFactory( TestComponentA.class,
- TestComponentA.__serviceName, multiFactory, regKey);
- else if (implName.equals(TestComponentB.class.getName()))
- xSingleServiceFactory= FactoryHelper.getServiceFactory( TestComponentB.class,
- TestComponentB.__serviceName, multiFactory, regKey);
- return xSingleServiceFactory;
- }
+ if (implName.equals( TestComponentA.class.getName()) )
+ xSingleServiceFactory = FactoryHelper.getServiceFactory(
+ TestComponentA.class, TestComponentA.__serviceName,
+ multiFactory, regKey);
+ else if (implName.equals(TestComponentB.class.getName()))
+ xSingleServiceFactory= FactoryHelper.getServiceFactory(
+ TestComponentB.class, TestComponentB.__serviceName,
+ multiFactory, regKey);
+ return xSingleServiceFactory;
+ }
- public static boolean __writeRegistryServiceInfo(XRegistryKey regKey){
- boolean bregA= FactoryHelper.writeRegistryServiceInfo( TestComponentA.class.getName(),
- TestComponentA.__serviceName, regKey);
- boolean bregB= FactoryHelper.writeRegistryServiceInfo( TestComponentB.class.getName(),
- TestComponentB.__serviceName, regKey);
- return bregA && bregB;
- }
+ public static boolean __writeRegistryServiceInfo(XRegistryKey regKey){
+ boolean bregA= FactoryHelper.writeRegistryServiceInfo(
+ TestComponentA.class.getName(),
+ TestComponentA.__serviceName, regKey);
+ boolean bregB= FactoryHelper.writeRegistryServiceInfo(
+ TestComponentB.class.getName(),
+ TestComponentB.__serviceName, regKey);
+ return bregA && bregB;
+ }
}