tdf#86731: Add the dictionary not available message

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 <mike.kaganski@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
This commit is contained in:
Vaibhav 2019-03-17 19:42:23 +05:30 committed by Szymon Kłos
parent 94369103fa
commit 35027d2e9f
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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<weld::MessageDialog> xBox(