Tag: cws_src680_oj17
User: oj      
Date: 06/03/10 04:12:59

Modified:
 /dba/dbaccess/source/ui/relationdesign/
  RelationTableView.cxx

Log:
 #129492# clear undo actions when a table was removed

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.20&r2=1.20.94.1
Delta lines:  +13 -4
--------------------
--- RelationTableView.cxx       23 Sep 2005 12:45:21 -0000      1.20
+++ RelationTableView.cxx       10 Mar 2006 12:12:57 -0000      1.20.94.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RelationTableView.cxx,v $
  *
- *  $Revision: 1.20 $
+ *  $Revision: 1.20.94.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 12:45:21 $
+ *  last change: $Author: oj $ $Date: 2006/03/10 12:12:57 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -122,7 +122,12 @@
 #ifndef DBACCESS_JACCESS_HXX
 #include "JAccess.hxx"
 #endif
+#ifndef _UNDO_HXX
+#include <svtools/undo.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
 
 using namespace dbaui;
 using namespace ::dbtools;
@@ -208,7 +213,7 @@
                        ::rtl::OUString strTabExistenceTest = 
pTabConnData->GetSourceWinName();
                        sal_Bool bInvalid = 
::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest)
 != arrInvalidTables.end();
                        strTabExistenceTest = pTabConnData->GetDestWinName();
-                       bInvalid |= 
::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest)
 != arrInvalidTables.end();
+                       bInvalid = bInvalid || 
::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest)
 != arrInvalidTables.end();
 
                        if (bInvalid)
                        {       // nein -> Pech gehabt, die Connection faellt 
weg
@@ -473,8 +478,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();
                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);
        }
 }
 // 
-----------------------------------------------------------------------------




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

Reply via email to