[Libreoffice-commits] core.git: cui/source

Oliver Specht oliver.specht at cib.de
Wed Jan 13 22:14:08 PST 2016


 cui/source/dialogs/SpellDialog.cxx |    8 ++++----
 cui/source/inc/SpellDialog.hxx     |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 8c3ba5aa8de964313885afcdec06ef33a5c6a23a
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Wed Jan 13 14:40:56 2016 +0100

    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 at libreoffice.org>
    Reviewed-by: Oliver Specht <oliver.specht at cib.de>

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index ee2d520..b9f74bc 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 bae843e..ab74377 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;


More information about the Libreoffice-commits mailing list