summaryrefslogtreecommitdiff
path: root/xmlhelp/source/cxxhelp
diff options
context:
space:
mode:
Diffstat (limited to 'xmlhelp/source/cxxhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx5
-rw-r--r--xmlhelp/source/cxxhelp/provider/provider.cxx19
2 files changed, 10 insertions, 14 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index fb84af33f690..5113638f002a 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -51,6 +51,7 @@
#include <com/sun/star/beans/Optional.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/frame/XConfigManager.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
@@ -252,8 +253,8 @@ rtl::OString Databases::getImagesZipFileURL()
sal_Int16 nSymbolsStyle = 0;
try
{
- uno::Reference< lang::XMultiServiceFactory > xConfigProvider(
- m_xSMgr ->createInstanceWithContext(::rtl::OUString("com.sun.star.configuration.ConfigurationProvider"), m_xContext), uno::UNO_QUERY_THROW);
+ uno::Reference< lang::XMultiServiceFactory > xConfigProvider =
+ configuration::theDefaultProvider::get(m_xContext);
// set root path
uno::Sequence < uno::Any > lParams(1);
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx
index e3deabafd57e..6272306e1b11 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.cxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/frame/XConfigManager.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
@@ -306,8 +307,8 @@ void ContentProvider::init()
try
{
- uno::Reference< lang::XMultiServiceFactory > xConfigProvider(
- m_xSMgr ->createInstance(::rtl::OUString("com.sun.star.configuration.ConfigurationProvider")), uno::UNO_QUERY_THROW);
+ uno::Reference< lang::XMultiServiceFactory > xConfigProvider =
+ configuration::theDefaultProvider::get( comphelper::getComponentContext(m_xSMgr) );
uno::Sequence < uno::Any > lParams(1);
beans::PropertyValue aParam ;
@@ -361,26 +362,20 @@ void ContentProvider::init()
uno::Reference< lang::XMultiServiceFactory >
ContentProvider::getConfiguration() const
{
- uno::Reference< lang::XMultiServiceFactory > sProvider;
+ uno::Reference< lang::XMultiServiceFactory > xProvider;
if( m_xSMgr.is() )
{
try
{
- rtl::OUString sProviderService =
- rtl::OUString(
- "com.sun.star.configuration.ConfigurationProvider" );
- sProvider =
- uno::Reference< lang::XMultiServiceFactory >(
- m_xSMgr->createInstance( sProviderService ),
- uno::UNO_QUERY );
+ xProvider = configuration::theDefaultProvider::get( comphelper::getComponentContext(m_xSMgr) );
}
catch( const uno::Exception& )
{
- OSL_ENSURE( sProvider.is(), "cant instantiate configuration" );
+ OSL_ENSURE( xProvider.is(), "cant instantiate configuration" );
}
}
- return sProvider;
+ return xProvider;
}
uno::Reference< container::XHierarchicalNameAccess >