summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl.cxx15
-rw-r--r--uui/source/interactionhandler.cxx24
-rw-r--r--uui/source/newerverwarn.cxx2
3 files changed, 20 insertions, 21 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 60e49e41878a..3c24531e1dac 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -21,6 +21,7 @@
#include "com/sun/star/awt/XWindow.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/configuration/theDefaultProvider.hpp"
#include "com/sun/star/configuration/backend/MergeRecoveryRequest.hpp"
#include "com/sun/star/configuration/backend/StratumCreationException.hpp"
#include "com/sun/star/container/XHierarchicalNameAccess.hpp"
@@ -971,18 +972,8 @@ UUIInteractionHelper::getInteractionHandlerList(
{
try
{
- uno::Reference< lang::XMultiServiceFactory > xConfigProv(
- m_xServiceFactory->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.ConfigurationProvider" )) ),
- uno::UNO_QUERY );
-
- if ( !xConfigProv.is() )
- throw uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "unable to instanciate config provider service")),
- uno::Reference< uno::XInterface >());
+ uno::Reference< lang::XMultiServiceFactory > xConfigProv =
+ configuration::theDefaultProvider::get( comphelper::getComponentContext(m_xServiceFactory) );
rtl::OUStringBuffer aFullPath;
aFullPath.appendAscii(
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx
index 821b03e632a8..71f11eb33533 100644
--- a/uui/source/interactionhandler.cxx
+++ b/uui/source/interactionhandler.cxx
@@ -70,18 +70,26 @@ UUIInteractionHandler::initialize(
{
delete m_pImpl;
+ // The old-style InteractionHandler service supported a sequence of
+ // PropertyValue, while the new-style service now uses constructors to pass
+ // in Parent and Context values; for backwards compatibility, keep support
+ // for a PropertyValue sequence, too:
uno::Reference< awt::XWindow > xWindow;
rtl::OUString aContext;
- ::comphelper::NamedValueCollection aProperties( rArguments );
- if ( aProperties.has( "Parent" ) )
+ if (!((rArguments.getLength() == 1 && (rArguments[0] >>= xWindow)) ||
+ (rArguments.getLength() == 2 && (rArguments[0] >>= xWindow) &&
+ (rArguments[1] >>= aContext))))
{
- OSL_VERIFY( aProperties.get( "Parent" ) >>= xWindow );
+ ::comphelper::NamedValueCollection aProperties( rArguments );
+ if ( aProperties.has( "Parent" ) )
+ {
+ OSL_VERIFY( aProperties.get( "Parent" ) >>= xWindow );
+ }
+ if ( aProperties.has( "Context" ) )
+ {
+ OSL_VERIFY( aProperties.get( "Context" ) >>= aContext );
+ }
}
- if ( aProperties.has( "Context" ) )
- {
- OSL_VERIFY( aProperties.get( "Context" ) >>= aContext );
- }
-
m_pImpl = new UUIInteractionHelper(m_xServiceFactory, xWindow, aContext);
}
diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx
index a16478272d72..d7c8b966210e 100644
--- a/uui/source/newerverwarn.cxx
+++ b/uui/source/newerverwarn.cxx
@@ -118,7 +118,7 @@ IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl)
// updates enabled", but this here is not an automatic update, but one triggered explicitly by the user.
uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
- aContext.getLegacyServiceFactory(),
+ aContext.getUNOContext(),
DEFINE_CONST_UNICODE("org.openoffice.Office.Addons/"),
DEFINE_CONST_UNICODE("AddonUI/OfficeHelp/UpdateCheckJob"),
DEFINE_CONST_UNICODE("URL"),