User: kz      
Date: 2008-06-25 12:58:23+0000
Modified:
   dba/dbaccess/source/ui/relationdesign/RelationTableView.cxx

Log:
 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

File Changes:

Directory: /dba/dbaccess/source/ui/relationdesign/
==================================================

File [changed]: RelationTableView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/relationdesign/RelationTableView.cxx?r1=1.29&r2=1.30
Delta lines:  +12 -13
---------------------
--- RelationTableView.cxx       2008-06-06 14:14:43+0000        1.29
+++ RelationTableView.cxx       2008-06-25 12:58:20+0000        1.30
@@ -166,7 +166,7 @@
 
        //////////////////////////////////////////////////////////////////////
        // 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 @@
        }
 
        // 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 @@
 {
        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 @@
 }
 
 
//------------------------------------------------------------------------------
-::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 @@
        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 @@
        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);
        }
 }
 // 
-----------------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to