summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-01-24 11:22:22 +0100
committerXisco Faulí <xiscofauli@libreoffice.org>2020-01-07 15:32:02 +0100
commitf200dd5cb84681558700c49de0969907f78f8db1 (patch)
treea9089df1fa6a04c9e74aaba48eb9e88c704a8ef8
parent2c3f7d4ee0a0b2bf6efc41670645bd361f1b76ef (diff)
tdf#86731 Don't show 'start from beginning' when dictionary is missing
Change-Id: I160e4b15e3c636be0e23dd5bbb2da62dfa6a42ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/82169 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit a50a2bf8e8c6084aeacb8d2db42e21f528410742) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86345 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index a518176926ab..2429b09484f9 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -176,6 +176,8 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
SwWrtShell* pWrtShell = GetWrtShell_Impl();
if(pWrtShell)
{
+ bool bNoDictionaryAvailable = pWrtShell->GetDoc()->IsDictionaryMissing();
+
if (!bRecheck)
{
// first set continuation point for spell/grammar check to the
@@ -380,7 +382,7 @@ The code below would only be part of the solution.
OSL_ENSURE(m_pSpellState->m_bDrawingsSpelled &&
m_pSpellState->m_bOtherSpelled && m_pSpellState->m_bBodySpelled,
"not all parts of the document are already spelled");
- if(m_pSpellState->m_xStartRange.is())
+ if( m_pSpellState->m_xStartRange.is() && !bNoDictionaryAvailable )
{
LockFocusNotification( true );
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetController()->getDialog(),
@@ -406,8 +408,7 @@ The code below would only be part of the solution.
bCloseMessage = false; // no closing message if a wrap around has been denied
}
}
- bool bNoDictionaryAvailable = pWrtShell->GetDoc()->IsDictionaryMissing();
- if( aRet.empty() && bCloseMessage )
+ if( aRet.empty() && bCloseMessage && !bNoDictionaryAvailable )
{
LockFocusNotification( true );
OUString sInfo( SwResId( bNoDictionaryAvailable ? STR_DICTIONARY_UNAVAILABLE : STR_SPELLING_COMPLETED ) );