diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/condformat/condformatdlgentry.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 3c00f78bfc16..35af1f7d90ae 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1022,13 +1022,6 @@ void ScColorScale3FrmtEntry::SetInactive() IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox*, pBox ) { - bool bEnableEdit = true; - sal_Int32 nPos = pBox->GetSelectEntryPos(); - if(nPos < 2) - { - bEnableEdit = false; - } - Edit* pEd = NULL; if(pBox == &maLbEntryTypeMin) pEd = &maEdMin; @@ -1037,6 +1030,16 @@ IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox*, pBox ) else if(pBox == &maLbEntryTypeMax) pEd = &maEdMax; + if (!pEd) + return 0; + + bool bEnableEdit = true; + sal_Int32 nPos = pBox->GetSelectEntryPos(); + if(nPos < 2) + { + bEnableEdit = false; + } + if(bEnableEdit) pEd->Enable(); else |