diff options
author | Oliver Specht <oliver.specht@cib.de> | 2016-01-13 14:40:56 +0100 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2016-01-14 06:13:42 +0000 |
commit | 8c3ba5aa8de964313885afcdec06ef33a5c6a23a (patch) | |
tree | 794da9d9ee8250ca8103696ab1202f2cdc9b515f | |
parent | 1fbd073828ef52f5206aed4643226bae9fb85f4f (diff) |
tdf#47989: Restore button should re-read the text
Fixes the re-use of the current sentence when restore button is
clicked (introduced with tdf#39348) and really updates the
current sentence in that case
Change-Id: Id29262cae01eadaf4d588aad2dac23bf77b2a645
Reviewed-on: https://gerrit.libreoffice.org/21428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 8 | ||||
-rw-r--r-- | cui/source/inc/SpellDialog.hxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index ee2d52068fa1..b9f74bc89e1f 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -506,7 +506,7 @@ IMPL_LINK_TYPED( SpellDialog, ExtClickHdl, Button *, pBtn, void ) IMPL_LINK_TYPED( SpellDialog, CheckGrammarHdl, Button*, pBox, void ) { rParent.SetGrammarChecking( static_cast<CheckBox*>(pBox)->IsChecked() ); - Impl_Restore(); + Impl_Restore(true); } void SpellDialog::StartSpellOptDlg_Impl() @@ -725,7 +725,7 @@ IMPL_LINK_TYPED( SpellDialog, DialogUndoHdl, SpellUndoAction_Impl&, rAction, voi } } -void SpellDialog::Impl_Restore() +void SpellDialog::Impl_Restore(bool bUseSavedSentence) { //clear the "ChangeAllList" SvxGetChangeAllList()->clear(); @@ -733,7 +733,7 @@ void SpellDialog::Impl_Restore() m_pSentenceED->SetText(OUString()); m_pSentenceED->ResetModified(); //Resolves: fdo#39348 refill the dialog with the currently spelled sentence - SpellContinue_Impl(true); + SpellContinue_Impl(bUseSavedSentence); m_pIgnorePB->SetText(m_sIgnoreOnceST); } @@ -741,7 +741,7 @@ IMPL_LINK_NOARG_TYPED(SpellDialog, IgnoreHdl, Button*, void) { if (m_sResumeST.equals(m_pIgnorePB->GetText())) { - Impl_Restore(); + Impl_Restore(false); } else { diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index bae843e436fe..ab7437783f4b 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -204,7 +204,7 @@ private: void Init_Impl(); void SpellContinue_Impl(bool UseSavedSentence = false, bool bIgnoreCurrentError = false ); void LockFocusChanges( bool bLock ) {bFocusLocked = bLock;} - void Impl_Restore(); + void Impl_Restore(bool bUseSavedSentence); void SetSelectedLang_Impl( LanguageType nLang ); LanguageType GetSelectedLang_Impl() const; |