1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: gconfbackend.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_shell.hxx"
34 #include "gconfbackend.hxx"
35 #include "gconflayer.hxx"
36 #include <com/sun/star/configuration/backend/ComponentChangeEvent.hpp>
38 #ifndef INCLUDED_VECTOR
40 #define INCLUDED_VECTOR
42 #include <osl/process.h>
44 #include <rtl/ustrbuf.hxx>
45 #include <rtl/byteseq.h>
49 #ifdef ENABLE_LOCKDOWN
50 // each entry should have an identifying ConfigurationSetting
51 static const ConfigurationValue SetupConfigurationValuesList
[] =
54 SETTING_WRITER_DEFAULT_DOC_FORMAT
,
55 "/apps/openoffice/writer_default_document_format",
56 "org.openoffice.Setup/Office/Factories/com.sun.star.text.TextDocument/ooSetupFactoryDefaultFilter",
64 SETTING_IMPRESS_DEFAULT_DOC_FORMAT
,
65 "/apps/openoffice/impress_default_document_format",
66 "org.openoffice.Setup/Office/Factories/com.sun.star.presentation.PresentationDocument/ooSetupFactoryDefaultFilter",
74 SETTING_CALC_DEFAULT_DOC_FORMAT
,
75 "/apps/openoffice/calc_default_document_format",
76 "org.openoffice.Setup/Office/Factories/com.sun.star.sheet.SpreadsheetDocument/ooSetupFactoryDefaultFilter",
83 #endif // ENABLE_LOCKDOWN
85 #ifdef ENABLE_LOCKDOWN
86 // each entry should have an identifying ConfigurationSetting
87 static const ConfigurationValue RecoveryConfigurationValuesList
[] =
92 "org.openoffice.Office.Recovery/AutoSave/Enabled",
100 SETTING_AUTO_SAVE_INTERVAL
,
101 "/apps/openoffice/auto_save_interval",
102 "org.openoffice.Office.Recovery/AutoSave/TimeIntervall",
109 #endif // ENABLE_LOCKDOWN
112 * This should be in a different backend actually, but this has to wait ..
115 #ifdef ENABLE_LOCKDOWN
116 // each entry should have an identifying ConfigurationSetting
117 static const ConfigurationValue UserProfileConfigurationValuesList
[] =
120 SETTING_USER_GIVENNAME
,
121 "/desktop/gnome/url-handlers/mailto/command", // dummy, needed for getTimestamp
122 "org.openoffice.UserProfile/Data/givenname",
126 SETTING_USER_GIVENNAME
130 SETTING_USER_SURNAME
,
131 "/desktop/gnome/url-handlers/mailto/command", // dummy, needed for getTimestamp
132 "org.openoffice.UserProfile/Data/sn",
139 #endif // ENABLE_LOCKDOWN
141 // each entry should have an identifying ConfigurationSetting
142 static const ConfigurationValue VCLConfigurationValuesList
[] =
145 SETTING_ENABLE_ACCESSIBILITY
,
146 "/desktop/gnome/interface/accessibility",
147 "org.openoffice.VCL/Settings/Accessibility/EnableATToolSupport",
154 #ifdef ENABLE_LOCKDOWN
157 SETTING_DISABLE_PRINTING
,
158 "/desktop/gnome/lockdown/disable_printing",
159 "org.openoffice.VCL/Settings/DesktopManagement/DisablePrinting",
166 #endif // ENABLE_LOCKDOWN
170 // each entry should have an identifying ConfigurationSetting
171 static const ConfigurationValue InetConfigurationValuesList
[] =
175 GCONF_PROXY_MODE_KEY
,
176 "org.openoffice.Inet/Settings/ooInetProxyType",
184 SETTING_PROXY_HTTP_HOST
,
185 "/system/http_proxy/host",
186 "org.openoffice.Inet/Settings/ooInetHTTPProxyName",
194 SETTING_PROXY_HTTP_PORT
,
195 "/system/http_proxy/port",
196 "org.openoffice.Inet/Settings/ooInetHTTPProxyPort",
204 SETTING_PROXY_HTTPS_HOST
,
205 "/system/proxy/secure_host",
206 "org.openoffice.Inet/Settings/ooInetHTTPSProxyName",
214 SETTING_PROXY_HTTPS_PORT
,
215 "/system/proxy/secure_port",
216 "org.openoffice.Inet/Settings/ooInetHTTPSProxyPort",
224 SETTING_PROXY_FTP_HOST
,
225 "/system/proxy/ftp_host",
226 "org.openoffice.Inet/Settings/ooInetFTPProxyName",
234 SETTING_PROXY_FTP_PORT
,
235 "/system/proxy/ftp_port",
236 "org.openoffice.Inet/Settings/ooInetFTPProxyPort",
244 SETTING_NO_PROXY_FOR
,
245 "/system/http_proxy/ignore_hosts",
246 "org.openoffice.Inet/Settings/ooInetNoProxy",
254 // each entry should have an identifying ConfigurationSetting
255 static const ConfigurationValue CommonConfigurationValuesList
[] =
258 SETTING_MAILER_PROGRAM
,
259 "/desktop/gnome/url-handlers/mailto/command",
260 "org.openoffice.Office.Common/ExternalMailer/Program",
267 SETTING_SOURCEVIEWFONT_NAME
,
268 "/desktop/gnome/interface/monospace_font_name",
269 "org.openoffice.Office.Common/Font/SourceViewFont/FontName",
276 SETTING_SOURCEVIEWFONT_HEIGHT
,
277 "/desktop/gnome/interface/monospace_font_name",
278 "org.openoffice.Office.Common/Font/SourceViewFont/FontHeight",
285 #ifdef ENABLE_LOCKDOWN
288 SETTING_USE_SYSTEM_FILE_DIALOG
,
289 "/apps/openoffice/use_system_file_dialog",
290 "org.openoffice.Office.Common/Misc/UseSystemFileDialog",
298 SETTING_DISABLE_UI_CUSTOMIZATION
,
299 "/apps/openoffice/lockdown/disable_ui_customization",
300 "org.openoffice.Office.Common/Misc/DisableUICustomization",
308 SETTING_PRINTING_MODIFIES_DOCUMENT
,
309 "/apps/openoffice/printing_modifies_doc",
310 "org.openoffice.Office.Common/Print/PrintingModifiesDocument",
318 SETTING_SHOW_ICONS_IN_MENUS
,
319 "/apps/openoffice/show_menu_icons",
320 "org.openoffice.Office.Common/View/Menu/ShowIconsInMenues",
328 SETTING_SHOW_INACTIVE_MENUITEMS
,
329 "/apps/openoffice/show_menu_inactive_items",
330 "org.openoffice.Office.Common/View/Menu/DontHideDisabledEntry",
338 SETTING_SHOW_FONT_PREVIEW
,
339 "/apps/openoffice/show_font_preview",
340 "org.openoffice.Office.Common/Font/View/ShowFontBoxWYSIWYG",
348 SETTING_SHOW_FONT_HISTORY
,
349 "/apps/openoffice/show_font_history",
350 "org.openoffice.Office.Common/Font/View/History",
358 SETTING_ENABLE_OPENGL
,
359 "/apps/openoffice/use_opengl",
360 "org.openoffice.Office.Common/_3D_Engine/OpenGL",
368 SETTING_OPTIMIZE_OPENGL
,
369 "/apps/openoffice/optimize_opengl",
370 "org.openoffice.Office.Common/_3D_Engine/OpenGL_Faster",
378 SETTING_USE_SYSTEM_FONT
,
379 "/apps/openoffice/use_system_font",
380 "org.openoffice.Office.Common/Accessibility/IsSystemFont",
388 SETTING_USE_FONT_ANTI_ALIASING
,
389 "/apps/openoffice/use_font_anti_aliasing",
390 "org.openoffice.Office.Common/View/FontAntiAliasing/Enabled",
398 SETTING_FONT_ANTI_ALIASING_MIN_PIXEL
,
399 "/apps/openoffice/font_anti_aliasing_min_pixel",
400 "org.openoffice.Office.Common/View/FontAntiAliasing/MinPixelHeight",
408 SETTING_WARN_CREATE_PDF
,
409 "/apps/openoffice/lockdown/warn_info_create_pdf",
410 "org.openoffice.Office.Common/Security/Scripting/WarnCreatePDF",
418 SETTING_WARN_PRINT_DOC
,
419 "/apps/openoffice/lockdown/warn_info_printing",
420 "org.openoffice.Office.Common/Security/Scripting/WarnPrintDoc",
428 SETTING_WARN_SAVEORSEND_DOC
,
429 "/apps/openoffice/lockdown/warn_info_saving",
430 "org.openoffice.Office.Common/Security/Scripting/WarnSaveOrSendDoc",
438 SETTING_WARN_SIGN_DOC
,
439 "/apps/openoffice/lockdown/warn_info_signing",
440 "org.openoffice.Office.Common/Security/Scripting/WarnSignDoc",
448 SETTING_REMOVE_PERSONAL_INFO
,
449 "/apps/openoffice/lockdown/remove_personal_info_on_save",
450 "org.openoffice.Office.Common/Security/Scripting/RemovePersonalInfoOnSaving",
458 SETTING_RECOMMEND_PASSWORD
,
459 "/apps/openoffice/lockdown/recommend_password_on_save",
460 "org.openoffice.Office.Common/Security/Scripting/RecommendPasswordProtection",
469 "/apps/openoffice/undo_steps",
470 "org.openoffice.Office.Common/Undo/Steps",
479 "/apps/openoffice/icon_size",
480 "org.openoffice.Office.Common/Misc/SymbolSet",
488 SETTING_MACRO_SECURITY_LEVEL
,
489 "/apps/openoffice/lockdown/macro_security_level",
490 "org.openoffice.Office.Common/Security/Scripting/MacroSecurityLevel",
498 SETTING_CREATE_BACKUP
,
499 "/apps/openoffice/create_backup",
500 "org.openoffice.Office.Common/Save/Document/CreateBackup",
508 SETTING_WARN_ALIEN_FORMAT
,
509 "/apps/openoffice/warn_alien_format",
510 "org.openoffice.Office.Common/Save/Document/WarnAlienFormat",
517 #endif // ENABLE_LOCKDOWN
521 static const ConfigurationValue PathsConfigurationValuesList
[] =
524 SETTING_WORK_DIRECTORY
,
525 "/desktop/gnome/url-handlers/mailto/command", // dummy, needed for getTimestamp
526 "org.openoffice.Office.Paths/Variables/Work",
530 SETTING_WORK_DIRECTORY
, // so that the existence of the dir can be checked
534 #ifdef ENABLE_LOCKDOWN
535 static const char * SetupPreloadValuesList
[] =
540 #endif // ENABLE_LOCKDOWN
542 #ifdef ENABLE_LOCKDOWN
543 static const char * RecoveryPreloadValuesList
[] =
548 #endif // ENABLE_LOCKDOWN
550 #ifdef ENABLE_LOCKDOWN
551 static const char * UserProfilePreloadValuesList
[] =
555 #endif // ENABLE_LOCKDOWN
557 static const char * VCLPreloadValuesList
[] =
559 "/desktop/gnome/interface",
560 #ifdef ENABLE_LOCKDOWN
561 "/desktop/gnome/lockdown",
562 #endif // ENABLE_LOCKDOWN
566 static const char * InetPreloadValuesList
[] =
569 "/system/http_proxy/host",
573 static const char * CommonPreloadValuesList
[] =
575 "/desktop/gnome/url-handlers/mailto",
576 #ifdef ENABLE_LOCKDOWN
577 "/apps/openoffice/lockdown",
579 #endif // ENABLE_LOCKDOWN
583 static const char * PathsPreloadValuesList
[] =
588 //==============================================================================
591 void ONotificationThread::run()
594 //Need to start a GMain loop for notifications to work
595 mLoop=g_main_loop_new(g_main_context_default(),FALSE);
596 g_main_loop_run(mLoop);
601 //------------------------------------------------------------------------------
603 GconfBackend
* GconfBackend::mInstance
= 0;
605 GconfBackend
* GconfBackend::createInstance(const uno::Reference
<uno::XComponentContext
>& xContext
)
609 mInstance
= new GconfBackend (xContext
);
615 //------------------------------------------------------------------------------
617 GconfBackend::GconfBackend(const uno::Reference
<uno::XComponentContext
>& xContext
)
618 throw (backend::BackendAccessException
)
619 : BackendBase(mMutex
), m_xContext(xContext
)
620 // , mNotificationThread(NULL)
626 //------------------------------------------------------------------------------
628 GconfBackend::~GconfBackend(void) {
631 // delete (mNotificationThread);
632 GconfBackend::mClient
= NULL
;
636 //------------------------------------------------------------------------------
638 GConfClient
* GconfBackend::mClient
= 0;
641 GConfClient
* GconfBackend::getGconfClient()
646 /* initialize glib object type library */
649 GError
* aError
= NULL
;
650 if (!gconf_init(0, NULL
, &aError
))
652 rtl::OUStringBuffer msg
;
653 msg
.appendAscii("GconfBackend:GconfLayer: Cannot Initialize Gconf connection - " );
654 msg
.appendAscii(aError
->message
);
656 g_error_free(aError
);
658 throw uno::RuntimeException(msg
.makeStringAndClear(),NULL
);
661 mClient
= gconf_client_get_default();
664 throw uno::RuntimeException(rtl::OUString::createFromAscii
665 ("GconfBackend:GconfLayer: Cannot Initialize Gconf connection"),NULL
);
672 //------------------------------------------------------------------------------
674 uno::Reference
<backend::XLayer
> SAL_CALL
GconfBackend::getLayer(
675 const rtl::OUString
& aComponent
, const rtl::OUString
& /*aTimestamp*/)
676 throw (backend::BackendAccessException
, lang::IllegalArgumentException
)
678 uno::Reference
<backend::XLayer
> xLayer
;
680 if( aComponent
.equalsAscii("org.openoffice.Office.Common" ) )
682 xLayer
= new GconfLayer( m_xContext
,
683 CommonConfigurationValuesList
,
684 G_N_ELEMENTS( CommonConfigurationValuesList
),
685 CommonPreloadValuesList
);
687 else if( aComponent
.equalsAscii("org.openoffice.Inet" ) )
689 xLayer
= new GconfLayer( m_xContext
,
690 InetConfigurationValuesList
,
691 G_N_ELEMENTS( InetConfigurationValuesList
),
692 InetPreloadValuesList
);
694 else if( aComponent
.equalsAscii("org.openoffice.VCL" ) )
696 xLayer
= new GconfLayer( m_xContext
,
697 VCLConfigurationValuesList
,
698 G_N_ELEMENTS( VCLConfigurationValuesList
),
699 VCLPreloadValuesList
);
701 else if( aComponent
.equalsAscii("org.openoffice.Office.Paths" ) )
703 xLayer
= new GconfLayer( m_xContext
,
704 PathsConfigurationValuesList
,
705 G_N_ELEMENTS( PathsConfigurationValuesList
),
706 PathsPreloadValuesList
);
709 #ifdef ENABLE_LOCKDOWN
710 else if( aComponent
.equalsAscii("org.openoffice.UserProfile" ) )
712 xLayer
= new GconfLayer( m_xContext
,
713 UserProfileConfigurationValuesList
,
714 G_N_ELEMENTS( UserProfileConfigurationValuesList
),
715 UserProfilePreloadValuesList
);
717 else if( aComponent
.equalsAscii("org.openoffice.Office.Recovery" ) )
719 xLayer
= new GconfLayer( m_xContext
,
720 RecoveryConfigurationValuesList
,
721 G_N_ELEMENTS( RecoveryConfigurationValuesList
),
722 RecoveryPreloadValuesList
);
724 else if( aComponent
.equalsAscii("org.openoffice.Setup" ) )
726 xLayer
= new GconfLayer( m_xContext
,
727 SetupConfigurationValuesList
,
728 G_N_ELEMENTS( SetupConfigurationValuesList
),
729 SetupPreloadValuesList
);
731 #endif // ENABLE_LOCKDOWN
736 //------------------------------------------------------------------------------
738 uno::Reference
<backend::XUpdatableLayer
> SAL_CALL
739 GconfBackend::getUpdatableLayer(const rtl::OUString
& /*aComponent*/)
740 throw (backend::BackendAccessException
,lang::NoSupportException
,
741 lang::IllegalArgumentException
)
743 throw lang::NoSupportException( rtl::OUString(
744 RTL_CONSTASCII_USTRINGPARAM("GconfBackend: No Update Operation allowed, Read Only access") ),
748 //------------------------------------------------------------------------------
750 // currently not used
753 keyChangedCallback(GConfClient
* aClient
,
759 OSL_TRACE("In KeyChangedCallback Function");
760 rtl::OUString aGconfKey
= rtl::OUString::createFromAscii(aEntry
->key
);
761 GconfBackend
* aGconfBe
= (GconfBackend
*) aBackend
;
763 aGconfBe
->notifyListeners(aGconfKey
);
768 //------------------------------------------------------------------------------
770 void GconfBackend::notifyListeners(const rtl::OUString
& /*aGconfKey*/)
773 //look up associated component from Map using GconfKey
774 KeyMappingTable::iterator aIter;
775 rtl::OUString aComponent;
776 for( aIter= mKeyMap.begin(); aIter != mKeyMap.end(); aIter++)
778 if (aIter->second.mGconfName == aGconfKey)
780 aComponent = aIter->first;
787 //Need to store updated layer TimeStamp as Gconf library
788 //has no access to TimeStamp via its api
789 TimeValue aTimeValue ={0,0} ;
790 osl_getSystemTime(&aTimeValue);
792 oslDateTime aLayerTS;
793 rtl::OUString aTimeStamp;
795 if (osl_getDateTimeFromTimeValue(&aTimeValue, &aLayerTS)) {
796 sal_Char asciiStamp [20] ;
798 sprintf(asciiStamp, "%04d%02d%02d%02d%02d%02dZ",
799 aLayerTS.Year, aLayerTS.Month, aLayerTS.Day,
800 aLayerTS.Hours, aLayerTS.Minutes, aLayerTS.Seconds) ;
801 aTimeStamp = rtl::OUString::createFromAscii(asciiStamp) ;
805 TSMappingTable::iterator aTSIter;
806 aTSIter = mTSMap.find(aComponent);
807 if (aTSIter == mTSMap.end())
809 mTSMap.insert(TSMappingTable::value_type(aComponent,aTimeStamp));
813 aTSIter->second = aTimeStamp;
816 typedef ListenerList::iterator LLIter;
817 typedef std::pair<LLIter, LLIter> BFRange;
818 BFRange aRange = mListenerList.equal_range(aComponent);
819 while (aRange.first != aRange.second)
821 LLIter cur = aRange.first++;
822 backend::ComponentChangeEvent aEvent;
823 aEvent.Component = aComponent;
824 aEvent.Source = *this;
825 cur->second->componentDataChanged(aEvent);
832 //------------------------------------------------------------------------------
833 void SAL_CALL
GconfBackend::addChangesListener(
834 const uno::Reference
<backend::XBackendChangesListener
>& xListener
,
835 const rtl::OUString
& aComponent
)
836 throw (::com::sun::star::uno::RuntimeException
)
839 osl::MutexGuard aGuard(mMutex);
841 GConfClient* aClient = getGconfClient();
843 ListenerList::iterator aIter;
844 aIter = mListenerList.find(aComponent);
845 if (aIter == mListenerList.end())
847 typedef KeyMappingTable::iterator KMTIter;
848 typedef std::pair<KMTIter, KMTIter> BFRange;
850 BFRange aRange = mKeyMap.equal_range(aComponent);
852 while (aRange.first != aRange.second)
854 KMTIter cur = aRange.first++;
856 sal_Int32 nIndex = cur->second.mGconfName.lastIndexOf('/');
857 rtl::OUString aDirectory = cur->second.mGconfName.copy(0, nIndex);
858 rtl::OString aDirectoryStr= rtl::OUStringToOString(aDirectory, RTL_TEXTENCODING_ASCII_US);
859 GError* aError = NULL;
860 gconf_client_add_dir(aClient,
861 aDirectoryStr.getStr(),
862 GCONF_CLIENT_PRELOAD_NONE,
867 OSL_TRACE("GconfBackend:: Cannot register listener for Component %s",
868 rtl::OUStringToOString(aComponent, RTL_TEXTENCODING_ASCII_US).getStr() );
871 rtl::OString aKey = rtl::OUStringToOString(cur->second.mGconfName,
872 RTL_TEXTENCODING_ASCII_US);
874 GConfClientNotifyFunc aNotifyFunc = &keyChangedCallback;
875 sal_uInt32 aID = gconf_client_notify_add(
884 OSL_TRACE("GconfBackend:: Cannot register listener for Component %s",
885 rtl::OUStringToOString(aComponent, RTL_TEXTENCODING_ASCII_US).getStr() );
896 if (mNotificationThread == NULL)
899 mNotificationThread = new ONotificationThread();
901 if ( mNotificationThread == NULL)
903 OSL_ENSURE(false,"Could not start Notification Thread ");
907 mNotificationThread->create();
911 //Store listener in list
912 mListenerList
.insert(ListenerList::value_type(aComponent
, xListener
));
916 //------------------------------------------------------------------------------
917 void SAL_CALL
GconfBackend::removeChangesListener(
918 const uno::Reference
<backend::XBackendChangesListener
>& /*xListener*/,
919 const rtl::OUString
& /*aComponent*/)
920 throw (::com::sun::star::uno::RuntimeException
)
923 osl::MutexGuard aGuard(mMutex);
924 GConfClient* aClient = GconfBackend::getGconfClient();
925 ListenerList::iterator aIter;
926 aIter = mListenerList.find(aComponent);
927 if (aIter == mListenerList.end())
930 OSL_TRACE("GconfBackend:: Cannot deregister listener for Component %s - Listner not registered",
931 rtl::OUStringToOString(aComponent, RTL_TEXTENCODING_ASCII_US).getStr() );
933 typedef KeyMappingTable::iterator KMTIter;
934 typedef std::pair<KMTIter, KMTIter> BFRange;
936 BFRange aRange = mKeyMap.equal_range(aComponent);
938 while (aRange.first != aRange.second)
940 KMTIter cur = aRange.first++;
942 sal_Int32 nIndex = cur->second.mGconfName.lastIndexOf('/');
943 rtl::OUString aDirectory = cur->second.mGconfName.copy(0, nIndex);
944 rtl::OString aDirectoryStr= rtl::OUStringToOString(aDirectory, RTL_TEXTENCODING_ASCII_US);
945 GError* aError = NULL;
946 gconf_client_remove_dir(aClient,
947 aDirectoryStr.getStr(),
952 OSL_TRACE("GconfBackend:: Cannot deRegister listener for Component %s",
953 rtl::OUStringToOString(aComponent, RTL_TEXTENCODING_ASCII_US).getStr() );
960 //------------------------------------------------------------------------------
962 rtl::OUString SAL_CALL
GconfBackend::getBackendName(void) {
963 return rtl::OUString(
964 RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.GconfBackend") );
967 //------------------------------------------------------------------------------
969 rtl::OUString SAL_CALL
GconfBackend::getImplementationName(void)
970 throw (uno::RuntimeException
)
972 return getBackendName() ;
975 //------------------------------------------------------------------------------
977 uno::Sequence
<rtl::OUString
> SAL_CALL
GconfBackend::getBackendServiceNames(void)
979 uno::Sequence
<rtl::OUString
> aServices(1) ;
980 aServices
[0] = rtl::OUString(
981 RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.GconfBackend")) ;
986 //------------------------------------------------------------------------------
988 sal_Bool SAL_CALL
GconfBackend::supportsService(const rtl::OUString
& aServiceName
)
989 throw (uno::RuntimeException
)
991 uno::Sequence
< rtl::OUString
> const svc
= getBackendServiceNames();
993 for(sal_Int32 i
= 0; i
< svc
.getLength(); ++i
)
994 if(svc
[i
] == aServiceName
)
1000 //------------------------------------------------------------------------------
1002 uno::Sequence
<rtl::OUString
>
1003 SAL_CALL
GconfBackend::getSupportedServiceNames(void)
1004 throw (uno::RuntimeException
)
1006 return getBackendServiceNames() ;
1009 // ---------------------------------------------------------------------------------------