summaryrefslogtreecommitdiff
path: root/sc/source/ui/app
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-31 22:35:27 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-09-01 14:48:48 -0400
commit5f62f8e19d07c795b98ca85350b00b5d1edef3e2 (patch)
treebb434122387f66b09d920f934b4dbc9b0b73c041 /sc/source/ui/app
parent547f4fec93a023ff244e3bf509baf4b8001effa0 (diff)
Auto spell-check is no longer done in ScDocument.
Change-Id: I7ecfd6160443299887e31d784322a00580aac067
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r--sc/source/ui/app/scmod.cxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 74bb24a4e0ff..37dee2fd5df1 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1942,11 +1942,15 @@ IMPL_LINK_NOARG(ScModule, IdleHandler)
}
bool bMore = false;
+ bool bAutoSpell = false;
ScDocShell* pDocSh = dynamic_cast<ScDocShell*>(SfxObjectShell::Current());
if ( pDocSh )
{
ScDocument* pDoc = pDocSh->GetDocument();
+ bAutoSpell = pDoc->GetDocOptions().IsAutoSpell();
+ if (pDocSh->IsReadOnly())
+ bAutoSpell = false;
sal_Bool bLinks = pDoc->IdleCheckLinks();
sal_Bool bWidth = pDoc->IdleCalcTextWidth();
@@ -1959,14 +1963,17 @@ IMPL_LINK_NOARG(ScModule, IdleHandler)
lcl_CheckNeedsRepaint( pDocSh );
}
- ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
- if (pViewSh)
+ if (bAutoSpell)
{
- bool bSpell = pViewSh->ContinueOnlineSpelling();
- if (bSpell)
+ ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
+ if (pViewSh)
{
- aSpellTimer.Start();
- bMore = true;
+ bool bSpell = pViewSh->ContinueOnlineSpelling();
+ if (bSpell)
+ {
+ aSpellTimer.Start();
+ bMore = true;
+ }
}
}