#97525# fixed enabling/disabling of controls

This commit is contained in:
Christian Lippka 2002-07-02 13:09:50 +00:00
parent b752392a84
commit af9bc74f12
2 changed files with 23 additions and 39 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: prntopts.cxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: ka $ $Date: 2001-10-22 13:36:42 $
* last change: $Author: cl $ $Date: 2002-07-02 14:08:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -282,24 +282,11 @@ IMPL_LINK( SdPrintOptions, ClickCheckboxHdl, CheckBox *, pCbx )
{
BOOL bPageNameAllowed = TRUE;
if( !aCbxDraw.IsChecked() &&
!aCbxNotes.IsChecked() &&
!aCbxOutline.IsChecked() )
{
if ( !aCbxHandout.IsChecked() )
pCbx->Check();
aCbxPagename.Check( FALSE );
aCbxPagename.Enable( FALSE );
}
else
{
if( aRbtBooklet.IsChecked() )
aCbxPagename.Enable( FALSE );
else
aCbxPagename.Enable( TRUE );
}
// there must be at least one of them checked
if( !aCbxDraw.IsChecked() && !aCbxNotes.IsChecked() && !aCbxOutline.IsChecked() && !aCbxHandout.IsChecked() )
pCbx->Check();
updateControls();
return 0;
}
@ -307,26 +294,21 @@ IMPL_LINK( SdPrintOptions, ClickCheckboxHdl, CheckBox *, pCbx )
IMPL_LINK( SdPrintOptions, ClickBookletHdl, CheckBox *, EMPTYARG )
{
if( aRbtBooklet.IsChecked() )
{
aCbxFront.Enable();
aCbxBack.Enable();
aCbxDate.Enable( FALSE );
aCbxTime.Enable( FALSE );
aCbxPagename.Enable( FALSE );
}
else
{
aCbxFront.Enable( FALSE );
aCbxBack.Enable( FALSE );
aCbxDate.Enable();
aCbxTime.Enable();
aCbxPagename.Enable();
}
updateControls();
return 0;
}
void SdPrintOptions::updateControls()
{
aCbxFront.Enable(aRbtBooklet.IsChecked());
aCbxBack.Enable(aRbtBooklet.IsChecked());
aCbxDate.Enable( !aRbtBooklet.IsChecked() );
aCbxTime.Enable( !aRbtBooklet.IsChecked() );
aCbxPagename.Enable( !aRbtBooklet.IsChecked() && (aCbxDraw.IsChecked() || aCbxNotes.IsChecked() || aCbxOutline.IsChecked()) );
}
/* -----------------------------04.05.01 10:53--------------------------------
---------------------------------------------------------------------------*/

View file

@ -2,9 +2,9 @@
*
* $RCSfile: prntopts.hxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: dr $ $Date: 2001-06-25 13:31:54 $
* last change: $Author: cl $ $Date: 2002-07-02 14:09:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -125,6 +125,8 @@ private:
DECL_LINK( ClickCheckboxHdl, CheckBox * );
DECL_LINK( ClickBookletHdl, CheckBox * );
void updateControls();
public:
SdPrintOptions( Window* pParent, const SfxItemSet& rInAttrs);
~SdPrintOptions();