diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-01-13 16:03:18 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-01-13 16:03:18 +0000 |
commit | 2e8dc3a17ccc3e9c6d7b3927a4ccfaa004d38516 (patch) | |
tree | 02ee12c043003d39af9d0d0e6f2bcab54b6e3a0e /sc | |
parent | 250940f9ce7b435024c92f221972c5c6d7271671 (diff) |
INTEGRATION: CWS dr43 (1.21.22); FILE MERGED
2005/12/05 09:10:43 nn 1.21.22.1: #128113# handle focus on empty field
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/dbgui/pvlaydlg.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 52000faea24c..8a2360737aab 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -4,9 +4,9 @@ * * $RCSfile: pvlaydlg.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: rt $ $Date: 2005-10-21 12:03:15 $ + * last change: $Author: rt $ $Date: 2006-01-13 17:03:18 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -917,6 +917,12 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, size_t nFieldIndex ) if ( pArr ) { + if ( nFieldIndex >= pArr->size() ) + { + DBG_ERROR("invalid selection"); + return; + } + size_t nArrPos = 0; if( ScDPLabelData* pData = GetLabelData( (*pArr)[nFieldIndex]->mnCol, &nArrPos ) ) { @@ -986,6 +992,12 @@ void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, BOOL bGotFocus ) The !IsActive() condition handles the case that a LoseFocus event of a field window would follow the Deactivate event of this dialog. */ BOOL bEnable = (bGotFocus || !IsActive()) && (eType != TYPE_SELECT); + + // #128113# The TestTool may set the focus into an empty field. + // Then the Remove/Options buttons must be disabled. + if ( bEnable && bGotFocus && GetFieldWindow( eType ).IsEmpty() ) + bEnable = FALSE; + aBtnRemove.Enable( bEnable ); aBtnOptions.Enable( bEnable ); if( bGotFocus ) |