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 
41 #include <sfx2/objface.hxx>
42 #include <wrtsh.hxx>
43 #include <edtwin.hxx>
44 #include <view.hxx>
45 #include <docsh.hxx>
46 #include <doc.hxx>
47 #include <globals.hrc>
48 #include <cmdid.h>
49 #include <globdoc.hxx>
50 #include <wview.hxx>
51 
52 #define ShellClass_SwView
53 #define ShellClass_Text
54 #define ShellClass_TextDrawText
55 
56 #include <sfx2/msg.hxx>
57 #include <swslots.hxx>
58 #include <PostItMgr.hxx>
59 
60 #include <ndtxt.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  m_pWrtShell->ApplyAccessibilityOptions(rAccessibilityOptions);
118  //to enable the right state of the selection cursor in readonly documents
119  if(GetDocShell()->IsReadOnly())
120  m_pWrtShell->ShowCursor();
121 
122 }
123 
124 void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem> const & rConfigItem)
125 {
126  m_pViewImpl->SetMailMergeConfigItem(rConfigItem);
128 }
129 
130 std::shared_ptr<SwMailMergeConfigItem> const & SwView::GetMailMergeConfigItem() const
131 {
132  return m_pViewImpl->GetMailMergeConfigItem();
133 }
134 
135 static bool lcl_IsViewMarks( const SwViewOption& rVOpt )
136 {
137  return rVOpt.IsHardBlank() &&
138  rVOpt.IsSoftHyph() &&
140 }
141 static void lcl_SetViewMarks(SwViewOption& rVOpt, bool bOn )
142 {
143  rVOpt.SetHardBlank(bOn);
144  rVOpt.SetSoftHyph(bOn);
146  ViewOptFlags::FieldShadings, bOn, true);
147 }
148 
149 static void lcl_SetViewMetaChars( SwViewOption& rVOpt, bool bOn)
150 {
151  rVOpt.SetViewMetaChars( bOn );
152  if(bOn && !(rVOpt.IsParagraph() ||
153  rVOpt.IsTab() ||
154  rVOpt.IsLineBreak() ||
155  rVOpt.IsShowHiddenChar() ||
156  rVOpt.IsShowBookmarks() ||
157  rVOpt.IsBlank()))
158  {
159  rVOpt.SetParagraph(bOn);
160  rVOpt.SetTab(bOn);
161  rVOpt.SetLineBreak(bOn);
162  rVOpt.SetBlank(bOn);
163  rVOpt.SetShowHiddenChar(bOn);
164  rVOpt.SetShowBookmarks(bOn);
165  }
166 }
167 
169 {
170  // OS: pay attention to numerical order!
171  static sal_uInt16 const aInva[] =
172  {
173  //SID_NEWWINDOW,/*5620*/
174  SID_BROWSER_MODE, /*6313*/
175  SID_RULER_BORDERS, SID_RULER_PAGE_POS,
176  //SID_ATTR_LONG_LRSPACE,
177  SID_HTML_MODE,
178  SID_RULER_PROTECT, /* 10915 */
179  //SID_AUTOSPELL_CHECK,
180  //SID_AUTOSPELL_MARKOFF,
181  SID_TOGGLE_RESOLVED_NOTES, /* 11672*/
182  FN_RULER, /*20211*/
183  FN_VIEW_GRAPHIC, /*20213*/
185  FN_VIEW_FIELDS, /*20215*/
186  FN_VLINEAL, /*20216*/
187  FN_VSCROLLBAR, /*20217*/
188  FN_HSCROLLBAR, /*20218*/
190  FN_VIEW_MARKS,
191  //FN_VIEW_FIELDNAME, /**/
192  FN_VIEW_TABLEGRID, /*20227*/
193  FN_PRINT_LAYOUT, /*20237*/
194  FN_QRY_MERGE, /*20364*/
196  0
197  };
198  // the view must not exist!
199  GetViewFrame()->GetBindings().Invalidate(aInva);
200  CheckVisArea();
201 
203  if( GetWrtShell().GetViewOptions()->getBrowseMode() && SvxZoomType::PERCENT != (eType =
204  GetWrtShell().GetViewOptions()->GetZoomType()) )
205  SetZoom( eType );
207 }
208 
209 // State of view options
210 
212 {
213  SfxWhichIter aIter(rSet);
214  sal_uInt16 nWhich = aIter.FirstWhich();
215  SfxBoolItem aBool;
216  const SwViewOption* pOpt = GetWrtShell().GetViewOptions();
217 
218  while(nWhich)
219  {
220  bool bReadonly = GetDocShell()->IsReadOnly();
221  if ( bReadonly && nWhich != FN_VIEW_GRAPHIC )
222  {
223  rSet.DisableItem(nWhich);
224  nWhich = 0;
225  }
226  switch(nWhich)
227  {
228  case FN_RULER:
229  {
230  if(!pOpt->IsViewHRuler(true) && !pOpt->IsViewVRuler(true))
231  {
232  rSet.DisableItem(nWhich);
233  nWhich = 0;
234  }
235  else
236  aBool.SetValue( pOpt->IsViewAnyRuler());
237  }
238  break;
239  case SID_BROWSER_MODE:
240  case FN_PRINT_LAYOUT:
241  {
242  bool bState = pOpt->getBrowseMode();
243  if(FN_PRINT_LAYOUT == nWhich)
244  bState = !bState;
245  aBool.SetValue( bState );
246  }
247  break;
248  case FN_VIEW_BOUNDS:
249  aBool.SetValue( SwViewOption::IsDocBoundaries()); break;
250  case FN_VIEW_GRAPHIC:
251  aBool.SetValue( pOpt->IsGraphic() ); break;
252  case FN_VIEW_FIELDS:
253  aBool.SetValue( SwViewOption::IsFieldShadings() ); break;
254  case FN_VIEW_FIELDNAME:
255  aBool.SetValue( pOpt->IsFieldName() ); break;
256  case FN_VIEW_MARKS:
257  aBool.SetValue( lcl_IsViewMarks(*pOpt) ); break;
258  case FN_VIEW_META_CHARS:
259  aBool.SetValue( pOpt->IsViewMetaChars() ); break;
260  case FN_VIEW_TABLEGRID:
261  aBool.SetValue( SwViewOption::IsTableBoundaries() ); break;
262  case SID_TOGGLE_NOTES:
263  {
264  if (!GetPostItMgr()->HasNotes())
265  {
266  rSet.DisableItem(nWhich);
267  nWhich = 0;
268  }
269  else
270  aBool.SetValue( pOpt->IsPostIts());
271  break;
272  }
273  case SID_TOGGLE_RESOLVED_NOTES:
274  {
275  if (!GetPostItMgr()->HasNotes())
276  {
277  rSet.DisableItem(nWhich);
278  nWhich = 0;
279  }
280  else
281  aBool.SetValue( pOpt->IsResolvedPostIts());
282  break;
283  }
284  case FN_VIEW_HIDDEN_PARA:
285  aBool.SetValue( pOpt->IsShowHiddenPara()); break;
287  {
288  if (pOpt->getBrowseMode() || !pOpt->CanHideWhitespace())
289  {
290  rSet.DisableItem(nWhich);
291  nWhich = 0;
292  }
293  else
294  aBool.SetValue(pOpt->IsHideWhitespaceMode());
295  break;
296  }
298  {
299  aBool.SetValue(!pOpt->IsHideWhitespaceMode());
300  break;
301  }
302  case SID_GRID_VISIBLE:
303  aBool.SetValue( pOpt->IsGridVisible() ); break;
304  case SID_GRID_USE:
305  aBool.SetValue( pOpt->IsSnap() ); break;
306  case SID_HELPLINES_MOVE:
307  aBool.SetValue( pOpt->IsCrossHair() ); break;
309  aBool.SetValue( pOpt->IsSmoothScroll()); break;
310  case FN_VLINEAL:
311  aBool.SetValue( StatVRuler() ); break;
312  case FN_HSCROLLBAR:
313  if( pOpt->getBrowseMode() )
314  {
315  rSet.DisableItem(nWhich);
316  nWhich = 0;
317  }
318  else
319  aBool.SetValue( IsHScrollbarVisible() );
320  break;
321  case FN_VSCROLLBAR:
322  aBool.SetValue( IsVScrollbarVisible() ); break;
323  case SID_AUTOSPELL_CHECK:
324  aBool.SetValue( pOpt->IsOnlineSpell() );
325  break;
326  case FN_SHADOWCURSOR:
327  if ( pOpt->getBrowseMode() )
328  {
329  rSet.DisableItem( nWhich );
330  nWhich = 0;
331  }
332  else
333  aBool.SetValue( pOpt->IsShadowCursor() );
334  break;
336  aBool.SetValue( pOpt->IsShowInlineTooltips() );
337  break;
339  aBool.SetValue( pOpt->IsUseHeaderFooterMenu() );
340  break;
343  break;
345  aBool.SetValue( pOpt->IsShowChangesInMargin() );
346  break;
347  }
348 
349  if( nWhich )
350  {
351  aBool.SetWhich( nWhich );
352  rSet.Put( aBool );
353  }
354  nWhich = aIter.NextWhich();
355  }
356 }
357 
358 // execute view options
359 
361 {
362  std::unique_ptr<SwViewOption> pOpt(new SwViewOption( *GetWrtShell().GetViewOptions() ));
363  bool bModified = GetWrtShell().IsModified();
364 
365  int eState = STATE_TOGGLE;
366  bool bSet = false;
367  bool bBrowseModeChanged = false;
368 
369  const SfxItemSet *pArgs = rReq.GetArgs();
370  sal_uInt16 nSlot = rReq.GetSlot();
371  const SfxPoolItem* pAttr=nullptr;
372 
373  if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
374  {
375  bSet = static_cast<const SfxBoolItem*>(pAttr)->GetValue();
376  eState = bSet ? STATE_ON : STATE_OFF;
377  }
378 
379  bool bFlag = STATE_ON == eState;
380  uno::Reference< linguistic2::XLinguProperties > xLngProp( ::GetLinguPropertySet() );
381 
382  switch ( nSlot )
383  {
384  case FN_VIEW_GRAPHIC:
385  if( STATE_TOGGLE == eState )
386  bFlag = !pOpt->IsGraphic();
387  pOpt->SetGraphic( bFlag );
388  break;
389 
390  case FN_VIEW_FIELDS:
391  if( STATE_TOGGLE == eState )
392  bFlag = !SwViewOption::IsFieldShadings() ;
394  break;
395 
396  case FN_VIEW_BOUNDS:
397  if( STATE_TOGGLE == eState )
400  break;
401 
402  case SID_GRID_VISIBLE:
403  if( STATE_TOGGLE == eState )
404  bFlag = !pOpt->IsGridVisible();
405 
406  pOpt->SetGridVisible( bFlag );
407  break;
408 
409  case SID_GRID_USE:
410  if( STATE_TOGGLE == eState )
411  bFlag = !pOpt->IsSnap();
412 
413  pOpt->SetSnap( bFlag );
414  break;
415 
416  case SID_HELPLINES_MOVE:
417  if( STATE_TOGGLE == eState )
418  bFlag = !pOpt->IsCrossHair();
419 
420  pOpt->SetCrossHair( bFlag );
421  break;
422 
423  case SID_BROWSER_MODE:
424  bBrowseModeChanged = !pOpt->getBrowseMode();
425  pOpt->setBrowseMode(true );
426  break;
427 
428  case FN_PRINT_LAYOUT:
429  bBrowseModeChanged = pOpt->getBrowseMode();
430  pOpt->setBrowseMode( false );
431  break;
432 
433  case SID_TOGGLE_NOTES:
434  if ( STATE_TOGGLE == eState )
435  bFlag = !pOpt->IsPostIts();
436 
437  GetPostItMgr()->SetLayout();
438  pOpt->SetPostIts( bFlag );
439  if (pOpt->IsPostIts())
441  break;
442 
443  case SID_TOGGLE_RESOLVED_NOTES:
444  if ( STATE_TOGGLE == eState )
445  bFlag = pOpt->IsResolvedPostIts();
446 
448 
449  GetPostItMgr()->SetLayout();
450  pOpt->SetResolvedPostIts( !bFlag );
451 
452  break;
453 
454  case FN_VIEW_HIDDEN_PARA:
455  if ( STATE_TOGGLE == eState )
456  bFlag = !pOpt->IsShowHiddenPara();
457 
458  pOpt->SetShowHiddenPara( bFlag );
459  break;
460 
462  if ( STATE_TOGGLE == eState )
463  bFlag = !pOpt->IsHideWhitespaceMode();
464 
465  pOpt->SetHideWhitespaceMode(bFlag);
466  break;
467 
469  if ( STATE_TOGGLE == eState )
470  bFlag = pOpt->IsHideWhitespaceMode();
471 
472  pOpt->SetHideWhitespaceMode(!bFlag);
473  break;
474 
476 
477  if ( STATE_TOGGLE == eState )
478  bFlag = !pOpt->IsSmoothScroll();
479 
480  pOpt->SetSmoothScroll( bFlag );
481  break;
482 
483  case FN_VLINEAL:
484  if( STATE_TOGGLE == eState )
485  bFlag = !pOpt->IsViewVRuler();
486 
487  pOpt->SetViewVRuler( bFlag );
488  break;
489 
490  case FN_VSCROLLBAR:
491  if( STATE_TOGGLE == eState )
492  bFlag = !pOpt->IsViewVScrollBar();
493 
494  pOpt->SetViewVScrollBar( bFlag );
495  break;
496 
497  case FN_HSCROLLBAR:
498  if( STATE_TOGGLE == eState )
499  bFlag = !pOpt->IsViewHScrollBar();
500 
501  pOpt->SetViewHScrollBar( bFlag );
502  break;
503 
504  case FN_RULER:
505  if( STATE_TOGGLE == eState )
506  bFlag = !pOpt->IsViewAnyRuler();
507 
508  pOpt->SetViewAnyRuler( bFlag );
509  break;
510 
511  case FN_VIEW_TABLEGRID:
512  if( STATE_TOGGLE == eState )
515  break;
516 
517  case FN_VIEW_FIELDNAME:
518  if( STATE_TOGGLE == eState )
519  bFlag = !pOpt->IsFieldName() ;
520 
521  pOpt->SetFieldName( bFlag );
522  break;
523 
524  case FN_VIEW_MARKS:
525  if( STATE_TOGGLE == eState )
526  bFlag = !lcl_IsViewMarks(*pOpt) ;
527 
528  lcl_SetViewMarks( *pOpt, bFlag );
529  break;
530 
531  case FN_VIEW_META_CHARS:
532  if( STATE_TOGGLE == eState )
533  bFlag = !pOpt->IsViewMetaChars();
534 
535  lcl_SetViewMetaChars( *pOpt, bFlag );
536  break;
537 
538  case SID_AUTOSPELL_CHECK:
539  const SfxPoolItem* pItem;
540 
541  if (pArgs && pArgs->HasItem(FN_PARAM_1, &pItem))
542  bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
543  else if( STATE_TOGGLE == eState )
544  {
545  bFlag = !pOpt->IsOnlineSpell();
546  bSet = bFlag;
547  }
548 
549  pOpt->SetOnlineSpell(bSet);
550  {
551  SvtLinguConfig aCfg;
552  aCfg.SetProperty( UPN_IS_SPELL_AUTO, uno::makeAny( bSet ) );
553 
554  if (xLngProp.is())
555  xLngProp->setIsSpellAuto( bSet );
556 
557  // for the time being we do not have a specific option for grammarchecking.
558  // thus we'll use the one for spell checking...
559  if (bSet)
560  {
561  SwDocShell *pDocSh = GetDocShell();
562  SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
563 
564  // right now we don't have view options for automatic grammar checking. Thus...
565  bool bIsAutoGrammar = false;
566  aCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bIsAutoGrammar;
567 
568  if (pDoc && bIsAutoGrammar)
569  pDoc->StartGrammarChecking();
570  }
571  }
572  break;
573 
574  case FN_SHADOWCURSOR:
575  if( STATE_TOGGLE == eState )
576  {
577  bFlag = !pOpt->IsShadowCursor();
578  bSet = bFlag;
579  }
580 
581  pOpt->SetShadowCursor(bSet);
582  break;
583 
585  if( STATE_TOGGLE == eState )
586  bFlag = !pOpt->IsShowInlineTooltips();
587 
588  pOpt->SetShowInlineTooltips( bFlag );
589  break;
590 
592  if( STATE_TOGGLE == eState )
593  bFlag = !pOpt->IsUseHeaderFooterMenu();
594 
595  pOpt->SetUseHeaderFooterMenu( bFlag );
596  break;
597 
599  {
600  if( STATE_TOGGLE == eState )
601  bFlag = !pOpt->IsShowOutlineContentVisibilityButton();
602 
603  SwWrtShell &rSh = GetWrtShell();
604 
605  // move cursor to top of document
606  if (rSh.IsSelFrameMode())
607  {
608  rSh.UnSelectFrame();
609  rSh.LeaveSelFrameMode();
610  }
611  rSh.EnterStdMode();
612  rSh.SttEndDoc(true);
613 
614  if (!bFlag)
615  {
616  // make all content visible
617  const SwOutlineNodes& rOutlineNds = rSh.GetNodes().GetOutLineNds();
618  for (SwOutlineNodes::size_type nPos = 0; nPos < rOutlineNds.size(); ++nPos)
619  {
620  SwNode* pNd = rOutlineNds[nPos];
621  bool bOutlineContentVisibleAttr = true;
622  pNd->GetTextNode()->GetAttrOutlineContentVisible(bOutlineContentVisibleAttr);
623  if (!bOutlineContentVisibleAttr)
624  {
627  }
628  }
629  }
630 
631  pOpt->SetShowOutlineContentVisibilityButton(bFlag);
632  break;
633  }
634 
636  if( STATE_TOGGLE == eState )
637  bFlag = !pOpt->IsShowChangesInMargin();
638 
639  pOpt->SetShowChangesInMargin( bFlag );
640  break;
641 
642  default:
643  OSL_FAIL("wrong request method");
644  return;
645  }
646 
647  // Set UserPrefs, mark request as modified
648  bool bWebView = dynamic_cast<const SwWebView*>(this) != nullptr;
649  SwWrtShell &rSh = GetWrtShell();
650  rSh.StartAction();
651  SwModule* pModule = SW_MOD();
652  if( *rSh.GetViewOptions() != *pOpt )
653  {
654  rSh.ApplyViewOptions( *pOpt );
655  if( bBrowseModeChanged )
656  {
657  GetDocShell()->ToggleLayoutMode(this);
658  }
659 
660  // The UsrPref must be marked as modified.
661  // call for initialization
662  pModule->GetUsrPref(bWebView);
663  SwModule::CheckSpellChanges( pOpt->IsOnlineSpell(), false, false, false );
664  }
665  //OS: Set back modified again, because view/fields sets the Doc modified.
666  if( !bModified )
667  rSh.ResetModified();
668 
669  pModule->ApplyUsrPref( *pOpt, this, bWebView ? SvViewOpt::DestWeb : SvViewOpt::DestText );
670 
671  // #i6193# let postits know about new spellcheck setting
672  if ( nSlot == SID_AUTOSPELL_CHECK )
674 
675  const bool bLockedView = rSh.IsViewLocked();
676  rSh.LockView( true ); //lock visible section
678  if( bBrowseModeChanged && !bFlag )
679  CalcVisArea( GetEditWin().GetOutputSizePixel() );
680  rSh.LockView( bLockedView );
681 
682  pOpt.reset();
683  Invalidate(rReq.GetSlot());
684  if(!pArgs)
685  rReq.AppendItem(SfxBoolItem(nSlot, bFlag));
686  rReq.Done();
687 }
688 
690 {
693  pDlg->Execute();
694 }
695 
697 {
700  ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateOutlineTabDialog(GetFrameWeld(), &aTmp, GetWrtShell()));
701  pDlg->Execute();
702 }
703 
704 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
static void lcl_SetViewMetaChars(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:149
void SetLineBreak(bool b)
Definition: viewopt.hxx:255
void UIFeatureChanged()
bool IsViewMetaChars() const
Definition: viewopt.hxx:369
bool IsSmoothScroll() const
Definition: viewopt.hxx:397
static void lcl_SetViewMarks(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:141
#define FN_VIEW_GRAPHIC
Definition: cmdid.h:154
void SetSoftHyph(bool b)
Definition: viewopt.hxx:266
const SwNodes & GetNodes() const
Definition: viewsh.cxx:2081
void SetMailMergeConfigItem(std::shared_ptr< SwMailMergeConfigItem > const &rConfigItem)
Definition: view0.cxx:124
#define SFX_IMPL_INTERFACE(Class, SuperClass)
static bool IsDocBoundaries()
Definition: viewopt.hxx:659
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON
Definition: cmdid.h:189
bool SttEndDoc(bool bStt)
Definition: crsrsh.cxx:573
std::shared_ptr< SwMailMergeConfigItem > const & GetMailMergeConfigItem() const
Definition: view0.cxx:130
bool IsViewAnyRuler() const
Definition: viewopt.hxx:575
std::string GetValue
std::unique_ptr< SwWrtShell > m_pWrtShell
Definition: view.hxx:181
void ToggleLayoutMode(SwView *pView)
Definition: docsh2.cxx:150
bool IsGraphic() const
Definition: viewopt.hxx:327
bool StatVRuler() const
Definition: view.hxx:476
bool IsPostIts() const
Definition: viewopt.hxx:273
bool IsModified() const
Changes in document?
Definition: edws.cxx:65
Definition: doc.hxx:186
sal_uInt16 FirstWhich()
bool IsHardBlank() const
Definition: viewopt.hxx:231
void EnterStdMode()
Definition: select.cxx:550
SwEditWin & GetEditWin()
Definition: view.hxx:402
void Done(bool bRemove=false)
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
Definition: apphdl.cxx:1044
void RecheckBrowseMode()
Definition: view0.cxx:168
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void SetHardBlank(bool b)
Definition: viewopt.hxx:233
bool IsShowHiddenPara() const
Definition: viewopt.hxx:391
#define FN_VSCROLLBAR
Definition: cmdid.h:158
void SetShowHiddenChar(bool b)
Definition: viewopt.hxx:319
sal_uInt16 NextWhich()
void SetAttrOutlineContentVisible(bool bVisible)
Definition: ndtxt.cxx:4019
SwWrtShell & GetWrtShell() const
Definition: view.hxx:399
bool CanHideWhitespace() const
The rules that allow for hiding whitespace.
Definition: viewopt.hxx:481
void ShowHideResolvedNotes(bool visible)
Definition: PostItMgr.cxx:2471
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
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()
#define UPN_IS_GRAMMAR_AUTO
void SetParagraph(bool b)
Definition: viewopt.hxx:239
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
bool getBrowseMode() const
Definition: viewopt.hxx:466
static bool IsFuzzing()
void ExecViewOptions(SfxRequest &)
Definition: view0.cxx:360
#define FN_VIEW_HIDE_WHITESPACE
Definition: cmdid.h:184
ShellMode
Definition: view.hxx:85
#define FN_RULER
Definition: cmdid.h:152
size_type size() const
bool IsViewHRuler(bool bDirect=false) const
Definition: viewopt.hxx:586
#define FN_HSCROLLBAR
Definition: cmdid.h:159
bool IsBlank(bool bHard=false) const
Definition: viewopt.hxx:225
#define FN_INSERT_FIELD_DATA_ONLY
Definition: cmdid.h:210
#define FN_VIEW_MARKS
Definition: cmdid.h:162
bool IsShadowCursor() const
Definition: viewopt.hxx:615
DocumentType eType
bool IsShowOutlineContentVisibilityButton() const
Definition: viewopt.cxx:100
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
static void SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveInConfig=false)
Definition: viewopt.cxx:557
static bool lcl_IsViewMarks(const SwViewOption &rVOpt)
Definition: view0.cxx:135
bool IsCrossHair() const
Definition: viewopt.hxx:379
#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:155
SFX_IMPL_NAMED_VIEWFACTORY(SwView,"Default")
Definition: view0.cxx:70
void EndAction(const bool bIdleEnd=false, const bool DoSetPosX=false)
Definition: crsrsh.cxx:239
#define UPN_IS_SPELL_AUTO
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:600
#define FN_VIEW_TABLEGRID
Definition: cmdid.h:164
void ExecFormatFootnote()
Definition: view0.cxx:689
#define FN_SHOW_INLINETOOLTIPS
Definition: cmdid.h:185
bool IsTab(bool bHard=false) const
Definition: viewopt.hxx:219
#define FN_SHADOWCURSOR
Definition: cmdid.h:513
bool GetAttrOutlineContentVisible(bool &bOutlineContentVisibleAttr)
GetAttrOutlineContentVisible.
Definition: ndtxt.cxx:4007
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
bool IsHScrollbarVisible() const
Definition: viewmdi.cxx:672
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:591
bool IsLineBreak(bool bHard=false) const
Definition: viewopt.hxx:252
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
Definition: ndarr.hxx:231
bool IsOnlineSpell() const
Definition: viewopt.hxx:365
static bool IsFieldShadings()
Definition: viewopt.hxx:665
#define SFX_VIEW_REGISTRATION(DocClass)
void SetViewMetaChars(bool b)
Definition: viewopt.hxx:371
#define FN_QRY_MERGE
Definition: cmdid.h:228
SAL_DLLPRIVATE void CalcVisArea(const Size &rPixelSz)
Definition: viewport.cxx:764
void SetValue(bool const bTheValue)
SwDocShell * GetDocShell()
Definition: view.cxx:1109
bool IsReadOnly() const
void StartAction()
Definition: crsrsh.cxx:222
void CheckMetaText()
Definition: PostItMgr.cxx:2275
bool IsHideWhitespaceMode() const
Definition: viewopt.hxx:477
#define FN_VIEW_FIELDS
Definition: cmdid.h:156
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:163
weld::Window * GetFrameWeld() const
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:288
std::unique_ptr< SwView_Impl > m_pViewImpl
Definition: view.hxx:187
void ExecNumberingOutline(SfxItemPool &)
Definition: view0.cxx:696
bool IsVScrollbarVisible() const
Definition: viewmdi.cxx:684
void LockView(bool b)
Definition: viewsh.hxx:462
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:423
void SetLayout()
Definition: PostItMgr.hxx:199
void ToggleOutlineContentVisibility(SwNode *pNd, const bool bForceNotVisible=false)
Definition: wrtsh1.cxx:2008
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:168
#define FN_VIEW_HIDDEN_PARA
Definition: cmdid.h:172
#define FN_VIEW_SHOW_WHITESPACE
Definition: cmdid.h:187
SwPostItMgr * GetPostItMgr()
Definition: view.hxx:622
bool SetProperty(const OUString &rPropertyName, const css::uno::Any &rValue)
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
void UnSelectFrame()
Definition: select.cxx:322
static bool IsTableBoundaries()
Definition: viewopt.hxx:661
bool IsUseHeaderFooterMenu() const
Definition: viewopt.hxx:300
bool HasNotes() const
Definition: PostItMgr.cxx:2099
#define FN_SHOW_CHANGES_IN_MARGIN
Definition: cmdid.h:191
#define FN_VIEW_SMOOTH_SCROLL
Definition: cmdid.h:173
#define FN_VIEW_META_CHARS
Definition: cmdid.h:161
bool IsSoftHyph() const
Definition: viewopt.hxx:264
void LeaveSelFrameMode()
Definition: select.cxx:719
bool IsShowBookmarks(bool const bHard=false) const
Definition: viewopt.hxx:246
void SetSpellChecking()
Definition: PostItMgr.cxx:2261
bool IsGridVisible() const
Definition: viewopt.hxx:360
void AppendItem(const SfxPoolItem &)
#define FN_USE_HEADERFOOTERMENU
Definition: cmdid.h:186
css::view::XSelectionSupplier * GetUNOObject()
Definition: view0.cxx:110
css::uno::Any GetProperty(const OUString &rPropertyName) const
void StateViewOptions(SfxItemSet &)
Definition: view0.cxx:211
SvxZoomType
bool IsShowHiddenChar(bool bHard=false) const
Definition: viewopt.hxx:315
bool StartGrammarChecking(bool bSkipStart=false)
Definition: docnew.cxx:136
std::vector< SwNode * >::size_type size_type
void ApplyAccessibilityOptions(SvtAccessibilityOptions const &rAccessibilityOptions)
Definition: view0.cxx:115
bool IsSnap() const
Definition: viewopt.hxx:352
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: wrtsh1.cxx:1790
ShellMode GetShellMode() const
Definition: view0.cxx:105
#define FN_VLINEAL
Definition: cmdid.h:157
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
sal_uInt16 nPos
bool IsSelFrameMode() const
Definition: wrtsh.hxx:170
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:846
void SetBlank(bool b)
Definition: viewopt.hxx:228
void CheckVisArea()
Definition: viewport.cxx:310
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
Definition: swmodul1.cxx:136
Base class of the Writer document model elements.
Definition: node.hxx:79