summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-01-21 11:20:19 +0100
committerJan Holesovsky <kendy@collabora.com>2019-01-22 16:01:30 +0100
commit73ab85e5a7e9200ad8000da4a6f5c873794259ca (patch)
tree4e1be730bbff4fa1ba08f52990ff9e73a425299e
parent50731e73a5e6103ba68b8f5a9143cc223d830410 (diff)
tdf#122748 Don't restore previous language selection
Change-Id: I8688c65695080804bae22209ed5d4890ced1a8dc
-rw-r--r--cui/source/dialogs/SpellDialog.cxx7
-rw-r--r--cui/source/inc/SpellDialog.hxx2
2 files changed, 5 insertions, 4 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index c99efacc7217..b1ec6932acc3 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -297,7 +297,7 @@ void SpellDialog::Init_Impl()
LinguMgr::GetChangeAllList()->clear();
}
-void SpellDialog::UpdateBoxes_Impl()
+void SpellDialog::UpdateBoxes_Impl(bool bCallFromSelectHdl)
{
sal_Int32 i;
m_pSuggestionLB->Clear();
@@ -324,7 +324,8 @@ void SpellDialog::UpdateBoxes_Impl()
}
else
SetTitle_Impl( nAltLanguage );
- m_pLanguageLB->SelectLanguage( nAltLanguage );
+ if( !bCallFromSelectHdl )
+ m_pLanguageLB->SelectLanguage( nAltLanguage );
int nDicts = InitUserDicts();
// enter alternatives
@@ -764,7 +765,7 @@ IMPL_LINK(SpellDialog, LanguageSelectHdl, ListBox&, rBox, void)
m_pSentenceED->AddUndoAction(new SpellUndoAction_Impl(SPELLUNDO_CHANGE_LANGUAGE, aDialogUndoLink));
}
- SpellDialog::UpdateBoxes_Impl();
+ SpellDialog::UpdateBoxes_Impl(true);
}
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 41d68d99ba68..08e61bbc7b4e 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -197,7 +197,7 @@ private:
void AddToDictionaryExecute( sal_uInt16 ItemId, PopupMenu const *pMenu );
void StartSpellOptDlg_Impl();
int InitUserDicts();
- void UpdateBoxes_Impl();
+ void UpdateBoxes_Impl(bool bCallFromSelectHdl = false);
void Init_Impl();
void SpellContinue_Impl(bool UseSavedSentence = false, bool bIgnoreCurrentError = false );
void LockFocusChanges( bool bLock ) {bFocusLocked = bLock;}