diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-03 14:39:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-09 08:08:14 +0200 |
commit | 3a50e97499d0c1ff6307dcfe9883aea1af300947 (patch) | |
tree | 24e6c2801ecfffbd649aaa7fdc47fdd4d58cd2d2 /dbaccess | |
parent | b498ff10d202287eabb27aa286c860cb766f8423 (diff) |
fdo#46808, Adapt sdb::OrderDialog UNO service to new style
The service already existed, it just did not have an IDL file.
Change-Id: If24e9d6069bf7454bb0add3be8c4bc5916cc4d1f
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/uno/composerdialogs.cxx | 17 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/composerdialogs.hxx | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx index 99645b4ed8a1..008d17416b6c 100644 --- a/dbaccess/source/ui/uno/composerdialogs.cxx +++ b/dbaccess/source/ui/uno/composerdialogs.cxx @@ -153,6 +153,7 @@ namespace dbaui { if( aArguments.getLength() == 3 ) { + // this is the FilterDialog::createWithQuery method Reference<com::sun::star::sdb::XSingleSelectQueryComposer> xQueryComposer; aArguments[0] >>= xQueryComposer; Reference<com::sun::star::sdbc::XRowSet> xRowSet; @@ -195,6 +196,22 @@ namespace dbaui } //--------------------------------------------------------------------- + void SAL_CALL RowsetOrderDialog::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException) + { + if( aArguments.getLength() == 2 ) + { + Reference<com::sun::star::sdb::XSingleSelectQueryComposer> xQueryComposer; + aArguments[0] >>= xQueryComposer; + Reference<com::sun::star::beans::XPropertySet> xRowSet; + aArguments[1] >>= xRowSet; + setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "QueryComposer" ) ), makeAny( xQueryComposer ) ); + setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowSet" ) ), makeAny( xRowSet ) ); + } + else + ComposerDialog::initialize(aArguments); + } + + //--------------------------------------------------------------------- void RowsetOrderDialog::executedDialog( sal_Int16 _nExecutionResult ) { ComposerDialog::executedDialog( _nExecutionResult ); diff --git a/dbaccess/source/ui/uno/composerdialogs.hxx b/dbaccess/source/ui/uno/composerdialogs.hxx index 8dc83d00d326..618eacfd902f 100644 --- a/dbaccess/source/ui/uno/composerdialogs.hxx +++ b/dbaccess/source/ui/uno/composerdialogs.hxx @@ -125,6 +125,8 @@ namespace dbaui // OGenericUnoDialog overridables virtual void executedDialog( sal_Int16 _nExecutionResult ); + virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments ) + throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException); }; //......................................................................... |