summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-02-24 12:27:37 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-02-26 13:27:23 +0100
commit393bd0eebe09230ef90c5b343c93338526f3f4b7 (patch)
tree8c586c891688c46292cc4e18d9ff95c7c6068efc
parent24404329b71f12886830b6511ece8af10b2a7df1 (diff)
fix core when clicking on entries in Manage Names dialog in calc fdo#46568
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 56c50e8d4b5f..06ad128f6353 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -269,10 +269,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()