Tag: cws_src680_qiq User: fs Date: 06/05/12 06:47:05 Modified: /dba/dbaccess/source/ui/app/ AppController.hxx, AppControllerDnD.cxx /dba/dbaccess/source/ui/browser/ genericcontroller.cxx, unodatbr.cxx /dba/dbaccess/source/ui/inc/ RelationController.hxx, TableController.hxx, genericcontroller.hxx, querycontroller.hxx, unodatbr.hxx /dba/dbaccess/source/ui/misc/ makefile.mk /dba/dbaccess/source/ui/querydesign/ QueryTableView.cxx /dba/dbaccess/source/ui/relationdesign/ RelationController.cxx /dba/dbaccess/source/ui/tabledesign/ TableController.cxx
Log: #i51143# refactoring of controller initialization, which allows accessing the load arguments even during Construct (and not only in the - later - impl_initialize) File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppController.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.hxx?r1=1.13&r2=1.13.96.1 Delta lines: +4 -5 ------------------- --- AppController.hxx 24 Oct 2005 08:30:19 -0000 1.13 +++ AppController.hxx 12 May 2006 13:46:59 -0000 1.13.96.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppController.hxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.13.96.1 $ * - * last change: $Author: rt $ $Date: 2005/10/24 08:30:19 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:46:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -455,8 +455,7 @@ // OGenericUnoController virtual void updateTitle( ); virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager ); - - virtual void impl_initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ); + virtual void impl_initialize(); virtual ~OApplicationController(); public: File [changed]: AppControllerDnD.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerDnD.cxx?r1=1.14.76.2&r2=1.14.76.3 Delta lines: +3 -17 -------------------- --- AppControllerDnD.cxx 12 May 2006 11:12:31 -0000 1.14.76.2 +++ AppControllerDnD.cxx 12 May 2006 13:46:59 -0000 1.14.76.3 @@ -4,9 +4,9 @@ * * $RCSfile: AppControllerDnD.cxx,v $ * - * $Revision: 1.14.76.2 $ + * $Revision: 1.14.76.3 $ * - * last change: $Author: fs $ $Date: 2006/05/12 11:12:31 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:46:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -595,22 +595,8 @@ } } // ----------------------------------------------------------------------------- -void OApplicationController::impl_initialize( const Sequence< Any >& aArguments ) +void OApplicationController::impl_initialize() { -#if OSL_DEBUG_LEVEL > 0 - const Any* pIter = aArguments.getConstArray(); - const Any* pEnd = pIter + aArguments.getLength(); - PropertyValue aProp; - for(;pIter != pEnd;++pIter) - { - if ( (*pIter >>= aProp) && aProp.Name == URL_INTERACTIVE ) - { - DBG_ERROR( "OApplicationController::impl_initialize: who's still using the 'Interactive' flag?" ); - break; - } - } -#endif - Reference<XModifiable> xModi(m_xModel,UNO_QUERY); m_bCurrentlyModified = (xModi.is() && xModi->isModified()); } Directory: /dba/dbaccess/source/ui/browser/ =========================================== File [changed]: genericcontroller.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/genericcontroller.cxx?r1=1.68&r2=1.68.10.1 Delta lines: +7 -5 ------------------- --- genericcontroller.cxx 19 Apr 2006 13:19:44 -0000 1.68 +++ genericcontroller.cxx 12 May 2006 13:47:00 -0000 1.68.10.1 @@ -4,9 +4,9 @@ * * $RCSfile: genericcontroller.cxx,v $ * - * $Revision: 1.68 $ + * $Revision: 1.68.10.1 $ * - * last change: $Author: hr $ $Date: 2006/04/19 13:19:44 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -234,7 +234,7 @@ return VCLUnoHelper::GetInterface( getView() ); } // ----------------------------------------------------------------------------- -void OGenericUnoController::impl_initialize(const Sequence< Any >& aArguments) +void OGenericUnoController::impl_initialize() { } // ------------------------------------------------------------------------- @@ -280,6 +280,7 @@ throw Exception(::rtl::OUString::createFromAscii("Parent window is null"),*this); } + m_aInitParameters.assign( aArguments ); Construct( pParentWin ); if ( !getView() ) throw Exception(::rtl::OUString::createFromAscii("Window is null"),*this); @@ -291,7 +292,8 @@ ODataView* pView = getView(); if ( (m_bReadOnly || m_bPreview) && pView ) pView->EnableInput(FALSE); - impl_initialize(aArguments); + + impl_initialize(); } catch(Exception& e) { File [changed]: unodatbr.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.174&r2=1.174.10.1 Delta lines: +47 -111 ---------------------- --- unodatbr.cxx 19 Apr 2006 13:19:57 -0000 1.174 +++ unodatbr.cxx 12 May 2006 13:47:00 -0000 1.174.10.1 @@ -4,9 +4,9 @@ * * $RCSfile: unodatbr.cxx,v $ * - * $Revision: 1.174 $ + * $Revision: 1.174.10.1 $ * - * last change: $Author: hr $ $Date: 2006/04/19 13:19:57 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -96,6 +96,9 @@ #ifndef _URLOBJ_HXX //autogen #include <tools/urlobj.hxx> #endif +#ifndef TOOLS_DIAGNOSE_EX_H +#include <tools/diagnose_ex.h> +#endif #ifndef _SFXINTITEM_HXX //autogen #include <svtools/intitem.hxx> @@ -550,7 +553,6 @@ m_pTreeView->setModel(m_pTreeModel); m_pTreeView->setSelectHdl(LINK(this, SbaTableQueryBrowser, OnSelectEntry)); m_pTreeView->getListBox()->SetDoubleClickHdl(LINK(this, SbaTableQueryBrowser, OnEntryDoubleClicked)); - // initializeTreeModel(); call moved to impl_initialize // TODO getBrowserView()->getVclControl()->GetDataWindow().SetUniqueId(UID_DATABROWSE_DATAWINDOW); @@ -3036,129 +3038,63 @@ } // ------------------------------------------------------------------------- -void SbaTableQueryBrowser::impl_initialize( const Sequence< Any >& aArguments ) +void SbaTableQueryBrowser::impl_initialize() { ::vos::OGuard aGuard(Application::GetSolarMutex()); // doin' a lot of VCL stuff here -> lock the SolarMutex // first initialize the parent - SbaXDataBrowserController::impl_initialize( aArguments ); + SbaXDataBrowserController::impl_initialize(); Reference<XConnection> xForeignConnection; Reference< XFrame > xFrame; - PropertyValue aValue; - const Any* pIter = aArguments.getConstArray(); - const Any* pEnd = pIter + aArguments.getLength(); - - ::rtl::OUString aTableName,aCatalogName,aSchemaName; + ::rtl::OUString aTableName, aCatalogName, aSchemaName; sal_Bool bEsacpeProcessing = sal_True; - sal_Bool bShow = sal_True; sal_Int32 nInitialDisplayCommandType = CommandType::COMMAND; ::rtl::OUString sInitialDataSourceName; ::rtl::OUString sInitialCommand; - for(;pIter != pEnd;++pIter) - { - if (!(*pIter >>= aValue)) - throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid type in argument list. PropertyValue expected.")),*this); + const NamedValueCollection& rArguments( getInitParams() ); - if (0 == aValue.Name.compareToAscii(PROPERTY_DATASOURCENAME)) - { - if ( !(aValue.Value >>= sInitialDataSourceName) ) + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_DATASOURCENAME, sInitialDataSourceName ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for DataSourceName.")),*this); - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_COMMANDTYPE)) - { - if ( !(aValue.Value >>= nInitialDisplayCommandType) ) + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_COMMANDTYPE, nInitialDisplayCommandType ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for CommandType.")),*this); - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_COMMAND)) - { - if ( !(aValue.Value >>= sInitialCommand) ) + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_COMMAND, sInitialCommand ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for Command.")),*this); - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_ACTIVECONNECTION)) - { - if ( !(aValue.Value >>= xForeignConnection) ) + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_ACTIVECONNECTION, xForeignConnection ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for ActiveConnection.")),*this); - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_UPDATE_CATALOGNAME)) - { - if ( !(aValue.Value >>= aCatalogName) ) + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_UPDATE_CATALOGNAME, aCatalogName ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for UpdateCatalogName.")),*this); - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_UPDATE_SCHEMANAME)) - { - if ( !(aValue.Value >>= aSchemaName) ) + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_UPDATE_SCHEMANAME, aSchemaName ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for UpdateSchemaName.")),*this); - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_UPDATE_TABLENAME)) - { - if ( !(aValue.Value >>= aTableName) ) + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_UPDATE_TABLENAME, aTableName ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for UpdateTableName.")),*this); - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_USE_ESCAPE_PROCESSING)) - { - if ( !(aValue.Value >>= bEsacpeProcessing) ) + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_USE_ESCAPE_PROCESSING, bEsacpeProcessing ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for EscapeProcessing.")),*this); - } - else if ( 0 == aValue.Name.compareToAscii( "Frame" ) ) - { - if ( !(aValue.Value >>= xFrame) ) + + if ( !rArguments.getIfExists_ensureType( "Frame", xFrame ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for Frame.")),*this); - } - else if (0 == aValue.Name.compareToAscii("Preview")) - { - if ( ::cppu::any2bool(aValue.Value) ) - bShow = sal_False; - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_SHOWTREEVIEW)) - { - bShow = sal_False; - try - { - if(::cppu::any2bool(aValue.Value)) + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_SHOWMENU, m_bShowMenu ) ) + throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for ShowMenu.")),*this); + + sal_Bool bShowTreeView = rArguments.getOrDefault( (::rtl::OUString)PROPERTY_SHOWTREEVIEW, sal_True ); + m_bEnableBrowser = rArguments.getOrDefault( (::rtl::OUString)PROPERTY_SHOWTREEVIEWBUTTON, sal_True ); + + if ( bShowTreeView ) showExplorer(); else hideExplorer(); - } - catch(Exception&) - { - } - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_SHOWTREEVIEWBUTTON)) - { - try - { - // TODO: toolbox - if ( !::cppu::any2bool(aValue.Value) && getView() ) - { - // hide the explorer and the separator - m_bEnableBrowser = sal_False; -// getView()->getToolBox()->HideItem(ID_BROWSER_EXPLORER); -// getView()->getToolBox()->HideItem(getView()->getToolBox()->GetItemId(getView()->getToolBox()->GetItemPos(ID_BROWSER_EXPLORER)+1)); -// getView()->getToolBox()->ShowItem(ID_BROWSER_CLOSE); - } - } - catch(Exception&) - { - } - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_SHOWMENU)) - { - if ( !(aValue.Value >>= m_bShowMenu) ) - throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for ShowMenu.")),*this); - } - } - - if ( bShow ) - { - m_pTreeView->Show(); - m_pSplitter->Show(); - getBrowserView()->Resize(); - } if ( m_bPreview ) { @@ -3174,7 +3110,6 @@ *pStringIter++ = PROPERTY_BORDER; *pValueIter++ <<= sal_Int16(0); - *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar")); *pValueIter++ <<= sal_False; *pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker")); @@ -3189,6 +3124,7 @@ } catch(Exception) { + DBG_UNHANDLED_EXCEPTION(); } } Directory: /dba/dbaccess/source/ui/inc/ ======================================= File [changed]: RelationController.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/RelationController.hxx?r1=1.15.124.1&r2=1.15.124.2 Delta lines: +3 -3 ------------------- --- RelationController.hxx 12 May 2006 11:09:54 -0000 1.15.124.1 +++ RelationController.hxx 12 May 2006 13:47:00 -0000 1.15.124.2 @@ -4,9 +4,9 @@ * * $RCSfile: RelationController.hxx,v $ * - * $Revision: 1.15.124.1 $ + * $Revision: 1.15.124.2 $ * - * last change: $Author: fs $ $Date: 2006/05/12 11:09:54 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -96,7 +96,7 @@ // ask the user if the design should be saved when it is modified virtual short saveModified(); virtual void reset(); - virtual void impl_initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ); + virtual void impl_initialize(); virtual void updateTitle(); }; } File [changed]: TableController.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/TableController.hxx?r1=1.36&r2=1.36.4.1 Delta lines: +4 -4 ------------------- --- TableController.hxx 4 May 2006 08:43:16 -0000 1.36 +++ TableController.hxx 12 May 2006 13:47:01 -0000 1.36.4.1 @@ -4,9 +4,9 @@ * * $RCSfile: TableController.hxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.36.4.1 $ * - * last change: $Author: rt $ $Date: 2006/05/04 08:43:16 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -181,7 +181,7 @@ protected: void startTableListening(); void stopTableListening(); - virtual void impl_initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ); + virtual void impl_initialize(); }; } #endif // DBUI_TABLECONTROLLER_HXX File [changed]: genericcontroller.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/genericcontroller.hxx?r1=1.36&r2=1.36.18.1 Delta lines: +14 -7 -------------------- --- genericcontroller.hxx 31 Mar 2006 12:15:22 -0000 1.36 +++ genericcontroller.hxx 12 May 2006 13:47:01 -0000 1.36.18.1 @@ -4,9 +4,9 @@ * * $RCSfile: genericcontroller.hxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.36.18.1 $ * - * last change: $Author: vg $ $Date: 2006/03/31 12:15:22 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -104,6 +104,9 @@ #ifndef DBAUI_ICONTROLLER_HXX #include "IController.hxx" #endif +#ifndef DBACCESS_SOURCE_UI_INC_NAMEDVALUECOLLECTION_HXX +#include "namedvaluecollection.hxx" +#endif class Window; class VCLXWindow; @@ -125,8 +128,10 @@ typedef ::cppu::ImplHelper1 < ::com::sun::star::frame::XController > OGenericUnoController_CTRBASE; - // a smaller version of the FeatureEvent to be broadcasted by an ::com::sun::star::frame::XController - // ------------------------------------------------------------------------- + // ==================================================================== + // = FeatureState + // ==================================================================== + /// a smaller version of the FeatureEvent to be broadcasted by an ::com::sun::star::frame::XController struct FeatureState { ::com::sun::star::uno::Any aState; @@ -139,7 +144,6 @@ // ==================================================================== // = helper // ==================================================================== - // (would like to have them local to OGenericUnoController, but SunPro5 complains then ...) // -------------------------------------------------------------------- // .................................................................... @@ -197,6 +201,7 @@ { private: SupportedFeatures m_aSupportedFeatures; // look at the name + NamedValueCollection m_aInitParameters; #ifdef DBG_UTIL bool m_bDescribingSupportedFeatures; @@ -249,6 +254,8 @@ ::osl::Mutex& getMutex( ) { return OGenericUnoController_MBASE::m_aMutex; } ::cppu::OBroadcastHelper& getBroadcastHelper() { return OGenericUnoController_COMPBASE::rBHelper; } + const NamedValueCollection& getInitParams() const { return m_aInitParameters; } + // ---------------------------------------------------------------- // methods OGenericUnoController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM); @@ -344,7 +351,7 @@ virtual void setTitle(const ::rtl::OUString& _sName); // XInitialize will be called inside initialize - virtual void impl_initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments); + virtual void impl_initialize(); /** updateTitle will be called when a new frame is attached */ File [changed]: querycontroller.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/querycontroller.hxx?r1=1.32.124.1&r2=1.32.124.2 Delta lines: +3 -3 ------------------- --- querycontroller.hxx 12 May 2006 11:09:55 -0000 1.32.124.1 +++ querycontroller.hxx 12 May 2006 13:47:01 -0000 1.32.124.2 @@ -4,9 +4,9 @@ * * $RCSfile: querycontroller.hxx,v $ * - * $Revision: 1.32.124.1 $ + * $Revision: 1.32.124.2 $ * - * last change: $Author: fs $ $Date: 2006/05/12 11:09:55 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -206,7 +206,7 @@ // ask the user if the design should be saved when it is modified virtual short saveModified(); virtual void reset(); - virtual void impl_initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ); + virtual void impl_initialize(); void resetImpl(); File [changed]: unodatbr.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/unodatbr.hxx?r1=1.63&r2=1.63.98.1 Delta lines: +4 -4 ------------------- --- unodatbr.hxx 24 Oct 2005 08:32:10 -0000 1.63 +++ unodatbr.hxx 12 May 2006 13:47:01 -0000 1.63.98.1 @@ -4,9 +4,9 @@ * * $RCSfile: unodatbr.hxx,v $ * - * $Revision: 1.63 $ + * $Revision: 1.63.98.1 $ * - * last change: $Author: rt $ $Date: 2005/10/24 08:32:10 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -271,7 +271,7 @@ virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ); virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt ); - virtual void impl_initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ); + virtual void impl_initialize(); // SbaGridListener overridables virtual void RowChanged(); Directory: /dba/dbaccess/source/ui/misc/ ======================================== File [changed]: makefile.mk Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/makefile.mk?r1=1.25&r2=1.25.118.1 Delta lines: +5 -4 ------------------- --- makefile.mk 23 Sep 2005 12:40:55 -0000 1.25 +++ makefile.mk 12 May 2006 13:47:01 -0000 1.25.118.1 @@ -4,9 +4,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.25 $ +# $Revision: 1.25.118.1 $ # -# last change: $Author: hr $ $Date: 2005/09/23 12:40:55 $ +# last change: $Author: fs $ $Date: 2006/05/12 13:47:01 $ # # The Contents of this file are made available subject to # the terms of GNU Lesser General Public License Version 2.1. @@ -74,7 +74,8 @@ $(SLO)$/RowSetDrop.obj \ $(SLO)$/TableCopyHelper.obj \ $(SLO)$/moduledbu.obj \ - $(SLO)$/documentcontroller.obj + $(SLO)$/documentcontroller.obj \ + $(SLO)$/namedvaluecollection.obj SLOFILES= \ Directory: /dba/dbaccess/source/ui/querydesign/ =============================================== File [changed]: QueryTableView.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QueryTableView.cxx?r1=1.36.10.1&r2=1.36.10.2 Delta lines: +3 -3 ------------------- --- QueryTableView.cxx 10 May 2006 11:07:01 -0000 1.36.10.1 +++ QueryTableView.cxx 12 May 2006 13:47:02 -0000 1.36.10.2 @@ -4,9 +4,9 @@ * * $RCSfile: QueryTableView.cxx,v $ * - * $Revision: 1.36.10.1 $ + * $Revision: 1.36.10.2 $ * - * last change: $Author: fs $ $Date: 2006/05/10 11:07:01 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -606,7 +606,7 @@ ////////////////////////////////////////////////////////////////////// // find relations between the table an the tables already inserted Reference< XPropertySet > xTable( pNewTabWin->GetTable(), UNO_QUERY_THROW ); - Reference< XKeysSupplier > xKeys( xTable, UNO_QUERY_THROW); + Reference< XKeysSupplier > xKeys( xTable, UNO_QUERY ); if ( !xKeys.is() ) break; Reference< XIndexAccess> xKeyIndex = xKeys->getKeys(); Directory: /dba/dbaccess/source/ui/relationdesign/ ================================================== File [changed]: RelationController.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/relationdesign/RelationController.cxx?r1=1.42.118.1&r2=1.42.118.2 Delta lines: +9 -20 -------------------- --- RelationController.cxx 12 May 2006 11:10:16 -0000 1.42.118.1 +++ RelationController.cxx 12 May 2006 13:47:02 -0000 1.42.118.2 @@ -4,9 +4,9 @@ * * $RCSfile: RelationController.cxx,v $ * - * $Revision: 1.42.118.1 $ + * $Revision: 1.42.118.2 $ * - * last change: $Author: fs $ $Date: 2006/05/12 11:10:16 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -294,25 +294,14 @@ InvalidateFeature(_nId); } // ----------------------------------------------------------------------------- -void ORelationController::impl_initialize( const Sequence< Any >& aArguments ) +void ORelationController::impl_initialize() { - PropertyValue aValue; - const Any* pIter = aArguments.getConstArray(); - const Any* pEnd = pIter + aArguments.getLength(); + const NamedValueCollection& rArguments( getInitParams() ); - for(;pIter != pEnd;++pIter) - { - if (!(*pIter >>= aValue)) - throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid type in argument list. PropertyValue expected.")),*this); - if ( 0 == aValue.Name.compareToAscii(PROPERTY_ACTIVECONNECTION) ) - { - Reference< XConnection > xConn; - if ( !(aValue.Value >>= xConn) ) - throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for ActiveConnection.")),*this); - initializeConnection( xConn ); - break; - } - } + Reference< XConnection > xConnection; + xConnection = rArguments.getOrDefault( (::rtl::OUString)PROPERTY_ACTIVECONNECTION, xConnection ); + if ( xConnection.is() ) + initializeConnection( xConnection ); if ( !ensureConnected( sal_False ) ) { @@ -348,7 +337,7 @@ throw SQLException(); } - OJoinController::impl_initialize(aArguments); + OJoinController::impl_initialize(); if(!m_bRelationsPossible) InvalidateAll(); Directory: /dba/dbaccess/source/ui/tabledesign/ =============================================== File [changed]: TableController.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/tabledesign/TableController.cxx?r1=1.103&r2=1.103.2.1 Delta lines: +15 -28 --------------------- --- TableController.cxx 4 May 2006 08:50:19 -0000 1.103 +++ TableController.cxx 12 May 2006 13:47:02 -0000 1.103.2.1 @@ -4,9 +4,9 @@ * * $RCSfile: TableController.cxx,v $ * - * $Revision: 1.103 $ + * $Revision: 1.103.2.1 $ * - * last change: $Author: rt $ $Date: 2006/05/04 08:50:19 $ + * last change: $Author: fs $ $Date: 2006/05/12 13:47:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -596,35 +596,22 @@ } // ----------------------------------------------------------------------------- -void OTableController::impl_initialize( const Sequence< Any >& aArguments ) +void OTableController::impl_initialize() { try { - OTableController_BASE::impl_initialize(aArguments); + OTableController_BASE::impl_initialize(); - PropertyValue aValue; - const Any* pIter = aArguments.getConstArray(); - const Any* pEnd = pIter + aArguments.getLength(); + const NamedValueCollection& rArguments( getInitParams() ); - for(;pIter != pEnd;++pIter) - { - if (!(*pIter >>= aValue)) - throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid type in argument list. PropertyValue expected.")),*this); - if ( 0 == aValue.Name.compareToAscii(PROPERTY_ACTIVECONNECTION) ) - { - Reference< XConnection > xConn; - if ( !(aValue.Value >>= xConn) ) - throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for ActiveConnection.")),*this); - OSL_ENSURE( xConn.is(), "OTableController::initialize: invalid connection given!!" ); - if ( xConn.is() ) - initializeConnection( xConn ); - } - else if (0 == aValue.Name.compareToAscii(PROPERTY_CURRENTTABLE)) - { - if ( !(aValue.Value >>= m_sName) ) + Reference< XConnection > xConnection; + xConnection = rArguments.getOrDefault( (::rtl::OUString)PROPERTY_ACTIVECONNECTION, xConnection ); + if ( xConnection.is() ) + initializeConnection( xConnection ); + + if ( !rArguments.getIfExists_ensureType( (::rtl::OUString)PROPERTY_CURRENTTABLE, m_sName ) ) throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for CurrentTable.")),*this); - } - } + // read autoincrement value set in the datasource ::dbaui::fillAutoIncrementValue(getDataSource(),m_bAllowAutoIncrementValue,m_sAutoIncrementValue); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
