summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-17 10:53:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-12-17 11:05:59 +0100
commitfa2a7c1c95f78d20ed572091e12700fd4d852835 (patch)
treec470938b9614cc81ad288c67248f3874197f9fe8 /odk
parentca4065680a402e3d0ff43e41744b24a9c980b2ef (diff)
Keep using component_getImplementationEnvironment in extensions
...instead of relying on the implicit CPPU_CURRENT_LANGUAGE_BINDING_NAME convention. Keeping that convention an implementation detail makes it easier to do improvements in the future. (Theoretically, the bundled extension in mysqlc could be considered internal code and not adapted, but just be safe.) Change-Id: Iae41a6e072dabc2bf7c1481ba6cfed61680edf37
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx8
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx7
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx7
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx7
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx7
-rw-r--r--odk/examples/DevelopersGuide/examples.html4
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/exports.cxx7
-rw-r--r--odk/examples/cpp/counter/counter.cxx8
-rw-r--r--odk/examples/cpp/custompanel/ctp_services.cxx8
-rw-r--r--odk/examples/cpp/remoteclient/remoteclient.cxx8
-rw-r--r--odk/settings/component.uno.def1
11 files changed, 70 insertions, 2 deletions
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
index 0e516e3f9958..5456af87ee22 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
@@ -35,6 +35,7 @@
#include <stdio.h>
#include <rtl/ustring.hxx>
+#include <uno/lbnames.h>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/factory.hxx>
// generated c++ interfaces
@@ -85,4 +86,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_C
return pRet;
}
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
+component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
index c9ed065fd690..abb288e01045 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
@@ -36,6 +36,7 @@
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
+#include <uno/lbnames.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -204,6 +205,12 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
implName, xMgr, xRegistry, ::my_sc_impl::s_component_entries );
}
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
}
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
index 9e8fa4cbc323..4873522982b5 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
@@ -37,6 +37,7 @@
#include "SDriver.hxx"
#include <cppuhelper/factory.hxx>
#include <osl/diagnose.h>
+#include <uno/lbnames.h>
using namespace connectivity::skeleton;
using ::rtl::OUString;
@@ -143,5 +144,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
return pRet;
};
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
+component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
index e6b78850c65d..9d234e9aa1df 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
@@ -37,6 +37,7 @@
#include <osl/mutex.hxx>
#include <osl/thread.h>
+#include <uno/lbnames.h>
#include <cppuhelper/factory.hxx>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
@@ -72,6 +73,12 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
return pRet;
}
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
index 321bcf01076c..dfb9f6b8850f 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
@@ -38,6 +38,7 @@
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase.hxx>
+#include <uno/lbnames.h>
#include <com/sun/star/lang/XComponent.hpp>
@@ -339,6 +340,12 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
return pRet;
}
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
} // extern "C"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/examples.html b/odk/examples/DevelopersGuide/examples.html
index 4061d02da555..6a9a75053950 100644
--- a/odk/examples/DevelopersGuide/examples.html
+++ b/odk/examples/DevelopersGuide/examples.html
@@ -572,7 +572,7 @@ the c++ ProtocolHandler example.</td>
href="./Components/Addons/ProtocolHandlerAddon_cpp/component.cxx"
title="link to Components/Addons/ProtocolHandlerAddon_cpp/component.cxx">component.cxx</a></td>
<td class="cell80">Implements the administrative
-component functions (component_writeInfo, component_getFactory).</td>
+component functions (component_writeInfo, component_getFactory, component_getImplementationEnvironment).</td>
</tr>
<tr>
<td class="cell20"><a
@@ -899,7 +899,7 @@ the filter detection example.</td>
href="./OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx"
title="link to OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx">fdcomp.cxx</a></td>
<td class="cell80">Implements the administrative
-component functions (component_writeInfo, component_getFactory).</td>
+component functions (component_writeInfo, component_getFactory, component_getImplementationEnvironment).</td>
</tr>
<tr>
<td class="cell20"><a
diff --git a/odk/examples/cpp/complextoolbarcontrols/exports.cxx b/odk/examples/cpp/complextoolbarcontrols/exports.cxx
index 09ab4ceb6cf4..35a4f3910128 100644
--- a/odk/examples/cpp/complextoolbarcontrols/exports.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/exports.cxx
@@ -18,6 +18,7 @@
*/
#include <cppuhelper/factory.hxx>
+#include <uno/lbnames.h>
#include "MyProtocolHandler.h"
#include "MyListener.h"
@@ -56,6 +57,12 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplNa
return xFactory.get();
}
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
} // extern C
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/counter/counter.cxx b/odk/examples/cpp/counter/counter.cxx
index c539d66494b3..9fc6326a466f 100644
--- a/odk/examples/cpp/counter/counter.cxx
+++ b/odk/examples/cpp/counter/counter.cxx
@@ -46,6 +46,7 @@
#include <stdio.h>
#include <rtl/ustring.hxx>
+#include <uno/lbnames.h>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -181,4 +182,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_C
return pRet;
}
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
+component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/custompanel/ctp_services.cxx b/odk/examples/cpp/custompanel/ctp_services.cxx
index c096a7bd710a..a8f5702ea9c5 100644
--- a/odk/examples/cpp/custompanel/ctp_services.cxx
+++ b/odk/examples/cpp/custompanel/ctp_services.cxx
@@ -20,6 +20,7 @@
#include "ctp_factory.hxx"
#include <cppuhelper/implementationentry.hxx>
+#include <uno/lbnames.h>
//......................................................................................................................
namespace sd { namespace colortoolpanel
@@ -52,6 +53,13 @@ extern "C"
{
return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , ::sd::colortoolpanel::s_aServiceEntries );
}
+
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/cpp/remoteclient/remoteclient.cxx b/odk/examples/cpp/remoteclient/remoteclient.cxx
index 2b7c4b3251d4..373efaee8a24 100644
--- a/odk/examples/cpp/remoteclient/remoteclient.cxx
+++ b/odk/examples/cpp/remoteclient/remoteclient.cxx
@@ -35,6 +35,7 @@
#include <stdio.h>
#include <osl/mutex.hxx>
+#include <uno/lbnames.h>
#include <cppuhelper/factory.hxx>
#include <com/sun/star/uno/XNamingService.hpp>
@@ -245,6 +246,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
return pRet;
}
+
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
+ char const ** ppEnvTypeName, uno_Environment **)
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/settings/component.uno.def b/odk/settings/component.uno.def
index 0c35f9aaf23d..1ca480a3eb24 100644
--- a/odk/settings/component.uno.def
+++ b/odk/settings/component.uno.def
@@ -1,2 +1,3 @@
EXPORTS
component_getFactory
+component_getImplementationEnvironment