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->ApplyAccessiblityOptions(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,
186  //SID_AUTOSPELL_CHECK,
187  //SID_AUTOSPELL_MARKOFF,
188  FN_RULER, /*20211*/
189  FN_VIEW_GRAPHIC, /*20213*/
191  FN_VIEW_FIELDS, /*20215*/
192  FN_VLINEAL, /*20216*/
193  FN_VSCROLLBAR, /*20217*/
194  FN_HSCROLLBAR, /*20218*/
196  FN_VIEW_MARKS,
197  //FN_VIEW_FIELDNAME, /**/
198  FN_VIEW_TABLEGRID, /*20227*/
199  FN_PRINT_LAYOUT, /*20237*/
200  FN_QRY_MERGE, /*20364*/
202  0
203  };
204  // the view must not exist!
205  GetViewFrame()->GetBindings().Invalidate(aInva);
206  CheckVisArea();
207 
209  if( GetWrtShell().GetViewOptions()->getBrowseMode() && SvxZoomType::PERCENT != (eType =
210  GetWrtShell().GetViewOptions()->GetZoomType()) )
211  SetZoom( eType );
213 }
214 
215 // State of view options
216 
218 {
219  SfxWhichIter aIter(rSet);
220  sal_uInt16 nWhich = aIter.FirstWhich();
221  SfxBoolItem aBool;
222  const SwViewOption* pOpt = GetWrtShell().GetViewOptions();
223 
224  while(nWhich)
225  {
226  bool bReadonly = GetDocShell()->IsReadOnly();
227  if ( bReadonly && nWhich != FN_VIEW_GRAPHIC )
228  {
229  rSet.DisableItem(nWhich);
230  nWhich = 0;
231  }
232  switch(nWhich)
233  {
234  case FN_RULER:
235  {
236  if(!pOpt->IsViewHRuler(true) && !pOpt->IsViewVRuler(true))
237  {
238  rSet.DisableItem(nWhich);
239  nWhich = 0;
240  }
241  else
242  aBool.SetValue( pOpt->IsViewAnyRuler());
243  }
244  break;
245  case SID_BROWSER_MODE:
246  case FN_PRINT_LAYOUT:
247  {
248  bool bState = pOpt->getBrowseMode();
249  if(FN_PRINT_LAYOUT == nWhich)
250  bState = !bState;
251  aBool.SetValue( bState );
252  }
253  break;
254  case FN_VIEW_BOUNDS:
255  aBool.SetValue( SwViewOption::IsDocBoundaries()); break;
256  case FN_VIEW_GRAPHIC:
257  aBool.SetValue( pOpt->IsGraphic() ); break;
258  case FN_VIEW_FIELDS:
259  aBool.SetValue( SwViewOption::IsFieldShadings() ); break;
260  case FN_VIEW_FIELDNAME:
261  aBool.SetValue( pOpt->IsFieldName() ); break;
262  case FN_VIEW_MARKS:
263  aBool.SetValue( lcl_IsViewMarks(*pOpt) ); break;
264  case FN_VIEW_META_CHARS:
265  aBool.SetValue( pOpt->IsViewMetaChars() ); break;
266  case FN_VIEW_TABLEGRID:
267  aBool.SetValue( SwViewOption::IsTableBoundaries() ); break;
268  case SID_TOGGLE_NOTES:
269  {
270  if (!GetPostItMgr()->HasNotes())
271  {
272  rSet.DisableItem(nWhich);
273  nWhich = 0;
274  }
275  else
276  aBool.SetValue( pOpt->IsPostIts());
277  break;
278  }
279  case FN_VIEW_HIDDEN_PARA:
280  aBool.SetValue( pOpt->IsShowHiddenPara()); break;
282  {
283  if (pOpt->getBrowseMode() || !pOpt->CanHideWhitespace())
284  {
285  rSet.DisableItem(nWhich);
286  nWhich = 0;
287  }
288  else
289  aBool.SetValue(pOpt->IsHideWhitespaceMode());
290  break;
291  }
292  case SID_GRID_VISIBLE:
293  aBool.SetValue( pOpt->IsGridVisible() ); break;
294  case SID_GRID_USE:
295  aBool.SetValue( pOpt->IsSnap() ); break;
296  case SID_HELPLINES_MOVE:
297  aBool.SetValue( pOpt->IsCrossHair() ); break;
299  aBool.SetValue( pOpt->IsSmoothScroll()); break;
300  case FN_VLINEAL:
301  aBool.SetValue( StatVRuler() ); break;
302  case FN_HSCROLLBAR:
303  if( pOpt->getBrowseMode() )
304  {
305  rSet.DisableItem(nWhich);
306  nWhich = 0;
307  }
308  else
309  aBool.SetValue( IsHScrollbarVisible() );
310  break;
311  case FN_VSCROLLBAR:
312  aBool.SetValue( IsVScrollbarVisible() ); break;
313  case SID_AUTOSPELL_CHECK:
314  aBool.SetValue( pOpt->IsOnlineSpell() );
315  break;
316  case FN_SHADOWCURSOR:
317  if ( pOpt->getBrowseMode() )
318  {
319  rSet.DisableItem( nWhich );
320  nWhich = 0;
321  }
322  else
323  aBool.SetValue( pOpt->IsShadowCursor() );
324  break;
326  aBool.SetValue( pOpt->IsShowInlineTooltips() );
327  break;
329  aBool.SetValue( pOpt->IsUseHeaderFooterMenu() );
330  break;
331  }
332 
333  if( nWhich )
334  {
335  aBool.SetWhich( nWhich );
336  rSet.Put( aBool );
337  }
338  nWhich = aIter.NextWhich();
339  }
340 }
341 
342 // execute view options
343 
345 {
346  std::unique_ptr<SwViewOption> pOpt(new SwViewOption( *GetWrtShell().GetViewOptions() ));
347  bool bModified = GetWrtShell().IsModified();
348 
349  int eState = STATE_TOGGLE;
350  bool bSet = false;
351  bool bBrowseModeChanged = false;
352 
353  const SfxItemSet *pArgs = rReq.GetArgs();
354  sal_uInt16 nSlot = rReq.GetSlot();
355  const SfxPoolItem* pAttr=nullptr;
356 
357  if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
358  {
359  bSet = static_cast<const SfxBoolItem*>(pAttr)->GetValue();
360  eState = bSet ? STATE_ON : STATE_OFF;
361  }
362 
363  bool bFlag = STATE_ON == eState;
364  uno::Reference< linguistic2::XLinguProperties > xLngProp( ::GetLinguPropertySet() );
365 
366  switch ( nSlot )
367  {
368  case FN_VIEW_GRAPHIC:
369  if( STATE_TOGGLE == eState )
370  bFlag = !pOpt->IsGraphic();
371  pOpt->SetGraphic( bFlag );
372  break;
373 
374  case FN_VIEW_FIELDS:
375  if( STATE_TOGGLE == eState )
376  bFlag = !SwViewOption::IsFieldShadings() ;
378  break;
379 
380  case FN_VIEW_BOUNDS:
381  if( STATE_TOGGLE == eState )
384  break;
385 
386  case SID_GRID_VISIBLE:
387  if( STATE_TOGGLE == eState )
388  bFlag = !pOpt->IsGridVisible();
389 
390  pOpt->SetGridVisible( bFlag );
391  break;
392 
393  case SID_GRID_USE:
394  if( STATE_TOGGLE == eState )
395  bFlag = !pOpt->IsSnap();
396 
397  pOpt->SetSnap( bFlag );
398  break;
399 
400  case SID_HELPLINES_MOVE:
401  if( STATE_TOGGLE == eState )
402  bFlag = !pOpt->IsCrossHair();
403 
404  pOpt->SetCrossHair( bFlag );
405  break;
406 
407  case SID_BROWSER_MODE:
408  bBrowseModeChanged = !pOpt->getBrowseMode();
409  pOpt->setBrowseMode(true );
410  break;
411 
412  case FN_PRINT_LAYOUT:
413  bBrowseModeChanged = pOpt->getBrowseMode();
414  pOpt->setBrowseMode( false );
415  break;
416 
417  case SID_TOGGLE_NOTES:
418  if ( STATE_TOGGLE == eState )
419  bFlag = !pOpt->IsPostIts();
420 
421  GetPostItMgr()->SetLayout();
422  pOpt->SetPostIts( bFlag );
423  if (pOpt->IsPostIts())
425  break;
426 
427  case FN_VIEW_HIDDEN_PARA:
428  if ( STATE_TOGGLE == eState )
429  bFlag = !pOpt->IsShowHiddenPara();
430 
431  pOpt->SetShowHiddenPara( bFlag );
432  break;
433 
435  if ( STATE_TOGGLE == eState )
436  bFlag = !pOpt->IsHideWhitespaceMode();
437 
438  pOpt->SetHideWhitespaceMode(bFlag);
439  break;
440 
442 
443  if ( STATE_TOGGLE == eState )
444  bFlag = !pOpt->IsSmoothScroll();
445 
446  pOpt->SetSmoothScroll( bFlag );
447  break;
448 
449  case FN_VLINEAL:
450  if( STATE_TOGGLE == eState )
451  bFlag = !pOpt->IsViewVRuler();
452 
453  pOpt->SetViewVRuler( bFlag );
454  break;
455 
456  case FN_VSCROLLBAR:
457  if( STATE_TOGGLE == eState )
458  bFlag = !pOpt->IsViewVScrollBar();
459 
460  pOpt->SetViewVScrollBar( bFlag );
461  break;
462 
463  case FN_HSCROLLBAR:
464  if( STATE_TOGGLE == eState )
465  bFlag = !pOpt->IsViewHScrollBar();
466 
467  pOpt->SetViewHScrollBar( bFlag );
468  break;
469 
470  case FN_RULER:
471  if( STATE_TOGGLE == eState )
472  bFlag = !pOpt->IsViewAnyRuler();
473 
474  pOpt->SetViewAnyRuler( bFlag );
475  break;
476 
477  case FN_VIEW_TABLEGRID:
478  if( STATE_TOGGLE == eState )
481  break;
482 
483  case FN_VIEW_FIELDNAME:
484  if( STATE_TOGGLE == eState )
485  bFlag = !pOpt->IsFieldName() ;
486 
487  pOpt->SetFieldName( bFlag );
488  break;
489 
490  case FN_VIEW_MARKS:
491  if( STATE_TOGGLE == eState )
492  bFlag = !lcl_IsViewMarks(*pOpt) ;
493 
494  lcl_SetViewMarks( *pOpt, bFlag );
495  break;
496 
497  case FN_VIEW_META_CHARS:
498  if( STATE_TOGGLE == eState )
499  bFlag = !pOpt->IsViewMetaChars();
500 
501  lcl_SetViewMetaChars( *pOpt, bFlag );
502  break;
503 
504  case SID_AUTOSPELL_CHECK:
505  if( STATE_TOGGLE == eState )
506  {
507  bFlag = !pOpt->IsOnlineSpell();
508  bSet = bFlag;
509  }
510 
511  pOpt->SetOnlineSpell(bSet);
512  {
513  SvtLinguConfig aCfg;
514  aCfg.SetProperty( UPN_IS_SPELL_AUTO, uno::makeAny( bSet ) );
515 
516  if (xLngProp.is())
517  xLngProp->setIsSpellAuto( bSet );
518 
519  // for the time being we do not have a specific option for grammarchecking.
520  // thus we'll use the one for spell checking...
521  if (bSet)
522  {
523  SwDocShell *pDocSh = GetDocShell();
524  SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
525 
526  // right now we don't have view options for automatic grammar checking. Thus...
527  bool bIsAutoGrammar = false;
528  aCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bIsAutoGrammar;
529 
530  if (pDoc && bIsAutoGrammar)
531  pDoc->StartGrammarChecking();
532  }
533  }
534  break;
535 
536  case FN_SHADOWCURSOR:
537  if( STATE_TOGGLE == eState )
538  {
539  bFlag = !pOpt->IsShadowCursor();
540  bSet = bFlag;
541  }
542 
543  pOpt->SetShadowCursor(bSet);
544  break;
545 
547  if( STATE_TOGGLE == eState )
548  bFlag = !pOpt->IsShowInlineTooltips();
549 
550  pOpt->SetShowInlineTooltips( bFlag );
551  break;
552 
554  if( STATE_TOGGLE == eState )
555  bFlag = !pOpt->IsUseHeaderFooterMenu();
556 
557  pOpt->SetUseHeaderFooterMenu( bFlag );
558  break;
559 
560  default:
561  OSL_FAIL("wrong request method");
562  return;
563  }
564 
565  // Set UserPrefs, mark request as modified
566  bool bWebView = dynamic_cast<const SwWebView*>(this) != nullptr;
567  SwWrtShell &rSh = GetWrtShell();
568  rSh.StartAction();
569  SwModule* pModule = SW_MOD();
570  if( *rSh.GetViewOptions() != *pOpt )
571  {
572  rSh.ApplyViewOptions( *pOpt );
573  if( bBrowseModeChanged )
574  {
575  GetDocShell()->ToggleLayoutMode(this);
576  }
577 
578  // The UsrPref must be marked as modified.
579  // call for initialization
580  pModule->GetUsrPref(bWebView);
581  SwModule::CheckSpellChanges( pOpt->IsOnlineSpell(), false, false, false );
582  }
583  //OS: Set back modified again, because view/fields sets the Doc modified.
584  if( !bModified )
585  rSh.ResetModified();
586 
587  pModule->ApplyUsrPref( *pOpt, this, bWebView ? SvViewOpt::DestWeb : SvViewOpt::DestText );
588 
589  // #i6193# let postits know about new spellcheck setting
590  if ( nSlot == SID_AUTOSPELL_CHECK )
592 
593  const bool bLockedView = rSh.IsViewLocked();
594  rSh.LockView( true ); //lock visible section
596  if( bBrowseModeChanged && !bFlag )
597  CalcVisArea( GetEditWin().GetOutputSizePixel() );
598  rSh.LockView( bLockedView );
599 
600  pOpt.reset();
601  Invalidate(rReq.GetSlot());
602  if(!pArgs)
603  rReq.AppendItem(SfxBoolItem(nSlot, bFlag));
604  rReq.Done();
605 }
606 
608 {
611  pDlg->Execute();
612 }
613 
615 {
618  ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateOutlineTabDialog(GetFrameWeld(), &aTmp, GetWrtShell()));
619  pDlg->Execute();
620 }
621 
622 /* 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:237
void UIFeatureChanged()
bool IsViewMetaChars() const
Definition: viewopt.hxx:329
bool IsSmoothScroll() const
Definition: viewopt.hxx:357
static void lcl_SetViewMarks(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:150
#define FN_VIEW_GRAPHIC
Definition: cmdid.h:152
void SetSoftHyph(bool b)
Definition: viewopt.hxx:248
void SetMailMergeConfigItem(std::shared_ptr< SwMailMergeConfigItem > const &rConfigItem)
Definition: view0.cxx:133
#define SFX_IMPL_INTERFACE(Class, SuperClass)
static bool IsDocBoundaries()
Definition: viewopt.hxx:619
std::shared_ptr< SwMailMergeConfigItem > const & GetMailMergeConfigItem() const
Definition: view0.cxx:139
bool IsViewAnyRuler() const
Definition: viewopt.hxx:535
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:287
bool StatVRuler() const
Definition: view.hxx:477
bool IsReadOnly(const OUString &rURL, bool *pbExist)
bool IsPostIts() const
Definition: viewopt.hxx:255
bool IsModified() const
Changes in document?
Definition: edws.cxx:64
Definition: doc.hxx:185
sal_uInt16 FirstWhich()
bool IsHardBlank() const
Definition: viewopt.hxx:223
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:1040
void RecheckBrowseMode()
Definition: view0.cxx:175
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void SetHardBlank(bool b)
Definition: viewopt.hxx:225
bool IsShowHiddenPara() const
Definition: viewopt.hxx:351
#define FN_VSCROLLBAR
Definition: cmdid.h:156
void SetShowHiddenChar(bool b)
Definition: viewopt.hxx:279
uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
Definition: swtypes.cxx:81
sal_uInt16 NextWhich()
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
bool CanHideWhitespace() const
The rules that allow for hiding whitespace.
Definition: viewopt.hxx:441
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:251
#define FN_SYNC_LABELS
Definition: cmdid.h:445
void InvalidateBorder()
#define UPN_IS_GRAMMAR_AUTO
void SetParagraph(bool b)
Definition: viewopt.hxx:231
bool getBrowseMode() const
Definition: viewopt.hxx:426
static bool IsFuzzing()
void ExecViewOptions(SfxRequest &)
Definition: view0.cxx:344
#define FN_VIEW_HIDE_WHITESPACE
Definition: cmdid.h:182
ShellMode
Definition: view.hxx:87
#define FN_RULER
Definition: cmdid.h:150
bool IsViewHRuler(bool bDirect=false) const
Definition: viewopt.hxx:546
#define FN_HSCROLLBAR
Definition: cmdid.h:157
bool IsBlank(bool bHard=false) const
Definition: viewopt.hxx:217
#define FN_INSERT_FIELD_DATA_ONLY
Definition: cmdid.h:203
#define FN_VIEW_MARKS
Definition: cmdid.h:160
bool IsShadowCursor() const
Definition: viewopt.hxx:575
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
static void SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveInConfig=false)
Definition: viewopt.cxx:523
static bool lcl_IsViewMarks(const SwViewOption &rVOpt)
Definition: view0.cxx:144
bool IsCrossHair() const
Definition: viewopt.hxx:339
#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:153
SFX_IMPL_NAMED_VIEWFACTORY(SwView,"Default")
Definition: view0.cxx:79
void EndAction(const bool bIdleEnd=false, const bool DoSetPosX=false)
Definition: crsrsh.cxx:229
#define UPN_IS_SPELL_AUTO
SfxBindings & GetBindings()
void SetTab(bool b)
Definition: viewopt.hxx:214
bool IsParagraph(bool bHard=false) const
Definition: viewopt.hxx:228
bool IsViewVRuler(bool bDirect=false) const
Definition: viewopt.hxx:560
#define FN_VIEW_TABLEGRID
Definition: cmdid.h:162
void ExecFormatFootnote()
Definition: view0.cxx:607
#define FN_SHOW_INLINETOOLTIPS
Definition: cmdid.h:183
bool IsTab(bool bHard=false) const
Definition: viewopt.hxx:211
#define FN_SHADOWCURSOR
Definition: cmdid.h:495
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
bool IsHScrollbarVisible() const
Definition: viewmdi.cxx:673
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:572
bool IsLineBreak(bool bHard=false) const
Definition: viewopt.hxx:234
bool IsOnlineSpell() const
Definition: viewopt.hxx:325
DocumentType const eType
static bool IsFieldShadings()
Definition: viewopt.hxx:625
#define SFX_VIEW_REGISTRATION(DocClass)
void SetViewMetaChars(bool b)
Definition: viewopt.hxx:331
#define FN_QRY_MERGE
Definition: cmdid.h:221
SAL_DLLPRIVATE void CalcVisArea(const Size &rPixelSz)
Definition: viewport.cxx:778
void SetValue(bool const bTheValue)
SwDocShell * GetDocShell()
Definition: view.cxx:1115
bool IsReadOnly() const
void StartAction()
Definition: crsrsh.cxx:212
void CheckMetaText()
Definition: PostItMgr.cxx:2205
bool IsHideWhitespaceMode() const
Definition: viewopt.hxx:437
#define FN_VIEW_FIELDS
Definition: cmdid.h:154
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
#define SFX_OBJECTBAR_TOOLS
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
Definition: viewmdi.cxx:82
sal_uInt16 GetSlot() const
void DisableItem(sal_uInt16 nWhich)
#define FN_VIEW_FIELDNAME
Definition: cmdid.h:161
weld::Window * GetFrameWeld() const
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:264
std::unique_ptr< SwView_Impl > m_pViewImpl
Definition: view.hxx:189
void ExecNumberingOutline(SfxItemPool &)
Definition: view0.cxx:614
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 ApplyAccessiblityOptions(SvtAccessibilityOptions const &rAccessibilityOptions)
Definition: view0.cxx:124
void SetWhich(sal_uInt16 nId)
#define FN_PRINT_LAYOUT
Definition: cmdid.h:166
#define FN_VIEW_HIDDEN_PARA
Definition: cmdid.h:170
SwPostItMgr * GetPostItMgr()
Definition: view.hxx:621
bool SetProperty(const OUString &rPropertyName, const css::uno::Any &rValue)
static bool IsTableBoundaries()
Definition: viewopt.hxx:621
bool IsUseHeaderFooterMenu() const
Definition: viewopt.hxx:270
#define FN_VIEW_SMOOTH_SCROLL
Definition: cmdid.h:171
#define FN_VIEW_META_CHARS
Definition: cmdid.h:159
bool IsSoftHyph() const
Definition: viewopt.hxx:246
void SetSpellChecking()
Definition: PostItMgr.cxx:2191
bool IsGridVisible() const
Definition: viewopt.hxx:320
void AppendItem(const SfxPoolItem &)
#define FN_USE_HEADERFOOTERMENU
Definition: cmdid.h:184
css::view::XSelectionSupplier * GetUNOObject()
Definition: view0.cxx:119
css::uno::Any GetProperty(const OUString &rPropertyName) const
void StateViewOptions(SfxItemSet &)
Definition: view0.cxx:217
SvxZoomType
bool IsShowHiddenChar(bool bHard=false) const
Definition: viewopt.hxx:275
bool StartGrammarChecking(bool bSkipStart=false)
Definition: docnew.cxx:149
bool IsSnap() const
Definition: viewopt.hxx:312
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: wrtsh1.cxx:1772
#define FN_VLINEAL
Definition: cmdid.h:155
#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:220
void CheckVisArea()
Definition: viewport.cxx:324
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
Definition: swmodul1.cxx:144