User: hr Date: 05/09/23 05:44:43 Modified: /dba/dbaccess/source/ui/querydesign/ querycontroller.cxx
Log: INTEGRATION: CWS dba201b (1.99.44); FILE MERGED 2005/09/21 10:20:11 oj 1.99.44.3: RESYNC: (1.100-1.101); FILE MERGED 2005/07/26 13:14:41 fs 1.99.44.2: RESYNC: (1.99-1.100); FILE MERGED 2005/07/11 13:37:27 fs 1.99.44.1: merging CWS dba201 into CWS dba201b File Changes: Directory: /dba/dbaccess/source/ui/querydesign/ =============================================== File [changed]: querycontroller.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/querycontroller.cxx?r1=1.101&r2=1.102 Delta lines: +16 -11 --------------------- --- querycontroller.cxx 8 Sep 2005 16:33:27 -0000 1.101 +++ querycontroller.cxx 23 Sep 2005 12:44:40 -0000 1.102 @@ -748,32 +748,36 @@ OJoinController::impl_initialize(aArguments); PropertyValue aValue; - const Any* pBegin = aArguments.getConstArray(); - const Any* pEnd = pBegin + aArguments.getLength(); + const Any* pIter = aArguments.getConstArray(); + const Any* pEnd = pIter + aArguments.getLength(); - for(;pBegin != pEnd;++pBegin) + for(;pIter != pEnd;++pIter) { - if (!(*pBegin >>= aValue)) - continue; + 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; - aValue.Value >>= xConn; + if ( !(aValue.Value >>= xConn) ) + throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for ActiveConnection.")),*this); if ( xConn.is() ) initializeConnection( xConn ); } else if(0 == aValue.Name.compareToAscii(PROPERTY_CURRENTQUERY)) { - aValue.Value >>= m_sName; + if ( !(aValue.Value >>= m_sName) ) + throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for CurrentQuery.")),*this); } else if(0 == aValue.Name.compareToAscii(PROPERTY_QUERYDESIGNVIEW)) { - m_bDesign = ::cppu::any2bool(aValue.Value); + if ( !(aValue.Value >>= m_bDesign) ) + throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for QueryDesignView.")),*this); } else if(0 == aValue.Name.compareToAscii(PROPERTY_CREATEVIEW)) { - m_bCreateView = ::cppu::any2bool(aValue.Value); + if ( !(aValue.Value >>= m_bCreateView) ) + throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for CreateView.")),*this); } else if ( 0 == aValue.Name.compareToAscii( PARAM_INDEPENDENT_SQL_COMMAND ) ) { @@ -781,7 +785,8 @@ m_bEsacpeProcessing = sal_True; ::rtl::OUString sNewStatement; - aValue.Value >>= sNewStatement; + if ( !(aValue.Value >>= sNewStatement) ) + throw Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid argument type for IndependentSQLCommand.")),*this); setStatement_fireEvent( sNewStatement ); } } @@ -915,7 +920,7 @@ { Reference< XSQLQueryComposerFactory > xFactory(getConnection(), UNO_QUERY); OSL_ENSURE(xFactory.is(),"Connection doesn't support a querycomposer"); - if (xFactory.is()) + if ( xFactory.is() && getContainer() ) { try { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
