diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 10:50:34 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 10:50:34 +0000 |
commit | b958e8f3e9727e4ac03586c66f23d18dd0460373 (patch) | |
tree | 2d775133b03e9d285df55bf85a7b179ef2ac3d07 /forms/source/component/DatabaseForm.cxx | |
parent | 13bca3b64b32e2fbe000b3e252ad6c34c4a5c2f6 (diff) |
INTEGRATION: CWS dba201b (1.69.32); FILE MERGED
2005/09/21 06:45:36 oj 1.69.32.2: RESYNC: (1.69-1.70); FILE MERGED
2005/07/21 12:01:28 fs 1.69.32.1: #connectRowset now also takes into account connections from the outer database
Diffstat (limited to 'forms/source/component/DatabaseForm.cxx')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 84cb990eb8a6..d9fd600d6648 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -4,9 +4,9 @@ * * $RCSfile: DatabaseForm.cxx,v $ * - * $Revision: 1.70 $ + * $Revision: 1.71 $ * - * last change: $Author: rt $ $Date: 2005-09-08 22:36:22 $ + * last change: $Author: hr $ $Date: 2005-09-23 11:50:34 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1766,9 +1766,14 @@ void ODatabaseForm::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const A case PROPERTY_ID_ACTIVE_CONNECTION: { - Reference< XConnection > xSomeConnection; - if ( ::dbtools::isEmbeddedInDatabase( getParent(), xSomeConnection ) ) - throw PropertyVetoException(); + Reference< XConnection > xOuterConnection; + if ( ::dbtools::isEmbeddedInDatabase( getParent(), xOuterConnection ) ) + { + if ( xOuterConnection != Reference< XConnection >( rValue, UNO_QUERY ) ) + // somebody's trying to set a connection which is not equal the connection + // implied by the database we're embedded in + throw PropertyVetoException(); + } } // NO break! @@ -2811,8 +2816,6 @@ sal_Bool ODatabaseForm::implEnsureConnection() if (m_xAggregateSet.is()) { - // do we have a connection in the hierarchy than take that connection - // this overwrites all the other connnections Reference< XConnection > xConnection = connectRowset( Reference<XRowSet> (m_xAggregate, UNO_QUERY), m_xServiceFactory, |