summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-01-21 11:20:19 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-02-06 09:23:05 +0100
commit80198e1da81bd23ab698ff73d2d758f648acdcef (patch)
treea071ba9729314d894bc35076e525ab335c2524b6 /cui
parent8d070171116eb9c57aae10d3dfbd913a097d2451 (diff)
tdf#122748 Don't restore previous language selection
Change-Id: I8688c65695080804bae22209ed5d4890ced1a8dc Reviewed-on: https://gerrit.libreoffice.org/66678 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 1b1999009962b9d79858139bd7573947f78e6669) Reviewed-on: https://gerrit.libreoffice.org/66738 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'cui')
-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 42c6721b3ec8..0b27d8d20aab 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -296,7 +296,7 @@ void SpellDialog::Init_Impl()
LinguMgr::GetChangeAllList()->clear();
}
-void SpellDialog::UpdateBoxes_Impl()
+void SpellDialog::UpdateBoxes_Impl(bool bCallFromSelectHdl)
{
sal_Int32 i;
m_pSuggestionLB->Clear();
@@ -323,7 +323,8 @@ void SpellDialog::UpdateBoxes_Impl()
}
else
SetTitle_Impl( nAltLanguage );
- m_pLanguageLB->SelectLanguage( nAltLanguage );
+ if( !bCallFromSelectHdl )
+ m_pLanguageLB->SelectLanguage( nAltLanguage );
int nDicts = InitUserDicts();
// enter alternatives
@@ -766,7 +767,7 @@ IMPL_LINK(SpellDialog, LanguageSelectHdl, ListBox&, rBox, void)
m_pSentenceED->AddUndoAction(o3tl::make_unique<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 9af4d9af83c9..83ea575f91f5 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -196,7 +196,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;}