summaryrefslogtreecommitdiff
path: root/stoc/source/stocservices
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/stocservices')
-rw-r--r--stoc/source/stocservices/makefile.mk49
-rw-r--r--stoc/source/stocservices/stocserv.xml98
-rw-r--r--stoc/source/stocservices/stocservices.cxx117
3 files changed, 264 insertions, 0 deletions
diff --git a/stoc/source/stocservices/makefile.mk b/stoc/source/stocservices/makefile.mk
new file mode 100644
index 000000000000..2d2444f8a996
--- /dev/null
+++ b/stoc/source/stocservices/makefile.mk
@@ -0,0 +1,49 @@
+#*************************************************************************
+#
+# 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=..$/..
+
+PRJNAME= stoc
+TARGET = stocservices
+ENABLE_EXCEPTIONS=TRUE
+COMP1TYPELIST = stocserv
+
+# --- openoffice.org.orig/Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# ------------------------------------------------------------------
+
+.INCLUDE : ..$/cppumaker.mk
+
+# --- openoffice.org.orig/Files ------------------------------------------------------
+
+SLOFILES= \
+ $(SLO)$/stocservices.obj
+
+# --- openoffice.org.orig/Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/stoc/source/stocservices/stocserv.xml b/stoc/source/stocservices/stocserv.xml
new file mode 100644
index 000000000000..73de7da1bd54
--- /dev/null
+++ b/stoc/source/stocservices/stocserv.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
+<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
+ <module-name> stocservices.uno </module-name>
+ <component-description>
+ <author> Daniel Boelzle </author>
+ <name> com.sun.star.comp.stoc.TypeConverter </name>
+ <description>
+This service provide a widening converter. This means it can convert
+from one type to another if possible.
+</description>
+ <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
+ <language> C++ </language>
+ <status value="final"/>
+ <supported-service> com.sun.star.script.Converter </supported-service>
+ <type> com.sun.star.reflection.FieldAccessMode </type>
+ <type> com.sun.star.lang.IllegalArgumentException </type>
+ <type> com.sun.star.lang.XEventListener </type>
+ <type> com.sun.star.lang.XTypeProvider </type>
+ <type> com.sun.star.lang.XServiceInfo </type>
+ <type> com.sun.star.lang.XSingleServiceFactory </type>
+ <type> com.sun.star.lang.XSingleComponentFactory </type>
+ <type> com.sun.star.lang.XMultiServiceFactory </type>
+ <type> com.sun.star.registry.XRegistryKey </type>
+ <type> com.sun.star.script.XTypeConverter </type>
+ <type> com.sun.star.script.FailReason </type>
+ <type> com.sun.star.container.XSet </type>
+ <type> com.sun.star.container.XNameContainer </type>
+ <type> com.sun.star.container.XIndexContainer </type>
+ <type> com.sun.star.uno.XAggregation </type>
+ <type> com.sun.star.uno.XWeak </type>
+ <type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.XComponentContext </type>
+ </component-description>
+ <component-description>
+ <author>Stephan Bergmann</author>
+ <name>com.sun.star.comp.uri.ExternalUriReferenceTranslator</name>
+ <description>
+ Instances of this service translate between external and internal
+ URI references.
+ </description>
+ <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
+ <language>C++</language>
+ <status value="under_construction"/>
+ <supported-service>
+ com.sun.star.uri.ExternalUriReferenceTranslator
+ </supported-service>
+ </component-description>
+ <component-description>
+ <author>Stephan Bergmann</author>
+ <name>com.sun.star.comp.uri.UriReferenceFactory</name>
+ <description>
+ Instances of this service create URI references.
+ </description>
+ <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
+ <language>C++</language>
+ <status value="under_construction"/>
+ <supported-service>
+ com.sun.star.uri.UriReferenceFactory
+ </supported-service>
+ </component-description>
+ <component-description>
+ <author>Stephan Bergmann</author>
+ <name>
+ com.sun.star.comp.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript
+ </name>
+ <description>
+ Instances of this service parse textual representations of absolute
+ &#x201C;vnd.sun.star.script&#x201D; URLs.
+ </description>
+ <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
+ <language>C++</language>
+ <status value="under_construction"/>
+ <supported-service>
+ com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript
+ </supported-service>
+ </component-description>
+ <component-description>
+ <author>Stephan Bergmann</author>
+ <name>com.sun.star.comp.uri.VndSunStarPkgUrlReferenceFactory</name>
+ <description>
+ Instances of this service create &#x201C;vnd.sun.star.pkg&#x201D;
+ URL references.
+ </description>
+ <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
+ <language>C++</language>
+ <status value="under_construction"/>
+ <supported-service>
+ com.sun.star.uri.VndSunStarPkgUrlReferenceFactory
+ </supported-service>
+ </component-description>
+ <project-build-dependency> cppuhelper </project-build-dependency>
+ <project-build-dependency> cppu </project-build-dependency>
+ <project-build-dependency> sal </project-build-dependency>
+ <runtime-module-dependency> cppuhelper2(COM) </runtime-module-dependency>
+ <runtime-module-dependency> cppu2 </runtime-module-dependency>
+ <runtime-module-dependency> sal2 </runtime-module-dependency>
+</module-description>
diff --git a/stoc/source/stocservices/stocservices.cxx b/stoc/source/stocservices/stocservices.cxx
new file mode 100644
index 000000000000..5a276293089a
--- /dev/null
+++ b/stoc/source/stocservices/stocservices.cxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_stoc.hxx"
+
+#include "stocservices.hxx"
+
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implementationentry.hxx"
+#include "sal/types.h"
+#include "uno/environment.h"
+#include "uno/lbnames.h"
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+using namespace cppu;
+using namespace osl;
+using namespace rtl;
+using namespace stoc_services;
+
+rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
+
+static struct ImplementationEntry g_entries[] =
+{
+ // typeconv
+ {
+ TypeConverter_Impl_CreateInstance, tcv_getImplementationName,
+ tcv_getSupportedServiceNames, createSingleComponentFactory,
+ &g_moduleCount.modCnt , 0
+ },
+ // uriproc
+ {
+ ExternalUriReferenceTranslator::create,
+ ExternalUriReferenceTranslator::getImplementationName,
+ ExternalUriReferenceTranslator::getSupportedServiceNames,
+ createSingleComponentFactory, 0, 0
+ },
+ {
+ UriReferenceFactory::create,
+ UriReferenceFactory::getImplementationName,
+ UriReferenceFactory::getSupportedServiceNames,
+ createSingleComponentFactory, 0, 0
+ },
+ {
+ UriSchemeParser_vndDOTsunDOTstarDOTexpand::create,
+ UriSchemeParser_vndDOTsunDOTstarDOTexpand::getImplementationName,
+ UriSchemeParser_vndDOTsunDOTstarDOTexpand::getSupportedServiceNames,
+ createSingleComponentFactory, 0, 0
+ },
+ {
+ UriSchemeParser_vndDOTsunDOTstarDOTscript::create,
+ UriSchemeParser_vndDOTsunDOTstarDOTscript::getImplementationName,
+ UriSchemeParser_vndDOTsunDOTstarDOTscript::getSupportedServiceNames,
+ createSingleComponentFactory, 0, 0
+ },
+ {
+ VndSunStarPkgUrlReferenceFactory::create,
+ VndSunStarPkgUrlReferenceFactory::getImplementationName,
+ VndSunStarPkgUrlReferenceFactory::getSupportedServiceNames,
+ createSingleComponentFactory, 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+extern "C"
+{
+
+sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
+{
+ return g_moduleCount.canUnload( &g_moduleCount , pTime );
+}
+
+//==================================================================================================
+void SAL_CALL component_getImplementationEnvironment(
+ const sal_Char ** ppEnvTypeName, uno_Environment ** )
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+//==================================================================================================
+sal_Bool SAL_CALL component_writeInfo(
+ void * pServiceManager, void * pRegistryKey )
+{
+ return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
+}
+//==================================================================================================
+void * SAL_CALL component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+{
+ return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
+}
+
+}