diff options
author | Noel Power <noel.power@novell.com> | 2012-02-24 12:27:37 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-02-24 12:29:51 +0000 |
commit | 22871f1af3be444e747f7adaad5221b9c8b0bebf (patch) | |
tree | 50d3f9c6d015a522d06ad3dfff1b535c1b68edb6 /sc | |
parent | 602908b300d4d688d50355ebeca5d3063f25f475 (diff) |
fix core when clicking on entries in Manage Names dialog in calc fdo#46568
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/namedlg/namedlg.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index b2a7de6e2245..7baccb528f48 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -263,10 +263,28 @@ void ScNameDlg::SetActive() void ScNameDlg::UpdateChecks(ScRangeData* pData) { + // remove handlers, we only want the handlers to process + // user input and not when we are syncing the controls with our internal + // model ( also UpdateChecks is called already from some other event + // handlers, triggering handlers while already processing a handler can + // ( and does in this case ) corrupt the internal data + + maBtnCriteria.SetToggleHdl( Link() ); + maBtnPrintArea.SetToggleHdl( Link() ); + maBtnColHeader.SetToggleHdl( Link() ); + maBtnRowHeader.SetToggleHdl( Link() ); + maBtnCriteria .Check( pData->HasType( RT_CRITERIA ) ); maBtnPrintArea.Check( pData->HasType( RT_PRINTAREA ) ); maBtnColHeader.Check( pData->HasType( RT_COLHEADER ) ); maBtnRowHeader.Check( pData->HasType( RT_ROWHEADER ) ); + + // Restore handlers so user input is processed again + Link aToggleHandler = LINK( this, ScNameDlg, EdModifyHdl ); + maBtnCriteria.SetToggleHdl( aToggleHandler ); + maBtnPrintArea.SetToggleHdl( aToggleHandler ); + maBtnColHeader.SetToggleHdl( aToggleHandler ); + maBtnRowHeader.SetToggleHdl( aToggleHandler ); } bool ScNameDlg::IsNameValid() |