From 35027d2e9fff6e674609fe0659c1ebb8b79c2c1a Mon Sep 17 00:00:00 2001 From: Vaibhav Date: Sun, 17 Mar 2019 19:42:23 +0530 Subject: [PATCH] tdf#86731: Add the dictionary not available message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch enables a message or notification box which notifies the user with the message *No dictionary available* in case there is no dictionary available for any content. Change-Id: I61fa01ea469acb345637ab86da98a8de8f8a9762 Reviewed-on: https://gerrit.libreoffice.org/69366 Tested-by: Jenkins Reviewed-by: Mike Kaganski Reviewed-by: Szymon Kłos --- sw/inc/strings.hrc | 1 + sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 1a3e7bcabb83..93a8fcc1fcd2 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -836,6 +836,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 5dd83f837ea8..3dd7874977c7 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -406,10 +406,10 @@ The code below would only be part of the solution. } } bool bNoDictionaryAvailable = pWrtShell->GetDoc()->IsDictionaryMissing(); - 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 ) ); vcl::Window* pThisWindow = GetWindow(); // #i84610# std::unique_ptr xBox(