diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2008-01-14 13:58:32 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2008-01-14 13:58:32 +0000 |
commit | 3f544ab8ec327977c8d5ea1b5d85c04c3b9bac63 (patch) | |
tree | 8d7fdd29b46aa231bf964de8511f280b731706ca /extensions/source/propctrlr/formlinkdialog.cxx | |
parent | 30093cb3131149746ced1d35fad842e967484dc3 (diff) |
INTEGRATION: CWS wae4extensions (1.11.78); FILE MERGED
2007/09/27 07:18:25 fs 1.11.78.1: #i81612# warning-free code
Diffstat (limited to 'extensions/source/propctrlr/formlinkdialog.cxx')
-rw-r--r-- | extensions/source/propctrlr/formlinkdialog.cxx | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 6a995be40c0c..5f929b66c713 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -4,9 +4,9 @@ * * $RCSfile: formlinkdialog.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: rt $ $Date: 2007-04-26 08:07:30 $ + * last change: $Author: ihi $ $Date: 2008-01-14 14:58:32 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -533,7 +533,8 @@ namespace pcr } //------------------------------------------------------------------------ - sal_Bool FormLinkDialog::getExistingRelation( const Reference< XPropertySet >& _rxLHS, const Reference< XPropertySet >& _rxRHS, + sal_Bool FormLinkDialog::getExistingRelation( const Reference< XPropertySet >& _rxLHS, const Reference< XPropertySet >& /*_rxRHS*/, + // TODO: fix the usage of _rxRHS. This is issue #i81956#. Sequence< ::rtl::OUString >& _rLeftFields, Sequence< ::rtl::OUString >& _rRightFields ) const { try @@ -557,32 +558,33 @@ namespace pcr xKeys->getByIndex( key ) >>= xKey; sal_Int32 nKeyType = 0; xKey->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" ) ) ) >>= nKeyType; - if ( nKeyType == KeyType::FOREIGN ) + if ( nKeyType != KeyType::FOREIGN ) + continue; + + xKeyColumns.clear(); + xKeyColSupp = xKeyColSupp.query( xKey ); + if ( xKeyColSupp.is() ) + xKeyColumns = xKeyColumns.query( xKeyColSupp->getColumns() ); + OSL_ENSURE( xKeyColumns.is(), "FormLinkDialog::getExistingRelation: could not obtain the columns for the key!" ); + + if ( !xKeyColumns.is() ) + continue; + + const sal_Int32 columnCount = xKeyColumns->getCount(); + _rLeftFields.realloc( columnCount ); + _rRightFields.realloc( columnCount ); + for ( sal_Int32 column = 0; column < columnCount; ++column ) { - xKeyColumns.clear(); - xKeyColSupp = xKeyColSupp.query( xKey ); - if ( xKeyColSupp.is() ) - xKeyColumns = xKeyColumns.query( xKeyColSupp->getColumns() ); - OSL_ENSURE( xKeyColumns.is(), "FormLinkDialog::getExistingRelation: could not obtain the columns for the key!" ); - if ( xKeyColumns.is() ) + xKeyColumn.clear(); + xKeyColumns->getByIndex( column ) >>= xKeyColumn; + OSL_ENSURE( xKeyColumn.is(), "FormLinkDialog::getExistingRelation: invalid key column!" ); + if ( xKeyColumn.is() ) { - const sal_Int32 columnCount = xKeyColumns->getCount(); - _rLeftFields.realloc( columnCount ); - _rRightFields.realloc( columnCount ); - for ( sal_Int32 column = 0; column < columnCount; ++column ) - { - xKeyColumn.clear(); - xKeyColumns->getByIndex( column ) >>= xKeyColumn; - OSL_ENSURE( xKeyColumn.is(), "FormLinkDialog::getExistingRelation: invalid key column!" ); - if ( xKeyColumn.is() ) - { - xKeyColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName; - xKeyColumn->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RelatedColumn" ) ) ) >>= sRelatedColumnName; - - _rLeftFields[ column ] = sColumnName; - _rRightFields[ column ] = sRelatedColumnName; - } - } + xKeyColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName; + xKeyColumn->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RelatedColumn" ) ) ) >>= sRelatedColumnName; + + _rLeftFields[ column ] = sColumnName; + _rRightFields[ column ] = sRelatedColumnName; } } } |