summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-01-24 11:22:22 +0100
committerAndras Timar <andras.timar@collabora.com>2019-09-22 19:08:57 +0200
commit9fc3d2261ef9d2daccde96c1f18c30144985ea3e (patch)
tree064dda5eef3df30cb2ebbebb2d956dc31b3c2ae4 /sw/source
parent4bc934827d63d99ab34564aeb3c031cab9227ae1 (diff)
tdf#86731 Don't show 'start from beginning' when dictionary is missing
Change-Id: I160e4b15e3c636be0e23dd5bbb2da62dfa6a42ef
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx5
1 files changed, 3 insertions, 2 deletions
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<weld::MessageDialog> 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 );