diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-07-08 09:30:08 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-07-08 09:30:08 +0000 |
commit | 309f822298ac684698534e3f2938e3a63c367b96 (patch) | |
tree | 9a2b6e98857f1a92583492cb3d4e0e51fdc22644 /sw/source/ui/dbui/mmconfigitem.cxx | |
parent | 6f7d8f5dbc95402ea96c9914ec2dbc14fef9be98 (diff) |
INTEGRATION: CWS dba20blocker (1.3.366); FILE MERGED
2005/06/23 13:48:37 fs 1.3.366.1: copying fix for #i50905# into this CWS
Diffstat (limited to 'sw/source/ui/dbui/mmconfigitem.cxx')
-rw-r--r-- | sw/source/ui/dbui/mmconfigitem.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx index 182ad047c231..7b335cac166f 100644 --- a/sw/source/ui/dbui/mmconfigitem.cxx +++ b/sw/source/ui/dbui/mmconfigitem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: mmconfigitem.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: obo $ $Date: 2004-11-16 16:58:48 $ + * last change: $Author: obo $ $Date: 2005-07-08 10:30:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -179,6 +179,7 @@ struct DBAddressDataAssignment bColumnAssignmentsChanged(false) {} }; + /*-- 16.04.2004 09:43:29--------------------------------------------------- -----------------------------------------------------------------------*/ @@ -186,7 +187,7 @@ class SwMailMergeConfigItem_Impl : public utl::ConfigItem { friend class SwMailMergeConfigItem; Reference< XDataSource> xSource; - Reference< XConnection> xConnection; + SharedConnection xConnection; Reference< XColumnsSupplier> xColumnsSupplier; Reference< XStatement> xStatement; Reference< XResultSet> xResultSet; @@ -945,7 +946,7 @@ void SwMailMergeConfigItem::SetCountrySettings(sal_Bool bSet, const rtl::OUStrin -----------------------------------------------------------------------*/ void SwMailMergeConfigItem::SetCurrentConnection( Reference< XDataSource> xSource, - Reference< XConnection> xConnection, + SharedConnection xConnection, Reference< XColumnsSupplier> xColumnsSupplier, const SwDBData& rDBData) { @@ -967,7 +968,7 @@ Reference< XDataSource> SwMailMergeConfigItem::GetSource() /*-- 28.04.2004 15:38:11--------------------------------------------------- -----------------------------------------------------------------------*/ -Reference< XConnection> SwMailMergeConfigItem::GetConnection() +SharedConnection SwMailMergeConfigItem::GetConnection() { return m_pImpl->xConnection; } @@ -1001,7 +1002,7 @@ void SwMailMergeConfigItem::SetCurrentDBData( const SwDBData& rDBData) if(m_pImpl->aDBData != rDBData) { m_pImpl->aDBData = rDBData; - m_pImpl->xConnection = 0; + m_pImpl->xConnection.clear(); m_pImpl->xSource = 0; m_pImpl->xColumnsSupplier = 0; m_pImpl->SetModified(); @@ -1014,8 +1015,8 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() { if(!m_pImpl->xConnection.is() && m_pImpl->aDBData.sDataSource.getLength()) { - m_pImpl->xConnection = SwNewDBMgr::GetConnection( - m_pImpl->aDBData.sDataSource, m_pImpl->xSource); + m_pImpl->xConnection = SharedConnection( SwNewDBMgr::GetConnection( + m_pImpl->aDBData.sDataSource, m_pImpl->xSource), true ); } if(!m_pImpl->xResultSet.is() && m_pImpl->xConnection.is()) { @@ -1031,7 +1032,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() xRowProperties->setPropertyValue(C2U("Command"), makeAny(m_pImpl->aDBData.sCommand)); xRowProperties->setPropertyValue(C2U("CommandType"), makeAny(m_pImpl->aDBData.nCommandType)); xRowProperties->setPropertyValue(C2U("FetchSize"), makeAny((sal_Int32)10)); - xRowProperties->setPropertyValue(C2U("ActiveConnection"), makeAny(m_pImpl->xConnection)); + xRowProperties->setPropertyValue(C2U("ActiveConnection"), makeAny(m_pImpl->xConnection.getTyped())); if(m_pImpl->sFilter.getLength()) { try |