xref: /aoo42x/main/sw/source/ui/uiview/view0.cxx (revision 7a32b0c8)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sw.hxx"
26 
27 
28 
29 #include "hintids.hxx"
30 #include <vcl/graph.hxx>
31 #include <svx/galbrws.hxx>
32 #include <svl/srchitem.hxx>
33 #include <SwSpellDialogChildWindow.hxx>
34 #include <svl/eitem.hxx>
35 #include <unotools/linguprops.hxx>
36 #include <unotools/lingucfg.hxx>
37 #include <viewopt.hxx>
38 #include <globals.h>
39 #include <sfx2/app.hxx>
40 #include <sfx2/request.hxx>
41 #include <svl/whiter.hxx>
42 #include <svx/srchdlg.hxx>
43 #include <sfx2/templdlg.hxx>
44 #include <sfx2/viewfrm.hxx>
45 #include <sfx2/bindings.hxx>
46 #include <sfx2/sidebar/SidebarChildWindow.hxx>
47 #include <uivwimp.hxx>
48 #include <avmedia/mediaplayer.hxx>
49 //#include <swlinguconfig.hxx>
50 #include <swmodule.hxx>
51 
52 #include <sfx2/objface.hxx>
53 #include <navipi.hxx>
54 #include <wrtsh.hxx>
55 #include <edtwin.hxx>
56 #include "view.hxx"
57 #include "basesh.hxx"
58 #include "docsh.hxx"
59 #include "doc.hxx"
60 #include "globals.hrc"
61 #include "cmdid.h"		 	// FN_		 ...
62 #include "globdoc.hxx"
63 #include "wview.hxx"
64 #include "shells.hrc"
65 
66 #define OLEObjects
67 #define SwView
68 #define Frames
69 #define Graphics
70 #define Tables
71 #define Controls
72 #define GlobalContents
73 #define Text
74 #define Frame
75 #define Graphic
76 #define Object
77 #define Draw
78 #define TextDrawText
79 #define TextInTable
80 #define ListInText
81 #define ListInTable
82 #define WebTextInTable
83 #define WebListInText
84 #define WebListInTable
85 #define TextPage
86 #include <sfx2/msg.hxx>
87 #include "swslots.hxx"
88 #include <PostItMgr.hxx>
89 
90 
91 using namespace ::com::sun::star;
92 using ::rtl::OUString;
93 
94 #include <unotools/moduleoptions.hxx>
95 
96 #include <IDocumentSettingAccess.hxx>
97 
98 #include <unomid.h>
99 
100 SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default")
101 {
102     if ( SvtModuleOptions().IsWriter() )
103     {
104         SFX_VIEW_REGISTRATION(SwDocShell);
105         SFX_VIEW_REGISTRATION(SwGlobalDocShell);
106     }
107 }
108 
109 SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) )
110 {
111 	SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR);
112 	SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
113 	SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
114 	SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId());
115 	SFX_CHILDWINDOW_REGISTRATION(SvxSearchDialogWrapper::GetChildWindowId());
116     SFX_CHILDWINDOW_REGISTRATION(SwSpellDialogChildWindow::GetChildWindowId());
117     SFX_CHILDWINDOW_REGISTRATION(FN_REDLINE_ACCEPT);
118 	SFX_CHILDWINDOW_REGISTRATION(SID_HYPERLINK_DIALOG);
119 	SFX_CHILDWINDOW_REGISTRATION(GalleryChildWindow::GetChildWindowId());
120 	SFX_CHILDWINDOW_REGISTRATION(::avmedia::MediaPlayer::GetChildWindowId());
121     SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD_DATA_ONLY);
122         SFX_FEATURED_CHILDWINDOW_REGISTRATION(FN_SYNC_LABELS,           CHILDWIN_LABEL    );
123         SFX_FEATURED_CHILDWINDOW_REGISTRATION(FN_MAILMERGE_CHILDWINDOW, CHILDWIN_MAILMERGE);
124 //    SFX_CHILDWINDOW_REGISTRATION(FN_MAILMERGE_SENDMAIL_CHILDWINDOW);
125     SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_TOOLS|
126 								SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
127 								SW_RES(RID_TOOLS_TOOLBOX) );
128 }
129 
130 TYPEINIT1(SwView,SfxViewShell)
131 
132 /*-----------------13.12.97 11:06-------------------
133 
134 --------------------------------------------------*/
135 ShellModes	SwView::GetShellMode()
136 {
137 	return pViewImpl->GetShellMode();
138 }
139 
140 /*-----------------13.12.97 11:28-------------------
141 
142 --------------------------------------------------*/
143 view::XSelectionSupplier* SwView::GetUNOObject()
144 {
145 	return pViewImpl->GetUNOObject();
146 }
147 /* -----------------------------06.05.2002 13:18------------------------------
148 
149  ---------------------------------------------------------------------------*/
150 void SwView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions)
151 {
152     pWrtShell->ApplyAccessiblityOptions(rAccessibilityOptions);
153     //to enable the right state of the selection cursor in readonly documents
154     if(GetDocShell()->IsReadOnly())
155         pWrtShell->ShowCrsr();
156 
157 }
158 /*-- 26.05.2004 09:14:25---------------------------------------------------
159 
160   -----------------------------------------------------------------------*/
161 void   SwView::SetMailMergeConfigItem(SwMailMergeConfigItem*  pConfigItem,
162                 sal_uInt16 nRestart, sal_Bool bIsSource)
163 {
164     pViewImpl->SetMailMergeConfigItem(pConfigItem, nRestart, bIsSource);
165     UIFeatureChanged();
166 }
167 /*-- 26.05.2004 09:14:25---------------------------------------------------
168 
169   -----------------------------------------------------------------------*/
170 SwMailMergeConfigItem*  SwView::GetMailMergeConfigItem()
171 {
172     return pViewImpl->GetMailMergeConfigItem();
173 }
174 /*-- 26.05.2004 09:14:25---------------------------------------------------
175 
176   -----------------------------------------------------------------------*/
177 sal_uInt16 SwView::GetMailMergeRestartPage() const
178 {
179     return pViewImpl->GetMailMergeRestartPage();
180 }
181 /*-- 03.09.2004 11:56:33---------------------------------------------------
182 
183   -----------------------------------------------------------------------*/
184 sal_Bool SwView::IsMailMergeSourceView() const
185 {
186     return pViewImpl->IsMailMergeSourceView();
187 }
188 /*-- 12.04.2006 11:51:40---------------------------------------------------
189 
190   -----------------------------------------------------------------------*/
191 sal_Bool lcl_IsViewMarks( const SwViewOption& rVOpt )
192 {
193     return  rVOpt.IsHardBlank() &&
194             rVOpt.IsSoftHyph() &&
195             SwViewOption::IsFieldShadings();
196 }
197 void lcl_SetViewMarks(SwViewOption& rVOpt, sal_Bool bOn )
198 {
199     rVOpt.SetHardBlank(bOn);
200     rVOpt.SetSoftHyph(bOn);
201     SwViewOption::SetAppearanceFlag(
202             VIEWOPT_FIELD_SHADINGS, bOn, sal_True);
203 }
204 
205 void lcl_SetViewMetaChars( SwViewOption& rVOpt, sal_Bool bOn)
206 {
207     rVOpt.SetViewMetaChars( bOn );
208     if(bOn && !(rVOpt.IsParagraph()     ||
209             rVOpt.IsTab()       ||
210             rVOpt.IsLineBreak() ||
211             rVOpt.IsShowHiddenChar() ||
212             rVOpt.IsBlank()))
213     {
214         rVOpt.SetParagraph(bOn);
215         rVOpt.SetTab(bOn);
216         rVOpt.SetLineBreak(bOn);
217         rVOpt.SetBlank(bOn);
218         rVOpt.SetShowHiddenChar(bOn);
219     }
220 }
221 
222 void SwView::RecheckBrowseMode()
223 {
224     // OS: numerische Reihenfolge beachten!
225     static sal_uInt16 __READONLY_DATA aInva[] =
226         {
227             //SID_NEWWINDOW,/*5620*/
228             SID_BROWSER_MODE, /*6313*/
229             SID_RULER_BORDERS, SID_RULER_PAGE_POS,
230             //SID_ATTR_LONG_LRSPACE,
231             SID_HTML_MODE,
232             SID_RULER_PROTECT,
233             //SID_AUTOSPELL_CHECK,
234             //SID_AUTOSPELL_MARKOFF,
235             FN_RULER,      	/*20211*/
236             FN_VIEW_GRAPHIC,    /*20213*/
237             FN_VIEW_BOUNDS,   	/**/
238             FN_VIEW_FIELDS,     /*20215*/
239             FN_VLINEAL,             /*20216*/
240             FN_VSCROLLBAR,      /*20217*/
241             FN_HSCROLLBAR,      /*20218*/
242             FN_VIEW_META_CHARS, /**/
243             FN_VIEW_MARKS,     	/**/
244             //FN_VIEW_FIELDNAME, 	/**/
245             FN_VIEW_TABLEGRID,  /*20227*/
246             FN_PRINT_LAYOUT, /*20237*/
247             FN_QRY_MERGE,   /*20364*/
248             FN_SHADOWCURSOR, /**/
249             0
250         };
251     // the view must not exist!
252     GetViewFrame()->GetBindings().Invalidate(aInva);
253     CheckVisArea();
254 
255     SvxZoomType eType;
256     if( GetWrtShell().GetViewOptions()->getBrowseMode() && SVX_ZOOM_PERCENT != (eType = (SvxZoomType)
257         GetWrtShell().GetViewOptions()->GetZoomType()) )
258         SetZoom( eType );
259     InvalidateBorder();
260 }
261 
262 /*--------------------------------------------------------------------
263     State of view options
264  --------------------------------------------------------------------*/
265 void SwView::StateViewOptions(SfxItemSet &rSet)
266 {
267     SfxWhichIter aIter(rSet);
268     sal_uInt16 nWhich = aIter.FirstWhich();
269     SfxBoolItem aBool;
270     const SwViewOption* pOpt = GetWrtShell().GetViewOptions();
271     const IDocumentSettingAccess* pIDSA = GetDocShell()->getIDocumentSettingAccess();
272 
273     while(nWhich)
274     {
275         sal_Bool bReadonly = GetDocShell()->IsReadOnly();
276         if ( bReadonly && nWhich != FN_VIEW_GRAPHIC )
277         {
278             rSet.DisableItem(nWhich);
279             nWhich = 0;
280         }
281         switch(nWhich)
282         {
283             case FN_RULER:
284             {
285                 if(!pOpt->IsViewHRuler(sal_True) && !pOpt->IsViewVRuler(sal_True))
286                 {
287                     rSet.DisableItem(nWhich);
288                     nWhich = 0;
289                 }
290                 else
291                     aBool.SetValue( pOpt->IsViewAnyRuler());
292             }
293             break;
294             case SID_BROWSER_MODE:
295             case FN_PRINT_LAYOUT:
296 			{
297                 sal_Bool bState = pOpt->getBrowseMode();
298                 if(FN_PRINT_LAYOUT == nWhich)
299                     bState = !bState;
300                 aBool.SetValue( bState );
301 			}
302 			break;
303             case FN_VIEW_BOUNDS:
304                 aBool.SetValue( SwViewOption::IsDocBoundaries()); break;
305             case FN_VIEW_GRAPHIC:
306                 aBool.SetValue( !pOpt->IsGraphic() ); break;
307             case FN_VIEW_FIELDS:
308                 aBool.SetValue( SwViewOption::IsFieldShadings() ); break;
309             case FN_VIEW_FIELDNAME:
310                 aBool.SetValue( pOpt->IsFldName() ); break;
311             case FN_VIEW_MARKS:
312                 aBool.SetValue( lcl_IsViewMarks(*pOpt) ); break;
313             case FN_VIEW_META_CHARS:
314                 aBool.SetValue( pOpt->IsViewMetaChars() ); break;
315             case FN_VIEW_TABLEGRID:
316                 aBool.SetValue( SwViewOption::IsTableBoundaries() ); break;
317 			case FN_VIEW_NOTES:
318 			{
319 				aBool.SetValue( pOpt->IsPostIts());
320 				if (!GetPostItMgr()->HasNotes())
321 				{
322 					aBool.SetWhich( nWhich );
323 					rSet.Put( aBool );
324 					rSet.DisableItem(nWhich);
325 					nWhich = 0;
326 				}
327 				break;
328 			}
329 			case FN_VIEW_HIDDEN_PARA:
330                 aBool.SetValue( pOpt->IsShowHiddenPara()); break;
331             case SID_GRID_VISIBLE:
332                 aBool.SetValue( pOpt->IsGridVisible() ); break;
333             case SID_GRID_USE:
334                 aBool.SetValue( pOpt->IsSnap() ); break;
335             case SID_HELPLINES_MOVE:
336                 aBool.SetValue( pOpt->IsCrossHair() ); break;
337             case FN_VIEW_SMOOTH_SCROLL:
338                 aBool.SetValue( pOpt->IsSmoothScroll()); break;
339             case FN_VLINEAL:
340                 aBool.SetValue( 0 != StatVLineal() ); break;
341             case FN_HSCROLLBAR:
342                 if( pOpt->getBrowseMode() )
343                 {
344                     rSet.DisableItem(nWhich);
345                     nWhich = 0;
346                 }
347                 else
348                     aBool.SetValue( IsHScrollbarVisible() ); break;
349             case FN_VSCROLLBAR:
350                 aBool.SetValue( IsVScrollbarVisible() ); break;
351             case SID_AUTOSPELL_CHECK:
352                 aBool.SetValue( pOpt->IsOnlineSpell() );
353             break;
354             case FN_SHADOWCURSOR:
355                 if (pIDSA == 0 || pOpt->getBrowseMode() )
356                 {
357                     rSet.DisableItem( nWhich );
358                     nWhich = 0;
359                 }
360                 else
361                     aBool.SetValue( pOpt->IsShadowCursor() );
362             break;
363 
364         }
365 
366         if( nWhich )
367         {
368             aBool.SetWhich( nWhich );
369             rSet.Put( aBool );
370         }
371         nWhich = aIter.NextWhich();
372     }
373 }
374 
375 /*--------------------------------------------------------------------
376     execute view options
377  --------------------------------------------------------------------*/
378 void SwView::ExecViewOptions(SfxRequest &rReq)
379 {
380     SwViewOption* pOpt = new SwViewOption( *GetWrtShell().GetViewOptions() );
381     sal_Bool bModified = GetWrtShell().IsModified();
382 
383     int eState = STATE_TOGGLE;
384     sal_Bool bSet = sal_False;
385     bool bBrowseModeChanged = false;
386 
387     const SfxItemSet *pArgs = rReq.GetArgs();
388     sal_uInt16 nSlot = rReq.GetSlot();
389     const SfxPoolItem* pAttr=NULL;
390 
391     if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nSlot , sal_False, &pAttr ))
392     {
393         bSet = ((SfxBoolItem*)pAttr)->GetValue();
394         eState = bSet ? STATE_ON : STATE_OFF;
395     }
396 
397     sal_Bool bFlag = STATE_ON == eState;
398     uno::Reference< beans::XPropertySet >  xLngProp( ::GetLinguPropertySet() );
399 
400     switch ( nSlot )
401     {
402         case FN_VIEW_GRAPHIC:
403 
404                 if( STATE_TOGGLE == eState )
405                     bFlag = !pOpt->IsGraphic();
406                 pOpt->SetGraphic( bFlag );
407                 break;
408 
409         case FN_VIEW_FIELDS:
410                 if( STATE_TOGGLE == eState )
411                     bFlag = !SwViewOption::IsFieldShadings() ;
412                 SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, sal_True );
413                 break;
414 
415         case FN_VIEW_BOUNDS:
416                 if( STATE_TOGGLE == eState )
417                     bFlag = !SwViewOption::IsDocBoundaries();
418                 SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, sal_True );
419                 break;
420 
421         case SID_GRID_VISIBLE:
422                 if( STATE_TOGGLE == eState )
423                     bFlag = !pOpt->IsGridVisible();
424 
425                 pOpt->SetGridVisible( bFlag );
426                 break;
427 
428         case SID_GRID_USE:
429                 if( STATE_TOGGLE == eState )
430                     bFlag = !pOpt->IsSnap();
431 
432                 pOpt->SetSnap( bFlag );
433                 break;
434 
435         case SID_HELPLINES_MOVE:
436                 if( STATE_TOGGLE == eState )
437                     bFlag = !pOpt->IsCrossHair();
438 
439                 pOpt->SetCrossHair( bFlag );
440                 break;
441 
442         case SID_BROWSER_MODE:
443         case FN_PRINT_LAYOUT:
444                 if( STATE_TOGGLE == eState )
445                     bFlag = !pOpt->getBrowseMode();
446                 else if( nSlot == FN_PRINT_LAYOUT )
447                     bFlag = !bFlag;
448                 bBrowseModeChanged = bFlag != pOpt->getBrowseMode();
449                 // Disable "multiple layout"
450                 GetDocShell()->ToggleBrowserMode( bFlag, this );
451 
452                 pOpt->setBrowseMode( bFlag );
453                 break;
454 
455 	case FN_VIEW_NOTES:
456                 if ( STATE_TOGGLE == eState )
457                     bFlag = !pOpt->IsPostIts();
458 
459 				GetPostItMgr()->SetLayout();
460                 pOpt->SetPostIts( bFlag );
461                	if (pOpt->IsPostIts())
462 			GetPostItMgr()->CheckMetaText();
463 		 break;
464 
465         case FN_VIEW_HIDDEN_PARA:
466                 if ( STATE_TOGGLE == eState )
467                     bFlag = !pOpt->IsShowHiddenPara();
468 
469                 pOpt->SetShowHiddenPara( bFlag );
470                 break;
471 
472         case FN_VIEW_SMOOTH_SCROLL:
473 
474                 if ( STATE_TOGGLE == eState )
475                     bFlag = !pOpt->IsSmoothScroll();
476 
477                 pOpt->SetSmoothScroll( bFlag );
478                 break;
479 
480 
481         case FN_VLINEAL:
482                 if( STATE_TOGGLE == eState )
483                     bFlag = !pOpt->IsViewVRuler();
484 
485                 pOpt->SetViewVRuler( bFlag );
486                 break;
487 
488         case FN_VSCROLLBAR:
489                 if( STATE_TOGGLE == eState )
490                     bFlag = !pOpt->IsViewVScrollBar();
491 
492                 pOpt->SetViewVScrollBar( bFlag );
493                 break;
494 
495         case FN_HSCROLLBAR:
496                 if( STATE_TOGGLE == eState )
497                     bFlag = !pOpt->IsViewHScrollBar();
498 
499                 pOpt->SetViewHScrollBar( bFlag );
500                 break;
501         case FN_RULER:
502                 if( STATE_TOGGLE == eState )
503                     bFlag = !pOpt->IsViewAnyRuler();
504 
505                 pOpt->SetViewAnyRuler( bFlag );
506                 break;
507 
508         case FN_VIEW_TABLEGRID:
509                 if( STATE_TOGGLE == eState )
510                     bFlag = !SwViewOption::IsTableBoundaries();
511                 SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, sal_True );
512                 break;
513 
514         case FN_VIEW_FIELDNAME:
515                 if( STATE_TOGGLE == eState )
516                     bFlag = !pOpt->IsFldName() ;
517 
518                 pOpt->SetFldName( bFlag );
519                 break;
520         case FN_VIEW_MARKS:
521                 if( STATE_TOGGLE == eState )
522                     bFlag = !lcl_IsViewMarks(*pOpt) ;
523 
524                 lcl_SetViewMarks( *pOpt, bFlag );
525                 break;
526         case FN_VIEW_META_CHARS:
527                 if( STATE_TOGGLE == eState )
528                     bFlag = !pOpt->IsViewMetaChars();
529 
530                 lcl_SetViewMetaChars( *pOpt, bFlag );
531         break;
532         case SID_AUTOSPELL_CHECK:
533             if( STATE_TOGGLE == eState )
534                 bFlag = bSet = !pOpt->IsOnlineSpell();
535 
536             pOpt->SetOnlineSpell(bSet);
537             {
538                 uno::Any aVal( &bSet, ::getCppuBooleanType() );
539                 String aPropName( C2S(UPN_IS_SPELL_AUTO) );
540 
541                 SvtLinguConfig  aCfg;
542                 aCfg.SetProperty( aPropName, aVal );
543 
544                 if (xLngProp.is())
545                     xLngProp->setPropertyValue( aPropName, aVal );
546 
547                 // for the time being we do not have a specific option for grammarchecking.
548                 // thus we'll use the one for spell checking...
549                 if (bSet)
550                 {
551                     SwDocShell *pDocSh = GetDocShell();
552                     SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : NULL;
553 
554                     // right now we don't have view options for automatic grammar checking. Thus...
555                     sal_Bool bIsAutoGrammar = sal_False;
556                     aCfg.GetProperty( C2U( UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar;
557 
558                     if (pDoc && bIsAutoGrammar)
559                         StartGrammarChecking( *pDoc );
560                 }
561             }
562         break;
563         case FN_SHADOWCURSOR:
564             if( STATE_TOGGLE == eState )
565                 bFlag = bSet = !pOpt->IsShadowCursor();
566 
567             pOpt->SetShadowCursor(bSet);
568         break;
569 
570         default:
571             ASSERT(sal_False, Falsche Request-Methode);
572             return;
573     }
574 
575     // UserPrefs setzen Request als bearbeitet kennzeichnen
576     sal_Bool bWebView =  0 != dynamic_cast<const SwWebView*>(this);
577     SwWrtShell &rSh = GetWrtShell();
578     rSh.StartAction();
579     SwModule* pModule = SW_MOD();
580     if( !(*rSh.GetViewOptions() == *pOpt ))
581     {
582         rSh.ApplyViewOptions( *pOpt );
583         if( bBrowseModeChanged )
584         {
585             RecheckBrowseMode();
586             CheckVisArea();
587         }
588 
589         //Die UsrPref muessen als Modified gekennzeichnet werden.
590         //call for initialization
591         pModule->GetUsrPref(bWebView);
592         pModule->CheckSpellChanges( pOpt->IsOnlineSpell(), sal_False, sal_False, sal_False );
593     }
594     //OS:   Modified wieder zuruecksetzen, weil Ansicht/Felder
595     //      das Doc modified setzt.
596     if( !bModified )
597         rSh.ResetModified();
598 
599     pModule->ApplyUsrPref( *pOpt, this, bWebView ? VIEWOPT_DEST_WEB : VIEWOPT_DEST_TEXT );
600 
601 	//mod #i6193# let postits know about new spellcheck setting
602     if ( nSlot == SID_AUTOSPELL_CHECK )
603 		GetPostItMgr()->SetSpellChecking();
604 
605     const sal_Bool bLockedView = rSh.IsViewLocked();
606     rSh.LockView( sal_True );    //lock visible section
607     GetWrtShell().EndAction();
608     if( bBrowseModeChanged && !bFlag )
609         CalcVisArea( GetEditWin().GetOutputSizePixel() );
610     rSh.LockView( bLockedView );
611 
612     delete pOpt;
613     Invalidate(rReq.GetSlot());
614     if(!pArgs)
615         rReq.AppendItem(SfxBoolItem(nSlot, (sal_Bool)bFlag));
616     rReq.Done();
617 }
618 
619 IMPL_LINK( SwView, HtmlOptionsHdl, void*, EMPTYARG )
620 {
621 	// Invalidierung, falls blinkender Text erlaubt/verboten wurde
622     GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE);
623     return 0;
624 }
625