summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-17 10:53:29 +0100
committerAndras Timar <andras.timar@collabora.com>2014-01-03 09:51:52 +0100
commitc1b46bef2fba2f539fd69554aaac11b9d63d1458 (patch)
tree89c9d1870f3e8956083a44e9da80e3066ecee961 /odk
parent21891259314bcc3e348a2c785aca2531adaf39c1 (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.) (cherry picked from commit fa2a7c1c95f78d20ed572091e12700fd4d852835) Conflicts: desktop/test/deployment/active/active_native.cxx odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx odk/examples/cpp/counter/counter.cxx Change-Id: Iae41a6e072dabc2bf7c1481ba6cfed61680edf37 Reviewed-on: https://gerrit.libreoffice.org/7119 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
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 20c2628da3f4..b71c694458e7 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> // helper for queryInterface() impl
#include <cppuhelper/factory.hxx> // helper for component factory
// 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 ac86ea1a3764..fa6d87597dde 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> // "3" implementing three interfaces
#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>
@@ -206,6 +207,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 5cfe6601b2da..9dd347df54b1 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 b33b16ea9da5..17db8e1894e2 100644
--- a/odk/examples/DevelopersGuide/examples.html
+++ b/odk/examples/DevelopersGuide/examples.html
@@ -573,7 +573,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
@@ -900,7 +900,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 6f65f5cb735e..0773d60fdcfa 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> // helper for queryInterface() impl
#include <cppuhelper/factory.hxx> // helper for component factory
// generated c++ interfaces
@@ -194,4 +195,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 c8886b006b65..037814b31877 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