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