summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-07 15:15:57 +0200
committerNoel Grandin <noel@peralex.com>2013-01-15 09:56:00 +0200
commit1e618a8df61fd585d9e546148790b3856bf9c68d (patch)
treea2f06f5862bed03ea723ee85182c400389c0590a /svtools
parentb920a2a8682b21f29c63a269e6383647025cf635 (diff)
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
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/uno/addrtempuno.cxx29
1 files changed, 28 insertions, 1 deletions
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<com::sun::star::awt::XWindow> xParentWindow;
+ Reference<com::sun::star::beans::XPropertySet> 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)
{