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 using namespace ::com::sun::star;
61 
63 #include <sfx2/viewfac.hxx>
64 
65 #include <memory>
66 #include <swabstdlg.hxx>
67 
69 {
70  if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsWriter())
71  {
74  }
75 }
76 
78 
79 void SwView::InitInterface_Impl()
80 {
81  GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
82 
83  GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
84 
85  GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
86  GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
87  GetStaticInterface()->RegisterChildWindow(SwSpellDialogChildWindow::GetChildWindowId());
88  GetStaticInterface()->RegisterChildWindow(FN_REDLINE_ACCEPT);
89  GetStaticInterface()->RegisterChildWindow(SID_HYPERLINK_DIALOG);
90  GetStaticInterface()->RegisterChildWindow(FN_WORDCOUNT_DIALOG);
91 #if HAVE_FEATURE_AVMEDIA
92  GetStaticInterface()->RegisterChildWindow(::avmedia::MediaPlayer::GetChildWindowId());
93 #endif
94  GetStaticInterface()->RegisterChildWindow(FN_INSERT_FIELD_DATA_ONLY);
95 
96  GetStaticInterface()->RegisterChildWindow(FN_SYNC_LABELS, false, SfxShellFeature::SwChildWindowLabel);
97 
98  GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
99  ToolbarId::Tools_Toolbox);
100 }
101 
102 
104 {
105  return m_pViewImpl->GetShellMode();
106 }
107 
108 view::XSelectionSupplier* SwView::GetUNOObject()
109 {
110  return m_pViewImpl->GetUNOObject();
111 }
112 
114 {
115  m_pWrtShell->ApplyAccessibilityOptions(rAccessibilityOptions);
116  //to enable the right state of the selection cursor in readonly documents
117  if(GetDocShell()->IsReadOnly())
118  m_pWrtShell->ShowCursor();
119 
120 }
121 
122 void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem> const & rConfigItem)
123 {
124  m_pViewImpl->SetMailMergeConfigItem(rConfigItem);
126 }
127 
128 std::shared_ptr<SwMailMergeConfigItem> const & SwView::GetMailMergeConfigItem() const
129 {
130  return m_pViewImpl->GetMailMergeConfigItem();
131 }
132 
133 static bool lcl_IsViewMarks( const SwViewOption& rVOpt )
134 {
135  return rVOpt.IsHardBlank() &&
136  rVOpt.IsSoftHyph() &&
138 }
139 static void lcl_SetViewMarks(SwViewOption& rVOpt, bool bOn )
140 {
141  rVOpt.SetHardBlank(bOn);
142  rVOpt.SetSoftHyph(bOn);
144  ViewOptFlags::FieldShadings, bOn, true);
145 }
146 
147 static void lcl_SetViewMetaChars( SwViewOption& rVOpt, bool bOn)
148 {
149  rVOpt.SetViewMetaChars( bOn );
150  if(bOn && !(rVOpt.IsParagraph() ||
151  rVOpt.IsTab() ||
152  rVOpt.IsLineBreak() ||
153  rVOpt.IsShowHiddenChar() ||
154  rVOpt.IsShowBookmarks() ||
155  rVOpt.IsBlank()))
156  {
157  rVOpt.SetParagraph(bOn);
158  rVOpt.SetTab(bOn);
159  rVOpt.SetLineBreak(bOn);
160  rVOpt.SetBlank(bOn);
161  rVOpt.SetShowHiddenChar(bOn);
162  rVOpt.SetShowBookmarks(bOn);
163  }
164 }
165 
167 {
168  // OS: pay attention to numerical order!
169  static sal_uInt16 const aInva[] =
170  {
171  //SID_NEWWINDOW,/*5620*/
172  SID_BROWSER_MODE, /*6313*/
173  SID_RULER_BORDERS, SID_RULER_PAGE_POS,
174  //SID_ATTR_LONG_LRSPACE,
175  SID_HTML_MODE,
176  SID_RULER_PROTECT, /* 10915 */
177  //SID_AUTOSPELL_CHECK,
178  //SID_AUTOSPELL_MARKOFF,
179  SID_TOGGLE_RESOLVED_NOTES, /* 11672*/
180  FN_RULER, /*20211*/
181  FN_VIEW_GRAPHIC, /*20213*/
183  FN_VIEW_FIELDS, /*20215*/
184  FN_VLINEAL, /*20216*/
185  FN_VSCROLLBAR, /*20217*/
186  FN_HSCROLLBAR, /*20218*/
188  FN_VIEW_MARKS,
189  //FN_VIEW_FIELDNAME, /**/
190  FN_VIEW_TABLEGRID, /*20227*/
191  FN_PRINT_LAYOUT, /*20237*/
192  FN_QRY_MERGE, /*20364*/
194  0
195  };
196  // the view must not exist!
197  GetViewFrame()->GetBindings().Invalidate(aInva);
198  CheckVisArea();
199 
201  if( GetWrtShell().GetViewOptions()->getBrowseMode() && SvxZoomType::PERCENT != (eType =
202  GetWrtShell().GetViewOptions()->GetZoomType()) )
203  SetZoom( eType );
205 }
206 
207 // State of view options
208 
210 {
211  SfxWhichIter aIter(rSet);
212  sal_uInt16 nWhich = aIter.FirstWhich();
213  SfxBoolItem aBool;
214  const SwViewOption* pOpt = GetWrtShell().GetViewOptions();
215 
216  while(nWhich)
217  {
218  bool bReadonly = GetDocShell()->IsReadOnly();
219  if ( bReadonly && nWhich != FN_VIEW_GRAPHIC )
220  {
221  rSet.DisableItem(nWhich);
222  nWhich = 0;
223  }
224  switch(nWhich)
225  {
226  case FN_RULER:
227  {
228  if(!pOpt->IsViewHRuler(true) && !pOpt->IsViewVRuler(true))
229  {
230  rSet.DisableItem(nWhich);
231  nWhich = 0;
232  }
233  else
234  aBool.SetValue( pOpt->IsViewAnyRuler());
235  }
236  break;
237  case SID_BROWSER_MODE:
238  case FN_PRINT_LAYOUT:
239  {
240  bool bState = pOpt->getBrowseMode();
241  if(FN_PRINT_LAYOUT == nWhich)
242  bState = !bState;
243  aBool.SetValue( bState );
244  }
245  break;
246  case FN_VIEW_BOUNDS:
247  aBool.SetValue( SwViewOption::IsDocBoundaries()); break;
248  case FN_VIEW_GRAPHIC:
249  aBool.SetValue( pOpt->IsGraphic() ); break;
250  case FN_VIEW_FIELDS:
251  aBool.SetValue( SwViewOption::IsFieldShadings() ); break;
252  case FN_VIEW_FIELDNAME:
253  aBool.SetValue( pOpt->IsFieldName() ); break;
254  case FN_VIEW_MARKS:
255  aBool.SetValue( lcl_IsViewMarks(*pOpt) ); break;
256  case FN_VIEW_META_CHARS:
257  aBool.SetValue( pOpt->IsViewMetaChars() ); break;
258  case FN_VIEW_TABLEGRID:
259  aBool.SetValue( SwViewOption::IsTableBoundaries() ); break;
260  case SID_TOGGLE_NOTES:
261  {
262  if (!GetPostItMgr()->HasNotes())
263  {
264  rSet.DisableItem(nWhich);
265  nWhich = 0;
266  }
267  else
268  aBool.SetValue( pOpt->IsPostIts());
269  break;
270  }
271  case SID_TOGGLE_RESOLVED_NOTES:
272  {
273  if (!GetPostItMgr()->HasNotes())
274  {
275  rSet.DisableItem(nWhich);
276  nWhich = 0;
277  }
278  else
279  aBool.SetValue( pOpt->IsResolvedPostIts());
280  break;
281  }
282  case FN_VIEW_HIDDEN_PARA:
283  aBool.SetValue( pOpt->IsShowHiddenPara()); break;
285  {
286  if (pOpt->getBrowseMode() || !pOpt->CanHideWhitespace())
287  {
288  rSet.DisableItem(nWhich);
289  nWhich = 0;
290  }
291  else
292  aBool.SetValue(pOpt->IsHideWhitespaceMode());
293  break;
294  }
296  {
297  aBool.SetValue(!pOpt->IsHideWhitespaceMode());
298  break;
299  }
300  case SID_GRID_VISIBLE:
301  aBool.SetValue( pOpt->IsGridVisible() ); break;
302  case SID_GRID_USE:
303  aBool.SetValue( pOpt->IsSnap() ); break;
304  case SID_HELPLINES_MOVE:
305  aBool.SetValue( pOpt->IsCrossHair() ); break;
307  aBool.SetValue( pOpt->IsSmoothScroll()); break;
308  case FN_VLINEAL:
309  aBool.SetValue( StatVRuler() ); break;
310  case FN_HSCROLLBAR:
311  if( pOpt->getBrowseMode() )
312  {
313  rSet.DisableItem(nWhich);
314  nWhich = 0;
315  }
316  else
317  aBool.SetValue( IsHScrollbarVisible() );
318  break;
319  case FN_VSCROLLBAR:
320  aBool.SetValue( IsVScrollbarVisible() ); break;
321  case SID_AUTOSPELL_CHECK:
322  aBool.SetValue( pOpt->IsOnlineSpell() );
323  break;
324  case FN_SHADOWCURSOR:
325  if ( pOpt->getBrowseMode() )
326  {
327  rSet.DisableItem( nWhich );
328  nWhich = 0;
329  }
330  else
331  aBool.SetValue( pOpt->IsShadowCursor() );
332  break;
334  aBool.SetValue( pOpt->IsShowInlineTooltips() );
335  break;
337  aBool.SetValue( pOpt->IsUseHeaderFooterMenu() );
338  break;
341  break;
343  aBool.SetValue( pOpt->IsShowChangesInMargin() );
344  break;
345  }
346 
347  if( nWhich )
348  {
349  aBool.SetWhich( nWhich );
350  rSet.Put( aBool );
351  }
352  nWhich = aIter.NextWhich();
353  }
354 }
355 
356 // execute view options
357 
359 {
360  std::unique_ptr<SwViewOption> pOpt(new SwViewOption( *GetWrtShell().GetViewOptions() ));
361  bool bModified = GetWrtShell().IsModified();
362 
363  int eState = STATE_TOGGLE;
364  bool bSet = false;
365  bool bBrowseModeChanged = false;
366 
367  const SfxItemSet *pArgs = rReq.GetArgs();
368  sal_uInt16 nSlot = rReq.GetSlot();
369  const SfxPoolItem* pAttr=nullptr;
370 
371  if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
372  {
373  bSet = static_cast<const SfxBoolItem*>(pAttr)->GetValue();
374  eState = bSet ? STATE_ON : STATE_OFF;
375  }
376 
377  bool bFlag = STATE_ON == eState;
378  uno::Reference< linguistic2::XLinguProperties > xLngProp( ::GetLinguPropertySet() );
379 
380  switch ( nSlot )
381  {
382  case FN_VIEW_GRAPHIC:
383  if( STATE_TOGGLE == eState )
384  bFlag = !pOpt->IsGraphic();
385  pOpt->SetGraphic( bFlag );
386  break;
387 
388  case FN_VIEW_FIELDS:
389  if( STATE_TOGGLE == eState )
390  bFlag = !SwViewOption::IsFieldShadings() ;
392  break;
393 
394  case FN_VIEW_BOUNDS:
395  if( STATE_TOGGLE == eState )
398  break;
399 
400  case SID_GRID_VISIBLE:
401  if( STATE_TOGGLE == eState )
402  bFlag = !pOpt->IsGridVisible();
403 
404  pOpt->SetGridVisible( bFlag );
405  break;
406 
407  case SID_GRID_USE:
408  if( STATE_TOGGLE == eState )
409  bFlag = !pOpt->IsSnap();
410 
411  pOpt->SetSnap( bFlag );
412  break;
413 
414  case SID_HELPLINES_MOVE:
415  if( STATE_TOGGLE == eState )
416  bFlag = !pOpt->IsCrossHair();
417 
418  pOpt->SetCrossHair( bFlag );
419  break;
420 
421  case SID_BROWSER_MODE:
422  bBrowseModeChanged = !pOpt->getBrowseMode();
423  pOpt->setBrowseMode(true );
424  break;
425 
426  case FN_PRINT_LAYOUT:
427  bBrowseModeChanged = pOpt->getBrowseMode();
428  pOpt->setBrowseMode( false );
429  break;
430 
431  case SID_TOGGLE_NOTES:
432  if ( STATE_TOGGLE == eState )
433  bFlag = !pOpt->IsPostIts();
434 
435  GetPostItMgr()->SetLayout();
436  pOpt->SetPostIts( bFlag );
437  if (pOpt->IsPostIts())
439  break;
440 
441  case SID_TOGGLE_RESOLVED_NOTES:
442  if ( STATE_TOGGLE == eState )
443  bFlag = pOpt->IsResolvedPostIts();
444 
446 
447  GetPostItMgr()->SetLayout();
448  pOpt->SetResolvedPostIts( !bFlag );
449 
450  break;
451 
452  case FN_VIEW_HIDDEN_PARA:
453  if ( STATE_TOGGLE == eState )
454  bFlag = !pOpt->IsShowHiddenPara();
455 
456  pOpt->SetShowHiddenPara( bFlag );
457  break;
458 
460  if ( STATE_TOGGLE == eState )
461  bFlag = !pOpt->IsHideWhitespaceMode();
462 
463  pOpt->SetHideWhitespaceMode(bFlag);
464  break;
465 
467  if ( STATE_TOGGLE == eState )
468  bFlag = pOpt->IsHideWhitespaceMode();
469 
470  pOpt->SetHideWhitespaceMode(!bFlag);
471  break;
472 
474 
475  if ( STATE_TOGGLE == eState )
476  bFlag = !pOpt->IsSmoothScroll();
477 
478  pOpt->SetSmoothScroll( bFlag );
479  break;
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 
502  case FN_RULER:
503  if( STATE_TOGGLE == eState )
504  bFlag = !pOpt->IsViewAnyRuler();
505 
506  pOpt->SetViewAnyRuler( bFlag );
507  break;
508 
509  case FN_VIEW_TABLEGRID:
510  if( STATE_TOGGLE == eState )
513  break;
514 
515  case FN_VIEW_FIELDNAME:
516  if( STATE_TOGGLE == eState )
517  bFlag = !pOpt->IsFieldName() ;
518 
519  pOpt->SetFieldName( bFlag );
520  break;
521 
522  case FN_VIEW_MARKS:
523  if( STATE_TOGGLE == eState )
524  bFlag = !lcl_IsViewMarks(*pOpt) ;
525 
526  lcl_SetViewMarks( *pOpt, bFlag );
527  break;
528 
529  case FN_VIEW_META_CHARS:
530  if( STATE_TOGGLE == eState )
531  bFlag = !pOpt->IsViewMetaChars();
532 
533  lcl_SetViewMetaChars( *pOpt, bFlag );
534  break;
535 
536  case SID_AUTOSPELL_CHECK:
537  const SfxPoolItem* pItem;
538 
539  if (pArgs && pArgs->HasItem(FN_PARAM_1, &pItem))
540  bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
541  else if( STATE_TOGGLE == eState )
542  {
543  bFlag = !pOpt->IsOnlineSpell();
544  bSet = bFlag;
545  }
546 
547  pOpt->SetOnlineSpell(bSet);
548  {
549  SvtLinguConfig aCfg;
550  aCfg.SetProperty( UPN_IS_SPELL_AUTO, uno::makeAny( bSet ) );
551 
552  if (xLngProp.is())
553  xLngProp->setIsSpellAuto( bSet );
554 
555  // for the time being we do not have a specific option for grammarchecking.
556  // thus we'll use the one for spell checking...
557  if (bSet)
558  {
559  SwDocShell *pDocSh = GetDocShell();
560  SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
561 
562  // right now we don't have view options for automatic grammar checking. Thus...
563  bool bIsAutoGrammar = false;
564  aCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bIsAutoGrammar;
565 
566  if (pDoc && bIsAutoGrammar)
567  pDoc->StartGrammarChecking();
568  }
569  }
570  break;
571 
572  case FN_SHADOWCURSOR:
573  if( STATE_TOGGLE == eState )
574  {
575  bFlag = !pOpt->IsShadowCursor();
576  bSet = bFlag;
577  }
578 
579  pOpt->SetShadowCursor(bSet);
580  break;
581 
583  if( STATE_TOGGLE == eState )
584  bFlag = !pOpt->IsShowInlineTooltips();
585 
586  pOpt->SetShowInlineTooltips( bFlag );
587  break;
588 
590  if( STATE_TOGGLE == eState )
591  bFlag = !pOpt->IsUseHeaderFooterMenu();
592 
593  pOpt->SetUseHeaderFooterMenu( bFlag );
594  break;
595 
597  if( STATE_TOGGLE == eState )
598  bFlag = !pOpt->IsShowOutlineContentVisibilityButton();
599 
600  pOpt->SetShowOutlineContentVisibilityButton( bFlag );
601  break;
602 
604  if( STATE_TOGGLE == eState )
605  bFlag = !pOpt->IsShowChangesInMargin();
606 
607  pOpt->SetShowChangesInMargin( bFlag );
608  break;
609 
610  default:
611  OSL_FAIL("wrong request method");
612  return;
613  }
614 
615  // Set UserPrefs, mark request as modified
616  bool bWebView = dynamic_cast<const SwWebView*>(this) != nullptr;
617  SwWrtShell &rSh = GetWrtShell();
618  rSh.StartAction();
619  SwModule* pModule = SW_MOD();
620  if( *rSh.GetViewOptions() != *pOpt )
621  {
622  rSh.ApplyViewOptions( *pOpt );
623  if( bBrowseModeChanged )
624  {
625  GetDocShell()->ToggleLayoutMode(this);
626  }
627 
628  // The UsrPref must be marked as modified.
629  // call for initialization
630  pModule->GetUsrPref(bWebView);
631  SwModule::CheckSpellChanges( pOpt->IsOnlineSpell(), false, false, false );
632  }
633  //OS: Set back modified again, because view/fields sets the Doc modified.
634  if( !bModified )
635  rSh.ResetModified();
636 
637  pModule->ApplyUsrPref( *pOpt, this, bWebView ? SvViewOpt::DestWeb : SvViewOpt::DestText );
638 
639  // #i6193# let postits know about new spellcheck setting
640  if ( nSlot == SID_AUTOSPELL_CHECK )
642 
645 
646  const bool bLockedView = rSh.IsViewLocked();
647  rSh.LockView( true ); //lock visible section
649  if( bBrowseModeChanged && !bFlag )
650  CalcVisArea( GetEditWin().GetOutputSizePixel() );
651  rSh.LockView( bLockedView );
652 
653  pOpt.reset();
654  Invalidate(rReq.GetSlot());
655  if(!pArgs)
656  rReq.AppendItem(SfxBoolItem(nSlot, bFlag));
657  rReq.Done();
658 }
659 
661 {
664  pDlg->Execute();
665 }
666 
668 {
671  ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateOutlineTabDialog(GetFrameWeld(), &aTmp, GetWrtShell()));
672  pDlg->Execute();
673 }
674 
675 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
static void lcl_SetViewMetaChars(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:147
void SetLineBreak(bool b)
Definition: viewopt.hxx:254
void UIFeatureChanged()
bool IsViewMetaChars() const
Definition: viewopt.hxx:364
bool IsSmoothScroll() const
Definition: viewopt.hxx:392
static void lcl_SetViewMarks(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:139
#define FN_VIEW_GRAPHIC
Definition: cmdid.h:154
void SetSoftHyph(bool b)
Definition: viewopt.hxx:265
void SetMailMergeConfigItem(std::shared_ptr< SwMailMergeConfigItem > const &rConfigItem)
Definition: view0.cxx:122
#define SFX_IMPL_INTERFACE(Class, SuperClass)
static bool IsDocBoundaries()
Definition: viewopt.hxx:654
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON
Definition: cmdid.h:189
std::shared_ptr< SwMailMergeConfigItem > const & GetMailMergeConfigItem() const
Definition: view0.cxx:128
bool IsViewAnyRuler() const
Definition: viewopt.hxx:570
std::string GetValue
std::unique_ptr< SwWrtShell > m_pWrtShell
Definition: view.hxx:181
void ToggleLayoutMode(SwView *pView)
Definition: docsh2.cxx:149
bool IsGraphic() const
Definition: viewopt.hxx:322
bool StatVRuler() const
Definition: view.hxx:475
bool IsPostIts() const
Definition: viewopt.hxx:272
bool IsModified() const
Changes in document?
Definition: edws.cxx:65
Definition: doc.hxx:184
sal_uInt16 FirstWhich()
bool IsHardBlank() const
Definition: viewopt.hxx:230
SwEditWin & GetEditWin()
Definition: view.hxx:401
void Done(bool bRemove=false)
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
Definition: apphdl.cxx:1044
void RecheckBrowseMode()
Definition: view0.cxx:166
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void SetHardBlank(bool b)
Definition: viewopt.hxx:232
bool IsShowHiddenPara() const
Definition: viewopt.hxx:386
void SetOutlineContentVisibilityButtons()
Definition: edtwin.cxx:6602
#define FN_VSCROLLBAR
Definition: cmdid.h:158
void SetShowHiddenChar(bool b)
Definition: viewopt.hxx:314
uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
Definition: swtypes.cxx:67
sal_uInt16 NextWhich()
SwWrtShell & GetWrtShell() const
Definition: view.hxx:398
bool CanHideWhitespace() const
The rules that allow for hiding whitespace.
Definition: viewopt.hxx:476
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:631
bool IsFieldName() const
Definition: viewopt.hxx:268
#define FN_SYNC_LABELS
Definition: cmdid.h:463
void InvalidateBorder()
#define UPN_IS_GRAMMAR_AUTO
void SetParagraph(bool b)
Definition: viewopt.hxx:238
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
bool getBrowseMode() const
Definition: viewopt.hxx:461
static bool IsFuzzing()
void ExecViewOptions(SfxRequest &)
Definition: view0.cxx:358
#define FN_VIEW_HIDE_WHITESPACE
Definition: cmdid.h:184
ShellMode
Definition: view.hxx:85
#define FN_RULER
Definition: cmdid.h:152
bool IsViewHRuler(bool bDirect=false) const
Definition: viewopt.hxx:581
#define FN_HSCROLLBAR
Definition: cmdid.h:159
bool IsBlank(bool bHard=false) const
Definition: viewopt.hxx:224
#define FN_INSERT_FIELD_DATA_ONLY
Definition: cmdid.h:210
#define FN_VIEW_MARKS
Definition: cmdid.h:162
bool IsShadowCursor() const
Definition: viewopt.hxx:610
DocumentType eType
bool IsShowOutlineContentVisibilityButton() const
Definition: viewopt.hxx:305
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
static void SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveInConfig=false)
Definition: viewopt.cxx:521
static bool lcl_IsViewMarks(const SwViewOption &rVOpt)
Definition: view0.cxx:133
bool IsCrossHair() const
Definition: viewopt.hxx:374
#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:68
void EndAction(const bool bIdleEnd=false, const bool DoSetPosX=false)
Definition: crsrsh.cxx:238
#define UPN_IS_SPELL_AUTO
bool IsResolvedPostIts() const
Definition: viewopt.hxx:277
SfxBindings & GetBindings()
void SetTab(bool b)
Definition: viewopt.hxx:221
bool IsShowChangesInMargin() const
Definition: viewopt.hxx:293
bool IsParagraph(bool bHard=false) const
Definition: viewopt.hxx:235
bool IsViewVRuler(bool bDirect=false) const
Definition: viewopt.hxx:595
#define FN_VIEW_TABLEGRID
Definition: cmdid.h:164
void ExecFormatFootnote()
Definition: view0.cxx:660
#define FN_SHOW_INLINETOOLTIPS
Definition: cmdid.h:185
bool IsTab(bool bHard=false) const
Definition: viewopt.hxx:218
#define FN_SHADOWCURSOR
Definition: cmdid.h:513
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
bool IsHScrollbarVisible() const
Definition: viewmdi.cxx:667
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:591
bool IsLineBreak(bool bHard=false) const
Definition: viewopt.hxx:251
bool IsOnlineSpell() const
Definition: viewopt.hxx:360
static bool IsFieldShadings()
Definition: viewopt.hxx:660
#define SFX_VIEW_REGISTRATION(DocClass)
void SetViewMetaChars(bool b)
Definition: viewopt.hxx:366
#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:1108
bool IsReadOnly() const
void StartAction()
Definition: crsrsh.cxx:221
void CheckMetaText()
Definition: PostItMgr.cxx:2275
bool IsHideWhitespaceMode() const
Definition: viewopt.hxx:472
#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:287
std::unique_ptr< SwView_Impl > m_pViewImpl
Definition: view.hxx:187
void ExecNumberingOutline(SfxItemPool &)
Definition: view0.cxx:667
bool IsVScrollbarVisible() const
Definition: viewmdi.cxx:679
void LockView(bool b)
Definition: viewsh.hxx:462
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:423
void SetLayout()
Definition: PostItMgr.hxx:199
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:621
bool SetProperty(const OUString &rPropertyName, const css::uno::Any &rValue)
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
static bool IsTableBoundaries()
Definition: viewopt.hxx:656
bool IsUseHeaderFooterMenu() const
Definition: viewopt.hxx:299
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:263
bool IsShowBookmarks(bool const bHard=false) const
Definition: viewopt.hxx:245
void SetSpellChecking()
Definition: PostItMgr.cxx:2261
bool IsGridVisible() const
Definition: viewopt.hxx:355
void AppendItem(const SfxPoolItem &)
#define FN_USE_HEADERFOOTERMENU
Definition: cmdid.h:186
css::view::XSelectionSupplier * GetUNOObject()
Definition: view0.cxx:108
css::uno::Any GetProperty(const OUString &rPropertyName) const
void StateViewOptions(SfxItemSet &)
Definition: view0.cxx:209
SvxZoomType
bool IsShowHiddenChar(bool bHard=false) const
Definition: viewopt.hxx:310
bool StartGrammarChecking(bool bSkipStart=false)
Definition: docnew.cxx:132
void ApplyAccessibilityOptions(SvtAccessibilityOptions const &rAccessibilityOptions)
Definition: view0.cxx:113
bool IsSnap() const
Definition: viewopt.hxx:347
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: wrtsh1.cxx:1797
ShellMode GetShellMode() const
Definition: view0.cxx:103
#define FN_VLINEAL
Definition: cmdid.h:157
void SetShowBookmarks(bool const b)
Definition: viewopt.hxx:241
#define FN_REDLINE_ACCEPT
Definition: cmdid.h:130
bool IsViewLocked() const
Definition: viewsh.hxx:461
Definition: view.hxx:144
void SetBlank(bool b)
Definition: viewopt.hxx:227
void CheckVisArea()
Definition: viewport.cxx:310
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
Definition: swmodul1.cxx:137