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#else
122 m_pWrtShell->ApplyAccessibilityOptions();
123 //to enable the right state of the selection cursor in readonly documents
124 if(GetDocShell()->IsReadOnly())
125 m_pWrtShell->ShowCursor();
126#endif
127}
128
129void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem> const & rConfigItem)
130{
131 m_pViewImpl->SetMailMergeConfigItem(rConfigItem);
133}
134
135std::shared_ptr<SwMailMergeConfigItem> const & SwView::GetMailMergeConfigItem() const
136{
137 return m_pViewImpl->GetMailMergeConfigItem();
138}
139
140static bool lcl_IsViewMarks( const SwViewOption& rVOpt )
141{
142 return rVOpt.IsHardBlank() &&
143 rVOpt.IsSoftHyph() &&
144 rVOpt.IsFieldShadings();
145}
146static void lcl_SetViewMarks(SwViewOption& rVOpt, bool bOn )
147{
148 rVOpt.SetHardBlank(bOn);
149 rVOpt.SetSoftHyph(bOn);
150 rVOpt.SetAppearanceFlag(
151 ViewOptFlags::FieldShadings, bOn, true);
152}
153
154static void lcl_SetViewMetaChars( SwViewOption& rVOpt, bool bOn)
155{
156 rVOpt.SetViewMetaChars( bOn );
157 if(bOn && !(rVOpt.IsParagraph() ||
158 rVOpt.IsTab() ||
159 rVOpt.IsLineBreak() ||
160 rVOpt.IsShowHiddenChar() ||
161 rVOpt.IsShowBookmarks() ||
162 rVOpt.IsBlank()))
163 {
164 rVOpt.SetParagraph(bOn);
165 rVOpt.SetTab(bOn);
166 rVOpt.SetLineBreak(bOn);
167 rVOpt.SetBlank(bOn);
168 rVOpt.SetShowHiddenChar(bOn);
169 rVOpt.SetShowBookmarks(bOn);
170 }
171}
172
174{
175 // OS: pay attention to numerical order!
176 static sal_uInt16 const aInva[] =
177 {
178 //SID_NEWWINDOW,/*5620*/
179 SID_BROWSER_MODE, /*6313*/
180 SID_RULER_BORDERS, SID_RULER_PAGE_POS,
181 //SID_ATTR_LONG_LRSPACE,
182 SID_HTML_MODE,
183 SID_RULER_PROTECT, /* 10915 */
184 //SID_AUTOSPELL_CHECK,
185 //SID_AUTOSPELL_MARKOFF,
186 SID_TOGGLE_RESOLVED_NOTES, /* 11672*/
187 FN_RULER, /*20211*/
188 FN_VIEW_GRAPHIC, /*20213*/
190 FN_VIEW_FIELDS, /*20215*/
191 FN_VLINEAL, /*20216*/
192 FN_VSCROLLBAR, /*20217*/
193 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 && nWhich != FN_HIGHLIGHT_CHAR_DF)
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( pOpt->IsDocBoundaries()); break;
257 aBool.SetValue(pOpt->IsSectionBoundaries()); break;
258 case FN_VIEW_GRAPHIC:
259 aBool.SetValue( pOpt->IsGraphic() ); break;
260 case FN_VIEW_FIELDS:
261 aBool.SetValue( pOpt->IsFieldShadings() ); break;
263 aBool.SetValue( pOpt->IsFieldName() ); break;
264 case FN_VIEW_MARKS:
265 aBool.SetValue( lcl_IsViewMarks(*pOpt) ); break;
267 aBool.SetValue( pOpt->IsViewMetaChars() ); break;
269 aBool.SetValue( pOpt->IsTableBoundaries() ); break;
270 case SID_TOGGLE_NOTES:
271 {
272 if (!GetPostItMgr()->HasNotes())
273 {
274 rSet.DisableItem(nWhich);
275 nWhich = 0;
276 }
277 else
278 aBool.SetValue( pOpt->IsPostIts());
279 break;
280 }
281 case SID_TOGGLE_RESOLVED_NOTES:
282 {
283 if (!GetPostItMgr()->HasNotes())
284 {
285 rSet.DisableItem(nWhich);
286 nWhich = 0;
287 }
288 else
289 aBool.SetValue( pOpt->IsResolvedPostIts());
290 break;
291 }
293 aBool.SetValue( pOpt->IsShowHiddenPara()); break;
295 {
296 if (pOpt->getBrowseMode() || !pOpt->CanHideWhitespace())
297 {
298 rSet.DisableItem(nWhich);
299 nWhich = 0;
300 }
301 else
302 aBool.SetValue(pOpt->IsHideWhitespaceMode());
303 break;
304 }
306 {
307 aBool.SetValue(!pOpt->IsHideWhitespaceMode());
308 break;
309 }
310 case SID_GRID_VISIBLE:
311 aBool.SetValue( pOpt->IsGridVisible() ); break;
312 case SID_GRID_USE:
313 aBool.SetValue( pOpt->IsSnap() ); break;
314 case SID_HELPLINES_MOVE:
315 aBool.SetValue( pOpt->IsCrossHair() ); break;
317 aBool.SetValue( pOpt->IsSmoothScroll()); break;
318 case FN_VLINEAL:
319 aBool.SetValue( StatVRuler() ); break;
320 case FN_HSCROLLBAR:
321 if( pOpt->getBrowseMode() )
322 {
323 rSet.DisableItem(nWhich);
324 nWhich = 0;
325 }
326 else
327 aBool.SetValue( IsHScrollbarVisible() );
328 break;
329 case FN_VSCROLLBAR:
330 aBool.SetValue( IsVScrollbarVisible() ); break;
331 case SID_AUTOSPELL_CHECK:
332 aBool.SetValue( pOpt->IsOnlineSpell() );
333 break;
334 case SID_ACCESSIBILITY_CHECK_ONLINE:
335 {
337 aBool.SetValue(bOnlineAccessibilityCheck);
338 }
339 break;
340 case FN_SHADOWCURSOR:
341 if ( pOpt->getBrowseMode() )
342 {
343 rSet.DisableItem( nWhich );
344 nWhich = 0;
345 }
346 else
347 aBool.SetValue( pOpt->IsShadowCursor() );
348 break;
350 aBool.SetValue( pOpt->IsShowInlineTooltips() );
351 break;
353 aBool.SetValue( pOpt->IsUseHeaderFooterMenu() );
354 break;
357 break;
359 aBool.SetValue( pOpt->IsShowChangesInMargin() );
360 break;
363 break;
364 }
365
366 if( nWhich )
367 {
368 aBool.SetWhich( nWhich );
369 rSet.Put( aBool );
370 }
371 nWhich = aIter.NextWhich();
372 }
373}
374
375// execute view options
376
378{
379 std::optional<SwViewOption> pOpt( *GetWrtShell().GetViewOptions() );
380 bool bModified = GetWrtShell().IsModified();
381
382 int eState = STATE_TOGGLE;
383 bool bSet = false;
384 bool bBrowseModeChanged = false;
385
386 const SfxItemSet *pArgs = rReq.GetArgs();
387 sal_uInt16 nSlot = rReq.GetSlot();
388 const SfxPoolItem* pAttr=nullptr;
389
390 if( pArgs && SfxItemState::SET == pArgs->GetItemState( nSlot , false, &pAttr ))
391 {
392 bSet = static_cast<const SfxBoolItem*>(pAttr)->GetValue();
393 eState = bSet ? STATE_ON : STATE_OFF;
394 }
395
396 bool bFlag = STATE_ON == eState;
397 uno::Reference< linguistic2::XLinguProperties > xLngProp( ::GetLinguPropertySet() );
398
399 switch ( nSlot )
400 {
401 case FN_VIEW_GRAPHIC:
402 if( STATE_TOGGLE == eState )
403 bFlag = !pOpt->IsGraphic();
404 pOpt->SetGraphic( bFlag );
405 break;
406
407 case FN_VIEW_FIELDS:
408 if( STATE_TOGGLE == eState )
409 bFlag = !pOpt->IsFieldShadings() ;
410 pOpt->SetAppearanceFlag(ViewOptFlags::FieldShadings, bFlag, true );
411 break;
412
413 case FN_VIEW_BOUNDS:
414 if( STATE_TOGGLE == eState )
415 bFlag = !pOpt->IsDocBoundaries();
416 pOpt->SetAppearanceFlag(ViewOptFlags::DocBoundaries, bFlag, true );
417 break;
418
420 if( STATE_TOGGLE == eState )
421 bFlag = !pOpt->IsSectionBoundaries();
422 pOpt->SetAppearanceFlag(ViewOptFlags::SectionBoundaries, bFlag, true );
423 break;
424
425 case SID_GRID_VISIBLE:
426 if( STATE_TOGGLE == eState )
427 bFlag = !pOpt->IsGridVisible();
428
429 pOpt->SetGridVisible( bFlag );
430 break;
431
432 case SID_GRID_USE:
433 if( STATE_TOGGLE == eState )
434 bFlag = !pOpt->IsSnap();
435
436 pOpt->SetSnap( bFlag );
437 break;
438
439 case SID_HELPLINES_MOVE:
440 if( STATE_TOGGLE == eState )
441 bFlag = !pOpt->IsCrossHair();
442
443 pOpt->SetCrossHair( bFlag );
444 break;
445
446 case SID_BROWSER_MODE:
447 bBrowseModeChanged = !pOpt->getBrowseMode();
448 pOpt->setBrowseMode(true );
449 break;
450
451 case FN_PRINT_LAYOUT:
452 bBrowseModeChanged = pOpt->getBrowseMode();
453 pOpt->setBrowseMode( false );
454 break;
455
456 case SID_TOGGLE_NOTES:
457 if ( STATE_TOGGLE == eState )
458 bFlag = !pOpt->IsPostIts();
459
461 pOpt->SetPostIts( bFlag );
462 if (pOpt->IsPostIts())
464 break;
465
466 case SID_TOGGLE_RESOLVED_NOTES:
467 if ( STATE_TOGGLE == eState )
468 bFlag = pOpt->IsResolvedPostIts();
469
471
473 pOpt->SetResolvedPostIts( !bFlag );
474
475 break;
476
478 if ( STATE_TOGGLE == eState )
479 bFlag = !pOpt->IsShowHiddenPara();
480
481 pOpt->SetShowHiddenPara( bFlag );
482 break;
483
485 if ( STATE_TOGGLE == eState )
486 bFlag = !pOpt->IsHideWhitespaceMode();
487
488 pOpt->SetHideWhitespaceMode(bFlag);
489 break;
490
492 if ( STATE_TOGGLE == eState )
493 bFlag = pOpt->IsHideWhitespaceMode();
494
495 pOpt->SetHideWhitespaceMode(!bFlag);
496 break;
497
499
500 if ( STATE_TOGGLE == eState )
501 bFlag = !pOpt->IsSmoothScroll();
502
503 pOpt->SetSmoothScroll( bFlag );
504 break;
505
506 case FN_VLINEAL:
507 if( STATE_TOGGLE == eState )
508 bFlag = !pOpt->IsViewVRuler();
509
510 pOpt->SetViewVRuler( bFlag );
511 break;
512
513 case FN_VSCROLLBAR:
514 if( STATE_TOGGLE == eState )
515 bFlag = !pOpt->IsViewVScrollBar();
516
517 pOpt->SetViewVScrollBar( bFlag );
518 break;
519
520 case FN_HSCROLLBAR:
521 if( STATE_TOGGLE == eState )
522 bFlag = !pOpt->IsViewHScrollBar();
523
524 pOpt->SetViewHScrollBar( bFlag );
525 break;
526
527 case FN_RULER:
528 if( STATE_TOGGLE == eState )
529 bFlag = !pOpt->IsViewAnyRuler();
530
531 pOpt->SetViewAnyRuler( bFlag );
532 break;
533
535 if( STATE_TOGGLE == eState )
536 bFlag = !pOpt->IsTableBoundaries();
537 pOpt->SetAppearanceFlag(ViewOptFlags::TableBoundaries, bFlag, true );
538 break;
539
541 if( STATE_TOGGLE == eState )
542 bFlag = !pOpt->IsFieldName() ;
543
544 pOpt->SetFieldName( bFlag );
545 break;
546
547 case FN_VIEW_MARKS:
548 if( STATE_TOGGLE == eState )
549 bFlag = !lcl_IsViewMarks(*pOpt) ;
550
551 lcl_SetViewMarks( *pOpt, bFlag );
552 break;
553
555 if (STATE_TOGGLE == eState)
556 bFlag = !m_bIsHighlightCharDF;
557 m_bIsHighlightCharDF = bFlag;
558 break;
559
561 if( STATE_TOGGLE == eState )
562 bFlag = !pOpt->IsViewMetaChars();
563
564 lcl_SetViewMetaChars( *pOpt, bFlag );
565 break;
566
567 case SID_AUTOSPELL_CHECK:
568 const SfxPoolItem* pItem;
569
570 if (pArgs && pArgs->HasItem(FN_PARAM_1, &pItem))
571 bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
572 else if( STATE_TOGGLE == eState )
573 {
574 bFlag = !pOpt->IsOnlineSpell();
575 bSet = bFlag;
576 }
577
578 pOpt->SetOnlineSpell(bSet);
579 {
580 SvtLinguConfig aCfg;
581 aCfg.SetProperty( UPN_IS_SPELL_AUTO, uno::Any( bSet ) );
582
583 if (xLngProp.is())
584 xLngProp->setIsSpellAuto( bSet );
585
586 // for the time being we do not have a specific option for grammarchecking.
587 // thus we'll use the one for spell checking...
588 if (bSet)
589 {
590 SwDocShell *pDocSh = GetDocShell();
591 SwDoc *pDoc = pDocSh? pDocSh->GetDoc() : nullptr;
592
593 // right now we don't have view options for automatic grammar checking. Thus...
594 bool bIsAutoGrammar = false;
595 aCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bIsAutoGrammar;
596
597 if (pDoc && bIsAutoGrammar)
598 pDoc->StartGrammarChecking();
599 }
600 }
601 break;
602
603 case SID_ACCESSIBILITY_CHECK_ONLINE:
604 {
605 if (pArgs && pArgs->HasItem(FN_PARAM_1, &pItem))
606 {
607 bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
608 }
609 else if (STATE_TOGGLE == eState)
610 {
612 bSet = !bOnlineCheck;
613 }
614 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
615 officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck::set(bSet, batch);
616 batch->commit();
617
618 SwDocShell *pDocSh = GetDocShell();
619 SwDoc* pDocument = pDocSh? pDocSh->GetDoc() : nullptr;
620 if (pDocument)
621 pDocument->getOnlineAccessibilityCheck()->updateCheckerActivity();
622 }
623 break;
624
625 case FN_SHADOWCURSOR:
626 if( STATE_TOGGLE == eState )
627 {
628 bFlag = !pOpt->IsShadowCursor();
629 bSet = bFlag;
630 }
631
632 pOpt->SetShadowCursor(bSet);
633 break;
634
636 if( STATE_TOGGLE == eState )
637 bFlag = !pOpt->IsShowInlineTooltips();
638
639 pOpt->SetShowInlineTooltips( bFlag );
640 break;
641
643 if( STATE_TOGGLE == eState )
644 bFlag = !pOpt->IsUseHeaderFooterMenu();
645
646 pOpt->SetUseHeaderFooterMenu( bFlag );
647 break;
648
650 {
651 if( STATE_TOGGLE == eState )
652 bFlag = !pOpt->IsShowOutlineContentVisibilityButton();
653
654 SwWrtShell &rSh = GetWrtShell();
655
656 if (!bFlag) // Outline folding is being turned ON!
658
659 pOpt->SetShowOutlineContentVisibilityButton(bFlag);
660
661 // Apply option change here so if toggling the outline folding feature ON
662 // the invalidate function will see this.
663 rSh.StartAction();
664 rSh.ApplyViewOptions(*pOpt);
665 rSh.EndAction();
666
667 if (bFlag) // Outline folding is being turned OFF!
669
670 break;
671 }
672
674 if( STATE_TOGGLE == eState )
675 bFlag = !pOpt->IsShowChangesInMargin();
676
677 pOpt->SetShowChangesInMargin( bFlag );
678 break;
679
680 default:
681 OSL_FAIL("wrong request method");
682 return;
683 }
684
685 // Set UserPrefs, mark request as modified
686 bool bWebView = dynamic_cast<const SwWebView*>(this) != nullptr;
687 SwWrtShell &rSh = GetWrtShell();
688 rSh.StartAction();
689 SwModule* pModule = SW_MOD();
690 if( *rSh.GetViewOptions() != *pOpt )
691 {
692 rSh.ApplyViewOptions( *pOpt );
693 if( bBrowseModeChanged )
694 {
696 }
697
698 // The UsrPref must be marked as modified.
699 // call for initialization
700 pModule->GetUsrPref(bWebView);
701 SwModule::CheckSpellChanges( pOpt->IsOnlineSpell(), false, false, false );
702 }
703 //OS: Set back modified again, because view/fields sets the Doc modified.
704 if( !bModified )
705 rSh.ResetModified();
706
707 pModule->ApplyUsrPref( *pOpt, this, bWebView ? SvViewOpt::DestWeb : SvViewOpt::DestText );
708
709 // #i6193# let postits know about new spellcheck setting
710 if ( nSlot == SID_AUTOSPELL_CHECK )
712
713 const bool bLockedView = rSh.IsViewLocked();
714 rSh.LockView( true ); //lock visible section
716 if( bBrowseModeChanged && !bFlag )
717 CalcVisArea( GetEditWin().GetOutputSizePixel() );
718 rSh.LockView( bLockedView );
719
720 pOpt.reset();
721 Invalidate(rReq.GetSlot());
722 if(!pArgs)
723 rReq.AppendItem(SfxBoolItem(nSlot, bFlag));
724 rReq.Done();
725}
726
728{
731 pDlg->Execute();
732}
733
735{
739 pDlg->Execute();
740}
741
742/* 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:197
bool StartGrammarChecking(bool bSkipStart=false)
Definition: docnew.cxx:141
std::unique_ptr< sw::OnlineAccessibilityCheck > const & getOnlineAccessibilityCheck() const
Definition: doc.hxx:1578
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:642
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
Definition: apphdl.cxx:1076
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
Definition: swmodul1.cxx:136
void SetLayout()
Definition: PostItMgr.hxx:201
void SetSpellChecking()
Definition: PostItMgr.cxx:2278
void CheckMetaText()
Definition: PostItMgr.cxx:2292
void ShowHideResolvedNotes(bool visible)
Definition: PostItMgr.cxx:2490
bool IsViewHRuler(bool bDirect=false) const
Definition: viewopt.hxx:756
bool IsHideWhitespaceMode() const
Definition: viewopt.hxx:647
bool IsParagraph(bool bHard=false) const
Definition: viewopt.hxx:369
bool IsSectionBoundaries() const
Definition: viewopt.hxx:836
void SetLineBreak(bool b)
Definition: viewopt.hxx:394
bool IsShadowCursor() const
Definition: viewopt.hxx:785
bool IsSmoothScroll() const
Definition: viewopt.hxx:574
void SetTab(bool b)
Definition: viewopt.hxx:346
bool IsShowBookmarks(bool const bHard=false) const
Definition: viewopt.hxx:383
bool IsBlank(bool bHard=false) const
Definition: viewopt.hxx:351
bool IsShowOutlineContentVisibilityButton() const
Definition: viewopt.cxx:177
bool IsGridVisible() const
Definition: viewopt.hxx:532
void SetShowHiddenChar(bool b)
Definition: viewopt.hxx:491
void SetHardBlank(bool b)
Definition: viewopt.hxx:364
bool IsShowHiddenPara() const
Definition: viewopt.hxx:568
bool IsHardBlank() const
Definition: viewopt.hxx:360
void SetParagraph(bool b)
Definition: viewopt.hxx:374
void SetSoftHyph(bool b)
Definition: viewopt.hxx:412
bool IsViewAnyRuler() const
Definition: viewopt.hxx:745
void SetShowBookmarks(bool const b)
Definition: viewopt.hxx:379
void SetBlank(bool b)
Definition: viewopt.hxx:355
bool getBrowseMode() const
Definition: viewopt.hxx:636
bool IsShowHiddenChar(bool bHard=false) const
Definition: viewopt.hxx:487
bool IsViewVRuler(bool bDirect=false) const
Definition: viewopt.hxx:770
bool IsGraphic() const
Definition: viewopt.hxx:499
bool IsSoftHyph() const
Definition: viewopt.hxx:409
bool IsFieldName() const
Definition: viewopt.hxx:417
bool IsTableBoundaries() const
Definition: viewopt.hxx:831
bool IsPostIts() const
Definition: viewopt.hxx:425
bool CanHideWhitespace() const
The rules that allow for hiding whitespace.
Definition: viewopt.hxx:651
bool IsViewMetaChars() const
Definition: viewopt.hxx:546
bool IsResolvedPostIts() const
Definition: viewopt.hxx:435
bool IsLineBreak(bool bHard=false) const
Definition: viewopt.hxx:389
bool IsTab(bool bHard=false) const
Definition: viewopt.hxx:342
bool IsOnlineSpell() const
Definition: viewopt.hxx:537
bool IsDocBoundaries() const
Definition: viewopt.hxx:829
bool IsUseHeaderFooterMenu() const
Definition: viewopt.hxx:473
void SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveInConfig=false)
Definition: viewopt.cxx:542
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:446
bool IsShowChangesInMargin() const
Definition: viewopt.hxx:455
bool IsFieldShadings() const
Definition: viewopt.hxx:835
bool IsSnap() const
Definition: viewopt.hxx:524
bool IsCrossHair() const
Definition: viewopt.hxx:556
void SetViewMetaChars(bool b)
Definition: viewopt.hxx:548
bool IsViewLocked() const
Definition: viewsh.hxx:490
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:452
void LockView(bool b)
Definition: viewsh.hxx:491
Definition: view.hxx:146
bool StatVRuler() const
Definition: view.hxx:501
SwWrtShell & GetWrtShell() const
Definition: view.hxx:423
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:135
bool IsHScrollbarVisible() const
Definition: viewmdi.cxx:755
SwPostItMgr * GetPostItMgr()
Definition: view.hxx:650
css::view::XSelectionSupplier * GetUNOObject()
Definition: view0.cxx:113
void ExecNumberingOutline(SfxItemPool &)
Definition: view0.cxx:734
bool IsVScrollbarVisible() const
Definition: viewmdi.cxx:767
SwEditWin & GetEditWin()
Definition: view.hxx:426
void ExecViewOptions(SfxRequest &)
Definition: view0.cxx:377
bool m_bIsHighlightCharDF
Definition: view.hxx:273
void CheckVisArea()
Definition: viewport.cxx:316
ShellMode GetShellMode() const
Definition: view0.cxx:108
SwDocShell * GetDocShell()
Definition: view.cxx:1193
void RecheckBrowseMode()
Definition: view0.cxx:173
void ExecFormatFootnote()
Definition: view0.cxx:727
void StateViewOptions(SfxItemSet &)
Definition: view0.cxx:217
void ApplyAccessibilityOptions()
Definition: view0.cxx:118
SAL_DLLPRIVATE void CalcVisArea(const Size &rPixelSz)
Definition: viewport.cxx:770
void SetMailMergeConfigItem(std::shared_ptr< SwMailMergeConfigItem > const &rConfigItem)
Definition: view0.cxx:129
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:2122
void MakeAllFoldedOutlineContentVisible(bool bMakeVisible=true)
Definition: wrtsh1.cxx:2560
static std::shared_ptr< ConfigurationChanges > create()
static bool IsFuzzing()
#define FN_PRINT_LAYOUT
Definition: cmdid.h:175
#define FN_VLINEAL
Definition: cmdid.h:161
#define FN_VIEW_SHOW_WHITESPACE
Definition: cmdid.h:194
#define FN_RULER
Definition: cmdid.h:156
#define FN_VIEW_GRAPHIC
Definition: cmdid.h:158
#define FN_SHADOWCURSOR
Definition: cmdid.h:547
#define FN_VIEW_SMOOTH_SCROLL
Definition: cmdid.h:180
#define FN_HSCROLLBAR
Definition: cmdid.h:163
#define FN_SHOW_CHANGES_IN_MARGIN
Definition: cmdid.h:198
#define FN_HIGHLIGHT_CHAR_DF
Definition: cmdid.h:171
#define FN_VIEW_SECTION_BOUNDARIES
Definition: cmdid.h:164
#define FN_QRY_MERGE
Definition: cmdid.h:250
#define FN_USE_HEADERFOOTERMENU
Definition: cmdid.h:193
#define FN_VIEW_FIELDS
Definition: cmdid.h:160
#define FN_VIEW_HIDDEN_PARA
Definition: cmdid.h:179
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON
Definition: cmdid.h:196
#define FN_VIEW_META_CHARS
Definition: cmdid.h:166
#define FN_SYNC_LABELS
Definition: cmdid.h:496
#define FN_WORDCOUNT_DIALOG
Definition: cmdid.h:627
#define FN_VIEW_FIELDNAME
Definition: cmdid.h:168
#define FN_INSERT_FIELD_DATA_ONLY
Definition: cmdid.h:223
#define FN_VIEW_MARKS
Definition: cmdid.h:167
#define FN_VIEW_HIDE_WHITESPACE
Definition: cmdid.h:191
#define FN_VSCROLLBAR
Definition: cmdid.h:162
#define FN_REDLINE_ACCEPT
Definition: cmdid.h:136
#define FN_SHOW_INLINETOOLTIPS
Definition: cmdid.h:192
#define FN_VIEW_BOUNDS
Definition: cmdid.h:159
#define FN_VIEW_TABLEGRID
Definition: cmdid.h:169
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
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:254
uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
Definition: swtypes.cxx:61
static void lcl_SetViewMarks(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:146
static bool lcl_IsViewMarks(const SwViewOption &rVOpt)
Definition: view0.cxx:140
SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default")
Definition: view0.cxx:73
static void lcl_SetViewMetaChars(SwViewOption &rVOpt, bool bOn)
Definition: view0.cxx:154
ShellMode
Definition: view.hxx:87
#define SFX_VIEW_REGISTRATION(DocClass)
SvxZoomType