LibreOffice Module sw (master)  1
view0.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <config_features.h>
21 
23 #include <svl/eitem.hxx>
24 #include <unotools/configmgr.hxx>
25 #include <unotools/linguprops.hxx>
26 #include <unotools/lingucfg.hxx>
27 #include <viewopt.hxx>
28 #include <globals.h>
29 #include <sfx2/infobar.hxx>
30 #include <sfx2/request.hxx>
31 #include <svl/whiter.hxx>
32 #include <svx/srchdlg.hxx>
33 #include <sfx2/viewfrm.hxx>
34 #include <sfx2/bindings.hxx>
36 #include <uivwimp.hxx>
37 #include <avmedia/mediaplayer.hxx>
38 #include <swmodule.hxx>
39 #include <com/sun/star/linguistic2/XLinguProperties.hpp>
40 #include <osl/diagnose.h>
41 
42 #include <sfx2/objface.hxx>
43 #include <wrtsh.hxx>
44 #include <edtwin.hxx>
45 #include <view.hxx>
46 #include <docsh.hxx>
47 #include <doc.hxx>
48 #include <globals.hrc>
49 #include <cmdid.h>
50 #include <globdoc.hxx>
51 #include <wview.hxx>
52 
53 #define ShellClass_SwView
54 #define ShellClass_Text
55 #define ShellClass_TextDrawText
56 
57 #include <sfx2/msg.hxx>
58 #include <swslots.hxx>
59 #include <PostItMgr.hxx>
60 
61 #include <ndtxt.hxx>
62 
63 using namespace ::com::sun::star;
64 
66 #include <sfx2/viewfac.hxx>
67 
68 #include <memory>
69 #include <swabstdlg.hxx>
70 
72 {
73  if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsWriter())
74  {
77  }
78 }
79 
81 
82 void SwView::InitInterface_Impl()
83 {
84  GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
85 
86  GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
87 
88  GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
89  GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
90  GetStaticInterface()->RegisterChildWindow(SwSpellDialogChildWindow::GetChildWindowId());
91  GetStaticInterface()->RegisterChildWindow(FN_REDLINE_ACCEPT);
92  GetStaticInterface()->RegisterChildWindow(SID_HYPERLINK_DIALOG);
93  GetStaticInterface()->RegisterChildWindow(FN_WORDCOUNT_DIALOG);
94 #if HAVE_FEATURE_AVMEDIA
95  GetStaticInterface()->RegisterChildWindow(::avmedia::MediaPlayer::GetChildWindowId());
96 #endif
97  GetStaticInterface()->RegisterChildWindow(FN_INSERT_FIELD_DATA_ONLY);
98 
99  GetStaticInterface()->RegisterChildWindow(FN_SYNC_LABELS, false, SfxShellFeature::SwChildWindowLabel);
100 
101  GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
102  ToolbarId::Tools_Toolbox);
103 }
104 
105 
107 {
108  return m_pViewImpl->GetShellMode();
109 }
110 
111 view::XSelectionSupplier* SwView::GetUNOObject()
112 {
113  return m_pViewImpl->GetUNOObject();
114 }
115 
117 {
118  m_pWrtShell->ApplyAccessibilityOptions(rAccessibilityOptions);
119  //to enable the right state of the selection cursor in readonly documents
120  if(GetDocShell()->IsReadOnly())
121  m_pWrtShell->ShowCursor();
122 
123 }
124 
125 void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem> const & rConfigItem)
126 {
127  m_pViewImpl->SetMailMergeConfigItem(rConfigItem);
129 }
130 
131 std::shared_ptr<SwMailMergeConfigItem> const & SwView::GetMailMergeConfigItem() const
132 {
133  return m_pViewImpl->GetMailMergeConfigItem();
134 }
135 
136 static bool lcl_IsViewMarks( const SwViewOption& rVOpt )
137 {
138  return rVOpt.IsHardBlank() &&
139  rVOpt.IsSoftHyph() &&
141 }
142 static void lcl_SetViewMarks(SwViewOption& rVOpt, bool bOn )
143 {
144  rVOpt.SetHardBlank(bOn);
145  rVOpt.SetSoftHyph(bOn);
147  ViewOptFlags::FieldShadings, bOn, true);
148 }
149 
150 static void lcl_SetViewMetaChars( SwViewOption& rVOpt, bool bOn)
151 {
152  rVOpt.SetViewMetaChars( bOn );
153  if(bOn && !(rVOpt.IsParagraph() ||
154  rVOpt.IsTab() ||
155  rVOpt.IsLineBreak() ||
156  rVOpt.IsShowHiddenChar() ||
157  rVOpt.IsShowBookmarks() ||
158  rVOpt.IsBlank()))
159  {
160  rVOpt.SetParagraph(bOn);
161  rVOpt.SetTab(bOn);
162  rVOpt.SetLineBreak(bOn);
163  rVOpt.SetBlank(bOn);
164  rVOpt.SetShowHiddenChar(bOn);
165  rVOpt.SetShowBookmarks(bOn);
166  }
167 }
168 
170 {
171  // OS: pay attention to numerical order!
172  static sal_uInt16 const aInva[] =
173  {
174  //SID_NEWWINDOW,/*5620*/
175  SID_BROWSER_MODE, /*6313*/
176  SID_RULER_BORDERS, SID_RULER_PAGE_POS,
177  //SID_ATTR_LONG_LRSPACE,
178  SID_HTML_MODE,
179  SID_RULER_PROTECT, /* 10915 */
180  //SID_AUTOSPELL_CHECK,
181  //SID_AUTOSPELL_MARKOFF,
182  SID_TOGGLE_RESOLVED_NOTES, /* 11672*/
183  FN_RULER, /*20211*/
184  FN_VIEW_GRAPHIC, /*20213*/
186  FN_VIEW_FIELDS, /*20215*/
187  FN_VLINEAL, /*20216*/
188  FN_VSCROLLBAR, /*20217*/
189  FN_HSCROLLBAR, /*20218*/
191  FN_VIEW_MARKS,
192  //FN_VIEW_FIELDNAME, /**/
193  FN_VIEW_TABLEGRID, /*20227*/
194  FN_PRINT_LAYOUT, /*20237*/
195  FN_QRY_MERGE, /*20364*/
197  0
198  };
199  // the view must not exist!
200  GetViewFrame()->GetBindings().Invalidate(aInva);
201  CheckVisArea();
202 
204  if( GetWrtShell().GetViewOptions()->getBrowseMode() && SvxZoomType::PERCENT != (eType =
205  GetWrtShell().GetViewOptions()->GetZoomType()) )
206  SetZoom( eType );
208 }
209 
210 // State of view options
211 
213 {
214  SfxWhichIter aIter(rSet);
215  sal_uInt16 nWhich = aIter.FirstWhich();
216  SfxBoolItem aBool;
217  const SwViewOption* pOpt = GetWrtShell().GetViewOptions();
218 
219  while(nWhich)
220  {
221  bool bReadonly = GetDocShell()->IsReadOnly();
222  if ( bReadonly && nWhich != FN_VIEW_GRAPHIC )
223  {
224  rSet.DisableItem(nWhich);
225  nWhich = 0;
226  }
227  switch(nWhich)
228  {
229  case FN_RULER:
230  {
231  if(!pOpt->IsViewHRuler(true) && !pOpt->IsViewVRuler(true))
232  {
233  rSet.DisableItem(nWhich);
234  nWhich = 0;
235  }
236  else
237  aBool.SetValue( pOpt->IsViewAnyRuler());
238  }
239  break;
240  case SID_BROWSER_MODE:
241  case FN_PRINT_LAYOUT:
242  {
243  bool bState = pOpt->getBrowseMode();
244  if(FN_PRINT_LAYOUT == nWhich)
245  bState = !bState;
246  aBool.SetValue( bState );
247  }
248  break;
249  case FN_VIEW_BOUNDS:
250  aBool.SetValue( SwViewOption::IsDocBoundaries()); break;
251  case FN_VIEW_GRAPHIC:
252  aBool.SetValue( pOpt->IsGraphic() ); break;
253  case FN_VIEW_FIELDS:
254  aBool.SetValue( SwViewOption::IsFieldShadings() ); break;
255  case FN_VIEW_FIELDNAME:
256  aBool.SetValue( pOpt->IsFieldName() ); break;
257  case FN_VIEW_MARKS:
258  aBool.SetValue( lcl_IsViewMarks(*pOpt) ); break;
259  case FN_VIEW_META_CHARS:
260  aBool.SetValue( pOpt->IsViewMetaChars() ); break;
261  case FN_VIEW_TABLEGRID:
262  aBool.SetValue( SwViewOption::IsTableBoundaries() ); break;
263  case SID_TOGGLE_NOTES:
264  {
265  if (!GetPostItMgr()->HasNotes())
266  {
267  rSet.DisableItem(nWhich);
268  nWhich = 0;
269  }
270  else
271  aBool.SetValue( pOpt->IsPostIts());
272  break;
273  }
274  case SID_TOGGLE_RESOLVED_NOTES:
275  {
276  if (!GetPostItMgr()->HasNotes())
277  {
278  rSet.DisableItem(nWhich);
279  nWhich = 0;
280  }
281  else
282  aBool.SetValue( pOpt->IsResolvedPostIts());
283  break;
284  }
285  case FN_VIEW_HIDDEN_PARA:
286  aBool.SetValue( pOpt->IsShowHiddenPara()); break;
288  {
289  if (pOpt->getBrowseMode() || !pOpt->CanHideWhitespace())
290  {
291  rSet.DisableItem(nWhich);
292  nWhich = 0;
293  }
294  else
295  aBool.SetValue(pOpt->IsHideWhitespaceMode());
296  break;
297  }
299  {
300  aBool.SetValue(!pOpt->IsHideWhitespaceMode());
301  break;
302  }
303  case SID_GRID_VISIBLE:
304  aBool.SetValue( pOpt->IsGridVisible() ); break;
305  case SID_GRID_USE:
306  aBool.SetValue( pOpt->IsSnap() ); break;
307  case SID_HELPLINES_MOVE:
308  aBool.SetValue( pOpt->IsCrossHair() ); break;
310  aBool.SetValue( pOpt->IsSmoothScroll()); break;
311  case FN_VLINEAL:
312  aBool.SetValue( StatVRuler() ); break;
313  case FN_HSCROLLBAR:
314  if( pOpt->getBrowseMode() )
315  {
316  rSet.DisableItem(nWhich);
317  nWhich = 0;
318  }
319  else
320  aBool.SetValue( IsHScrollbarVisible() );
321  break;
322  case FN_VSCROLLBAR:
323  aBool.SetValue( IsVScrollbarVisible() ); break;
324  case SID_AUTOSPELL_CHECK:
325  aBool.SetValue( pOpt->IsOnlineSpell() );
326  break;
327  case FN_SHADOWCURSOR:
328  if ( pOpt->getBrowseMode() )
329  {
330  rSet.DisableItem( nWhich );
331  nWhich = 0;
332  }
333  else
334  aBool.SetValue( pOpt->IsShadowCursor() );
335  break;
337  aBool.SetValue( pOpt->IsShowInlineTooltips() );
338  break;
340  aBool.SetValue( pOpt->IsUseHeaderFooterMenu() );
341  break;
344  break;
346  aBool.SetValue( pOpt->IsShowChangesInMargin() );
347  break;
348  }
349 
350  if( nWhich )
351  {
352  aBool.SetWhich( nWhich );
353  rSet.Put( aBool );
354  }
355  nWhich = aIter.NextWhich();
356  }
357 }
358 
359 // execute view options
360 
362 {
363  std::optional<SwViewOption> pOpt( *GetWrtShell().GetViewOptions() );
364  bool bModified = GetWrtShell().IsModified();
365 
366  int eState = STATE_TOGGLE;
367  bool bSet = false;
368  bool bBrowseModeChanged = false;
369 
370  const SfxItemSet *pArgs = rReq.GetArgs();
371  sal_uInt16 nSlot = rReq.GetSlot();
372  const SfxPoolItem* pAttr=nullptr;
373 
374  if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
375  {
376  bSet = static_cast<const SfxBoolItem*>(pAttr)->GetValue();
377  eState = bSet ? STATE_ON : STATE_OFF;
378  }
379 
380  bool bFlag = STATE_ON == eState;
381  uno::Reference< linguistic2::XLinguProperties > xLngProp( ::GetLinguPropertySet() );
382 
383  switch ( nSlot )
384  {
385  case FN_VIEW_GRAPHIC:
386  if( STATE_TOGGLE == eState )
387  bFlag = !pOpt->IsGraphic();
388  pOpt->SetGraphic( bFlag );
389  break;
390 
391  case FN_VIEW_FIELDS:
392  if( STATE_TOGGLE == eState )
393  bFlag = !SwViewOption::IsFieldShadings() ;
395  break;
396 
397  case FN_VIEW_BOUNDS:
398  if( STATE_TOGGLE == eState )
401  break;
402 
403  case SID_GRID_VISIBLE:
404  if( STATE_TOGGLE == eState )
405  bFlag = !pOpt->IsGridVisible();
406 
407  pOpt->SetGridVisible( bFlag );
408  break;
409 
410  case SID_GRID_USE:
411  if( STATE_TOGGLE == eState )
412  bFlag = !pOpt->IsSnap();
413 
414  pOpt->SetSnap( bFlag );
415  break;
416 
417  case SID_HELPLINES_MOVE:
418  if( STATE_TOGGLE == eState )
419  bFlag = !pOpt->IsCrossHair();
420 
421  pOpt->SetCrossHair( bFlag );
422  break;
423 
424  case SID_BROWSER_MODE:
425  bBrowseModeChanged = !pOpt->getBrowseMode();
426  pOpt->setBrowseMode(true );
427  break;
428 
429  case FN_PRINT_LAYOUT:
430  bBrowseModeChanged = pOpt->getBrowseMode();
431  pOpt->setBrowseMode( false );
432  break;
433 
434  case SID_TOGGLE_NOTES:
435  if ( STATE_TOGGLE == eState )
436  bFlag = !pOpt->IsPostIts();
437 
438  GetPostItMgr()->SetLayout();
439  pOpt->SetPostIts( bFlag );
440  if (pOpt->IsPostIts())
442  break;
443 
444  case SID_TOGGLE_RESOLVED_NOTES:
445  if ( STATE_TOGGLE == eState )
446  bFlag = pOpt->IsResolvedPostIts();
447 
449 
450  GetPostItMgr()->SetLayout();
451  pOpt->SetResolvedPostIts( !bFlag );
452 
453  break;
454 
455  case FN_VIEW_HIDDEN_PARA:
456  if ( STATE_TOGGLE == eState )
457  bFlag = !pOpt->IsShowHiddenPara();
458 
459  pOpt->SetShowHiddenPara( bFlag );
460  break;
461 
463  if ( STATE_TOGGLE == eState )
464  bFlag = !pOpt->IsHideWhitespaceMode();
465 
466  pOpt->SetHideWhitespaceMode(bFlag);
467  break;
468 
470  if ( STATE_TOGGLE == eState )
471  bFlag = pOpt->IsHideWhitespaceMode();
472 
473  pOpt->SetHideWhitespaceMode(!bFlag);
474  break;
475 
477 
478  if ( STATE_TOGGLE == eState )
479  bFlag = !pOpt->IsSmoothScroll();
480 
481  pOpt->SetSmoothScroll( bFlag );
482  break;
483 
484  case FN_VLINEAL:
485  if( STATE_TOGGLE == eState )
486  bFlag = !pOpt->IsViewVRuler();
487 
488  pOpt->SetViewVRuler( bFlag );
489  break;
490 
491  case FN_VSCROLLBAR:
492  if( STATE_TOGGLE == eState )
493  bFlag = !pOpt->IsViewVScrollBar();
494 
495  pOpt->SetViewVScrollBar( bFlag );
496  break;
497 
498  case FN_HSCROLLBAR:
499  if( STATE_TOGGLE == eState )
500  bFlag = !pOpt->IsViewHScrollBar();
501 
502  pOpt->SetViewHScrollBar( bFlag );
503  break;
504 
505  case FN_RULER:
506  if( STATE_TOGGLE == eState )
507  bFlag = !pOpt->IsViewAnyRuler();
508 
509  pOpt->SetViewAnyRuler( bFlag );
510  break;
511 
512  case FN_VIEW_TABLEGRID:
513  if( STATE_TOGGLE == eState )
516  break;
517 
518  case FN_VIEW_FIELDNAME:
519  if( STATE_TOGGLE == eState )
520  bFlag = !pOpt->IsFieldName() ;
521 
522  pOpt->SetFieldName( bFlag );
523  break;
524 
525  case FN_VIEW_MARKS:
526  if( STATE_TOGGLE == eState )
527  bFlag = !lcl_IsViewMarks(*pOpt) ;
528 
529  lcl_SetViewMarks( *pOpt, bFlag );
530  break;
531 
532  case FN_VIEW_META_CHARS:
533  if( STATE_TOGGLE == eState )
534  bFlag = !pOpt->IsViewMetaChars();
535 
536  lcl_SetViewMetaChars( *pOpt, bFlag );
537  break;
538 
539  case SID_AUTOSPELL_CHECK:
540  const SfxPoolItem* pItem;
541 
542  if (pArgs && pArgs->HasItem(FN_PARAM_1, &pItem))
543  bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
544  else if( STATE_TOGGLE == eState )
545  {
546  bFlag = !pOpt->IsOnlineSpell();
547  bSet = bFlag;
548  }
549 
550  pOpt->SetOnlineSpell(bSet);
551  {
552  SvtLinguConfig aCfg;
553  aCfg.SetProperty( UPN_IS_SPELL_AUTO, uno::makeAny( bSet ) );
554 
555  if (xLngProp.is())
556  xLngProp->setIsSpellAuto( bSet );
557 
558  // for the time being we do not have a specific option for grammarchecking.
559  // thus we'll use the one for spell checking...
560  if (bSet)
561  {
562  SwDocShell *pDocSh = GetDocShell();
563  SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
564 
565  // right now we don't have view options for automatic grammar checking. Thus...
566  bool bIsAutoGrammar = false;
567  aCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bIsAutoGrammar;
568 
569  if (pDoc && bIsAutoGrammar)
570  pDoc->StartGrammarChecking();
571  }
572  }
573  break;
574 
575  case FN_SHADOWCURSOR:
576  if( STATE_TOGGLE == eState )
577  {
578  bFlag = !pOpt->IsShadowCursor();
579  bSet = bFlag;
580  }
581 
582  pOpt->SetShadowCursor(bSet);
583  break;
584 
586  if( STATE_TOGGLE == eState )
587  bFlag = !pOpt->IsShowInlineTooltips();
588 
589  pOpt->SetShowInlineTooltips( bFlag );
590  break;
591 
593  if( STATE_TOGGLE == eState )
594  bFlag = !pOpt->IsUseHeaderFooterMenu();
595 
596  pOpt->SetUseHeaderFooterMenu( bFlag );
597  break;
598 
600  {
601  if( STATE_TOGGLE == eState )
602  bFlag = !pOpt->IsShowOutlineContentVisibilityButton();
603 
604  SwWrtShell &rSh = GetWrtShell();
605 
606  if (!bFlag) // Outline folding is being turned ON!
608 
609  pOpt->SetShowOutlineContentVisibilityButton(bFlag);
610 
611  // Apply option change here so if toggling the outline folding feature ON
612  // the invalidate function will see this.
613  rSh.StartAction();
614  rSh.ApplyViewOptions(*pOpt);
615  rSh.EndAction();
616 
617  if (bFlag) // Outline folding is being turned OFF!
619 
620  break;
621  }
622 
624  if( STATE_TOGGLE == eState )
625  bFlag = !pOpt->IsShowChangesInMargin();
626 
627  pOpt->SetShowChangesInMargin( bFlag );
628  break;
629 
630  default:
631  OSL_FAIL("wrong request method");
632  return;
633  }
634 
635  // Set UserPrefs, mark request as modified
636  bool bWebView = dynamic_cast<const SwWebView*>(this) != nullptr;
637  SwWrtShell &rSh = GetWrtShell();
638  rSh.StartAction();
639  SwModule* pModule = SW_MOD();
640  if( *rSh.GetViewOptions() != *pOpt )
641  {
642  rSh.ApplyViewOptions( *pOpt );
643  if( bBrowseModeChanged )
644  {
645  GetDocShell()->ToggleLayoutMode(this);
646  }
647 
648  // The UsrPref must be marked as modified.
649  // call for initialization
650  pModule->GetUsrPref(bWebView);
651  SwModule::CheckSpellChanges( pOpt->IsOnlineSpell(), false, false, false );
652  }
653  //OS: Set back modified again, because view/fields sets the Doc modified.
654  if( !bModified )
655  rSh.ResetModified();
656 
657  pModule->ApplyUsrPref( *pOpt, this, bWebView ? SvViewOpt::DestWeb : SvViewOpt::DestText );
658 
659  // #i6193# let postits know about new spellcheck setting
660  if ( nSlot == SID_AUTOSPELL_CHECK )
662 
663  const bool bLockedView = rSh.IsViewLocked();
664  rSh.LockView( true ); //lock visible section
666  if( bBrowseModeChanged && !bFlag )
667  CalcVisArea( GetEditWin().GetOutputSizePixel() );
668  rSh.LockView( bLockedView );
669 
670  pOpt.reset();
671  Invalidate(rReq.GetSlot());
672  if(!pArgs)
673  rReq.AppendItem(SfxBoolItem(nSlot, bFlag));
674  rReq.Done();
675 }
676 
678 {
681  pDlg->Execute();
682 }
683 
685 {
686  SfxItemSet aTmp(rPool, svl::Items<FN_PARAM_1, FN_PARAM_1>);
689  pDlg->Execute();
690 }
691 
692 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
static void lcl_SetViewMetaChars(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:150
void SetLineBreak(bool b)
Definition: viewopt.hxx:255
void UIFeatureChanged()
bool IsViewMetaChars() const
Definition: viewopt.hxx:375
bool IsSmoothScroll() const
Definition: viewopt.hxx:403
static void lcl_SetViewMarks(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:142
#define FN_VIEW_GRAPHIC
Definition: cmdid.h:152
void SetSoftHyph(bool b)
Definition: viewopt.hxx:266
void SetMailMergeConfigItem(std::shared_ptr< SwMailMergeConfigItem > const &rConfigItem)
Definition: view0.cxx:125
#define SFX_IMPL_INTERFACE(Class, SuperClass)
static bool IsDocBoundaries()
Definition: viewopt.hxx:665
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON
Definition: cmdid.h:187
std::shared_ptr< SwMailMergeConfigItem > const & GetMailMergeConfigItem() const
Definition: view0.cxx:131
bool IsViewAnyRuler() const
Definition: viewopt.hxx:581
std::string GetValue
std::unique_ptr< SwWrtShell > m_pWrtShell
Definition: view.hxx:193
void ToggleLayoutMode(SwView *pView)
Definition: docsh2.cxx:151
bool IsGraphic() const
Definition: viewopt.hxx:333
bool StatVRuler() const
Definition: view.hxx:490
bool IsPostIts() const
Definition: viewopt.hxx:273
bool IsModified() const
Changes in document?
Definition: edws.cxx:65
Definition: doc.hxx:188
sal_uInt16 FirstWhich()
bool IsHardBlank() const
Definition: viewopt.hxx:231
SwEditWin & GetEditWin()
Definition: view.hxx:416
void Done(bool bRemove=false)
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
Definition: apphdl.cxx:1045
void RecheckBrowseMode()
Definition: view0.cxx:169
virtual VclPtr< SfxAbstractTabDialog > CreateOutlineTabDialog(weld::Window *pParent, const SfxItemSet *pSwItemSet, SwWrtShell &)=0
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void SetHardBlank(bool b)
Definition: viewopt.hxx:233
bool IsShowHiddenPara() const
Definition: viewopt.hxx:397
#define FN_VSCROLLBAR
Definition: cmdid.h:156
void SetShowHiddenChar(bool b)
Definition: viewopt.hxx:325
sal_uInt16 NextWhich()
SwWrtShell & GetWrtShell() const
Definition: view.hxx:413
bool CanHideWhitespace() const
The rules that allow for hiding whitespace.
Definition: viewopt.hxx:487
void ShowHideResolvedNotes(bool visible)
Definition: PostItMgr.cxx:2466
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
static void CheckSpellChanges(bool bOnlineSpelling, bool bIsSpellWrongAgain, bool bIsSpellAllAgain, bool bSmartTags)
Definition: swmodul1.cxx:630
bool IsFieldName() const
Definition: viewopt.hxx:269
#define FN_SYNC_LABELS
Definition: cmdid.h:463
void InvalidateBorder()
void SetParagraph(bool b)
Definition: viewopt.hxx:239
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
bool getBrowseMode() const
Definition: viewopt.hxx:472
static bool IsFuzzing()
void ExecViewOptions(SfxRequest &)
Definition: view0.cxx:361
#define FN_VIEW_HIDE_WHITESPACE
Definition: cmdid.h:182
ShellMode
Definition: view.hxx:85
#define FN_RULER
Definition: cmdid.h:150
constexpr OUStringLiteral UPN_IS_GRAMMAR_AUTO
bool IsViewHRuler(bool bDirect=false) const
Definition: viewopt.hxx:592
#define FN_HSCROLLBAR
Definition: cmdid.h:157
bool IsBlank(bool bHard=false) const
Definition: viewopt.hxx:225
#define FN_INSERT_FIELD_DATA_ONLY
Definition: cmdid.h:212
#define FN_VIEW_MARKS
Definition: cmdid.h:160
bool IsShadowCursor() const
Definition: viewopt.hxx:621
DocumentType eType
bool IsShowOutlineContentVisibilityButton() const
Definition: viewopt.cxx:99
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
static void SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveInConfig=false)
Definition: viewopt.cxx:552
static bool lcl_IsViewMarks(const SwViewOption &rVOpt)
Definition: view0.cxx:136
bool IsCrossHair() const
Definition: viewopt.hxx:385
#define SW_MOD()
Definition: swmodule.hxx:256
virtual VclPtr< SfxAbstractTabDialog > CreateSwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rSh)=0
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define FN_VIEW_BOUNDS
Definition: cmdid.h:153
SFX_IMPL_NAMED_VIEWFACTORY(SwView,"Default")
Definition: view0.cxx:71
bool IsResolvedPostIts() const
Definition: viewopt.hxx:278
SfxBindings & GetBindings()
void SetTab(bool b)
Definition: viewopt.hxx:222
bool IsShowChangesInMargin() const
Definition: viewopt.hxx:294
bool IsParagraph(bool bHard=false) const
Definition: viewopt.hxx:236
bool IsViewVRuler(bool bDirect=false) const
Definition: viewopt.hxx:606
#define FN_VIEW_TABLEGRID
Definition: cmdid.h:162
void ExecFormatFootnote()
Definition: view0.cxx:677
#define FN_SHOW_INLINETOOLTIPS
Definition: cmdid.h:183
bool IsTab(bool bHard=false) const
Definition: viewopt.hxx:219
#define FN_SHADOWCURSOR
Definition: cmdid.h:514
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
bool IsHScrollbarVisible() const
Definition: viewmdi.cxx:712
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:593
bool IsLineBreak(bool bHard=false) const
Definition: viewopt.hxx:252
void MakeAllFoldedOutlineContentVisible(bool bMakeVisible=true)
Definition: wrtsh1.cxx:2218
bool IsOnlineSpell() const
Definition: viewopt.hxx:371
static bool IsFieldShadings()
Definition: viewopt.hxx:671
#define SFX_VIEW_REGISTRATION(DocClass)
void SetViewMetaChars(bool b)
Definition: viewopt.hxx:377
#define FN_QRY_MERGE
Definition: cmdid.h:230
SAL_DLLPRIVATE void CalcVisArea(const Size &rPixelSz)
Definition: viewport.cxx:770
void SetValue(bool const bTheValue)
SwDocShell * GetDocShell()
Definition: view.cxx:1127
bool IsReadOnly() const
void StartAction()
Definition: crsrsh.cxx:227
void CheckMetaText()
Definition: PostItMgr.cxx:2270
bool IsHideWhitespaceMode() const
Definition: viewopt.hxx:483
#define FN_VIEW_FIELDS
Definition: cmdid.h:154
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define SFX_OBJECTBAR_TOOLS
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
Definition: viewmdi.cxx:72
sal_uInt16 GetSlot() const
void DisableItem(sal_uInt16 nWhich)
#define FN_VIEW_FIELDNAME
Definition: cmdid.h:161
weld::Window * GetFrameWeld() const
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:288
std::unique_ptr< SwView_Impl > m_pViewImpl
Definition: view.hxx:199
void ExecNumberingOutline(SfxItemPool &)
Definition: view0.cxx:684
bool IsVScrollbarVisible() const
Definition: viewmdi.cxx:724
void LockView(bool b)
Definition: viewsh.hxx:462
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:423
void SetLayout()
Definition: PostItMgr.hxx:200
virtual void Invalidate(sal_uInt16 nId=0)
void ResetModified()
Definition: edws.cxx:75
void SetWhich(sal_uInt16 nId)
#define FN_PRINT_LAYOUT
Definition: cmdid.h:166
#define FN_VIEW_HIDDEN_PARA
Definition: cmdid.h:170
#define FN_VIEW_SHOW_WHITESPACE
Definition: cmdid.h:185
SwPostItMgr * GetPostItMgr()
Definition: view.hxx:639
bool SetProperty(const OUString &rPropertyName, const css::uno::Any &rValue)
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
constexpr OUStringLiteral UPN_IS_SPELL_AUTO
static bool IsTableBoundaries()
Definition: viewopt.hxx:667
bool IsUseHeaderFooterMenu() const
Definition: viewopt.hxx:306
bool HasNotes() const
Definition: PostItMgr.cxx:2094
#define FN_SHOW_CHANGES_IN_MARGIN
Definition: cmdid.h:189
#define FN_VIEW_SMOOTH_SCROLL
Definition: cmdid.h:171
#define FN_VIEW_META_CHARS
Definition: cmdid.h:159
bool IsSoftHyph() const
Definition: viewopt.hxx:264
bool IsShowBookmarks(bool const bHard=false) const
Definition: viewopt.hxx:246
void SetSpellChecking()
Definition: PostItMgr.cxx:2256
bool IsGridVisible() const
Definition: viewopt.hxx:366
void AppendItem(const SfxPoolItem &)
#define FN_USE_HEADERFOOTERMENU
Definition: cmdid.h:184
css::view::XSelectionSupplier * GetUNOObject()
Definition: view0.cxx:111
css::uno::Any GetProperty(const OUString &rPropertyName) const
void StateViewOptions(SfxItemSet &)
Definition: view0.cxx:212
SvxZoomType
bool IsShowHiddenChar(bool bHard=false) const
Definition: viewopt.hxx:321
bool StartGrammarChecking(bool bSkipStart=false)
Definition: docnew.cxx:141
void ApplyAccessibilityOptions(SvtAccessibilityOptions const &rAccessibilityOptions)
Definition: view0.cxx:116
bool IsSnap() const
Definition: viewopt.hxx:358
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: wrtsh1.cxx:1830
ShellMode GetShellMode() const
Definition: view0.cxx:106
#define FN_VLINEAL
Definition: cmdid.h:155
void SetShowBookmarks(bool const b)
Definition: viewopt.hxx:242
#define FN_REDLINE_ACCEPT
Definition: cmdid.h:130
uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
Definition: swtypes.cxx:61
bool IsViewLocked() const
Definition: viewsh.hxx:461
Definition: view.hxx:144
void EndAction(const bool bIdleEnd=false)
Definition: crsrsh.cxx:244
void SetBlank(bool b)
Definition: viewopt.hxx:228
void CheckVisArea()
Definition: viewport.cxx:316
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
Definition: swmodul1.cxx:137