[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Sun Feb 26 04:31:15 PST 2012
sc/source/ui/namedlg/namedlg.cxx | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 393bd0eebe09230ef90c5b343c93338526f3f4b7
Author: Noel Power <noel.power at novell.com>
Date: Fri Feb 24 12:27:37 2012 +0000
fix core when clicking on entries in Manage Names dialog in calc fdo#46568
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 56c50e8..06ad128 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()
More information about the Libreoffice-commits
mailing list