From 9fc3d2261ef9d2daccde96c1f18c30144985ea3e Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Thu, 24 Jan 2019 11:22:22 +0100 Subject: tdf#86731 Don't show 'start from beginning' when dictionary is missing Change-Id: I160e4b15e3c636be0e23dd5bbb2da62dfa6a42ef --- sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 9f6863ae6e96..4761ee310f05 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -175,6 +175,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 @@ -379,7 +381,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 xBox(Application::CreateMessageDialog(GetWindow()->GetFrameWeld(), @@ -405,7 +407,6 @@ 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 && !bNoDictionaryAvailable ) { LockFocusNotification( true ); -- cgit