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#include <config_wasm_strip.h>
22
24#include <svl/eitem.hxx>
27#include <unotools/lingucfg.hxx>
28#include <officecfg/Office/Common.hxx>
29#include <viewopt.hxx>
30#include <globals.h>
31#include <sfx2/infobar.hxx>
32#include <sfx2/request.hxx>
33#include <svl/whiter.hxx>
34#include <svx/srchdlg.hxx>
35#include <sfx2/viewfrm.hxx>
36#include <sfx2/bindings.hxx>
37#include <sfx2/dispatch.hxx>
39#include <uivwimp.hxx>
41#include <swmodule.hxx>
42#include <com/sun/star/linguistic2/XLinguProperties.hpp>
43#include <osl/diagnose.h>
44
45#include <sfx2/objface.hxx>
46#include <wrtsh.hxx>
47#include <edtwin.hxx>
48#include <view.hxx>
49#include <docsh.hxx>
50#include <doc.hxx>
51#include <globals.hrc>
52#include <cmdid.h>
53#include <globdoc.hxx>
54#include <wview.hxx>
56
57#define ShellClass_SwView
58#define ShellClass_Text
59#define ShellClass_TextDrawText
60
61#include <sfx2/msg.hxx>
62#include <swslots.hxx>
63#include <PostItMgr.hxx>
64
65using namespace ::com::sun::star;
66
68#include <sfx2/viewfac.hxx>
69
70#include <memory>
71#include <swabstdlg.hxx>
72
74{
76 {
79 }
80}
81
83
84void SwView::InitInterface_Impl()
85{
86 GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true);
87
88 GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
89
90 GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
91 GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
92 GetStaticInterface()->RegisterChildWindow(SwSpellDialogChildWindow::GetChildWindowId());
93 GetStaticInterface()->RegisterChildWindow(FN_REDLINE_ACCEPT);
94 GetStaticInterface()->RegisterChildWindow(SID_HYPERLINK_DIALOG);
95 GetStaticInterface()->RegisterChildWindow(FN_WORDCOUNT_DIALOG);
96#if HAVE_FEATURE_AVMEDIA
97 GetStaticInterface()->RegisterChildWindow(::avmedia::MediaPlayer::GetChildWindowId());
98#endif
99 GetStaticInterface()->RegisterChildWindow(FN_INSERT_FIELD_DATA_ONLY);
100
101 GetStaticInterface()->RegisterChildWindow(FN_SYNC_LABELS, false, SfxShellFeature::SwChildWindowLabel);
102
103 GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS, SfxVisibilityFlags::Standard|SfxVisibilityFlags::Server,
104 ToolbarId::Tools_Toolbox);
105}
106
107
109{
110 return m_pViewImpl->GetShellMode();
111}
112
113view::XSelectionSupplier* SwView::GetUNOObject()
114{
115 return m_pViewImpl->GetUNOObject();
116}
117
119{
120#if ENABLE_WASM_STRIP_ACCESSIBILITY
121 (void)rAccessibilityOptions;
122#else
123 m_pWrtShell->ApplyAccessibilityOptions(rAccessibilityOptions);
124 //to enable the right state of the selection cursor in readonly documents
125 if(GetDocShell()->IsReadOnly())
126 m_pWrtShell->ShowCursor();
127#endif
128}
129
130void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem> const & rConfigItem)
131{
132 m_pViewImpl->SetMailMergeConfigItem(rConfigItem);
134}
135
136std::shared_ptr<SwMailMergeConfigItem> const & SwView::GetMailMergeConfigItem() const
137{
138 return m_pViewImpl->GetMailMergeConfigItem();
139}
140
141static bool lcl_IsViewMarks( const SwViewOption& rVOpt )
142{
143 return rVOpt.IsHardBlank() &&
144 rVOpt.IsSoftHyph() &&
146}
147static void lcl_SetViewMarks(SwViewOption& rVOpt, bool bOn )
148{
149 rVOpt.SetHardBlank(bOn);
150 rVOpt.SetSoftHyph(bOn);
152 ViewOptFlags::FieldShadings, bOn, true);
153}
154
155static void lcl_SetViewMetaChars( SwViewOption& rVOpt, bool bOn)
156{
157 rVOpt.SetViewMetaChars( bOn );
158 if(bOn && !(rVOpt.IsParagraph() ||
159 rVOpt.IsTab() ||
160 rVOpt.IsLineBreak() ||
161 rVOpt.IsShowHiddenChar() ||
162 rVOpt.IsShowBookmarks() ||
163 rVOpt.IsBlank()))
164 {
165 rVOpt.SetParagraph(bOn);
166 rVOpt.SetTab(bOn);
167 rVOpt.SetLineBreak(bOn);
168 rVOpt.SetBlank(bOn);
169 rVOpt.SetShowHiddenChar(bOn);
170 rVOpt.SetShowBookmarks(bOn);
171 }
172}
173
175{
176 // OS: pay attention to numerical order!
177 static sal_uInt16 const aInva[] =
178 {
179 //SID_NEWWINDOW,/*5620*/
180 SID_BROWSER_MODE, /*6313*/
181 SID_RULER_BORDERS, SID_RULER_PAGE_POS,
182 //SID_ATTR_LONG_LRSPACE,
183 SID_HTML_MODE,
184 SID_RULER_PROTECT, /* 10915 */
185 //SID_AUTOSPELL_CHECK,
186 //SID_AUTOSPELL_MARKOFF,
187 SID_TOGGLE_RESOLVED_NOTES, /* 11672*/
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*/
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!
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:
256 case FN_VIEW_GRAPHIC:
257 aBool.SetValue( pOpt->IsGraphic() ); break;
258 case FN_VIEW_FIELDS:
259 aBool.SetValue( SwViewOption::IsFieldShadings() ); break;
261 aBool.SetValue( pOpt->IsFieldName() ); break;
262 case FN_VIEW_MARKS:
263 aBool.SetValue( lcl_IsViewMarks(*pOpt) ); break;
265 aBool.SetValue( pOpt->IsViewMetaChars() ); 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 SID_TOGGLE_RESOLVED_NOTES:
280 {
281 if (!GetPostItMgr()->HasNotes())
282 {
283 rSet.DisableItem(nWhich);
284 nWhich = 0;
285 }
286 else
287 aBool.SetValue( pOpt->IsResolvedPostIts());
288 break;
289 }
291 aBool.SetValue( pOpt->IsShowHiddenPara()); break;
293 {
294 if (pOpt->getBrowseMode() || !pOpt->CanHideWhitespace())
295 {
296 rSet.DisableItem(nWhich);
297 nWhich = 0;
298 }
299 else
300 aBool.SetValue(pOpt->IsHideWhitespaceMode());
301 break;
302 }
304 {
305 aBool.SetValue(!pOpt->IsHideWhitespaceMode());
306 break;
307 }
308 case SID_GRID_VISIBLE:
309 aBool.SetValue( pOpt->IsGridVisible() ); break;
310 case SID_GRID_USE:
311 aBool.SetValue( pOpt->IsSnap() ); break;
312 case SID_HELPLINES_MOVE:
313 aBool.SetValue( pOpt->IsCrossHair() ); break;
315 aBool.SetValue( pOpt->IsSmoothScroll()); break;
316 case FN_VLINEAL:
317 aBool.SetValue( StatVRuler() ); break;
318 case FN_HSCROLLBAR:
319 if( pOpt->getBrowseMode() )
320 {
321 rSet.DisableItem(nWhich);
322 nWhich = 0;
323 }
324 else
325 aBool.SetValue( IsHScrollbarVisible() );
326 break;
327 case FN_VSCROLLBAR:
328 aBool.SetValue( IsVScrollbarVisible() ); break;
329 case SID_AUTOSPELL_CHECK:
330 aBool.SetValue( pOpt->IsOnlineSpell() );
331 break;
332 case SID_ACCESSIBILITY_CHECK_ONLINE:
333 {
335 aBool.SetValue(bOnlineAccessibilityCheck);
336 }
337 break;
338 case FN_SHADOWCURSOR:
339 if ( pOpt->getBrowseMode() )
340 {
341 rSet.DisableItem( nWhich );
342 nWhich = 0;
343 }
344 else
345 aBool.SetValue( pOpt->IsShadowCursor() );
346 break;
348 aBool.SetValue( pOpt->IsShowInlineTooltips() );
349 break;
351 aBool.SetValue( pOpt->IsUseHeaderFooterMenu() );
352 break;
355 break;
357 aBool.SetValue( pOpt->IsShowChangesInMargin() );
358 break;
359 }
360
361 if( nWhich )
362 {
363 aBool.SetWhich( nWhich );
364 rSet.Put( aBool );
365 }
366 nWhich = aIter.NextWhich();
367 }
368}
369
370// execute view options
371
373{
374 std::optional<SwViewOption> pOpt( *GetWrtShell().GetViewOptions() );
375 bool bModified = GetWrtShell().IsModified();
376
377 int eState = STATE_TOGGLE;
378 bool bSet = false;
379 bool bBrowseModeChanged = false;
380
381 const SfxItemSet *pArgs = rReq.GetArgs();
382 sal_uInt16 nSlot = rReq.GetSlot();
383 const SfxPoolItem* pAttr=nullptr;
384
385 if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
386 {
387 bSet = static_cast<const SfxBoolItem*>(pAttr)->GetValue();
388 eState = bSet ? STATE_ON : STATE_OFF;
389 }
390
391 bool bFlag = STATE_ON == eState;
392 uno::Reference< linguistic2::XLinguProperties > xLngProp( ::GetLinguPropertySet() );
393
394 switch ( nSlot )
395 {
396 case FN_VIEW_GRAPHIC:
397 if( STATE_TOGGLE == eState )
398 bFlag = !pOpt->IsGraphic();
399 pOpt->SetGraphic( bFlag );
400 break;
401
402 case FN_VIEW_FIELDS:
403 if( STATE_TOGGLE == eState )
406 break;
407
408 case FN_VIEW_BOUNDS:
409 if( STATE_TOGGLE == eState )
412 break;
413
414 case SID_GRID_VISIBLE:
415 if( STATE_TOGGLE == eState )
416 bFlag = !pOpt->IsGridVisible();
417
418 pOpt->SetGridVisible( bFlag );
419 break;
420
421 case SID_GRID_USE:
422 if( STATE_TOGGLE == eState )
423 bFlag = !pOpt->IsSnap();
424
425 pOpt->SetSnap( bFlag );
426 break;
427
428 case SID_HELPLINES_MOVE:
429 if( STATE_TOGGLE == eState )
430 bFlag = !pOpt->IsCrossHair();
431
432 pOpt->SetCrossHair( bFlag );
433 break;
434
435 case SID_BROWSER_MODE:
436 bBrowseModeChanged = !pOpt->getBrowseMode();
437 pOpt->setBrowseMode(true );
438 break;
439
440 case FN_PRINT_LAYOUT:
441 bBrowseModeChanged = pOpt->getBrowseMode();
442 pOpt->setBrowseMode( false );
443 break;
444
445 case SID_TOGGLE_NOTES:
446 if ( STATE_TOGGLE == eState )
447 bFlag = !pOpt->IsPostIts();
448
450 pOpt->SetPostIts( bFlag );
451 if (pOpt->IsPostIts())
453 break;
454
455 case SID_TOGGLE_RESOLVED_NOTES:
456 if ( STATE_TOGGLE == eState )
457 bFlag = pOpt->IsResolvedPostIts();
458
460
462 pOpt->SetResolvedPostIts( !bFlag );
463
464 break;
465
467 if ( STATE_TOGGLE == eState )
468 bFlag = !pOpt->IsShowHiddenPara();
469
470 pOpt->SetShowHiddenPara( bFlag );
471 break;
472
474 if ( STATE_TOGGLE == eState )
475 bFlag = !pOpt->IsHideWhitespaceMode();
476
477 pOpt->SetHideWhitespaceMode(bFlag);
478 break;
479
481 if ( STATE_TOGGLE == eState )
482 bFlag = pOpt->IsHideWhitespaceMode();
483
484 pOpt->SetHideWhitespaceMode(!bFlag);
485 break;
486
488
489 if ( STATE_TOGGLE == eState )
490 bFlag = !pOpt->IsSmoothScroll();
491
492 pOpt->SetSmoothScroll( bFlag );
493 break;
494
495 case FN_VLINEAL:
496 if( STATE_TOGGLE == eState )
497 bFlag = !pOpt->IsViewVRuler();
498
499 pOpt->SetViewVRuler( bFlag );
500 break;
501
502 case FN_VSCROLLBAR:
503 if( STATE_TOGGLE == eState )
504 bFlag = !pOpt->IsViewVScrollBar();
505
506 pOpt->SetViewVScrollBar( bFlag );
507 break;
508
509 case FN_HSCROLLBAR:
510 if( STATE_TOGGLE == eState )
511 bFlag = !pOpt->IsViewHScrollBar();
512
513 pOpt->SetViewHScrollBar( bFlag );
514 break;
515
516 case FN_RULER:
517 if( STATE_TOGGLE == eState )
518 bFlag = !pOpt->IsViewAnyRuler();
519
520 pOpt->SetViewAnyRuler( bFlag );
521 break;
522
524 if( STATE_TOGGLE == eState )
527 break;
528
530 if( STATE_TOGGLE == eState )
531 bFlag = !pOpt->IsFieldName() ;
532
533 pOpt->SetFieldName( bFlag );
534 break;
535
536 case FN_VIEW_MARKS:
537 if( STATE_TOGGLE == eState )
538 bFlag = !lcl_IsViewMarks(*pOpt) ;
539
540 lcl_SetViewMarks( *pOpt, bFlag );
541 break;
542
544 if( STATE_TOGGLE == eState )
545 bFlag = !pOpt->IsViewMetaChars();
546
547 lcl_SetViewMetaChars( *pOpt, bFlag );
548 break;
549
550 case SID_AUTOSPELL_CHECK:
551 const SfxPoolItem* pItem;
552
553 if (pArgs && pArgs->HasItem(FN_PARAM_1, &pItem))
554 bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
555 else if( STATE_TOGGLE == eState )
556 {
557 bFlag = !pOpt->IsOnlineSpell();
558 bSet = bFlag;
559 }
560
561 pOpt->SetOnlineSpell(bSet);
562 {
563 SvtLinguConfig aCfg;
564 aCfg.SetProperty( UPN_IS_SPELL_AUTO, uno::Any( bSet ) );
565
566 if (xLngProp.is())
567 xLngProp->setIsSpellAuto( bSet );
568
569 // for the time being we do not have a specific option for grammarchecking.
570 // thus we'll use the one for spell checking...
571 if (bSet)
572 {
573 SwDocShell *pDocSh = GetDocShell();
574 SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
575
576 // right now we don't have view options for automatic grammar checking. Thus...
577 bool bIsAutoGrammar = false;
578 aCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bIsAutoGrammar;
579
580 if (pDoc && bIsAutoGrammar)
581 pDoc->StartGrammarChecking();
582 }
583 }
584 break;
585
586 case SID_ACCESSIBILITY_CHECK_ONLINE:
587 {
588 if (pArgs && pArgs->HasItem(FN_PARAM_1, &pItem))
589 {
590 bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
591 }
592 else if (STATE_TOGGLE == eState)
593 {
595 bSet = !bOnlineCheck;
596 }
597 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
598 officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck::set(bSet, batch);
599 batch->commit();
600
601 SwDocShell *pDocSh = GetDocShell();
602 SwDoc* pDocument = pDocSh? pDocSh->GetDoc() : nullptr;
603 if (pDocument)
604 pDocument->getOnlineAccessibilityCheck()->updateCheckerActivity();
605 }
606 break;
607
608 case FN_SHADOWCURSOR:
609 if( STATE_TOGGLE == eState )
610 {
611 bFlag = !pOpt->IsShadowCursor();
612 bSet = bFlag;
613 }
614
615 pOpt->SetShadowCursor(bSet);
616 break;
617
619 if( STATE_TOGGLE == eState )
620 bFlag = !pOpt->IsShowInlineTooltips();
621
622 pOpt->SetShowInlineTooltips( bFlag );
623 break;
624
626 if( STATE_TOGGLE == eState )
627 bFlag = !pOpt->IsUseHeaderFooterMenu();
628
629 pOpt->SetUseHeaderFooterMenu( bFlag );
630 break;
631
633 {
634 if( STATE_TOGGLE == eState )
635 bFlag = !pOpt->IsShowOutlineContentVisibilityButton();
636
637 SwWrtShell &rSh = GetWrtShell();
638
639 if (!bFlag) // Outline folding is being turned ON!
641
642 pOpt->SetShowOutlineContentVisibilityButton(bFlag);
643
644 // Apply option change here so if toggling the outline folding feature ON
645 // the invalidate function will see this.
646 rSh.StartAction();
647 rSh.ApplyViewOptions(*pOpt);
648 rSh.EndAction();
649
650 if (bFlag) // Outline folding is being turned OFF!
652
653 break;
654 }
655
657 if( STATE_TOGGLE == eState )
658 bFlag = !pOpt->IsShowChangesInMargin();
659
660 pOpt->SetShowChangesInMargin( bFlag );
661 break;
662
663 default:
664 OSL_FAIL("wrong request method");
665 return;
666 }
667
668 // Set UserPrefs, mark request as modified
669 bool bWebView = dynamic_cast<const SwWebView*>(this) != nullptr;
670 SwWrtShell &rSh = GetWrtShell();
671 rSh.StartAction();
672 SwModule* pModule = SW_MOD();
673 if( *rSh.GetViewOptions() != *pOpt )
674 {
675 rSh.ApplyViewOptions( *pOpt );
676 if( bBrowseModeChanged )
677 {
679 }
680
681 // The UsrPref must be marked as modified.
682 // call for initialization
683 pModule->GetUsrPref(bWebView);
684 SwModule::CheckSpellChanges( pOpt->IsOnlineSpell(), false, false, false );
685 }
686 //OS: Set back modified again, because view/fields sets the Doc modified.
687 if( !bModified )
688 rSh.ResetModified();
689
690 pModule->ApplyUsrPref( *pOpt, this, bWebView ? SvViewOpt::DestWeb : SvViewOpt::DestText );
691
692 // #i6193# let postits know about new spellcheck setting
693 if ( nSlot == SID_AUTOSPELL_CHECK )
695
696 const bool bLockedView = rSh.IsViewLocked();
697 rSh.LockView( true ); //lock visible section
699 if( bBrowseModeChanged && !bFlag )
700 CalcVisArea( GetEditWin().GetOutputSizePixel() );
701 rSh.LockView( bLockedView );
702
703 pOpt.reset();
704 Invalidate(rReq.GetSlot());
705 if(!pArgs)
706 rReq.AppendItem(SfxBoolItem(nSlot, bFlag));
707 rReq.Done();
708}
709
711{
714 pDlg->Execute();
715}
716
718{
722 pDlg->Execute();
723}
724
725/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void Invalidate(sal_uInt16 nId)
void SetValue(bool const bTheValue)
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void DisableItem(sal_uInt16 nWhich)
bool IsReadOnly() const
void SetWhich(sal_uInt16 nId)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
void AppendItem(const SfxPoolItem &)
void Done(bool bRemove=false)
virtual void Invalidate(sal_uInt16 nId=0)
void UIFeatureChanged()
SfxBindings & GetBindings()
weld::Window * GetFrameWeld() const
void InvalidateBorder()
SfxViewFrame * GetViewFrame() const
sal_uInt16 FirstWhich()
sal_uInt16 NextWhich()
css::uno::Any GetProperty(std::u16string_view rPropertyName) const
bool SetProperty(std::u16string_view rPropertyName, const css::uno::Any &rValue)
virtual VclPtr< SfxAbstractTabDialog > CreateSwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rSh)=0
virtual VclPtr< SfxAbstractTabDialog > CreateOutlineTabDialog(weld::Window *pParent, const SfxItemSet *pSwItemSet, SwWrtShell &)=0
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
void StartAction()
Definition: crsrsh.cxx:226
void EndAction(const bool bIdleEnd=false)
Definition: crsrsh.cxx:243
void ToggleLayoutMode(SwView *pView)
Definition: docsh2.cxx:154
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:204
Definition: doc.hxx:194
bool StartGrammarChecking(bool bSkipStart=false)
Definition: docnew.cxx:141
std::unique_ptr< sw::OnlineAccessibilityCheck > const & getOnlineAccessibilityCheck() const
Definition: doc.hxx:1567
bool IsModified() const
Changes in document?
Definition: edws.cxx:65
void ResetModified()
Definition: edws.cxx:75
static void CheckSpellChanges(bool bOnlineSpelling, bool bIsSpellWrongAgain, bool bIsSpellAllAgain, bool bSmartTags)
Definition: swmodul1.cxx:643
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
Definition: apphdl.cxx:1083
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
Definition: swmodul1.cxx:137
void SetLayout()
Definition: PostItMgr.hxx:201
void SetSpellChecking()
Definition: PostItMgr.cxx:2284
void CheckMetaText()
Definition: PostItMgr.cxx:2298
void ShowHideResolvedNotes(bool visible)
Definition: PostItMgr.cxx:2496
bool IsViewHRuler(bool bDirect=false) const
Definition: viewopt.hxx:700
bool IsHideWhitespaceMode() const
Definition: viewopt.hxx:591
static bool IsDocBoundaries()
Definition: viewopt.hxx:774
bool IsParagraph(bool bHard=false) const
Definition: viewopt.hxx:313
void SetLineBreak(bool b)
Definition: viewopt.hxx:338
bool IsShadowCursor() const
Definition: viewopt.hxx:729
bool IsSmoothScroll() const
Definition: viewopt.hxx:518
void SetTab(bool b)
Definition: viewopt.hxx:290
bool IsShowBookmarks(bool const bHard=false) const
Definition: viewopt.hxx:327
bool IsBlank(bool bHard=false) const
Definition: viewopt.hxx:295
bool IsShowOutlineContentVisibilityButton() const
Definition: viewopt.cxx:100
bool IsGridVisible() const
Definition: viewopt.hxx:476
static bool IsTableBoundaries()
Definition: viewopt.hxx:776
void SetShowHiddenChar(bool b)
Definition: viewopt.hxx:435
void SetHardBlank(bool b)
Definition: viewopt.hxx:308
bool IsShowHiddenPara() const
Definition: viewopt.hxx:512
bool IsHardBlank() const
Definition: viewopt.hxx:304
void SetParagraph(bool b)
Definition: viewopt.hxx:318
void SetSoftHyph(bool b)
Definition: viewopt.hxx:356
bool IsViewAnyRuler() const
Definition: viewopt.hxx:689
void SetShowBookmarks(bool const b)
Definition: viewopt.hxx:323
void SetBlank(bool b)
Definition: viewopt.hxx:299
bool getBrowseMode() const
Definition: viewopt.hxx:580
bool IsShowHiddenChar(bool bHard=false) const
Definition: viewopt.hxx:431
bool IsViewVRuler(bool bDirect=false) const
Definition: viewopt.hxx:714
bool IsGraphic() const
Definition: viewopt.hxx:443
bool IsSoftHyph() const
Definition: viewopt.hxx:353
bool IsFieldName() const
Definition: viewopt.hxx:361
bool IsPostIts() const
Definition: viewopt.hxx:369
bool CanHideWhitespace() const
The rules that allow for hiding whitespace.
Definition: viewopt.hxx:595
bool IsViewMetaChars() const
Definition: viewopt.hxx:490
static bool IsFieldShadings()
Definition: viewopt.hxx:780
bool IsResolvedPostIts() const
Definition: viewopt.hxx:379
bool IsLineBreak(bool bHard=false) const
Definition: viewopt.hxx:333
bool IsTab(bool bHard=false) const
Definition: viewopt.hxx:286
bool IsOnlineSpell() const
Definition: viewopt.hxx:481
bool IsUseHeaderFooterMenu() const
Definition: viewopt.hxx:417
static void SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveInConfig=false)
Definition: viewopt.cxx:536
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:390
bool IsShowChangesInMargin() const
Definition: viewopt.hxx:399
bool IsSnap() const
Definition: viewopt.hxx:468
bool IsCrossHair() const
Definition: viewopt.hxx:500
void SetViewMetaChars(bool b)
Definition: viewopt.hxx:492
bool IsViewLocked() const
Definition: viewsh.hxx:471
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:433
void LockView(bool b)
Definition: viewsh.hxx:472
Definition: view.hxx:146
bool StatVRuler() const
Definition: view.hxx:493
SwWrtShell & GetWrtShell() const
Definition: view.hxx:416
std::unique_ptr< SwView_Impl > m_pViewImpl
Definition: view.hxx:200
std::unique_ptr< SwWrtShell > m_pWrtShell
Definition: view.hxx:194
std::shared_ptr< SwMailMergeConfigItem > const & GetMailMergeConfigItem() const
Definition: view0.cxx:136
bool IsHScrollbarVisible() const
Definition: viewmdi.cxx:728
SwPostItMgr * GetPostItMgr()
Definition: view.hxx:642
css::view::XSelectionSupplier * GetUNOObject()
Definition: view0.cxx:113
void ExecNumberingOutline(SfxItemPool &)
Definition: view0.cxx:717
bool IsVScrollbarVisible() const
Definition: viewmdi.cxx:740
SwEditWin & GetEditWin()
Definition: view.hxx:419
void ExecViewOptions(SfxRequest &)
Definition: view0.cxx:372
void CheckVisArea()
Definition: viewport.cxx:316
ShellMode GetShellMode() const
Definition: view0.cxx:108
SwDocShell * GetDocShell()
Definition: view.cxx:1160
void RecheckBrowseMode()
Definition: view0.cxx:174
void ExecFormatFootnote()
Definition: view0.cxx:710
void StateViewOptions(SfxItemSet &)
Definition: view0.cxx:217
SAL_DLLPRIVATE void CalcVisArea(const Size &rPixelSz)
Definition: viewport.cxx:772
void ApplyAccessibilityOptions(SvtAccessibilityOptions const &rAccessibilityOptions)
Definition: view0.cxx:118
void SetMailMergeConfigItem(std::shared_ptr< SwMailMergeConfigItem > const &rConfigItem)
Definition: view0.cxx:130
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
Definition: viewmdi.cxx:73
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: wrtsh1.cxx:2108
void MakeAllFoldedOutlineContentVisible(bool bMakeVisible=true)
Definition: wrtsh1.cxx:2550
static std::shared_ptr< ConfigurationChanges > create()
static bool IsFuzzing()
#define FN_PRINT_LAYOUT
Definition: cmdid.h:170
#define FN_VLINEAL
Definition: cmdid.h:159
#define FN_VIEW_SHOW_WHITESPACE
Definition: cmdid.h:189
#define FN_RULER
Definition: cmdid.h:154
#define FN_VIEW_GRAPHIC
Definition: cmdid.h:156
#define FN_SHADOWCURSOR
Definition: cmdid.h:531
#define FN_VIEW_SMOOTH_SCROLL
Definition: cmdid.h:175
#define FN_HSCROLLBAR
Definition: cmdid.h:161
#define FN_SHOW_CHANGES_IN_MARGIN
Definition: cmdid.h:193
#define FN_QRY_MERGE
Definition: cmdid.h:243
#define FN_USE_HEADERFOOTERMENU
Definition: cmdid.h:188
#define FN_VIEW_FIELDS
Definition: cmdid.h:158
#define FN_VIEW_HIDDEN_PARA
Definition: cmdid.h:174
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON
Definition: cmdid.h:191
#define FN_VIEW_META_CHARS
Definition: cmdid.h:163
#define FN_SYNC_LABELS
Definition: cmdid.h:480
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:610
#define FN_VIEW_FIELDNAME
Definition: cmdid.h:165
#define FN_INSERT_FIELD_DATA_ONLY
Definition: cmdid.h:217
#define FN_VIEW_MARKS
Definition: cmdid.h:164
#define FN_VIEW_HIDE_WHITESPACE
Definition: cmdid.h:186
#define FN_VSCROLLBAR
Definition: cmdid.h:160
#define FN_REDLINE_ACCEPT
Definition: cmdid.h:134
#define FN_SHOW_INLINETOOLTIPS
Definition: cmdid.h:187
#define FN_VIEW_BOUNDS
Definition: cmdid.h:157
#define FN_VIEW_TABLEGRID
Definition: cmdid.h:166
DocumentType eType
@ STATE_ON
Definition: globals.h:25
@ STATE_OFF
Definition: globals.h:24
@ STATE_TOGGLE
Definition: globals.h:26
constexpr OUStringLiteral UPN_IS_GRAMMAR_AUTO
constexpr OUStringLiteral UPN_IS_SPELL_AUTO
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define SFX_OBJECTBAR_TOOLS
const char GetValue[]
static SfxItemSet & rSet
#define SFX_IMPL_INTERFACE(Class, SuperClass)
#define SW_MOD()
Definition: swmodule.hxx:256
uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
Definition: swtypes.cxx:61
static void lcl_SetViewMarks(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:147
static bool lcl_IsViewMarks(const SwViewOption &rVOpt)
Definition: view0.cxx:141
SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default")
Definition: view0.cxx:73
static void lcl_SetViewMetaChars(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:155
ShellMode
Definition: view.hxx:87
#define SFX_VIEW_REGISTRATION(DocClass)
SvxZoomType