Tag: cws_src680_dba30 User: fs Date: 2006/07/19 06:16:56 Modified: dba/dbaccess/source/ui/relationdesign/RelationController.cxx
Log: RESYNC: (1.42-1.44); FILE MERGED File Changes: 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.16.1&r2=1.42.16.2 Delta lines: +25 -26 --------------------- --- RelationController.cxx 2 Jan 2006 09:17:18 -0000 1.42.16.1 +++ RelationController.cxx 19 Jul 2006 13:16:53 -0000 1.42.16.2 @@ -221,7 +221,6 @@ ,m_bRelationsPossible(sal_True) { DBG_CTOR(ORelationController,NULL); - m_bViewsAllowed = sal_False; InvalidateAll(); } // ----------------------------------------------------------------------------- @@ -238,7 +237,7 @@ { case SID_RELATION_ADD_RELATION: aReturn.bEnabled = m_vTableData.size() > 1 && isConnected() && isEditable(); - aReturn.aState = ::cppu::bool2any(sal_False); + aReturn.bChecked = false; break; case ID_BROWSER_SAVEDOC: aReturn.bEnabled = haveDataSource() && isModified(); @@ -290,30 +289,18 @@ default: OJoinController::Execute(_nId,aArgs); return; - break; } 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 ) ) { @@ -349,7 +336,7 @@ throw SQLException(); } - OJoinController::impl_initialize(aArguments); + OJoinController::impl_initialize(); if(!m_bRelationsPossible) InvalidateAll(); @@ -417,7 +404,6 @@ { OJoinController::describeSupportedFeatures(); implDescribeSupportedFeature( ".uno:DBAddRelation", SID_RELATION_ADD_RELATION, CommandGroup::EDIT ); - implDescribeSupportedFeature( ".uno:DBAddTable", ID_BROWSER_ADDTABLE, CommandGroup::EDIT ); } // ----------------------------------------------------------------------------- void ORelationController::loadData() @@ -483,7 +469,7 @@ ::rtl::OUString sSourceName,sReferencedTable; Reference<XPropertySet> xTableProp(xKeySup,UNO_QUERY); - sSourceName = ::dbtools::composeTableName(getConnection()->getMetaData(),xTableProp,sal_False,::dbtools::eInTableDefinitions); + sSourceName = ::dbtools::composeTableName( getConnection()->getMetaData(), xTableProp, ::dbtools::eInTableDefinitions, false, false, false ); xKey->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= sReferencedTable; ////////////////////////////////////////////////////////////////////// // insert windows @@ -594,6 +580,19 @@ pView->Invalidate(INVALIDATE_NOERASE); } } + +// ----------------------------------------------------------------------------- +bool ORelationController::allowViews() const +{ + return false; +} + +// ----------------------------------------------------------------------------- +bool ORelationController::allowQueries() const +{ + return false; +} + // ----------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
