summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/relationdesign/RelationTableView.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-25 11:58:20 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-25 11:58:20 +0000
commit2bce1ffa47646a8b7b2ddb42b9a7d2f8300cfa43 (patch)
treec1d8680652308eda033a9fa90d14ec98cbc85ce2 /dbaccess/source/ui/relationdesign/RelationTableView.cxx
parent9622113a0bf58654ea27a9485d3adcd526899d75 (diff)
INTEGRATION: CWS dba30d (1.28.30); FILE MERGED
2008/06/10 06:41:48 fs 1.28.30.3: RESYNC: (1.28-1.29); FILE MERGED 2008/05/29 15:13:41 oj 1.28.30.2: #i86168# delete connections 2008/05/29 11:27:02 fs 1.28.30.1: during #i80943#: refactoring: IController now passed around as reference, not as pointer
Diffstat (limited to 'dbaccess/source/ui/relationdesign/RelationTableView.cxx')
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx27
1 files changed, 13 insertions, 14 deletions
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index b8a4bac7e1b2..caa0f0f5caa3 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: RelationTableView.cxx,v $
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
* This file is part of OpenOffice.org.
*
@@ -166,7 +166,7 @@ void ORelationTableView::ReSync()
//////////////////////////////////////////////////////////////////////
// create and insert windows
- TTableWindowData* pTabWinDataList = m_pView->getController()->getTableWindowData();
+ TTableWindowData* pTabWinDataList = m_pView->getController().getTableWindowData();
TTableWindowData::reverse_iterator aIter = pTabWinDataList->rbegin();
for(;aIter != pTabWinDataList->rend();++aIter)
{
@@ -194,7 +194,7 @@ void ORelationTableView::ReSync()
}
// Verbindungen einfuegen
- TTableConnectionData* pTabConnDataList = m_pView->getController()->getTableConnectionData();
+ TTableConnectionData* pTabConnDataList = m_pView->getController().getTableConnectionData();
TTableConnectionData::reverse_iterator aConIter = pTabConnDataList->rbegin();
for(;aConIter != pTabConnDataList->rend();++aConIter)
@@ -226,7 +226,7 @@ BOOL ORelationTableView::IsAddAllowed()
{
DBG_CHKTHIS(ORelationTableView,NULL);
- return !m_pView->getController()->isReadOnly();
+ return !m_pView->getController().isReadOnly();
}
//------------------------------------------------------------------------
void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest)
@@ -337,25 +337,24 @@ void ORelationTableView::AddNewRelation()
}
//------------------------------------------------------------------------------
-::std::vector<OTableConnection*>::const_iterator ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_bDelete*/)
+bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_bDelete*/)
{
DBG_CHKTHIS(ORelationTableView,NULL);
- ::std::vector<OTableConnection*>::const_iterator aNextPos = getTableConnections()->end();
ORelationTableConnectionData* pTabConnData = (ORelationTableConnectionData*)pConn->GetData().get();
try
{
if (pTabConnData->DropRelation())
- aNextPos = OJoinTableView::RemoveConnection( pConn ,sal_True);
+ return OJoinTableView::RemoveConnection( pConn ,sal_True);
}
catch(SQLException& e)
{
- getDesignView()->getController()->showError(SQLExceptionInfo(e));
+ getDesignView()->getController().showError(SQLExceptionInfo(e));
}
catch(Exception&)
{
OSL_ENSURE(0,"ORelationTableView::RemoveConnection: Something other than SQLException occured!");
}
- return aNextPos;
+ return false;
}
//------------------------------------------------------------------------------
@@ -384,7 +383,7 @@ void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const
OTableWindow* pNewTabWin = createWindow( pNewTabWinData );
if(pNewTabWin->Init())
{
- m_pView->getController()->getTableWindowData()->push_back( pNewTabWinData);
+ m_pView->getController().getTableWindowData()->push_back( pNewTabWinData);
// when we already have a table with this name insert the full qualified one instead
(*GetTabWinMap())[_rComposedName] = pNewTabWin;
@@ -410,12 +409,12 @@ void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
OSQLMessageBox aDlg(this,ModuleRes(STR_QUERY_REL_DELETE_WINDOW),String(),WB_YES_NO|WB_DEF_YES,OSQLMessageBox::Warning);
if(aDlg.Execute() == RET_YES)
{
- m_pView->getController()->getUndoMgr()->Clear();
+ m_pView->getController().getUndoMgr()->Clear();
OJoinTableView::RemoveTabWin( pTabWin );
- m_pView->getController()->InvalidateFeature(SID_RELATION_ADD_RELATION);
- m_pView->getController()->InvalidateFeature(ID_BROWSER_UNDO);
- m_pView->getController()->InvalidateFeature(ID_BROWSER_REDO);
+ m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION);
+ m_pView->getController().InvalidateFeature(ID_BROWSER_UNDO);
+ m_pView->getController().InvalidateFeature(ID_BROWSER_REDO);
}
}
// -----------------------------------------------------------------------------