sw/inc/strings.hrc                                   |    1 +
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 16bce5bb1cb4e446f45633b128f6ab02a48b6840
Author:     Szymon Kłos <[email protected]>
AuthorDate: Mon Nov 25 15:15:36 2024 +0100
Commit:     Szymon Kłos <[email protected]>
CommitDate: Tue Nov 26 08:59:28 2024 +0100

    tdf#86731 bNoDictionaryAvailable should trigger meesagebox
    
    Reverts "PVS: V547 Expression 'bNoDictionaryAvailable' is always false"
    This reverts commit 816b51c7a9cdd72eaa01f3c074ba5a8446917d19.
    
    It removed the message completely from the code while, we should
    fix it rather by using correct condition.
    
    It was somehow too aggresively limited in commit 
f200dd5cb84681558700c49de0969907f78f8db1
    tdf#86731 Don't show 'start from beginning' when dictionary is missing
    
    Change-Id: I5f4b859047216399a09c7aefb8a47244c4833df5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177271
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 44b011cba6b7..a6ce4cad0a5a 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -945,6 +945,7 @@
 
 #define STR_QUERY_SPELL_CONTINUE                
NC_("STR_QUERY_SPELL_CONTINUE", "Continue checking at beginning of document?")
 #define STR_SPELLING_COMPLETED                  NC_("STR_SPELLING_COMPLETED", 
"The spellcheck is complete.")
+#define STR_DICTIONARY_UNAVAILABLE              
NC_("STR_DICTIONARY_UNAVAILABLE", "No dictionary available")
 
 /*--------------------------------------------------------------------
     Description: strings for the types
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx 
b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 69f5c3a18194..65c96385f0e6 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -398,10 +398,10 @@ The code below would only be part of the solution.
                     bCloseMessage = false; // no closing message if a wrap 
around has been denied
             }
         }
-        if( aRet.empty() && bCloseMessage && !bNoDictionaryAvailable )
+        if( aRet.empty() && bCloseMessage )
         {
             LockFocusNotification( true );
-            OUString sInfo( SwResId( STR_SPELLING_COMPLETED ) );
+            OUString sInfo( SwResId( bNoDictionaryAvailable ? 
STR_DICTIONARY_UNAVAILABLE : STR_SPELLING_COMPLETED ) );
             auto xSpellController = GetController();
             // #i84610#
             std::unique_ptr<weld::MessageDialog> xBox(

Reply via email to