summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/pvlaydlg.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-26 17:07:02 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-26 17:07:02 +0000
commit555d702903fb0857122024e1ab78a72d122d3f16 (patch)
tree6c749e09d7b761f4ce353bedcc31627a38529196 /sc/source/ui/dbgui/pvlaydlg.cxx
parentff721adbe05f7a6659d9dffcf46c671f8a644da7 (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'sc/source/ui/dbgui/pvlaydlg.cxx')
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 6cd48bbc629e..ac1d361c3905 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pvlaydlg.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: dr $ $Date: 2002-11-20 08:56:45 $
+ * last change: $Author: hr $ $Date: 2003-03-26 18:05:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -917,12 +917,16 @@ void ScDPLayoutDlg::NotifyDoubleClick( ScDPFieldType eType, long nFieldIndex )
//----------------------------------------------------------------------------
-void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, BOOL bActive )
+void ScDPLayoutDlg::NotifyFieldFocus( ScDPFieldType eType, BOOL bGotFocus )
{
- BOOL bEnable = bActive && (eType != TYPE_SELECT);
+ /* Enable Remove/Options buttons on GetFocus in field window.
+ #107616# Enable them also, if dialog is deactivated (click into document).
+ 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);
aBtnRemove.Enable( bEnable );
aBtnOptions.Enable( bEnable );
- if( bActive )
+ if( bGotFocus )
eLastActiveType = eType;
}
@@ -972,6 +976,17 @@ BOOL ScDPLayoutDlg::NotifyMoveSlider( USHORT nKeyCode )
//----------------------------------------------------------------------------
+void ScDPLayoutDlg::Deactivate()
+{
+ /* #107616# If the dialog has been deactivated (click into document), the LoseFocus
+ event from field window disables Remove/Options buttons. Re-enable them here by
+ simulating a GetFocus event. Event order of LoseFocus and Deactivate is not important.
+ The last event will enable the buttons in both cases (see NotifyFieldFocus). */
+ NotifyFieldFocus( eLastActiveType, TRUE );
+}
+
+//----------------------------------------------------------------------------
+
BOOL ScDPLayoutDlg::Contains( FuncData** pArr, short nCol, long& nAt )
{
if ( !pArr )