From 1e618a8df61fd585d9e546148790b3856bf9c68d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Jan 2013 15:15:57 +0200 Subject: fdo#46808, Adapt ui::AddressBookSourceDialog UNO service to new style The service already existed, it just did not have an IDL file. Change-Id: I34f9c29b7d5c91735cf1763b74d02516466bc78c --- svtools/source/uno/addrtempuno.cxx | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'svtools') diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index 2287b12b65bb..25e1dd89ab1e 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -76,6 +76,8 @@ namespace svt // OPropertyArrayUsageHelper virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; + void initialize(const Sequence< Any >& aArguments) throw(RuntimeException); + protected: // OGenericUnoDialog overridables virtual Dialog* createDialog(Window* _pParent); @@ -171,7 +173,32 @@ namespace svt if ( m_pDialog ) static_cast< AddressBookSourceDialog* >( m_pDialog )->getFieldMapping( m_aAliases ); } - + //------------------------------------------------------------------------------ + void OAddressBookSourceDialogUno::initialize(const Sequence< Any >& aArguments) throw(RuntimeException) + { + if( aArguments.getLength() == 5 ) + { + Reference xParentWindow; + Reference xDataSource; + rtl::OUString sDataSourceName; + rtl::OUString sCommand; + rtl::OUString sTitle; + if ( (aArguments[0] >>= xParentWindow) + && (aArguments[1] >>= xDataSource) + && (aArguments[2] >>= sDataSourceName) + && (aArguments[3] >>= sCommand) + && (aArguments[4] >>= sTitle) ) + { + setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ) ), makeAny( xParentWindow ) ); + setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataSource" ) ), makeAny( xDataSource ) ); + setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataSourceName" ) ), makeAny( sDataSourceName ) ); + setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Command" ) ), makeAny( sCommand ) ); + setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), makeAny( sTitle ) ); + return; + } + } + OGenericUnoDialog::initialize(aArguments); + } //------------------------------------------------------------------------------ void OAddressBookSourceDialogUno::implInitialize(const com::sun::star::uno::Any& _rValue) { -- cgit