Tag: cws_src680_dba26
User: oj      
Date: 05/03/08 03:34:26

Modified:
 /dba/dbaccess/source/ui/dlg/
  indexdialog.cxx

Log:
 #i44439# disable toolbar entries when index is a primary key index

File Changes:

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

File [changed]: indexdialog.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/indexdialog.cxx?r1=1.18&r2=1.18.198.1
Delta lines:  +7 -5
-------------------
--- indexdialog.cxx     1 Dec 2003 18:02:08 -0000       1.18
+++ indexdialog.cxx     8 Mar 2005 11:34:23 -0000       1.18.198.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: indexdialog.cxx,v $
  *
- *  $Revision: 1.18 $
+ *  $Revision: 1.18.198.1 $
  *
- *  last change: $Author: rt $ $Date: 2003/12/01 18:02:08 $
+ *  last change: $Author: oj $ $Date: 2005/03/08 11:34:23 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -347,8 +347,7 @@
 
                SvLBoxEntry* pSelected = m_aIndexes.FirstSelected();
                sal_Bool bSelectedAnything = NULL != pSelected;
-               m_aActions.EnableItem(ID_INDEX_DROP, bSelectedAnything);
-               m_aActions.EnableItem(ID_INDEX_RENAME, bSelectedAnything);
+               
 
                if (pSelected)
                {
@@ -356,12 +355,15 @@
                        OIndexCollection::const_iterator aSelectedPos = 
reinterpret_cast<OIndexCollection::const_iterator>(pSelected->GetUserData());
                        m_aActions.EnableItem(ID_INDEX_SAVE, 
aSelectedPos->isModified() || aSelectedPos->isNew());
                        m_aActions.EnableItem(ID_INDEX_RESET, 
aSelectedPos->isModified() || aSelectedPos->isNew());
+            bSelectedAnything = bSelectedAnything && 
!aSelectedPos->bPrimaryKey;
                }
                else
                {
                        m_aActions.EnableItem(ID_INDEX_SAVE, sal_False);
                        m_aActions.EnableItem(ID_INDEX_RESET, sal_False);
                }
+        m_aActions.EnableItem(ID_INDEX_DROP, bSelectedAnything);
+               m_aActions.EnableItem(ID_INDEX_RENAME, bSelectedAnything);
        }
 
        //------------------------------------------------------------------




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

Reply via email to