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