diff options
author | Oliver Specht <os@openoffice.org> | 2001-09-06 13:42:50 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2001-09-06 13:42:50 +0000 |
commit | 2013280cc55a93697e9c3f30a74f5d7d1dc89c74 (patch) | |
tree | 6a91538ed0f34c68e5375693f83797797756bf89 /svx/source/tbxctrls/fillctrl.cxx | |
parent | bbafdb6d300ad6fee562d886a932178751e8ff2d (diff) |
#74124# key handling of ListBox/ComboBox controller changed
Diffstat (limited to 'svx/source/tbxctrls/fillctrl.cxx')
-rw-r--r-- | svx/source/tbxctrls/fillctrl.cxx | 50 |
1 files changed, 19 insertions, 31 deletions
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index e7dd371b45d9..f94f7af37f3e 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fillctrl.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: obo $ $Date: 2001-01-16 11:48:16 $ + * last change: $Author: os $ $Date: 2001-09-06 14:42:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -689,7 +689,7 @@ IMPL_LINK( FillControl, SelectFillTypeHdl, ListBox *, pBox ) pLbFillType->Selected(); // release focus - if ( pBox && SfxViewShell::Current()->GetWindow() ) + if ( pBox && pLbFillType->IsRelease() && SfxViewShell::Current()->GetWindow() ) SfxViewShell::Current()->GetWindow()->GrabFocus(); } } @@ -706,17 +706,15 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) SfxObjectShell* pSh = SfxObjectShell::Current(); SfxDispatcher* pDisp = ( (SvxFillToolBoxControl*)GetData() )->GetBindings().GetDispatcher(); DBG_ASSERT( pDisp, "invalid Dispatcher" ); - - switch( eXFS ) + if(bAction) { - case XFILL_NONE: - if ( bAction ) + switch( eXFS ) + { + case XFILL_NONE: pDisp->Execute( SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L ); - break; + break; - case XFILL_SOLID: - { - if( bAction ) + case XFILL_SOLID: { // NEU //Eintrag wird auf temporaere Farbe geprueft @@ -732,12 +730,8 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) pDisp->Execute( SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, &aXFillStyleItem, 0L ); } - } - break; - - case XFILL_GRADIENT: - { - if( bAction ) + break; + case XFILL_GRADIENT: { USHORT nPos = pLbFillAttr->GetSelectEntryPos(); @@ -755,12 +749,9 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) } } } - } - break; + break; - case XFILL_HATCH: - { - if( bAction ) + case XFILL_HATCH: { USHORT nPos = pLbFillAttr->GetSelectEntryPos(); @@ -777,12 +768,9 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) } } } - } - break; + break; - case XFILL_BITMAP: - { - if( bAction ) + case XFILL_BITMAP: { USHORT nPos = pLbFillAttr->GetSelectEntryPos(); @@ -800,13 +788,13 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) } } } + break; } - break; + // release focus + if ( pLbFillAttr->IsRelease() && pBox && SfxViewShell::Current()->GetWindow() ) + SfxViewShell::Current()->GetWindow()->GrabFocus(); } - // release focus - if ( !pLbFillAttr->IsTravelSelect() && pBox && SfxViewShell::Current()->GetWindow() ) - SfxViewShell::Current()->GetWindow()->GrabFocus(); return 0; } |