summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview/view2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uiview/view2.cxx')
-rw-r--r--sw/source/ui/uiview/view2.cxx28
1 files changed, 23 insertions, 5 deletions
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 5f14993f66e6..11d0ee0f0f36 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -1106,21 +1106,39 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
GenerateFormLetter(bUseCurrentDocument);
}
break;
+ case SID_RECHECK_DOCUMENT:
+ {
+ SwDocShell* pDocShell = GetDocShell();
+ SwDoc* pDoc = pDocShell->GetDoc();
+ uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( pDoc->GetGCIterator() );
+ if( xGCIterator.is() )
+ {
+ xGCIterator->resetIgnoreRules();
+ }
+ // reset ignore lists
+ pDoc->SpellItAgainSam( sal_True, sal_False, sal_False );
+ // clear ignore dictionary
+ uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY );
+ if( xDictionary.is() )
+ xDictionary->clear();
+ // put cursor to the start of the document
+ pWrtShell->SttDoc();
+ }
+ // no break; - but call spell/grammar dialog
case FN_SPELL_GRAMMAR_DIALOG:
{
SfxViewFrame* pViewFrame = GetViewFrame();
if (rReq.GetArgs() != NULL)
- pViewFrame->SetChildWindow (nSlot,
+ pViewFrame->SetChildWindow (FN_SPELL_GRAMMAR_DIALOG,
((const SfxBoolItem&) (rReq.GetArgs()->
- Get(nSlot))).GetValue());
+ Get(FN_SPELL_GRAMMAR_DIALOG))).GetValue());
else
- pViewFrame->ToggleChildWindow(nSlot);
+ pViewFrame->ToggleChildWindow(FN_SPELL_GRAMMAR_DIALOG);
- pViewFrame->GetBindings().Invalidate(nSlot);
+ pViewFrame->GetBindings().Invalidate(FN_SPELL_GRAMMAR_DIALOG);
rReq.Ignore ();
}
break;
-
case SID_ALIGN_ANY_LEFT :
case SID_ALIGN_ANY_HCENTER :
case SID_ALIGN_ANY_RIGHT :