summaryrefslogtreecommitdiff
path: root/extensions/source/config/ldap/componentdef.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/config/ldap/componentdef.cxx')
-rw-r--r--extensions/source/config/ldap/componentdef.cxx51
1 files changed, 2 insertions, 49 deletions
diff --git a/extensions/source/config/ldap/componentdef.cxx b/extensions/source/config/ldap/componentdef.cxx
index 986866939466..0fd917d2ff9e 100644
--- a/extensions/source/config/ldap/componentdef.cxx
+++ b/extensions/source/config/ldap/componentdef.cxx
@@ -28,14 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_extensions.hxx"
-#ifndef EXTENSIONS_CONFIG_LDAP_LDAPUSERPROFILE_HXX_
#include "ldapuserprofilebe.hxx"
-#endif //CONFIGMGR_BACKEND_LDAPUSERPROFILE_HXX_
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
#include <cppuhelper/implementationentry.hxx>
-#endif // _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
-#include <rtl/ustrbuf.hxx>
using namespace extensions::config::ldap ;
@@ -70,49 +64,8 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
extern "C" sal_Bool SAL_CALL component_writeInfo(void *aServiceManager,
void *aRegistryKey) {
- using namespace ::com::sun::star::registry;
- if (aRegistryKey)
- {
-
- /** Service factory */
- uno::Reference<lang::XMultiServiceFactory> xFactory
- (reinterpret_cast<lang::XMultiServiceFactory*> (aServiceManager),
- uno::UNO_QUERY);
-
- rtl::OUStringBuffer aImplKeyName;
- aImplKeyName.appendAscii("/");
- aImplKeyName.append(LdapUserProfileBe::getLdapUserProfileBeName());
-
- rtl::OUString aMainKeyName(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
-
- uno::Reference<XRegistryKey> xNewImplKey(
- reinterpret_cast<XRegistryKey*>
- (aRegistryKey)->createKey(aImplKeyName.makeStringAndClear()));
-
- uno::Reference<XRegistryKey> xNewKey(
- xNewImplKey->createKey(aMainKeyName));
-
- //Now register associated service names
- uno::Sequence<rtl::OUString> sServiceNames =
- LdapUserProfileBe::getLdapUserProfileBeServiceNames();
- for (sal_Int32 i = 0 ; i < sServiceNames.getLength() ; ++ i)
- {
- xNewKey->createKey(sServiceNames[i]);
- }
- //Now register associated org.openoffice.UserProfile component
- //that this backend supports under xNewImplKey
- uno::Reference<XRegistryKey> xComponentKey(
- xNewImplKey->createKey(rtl::OUString::createFromAscii
- ("/DATA/SupportedComponents")));
-
- uno::Sequence<rtl::OUString> aComponentList(1);
- aComponentList[0]= rtl::OUString::createFromAscii
- ("org.openoffice.UserProfile");
-
- xComponentKey->setAsciiListValue(aComponentList);
- return sal_True;
- }
- return sal_False;
+ return cppu::component_writeInfoHelper(
+ aServiceManager, aRegistryKey, kImplementations_entries);
}
//------------------------------------------------------------------------------