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