tdf#163802 Merge SpellDialog::Init_Impl into ctor
This is also to make a bit more obvious what part of the initialization happens in the ctor and what only happens later: The (similarly named) SpellDialog::InitHdl only gets called later. (And the logic for the latter will change and it will be renamed to SpellDialog::Initialize in an upcoming commit.) Change-Id: Ia2647eddb15163f92c10b0ae9396b54895a38192 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188936 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -213,7 +213,33 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow,
|
||||
m_xAddToDictMB->set_help_id(m_xAddToDictPB->get_help_id());
|
||||
xSpell = LinguMgr::GetSpellChecker();
|
||||
|
||||
Init_Impl();
|
||||
// initialize handler
|
||||
m_xClosePB->connect_clicked(LINK( this, SpellDialog, CancelHdl ) );
|
||||
m_xChangePB->connect_clicked(LINK( this, SpellDialog, ChangeHdl ) );
|
||||
m_xChangeAllPB->connect_clicked(LINK( this, SpellDialog, ChangeAllHdl ) );
|
||||
m_xIgnorePB->connect_clicked(LINK( this, SpellDialog, IgnoreHdl ) );
|
||||
m_xIgnoreAllPB->connect_clicked(LINK( this, SpellDialog, IgnoreAllHdl ) );
|
||||
m_xIgnoreRulePB->connect_clicked(LINK( this, SpellDialog, IgnoreAllHdl ) );
|
||||
m_xUndoPB->connect_clicked(LINK( this, SpellDialog, UndoHdl ) );
|
||||
|
||||
m_xAutoCorrPB->connect_clicked( LINK( this, SpellDialog, ExtClickHdl ) );
|
||||
m_xCheckGrammarCB->connect_toggled( LINK( this, SpellDialog, CheckGrammarHdl ));
|
||||
m_xOptionsPB->connect_clicked( LINK( this, SpellDialog, ExtClickHdl ) );
|
||||
|
||||
m_xSuggestionLB->connect_row_activated( LINK( this, SpellDialog, DoubleClickChangeHdl ) );
|
||||
|
||||
m_xSentenceED->SetModifyHdl(LINK ( this, SpellDialog, ModifyHdl) );
|
||||
|
||||
m_xAddToDictMB->connect_selected(LINK ( this, SpellDialog, AddToDictSelectHdl ) );
|
||||
m_xAddToDictPB->connect_clicked(LINK ( this, SpellDialog, AddToDictClickHdl ) );
|
||||
|
||||
m_xLanguageLB->connect_changed(LINK( this, SpellDialog, LanguageSelectHdl ) );
|
||||
|
||||
// initialize language ListBox
|
||||
m_xLanguageLB->SetLanguageList(SvxLanguageListFlags::SPELL_USED, false, false, true);
|
||||
|
||||
m_xSentenceED->ClearModifyFlag();
|
||||
LinguMgr::GetChangeAllList()->clear();
|
||||
|
||||
// disable controls if service is missing
|
||||
m_xDialog->set_sensitive(xSpell.is());
|
||||
@@ -245,37 +271,6 @@ SpellDialog::~SpellDialog()
|
||||
}
|
||||
}
|
||||
|
||||
void SpellDialog::Init_Impl()
|
||||
{
|
||||
// initialize handler
|
||||
m_xClosePB->connect_clicked(LINK( this, SpellDialog, CancelHdl ) );
|
||||
m_xChangePB->connect_clicked(LINK( this, SpellDialog, ChangeHdl ) );
|
||||
m_xChangeAllPB->connect_clicked(LINK( this, SpellDialog, ChangeAllHdl ) );
|
||||
m_xIgnorePB->connect_clicked(LINK( this, SpellDialog, IgnoreHdl ) );
|
||||
m_xIgnoreAllPB->connect_clicked(LINK( this, SpellDialog, IgnoreAllHdl ) );
|
||||
m_xIgnoreRulePB->connect_clicked(LINK( this, SpellDialog, IgnoreAllHdl ) );
|
||||
m_xUndoPB->connect_clicked(LINK( this, SpellDialog, UndoHdl ) );
|
||||
|
||||
m_xAutoCorrPB->connect_clicked( LINK( this, SpellDialog, ExtClickHdl ) );
|
||||
m_xCheckGrammarCB->connect_toggled( LINK( this, SpellDialog, CheckGrammarHdl ));
|
||||
m_xOptionsPB->connect_clicked( LINK( this, SpellDialog, ExtClickHdl ) );
|
||||
|
||||
m_xSuggestionLB->connect_row_activated( LINK( this, SpellDialog, DoubleClickChangeHdl ) );
|
||||
|
||||
m_xSentenceED->SetModifyHdl(LINK ( this, SpellDialog, ModifyHdl) );
|
||||
|
||||
m_xAddToDictMB->connect_selected(LINK ( this, SpellDialog, AddToDictSelectHdl ) );
|
||||
m_xAddToDictPB->connect_clicked(LINK ( this, SpellDialog, AddToDictClickHdl ) );
|
||||
|
||||
m_xLanguageLB->connect_changed(LINK( this, SpellDialog, LanguageSelectHdl ) );
|
||||
|
||||
// initialize language ListBox
|
||||
m_xLanguageLB->SetLanguageList(SvxLanguageListFlags::SPELL_USED, false, false, true);
|
||||
|
||||
m_xSentenceED->ClearModifyFlag();
|
||||
LinguMgr::GetChangeAllList()->clear();
|
||||
}
|
||||
|
||||
void SpellDialog::UpdateBoxes_Impl(bool bCallFromSelectHdl)
|
||||
{
|
||||
m_xSuggestionLB->clear();
|
||||
|
||||
@@ -199,7 +199,6 @@ private:
|
||||
void StartSpellOptDlg_Impl();
|
||||
int InitUserDicts();
|
||||
void UpdateBoxes_Impl(bool bCallFromSelectHdl = false);
|
||||
void Init_Impl();
|
||||
void SpellContinue_Impl(std::unique_ptr<UndoChangeGroupGuard>* pGuard = nullptr, bool UseSavedSentence = false, bool bIgnoreCurrentError = false );
|
||||
void LockFocusChanges( bool bLock ) {bFocusLocked = bLock;}
|
||||
void ToplevelFocusChanged();
|
||||
|
||||
Reference in New Issue
Block a user