diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-02 15:03:12 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-04 14:42:52 +0200 |
commit | c25cb8a641723ab098980bb842caf75c0dc9b059 (patch) | |
tree | e264e2727309789e06147a7275b91abd05f9fcff /svl/source | |
parent | 0f3f9cb63056715845d9c3565bde69470c73efb2 (diff) |
fdo#46808, Adapt task::InteractionHandler UNO service to new style
Since we don't need to expose XInitialisation, we can make the new-style
service implement XInteractionHandler2.
Change-Id: Ib27beed1c12df17592c6472d6f58c233d2c41558
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 213856fc00e0..092b2bac0d3a 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -22,9 +22,11 @@ #include <unotools/pathoptions.hxx> #include <cppuhelper/factory.hxx> +#include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> #include <com/sun/star/registry/XSimpleRegistry.hpp> #include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/task/InteractionHandler.hpp> #include <com/sun/star/task/MasterPasswordRequest.hpp> #include <com/sun/star/task/NoMasterException.hpp> @@ -1124,7 +1126,8 @@ sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::R if ( !xTmpHandler.is() ) { uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW ); - xTmpHandler.set( xFactory->createInstance( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), uno::UNO_QUERY_THROW ); + uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) ); + xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW ); } if ( !m_aMasterPasswd.isEmpty() ) @@ -1168,7 +1171,8 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference< if ( !xTmpHandler.is() ) { uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW ); - xTmpHandler.set( xFactory->createInstance( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), uno::UNO_QUERY_THROW ); + uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) ); + xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW ); } sal_Bool bCanChangePassword = sal_True; @@ -1284,7 +1288,8 @@ void SAL_CALL PasswordContainer::removeMasterPassword() if ( !xTmpHandler.is() ) { uno::Reference< lang::XMultiServiceFactory > xFactory( mComponent, uno::UNO_QUERY_THROW ); - xTmpHandler.set( xFactory->createInstance( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), uno::UNO_QUERY_THROW ); + uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) ); + xTmpHandler.set( InteractionHandler::createDefault(xContext), uno::UNO_QUERY_THROW ); } sal_Bool bCanChangePassword = sal_True; |