1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_INC_VIEW_HXX
20 #define INCLUDED_SW_INC_VIEW_HXX
22 #include <vcl/timer.hxx>
23 #include <sfx2/viewsh.hxx>
24 #include <sfx2/objsh.hxx>
25 #include <editeng/svxenum.hxx>
26 #include <sfx2/zoomitem.hxx>
27 #include <svx/ruler.hxx>
28 #include <svx/fmshell.hxx>
29 #include <svx/svdobj.hxx>
30 #include <svl/style.hxx>
32 #include "swtypes.hxx"
33 #include "shellid.hxx"
35 class SwTextFormatColl
;
48 class SearchAttrItemList
;
49 class SvxSearchDialog
;
55 struct SwSearchOptions
;
59 class SvtAccessibilityOptions
;
61 class SwMailMergeConfigItem
;
62 class SwTextNode
; // #i23726#
63 class SwFormatClipboard
;
64 struct SwConversionArgs
;
67 enum class SotExchangeDest
;
69 enum class SvxSearchCmd
;
70 enum class SelectionType
: sal_Int32
;
72 namespace com
{ namespace sun
{ namespace star
{
73 namespace view
{ class XSelectionSupplier
; }
75 namespace sfx2
{ class FileDialogHelper
; }
76 namespace sw
{ namespace mark
{ class IFieldmark
; } }
78 const long nLeftOfst
= -370;
79 const long nScrollX
= 30;
80 const long nScrollY
= 30;
107 struct SwApplyTemplate
111 SwTextFormatColl
* pTextColl
;
112 SwPageDesc
* pPageDesc
;
113 SwFrameFormat
* pFrameFormat
;
114 SwCharFormat
* pCharFormat
;
118 SfxStyleFamily eType
;
120 SwFormatClipboard
* m_pFormatClipboard
;
121 size_t nUndo
; //< The initial undo stack depth.
124 eType(SfxStyleFamily::None
),
126 m_pFormatClipboard(nullptr),
129 aColl
.pTextColl
= nullptr;
135 // manage connection and disconnection of SwView and SwDocShell
136 class SwViewGlueDocShell
141 SwViewGlueDocShell(SwView
& rView
, SwDocShell
& rDocSh
);
142 ~SwViewGlueDocShell();
145 // view of a document
146 class SW_DLLPUBLIC SwView
: public SfxViewShell
148 friend class SwHHCWrapper
;
149 friend class SwHyphWrapper
;
150 friend class SwView_Impl
;
151 friend class SwClipboardChangeListener
;
154 static SvxSearchItem
*s_pSrchItem
;
156 static sal_uInt16 m_nMoveType
; // for buttons below the scrollbar (viewmdi)
157 static sal_Int32 m_nActMark
; // current jump mark for unknown mark
159 static bool s_bExtra
;
160 static bool s_bFound
;
161 static bool s_bJustOpened
;
163 static SearchAttrItemList
* s_pSearchList
;
164 static SearchAttrItemList
* s_pReplaceList
;
166 Timer m_aTimer
; // for delayed ChgLnks during an action
167 OUString m_sSwViewData
,
168 //and the new cursor position if the user double click in the PagePreview
170 // to support keyboard the number of the page to go to can be set too
171 sal_uInt16 m_nNewPage
;
173 sal_uInt16 m_nOldPageNum
;
174 OUString m_sOldSectionName
;
176 Point m_aTabColFromDocPos
; // moving table columns out of the document
177 SwTextNode
* m_pNumRuleNodeFromDoc
; // Moving indent of numrule #i23726#
179 Size m_aDocSz
; // current document size
180 tools::Rectangle m_aVisArea
; // visible region
182 VclPtr
<SwEditWin
> m_pEditWin
;
183 std::unique_ptr
<SwWrtShell
> m_pWrtShell
;
184 std::unique_ptr
<SwViewGlueDocShell
> m_xGlueDocShell
;
186 SfxShell
*m_pShell
; // current SubShell at the dispatcher
187 FmFormShell
*m_pFormShell
; // DB-FormShell
189 std::unique_ptr
<SwView_Impl
> m_pViewImpl
; // Impl-data for UNO + Basic
191 VclPtr
<SwScrollbar
> m_pHScrollbar
, // MDI control elements
194 bool m_bHScrollbarEnabled
;
195 bool m_bVScrollbarEnabled
;
197 VclPtr
<vcl::Window
> m_pScrollFill
; // dummy window for filling the lower right edge
198 // when both scrollbars are active
200 VclPtr
<SvxRuler
> m_pHRuler
,
203 std::unique_ptr
<SwGlossaryHdl
> m_pGlosHdl
; // handle text block
204 std::unique_ptr
<SwDrawBase
> m_pDrawActual
;
206 const SwFrameFormat
*m_pLastTableFormat
;
208 std::unique_ptr
<SwFormatClipboard
> m_pFormatClipboard
; //holds data for format paintbrush
210 std::unique_ptr
<SwPostItMgr
> m_pPostItMgr
;
212 SelectionType m_nSelectionType
;
213 sal_uInt16 m_nPageCnt
;
216 sal_uInt16 m_nDrawSfxId
;
217 OUString m_sDrawCustom
; //some drawing types are marked with strings!
218 sal_uInt16 m_nFormSfxId
;
219 SotExchangeDest m_nLastPasteDestination
;
221 // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
222 sal_uInt16 m_nLeftBorderDistance
;
223 sal_uInt16 m_nRightBorderDistance
;
225 SvxSearchCmd m_eLastSearchCommand
;
227 bool m_bWheelScrollInProgress
;
229 bool m_bCenterCursor
: 1,
231 m_bTabColFromDoc
: 1,
232 m_bTabRowFromDoc
: 1,
233 m_bSetTabColFromDoc
: 1 ,
234 m_bSetTabRowFromDoc
: 1,
235 m_bAttrChgNotified
: 1,
236 m_bAttrChgNotifiedWithRegistrations
: 1,
241 m_bInOuterResizePixel
: 1,
242 m_bInInnerResizePixel
: 1,
244 m_bPasteSpecialState
: 1,
246 m_bInDtor
: 1, //detect destructor to prevent creating of sub shells while closing
247 m_bOldShellWasPagePreview
: 1,
248 m_bIsPreviewDoubleClick
: 1, // #i114045#
249 m_bMakeSelectionVisible
: 1; // transport the bookmark selection
250 bool m_bInitOnceCompleted
= false;
252 /// LibreOfficeKit has to force the page size for PgUp/PgDown
253 /// functionality based on the user's view, instead of using the m_aVisArea.
254 SwTwips m_nLOKPageUpDownOffset
;
256 // methods for searching
257 // set search context
258 SAL_DLLPRIVATE
bool SearchAndWrap(bool bApi
);
259 SAL_DLLPRIVATE
bool SearchAll();
260 SAL_DLLPRIVATE sal_uLong
FUNC_Search( const SwSearchOptions
& rOptions
);
261 SAL_DLLPRIVATE
void Replace();
263 bool IsDocumentBorder();
265 SAL_DLLPRIVATE
bool IsTextTool() const;
267 DECL_DLLPRIVATE_LINK( TimeoutHdl
, Timer
*, void );
269 inline long GetXScroll() const;
270 inline long GetYScroll() const;
271 SAL_DLLPRIVATE Point
AlignToPixel(const Point
& rPt
) const;
272 SAL_DLLPRIVATE
void CalcPt( Point
* pPt
,const tools::Rectangle
& rRect
,
276 SAL_DLLPRIVATE
bool GetPageScrollUpOffset(SwTwips
& rOff
) const;
277 SAL_DLLPRIVATE
bool GetPageScrollDownOffset(SwTwips
& rOff
) const;
279 // scrollbar movements
280 SAL_DLLPRIVATE
bool PageUp();
281 SAL_DLLPRIVATE
bool PageDown();
282 SAL_DLLPRIVATE
bool PageUpCursor(bool bSelect
);
283 SAL_DLLPRIVATE
bool PageDownCursor(bool bSelect
);
284 SAL_DLLPRIVATE
void PhyPageUp();
285 SAL_DLLPRIVATE
void PhyPageDown();
287 SAL_DLLPRIVATE
void CreateScrollbar( bool bHori
);
288 DECL_DLLPRIVATE_LINK( ScrollHdl
, ScrollBar
*, void );
289 DECL_DLLPRIVATE_LINK( EndScrollHdl
, ScrollBar
*, void );
290 SAL_DLLPRIVATE
bool UpdateScrollbars();
291 DECL_DLLPRIVATE_LINK( WindowChildEventListener
, VclWindowEvent
&, void );
292 SAL_DLLPRIVATE
void CalcVisArea( const Size
&rPixelSz
);
294 // linguistics functions
295 SAL_DLLPRIVATE
void HyphenateDocument();
296 SAL_DLLPRIVATE
bool IsDrawTextHyphenate();
297 SAL_DLLPRIVATE
void HyphenateDrawText();
298 SAL_DLLPRIVATE
void StartThesaurus();
301 SAL_DLLPRIVATE
void StartTextConversion( LanguageType nSourceLang
, LanguageType nTargetLang
, const vcl::Font
*pTargetFont
, sal_Int32 nOptions
, bool bIsInteractive
);
303 // used for spell checking and text conversion
304 SAL_DLLPRIVATE
void SpellStart( SvxSpellArea eSpell
, bool bStartDone
,
305 bool bEndDone
, SwConversionArgs
*pConvArgs
);
306 SAL_DLLPRIVATE
void SpellEnd( SwConversionArgs
const *pConvArgs
);
308 SAL_DLLPRIVATE
void HyphStart( SvxSpellArea eSpell
);
309 SAL_DLLPRIVATE
void SpellContext(bool bOn
= true)
310 { m_bCenterCursor
= bOn
; }
312 // for readonly switching
313 SAL_DLLPRIVATE
virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
314 SAL_DLLPRIVATE
void CheckReadonlyState();
315 SAL_DLLPRIVATE
void CheckReadonlySelection();
317 // method for rotating PageDesc
318 SAL_DLLPRIVATE
void SwapPageMargin(const SwPageDesc
&, SvxLRSpaceItem
& rLR
);
320 SAL_DLLPRIVATE
void SetZoom_( const Size
&rEditSz
,
321 SvxZoomType eZoomType
,
324 SAL_DLLPRIVATE
void CalcAndSetBorderPixel( SvBorder
&rToFill
);
326 SAL_DLLPRIVATE
void ShowAtResize();
328 SAL_DLLPRIVATE
virtual void Move() override
;
330 public: // #i123922# Needs to be called from a 2nd place now as a helper method
331 SAL_DLLPRIVATE
bool InsertGraphicDlg( SfxRequest
& );
335 SwView_Impl
* GetViewImpl() {return m_pViewImpl
.get();}
337 void ImpSetVerb( SelectionType nSelType
);
339 SelectionType
GetSelectionType() const { return m_nSelectionType
; }
340 void SetSelectionType(SelectionType nSet
) { m_nSelectionType
= nSet
;}
343 void SetShell( SfxShell
* pS
) { m_pShell
= pS
; }
344 void SetFormShell( FmFormShell
* pSh
) { m_pFormShell
= pSh
; }
346 virtual void SelectShell();
348 virtual void Activate(bool) override
;
349 virtual void Deactivate(bool) override
;
350 virtual void InnerResizePixel( const Point
&rOfs
, const Size
&rSize
, bool inplaceEditModeChange
) override
;
351 virtual void OuterResizePixel( const Point
&rOfs
, const Size
&rSize
) override
;
353 const SwFrameFormat
* GetLastTableFrameFormat() const {return m_pLastTableFormat
;}
354 void SetLastTableFrameFormat(const SwFrameFormat
* pSet
) {m_pLastTableFormat
= pSet
;}
356 // form letter execution
357 void GenerateFormLetter(bool bUseCurrentDocument
);
359 using SfxShell::GetDispatcher
;
362 SFX_DECL_VIEWFACTORY(SwView
);
363 SFX_DECL_INTERFACE(SW_VIEWSHELL
)
366 /// SfxInterface initializer.
367 static void InitInterface_Impl();
370 SfxDispatcher
&GetDispatcher();
372 void GotFocus() const;
373 virtual SdrView
* GetDrawView() const override
;
374 virtual bool HasUIFeature(SfxShellFeature nFeature
) const override
;
375 virtual void ShowCursor( bool bOn
= true ) override
;
376 virtual ErrCode
DoVerb( long nVerb
) override
;
378 virtual sal_uInt16
SetPrinter( SfxPrinter
* pNew
,
379 SfxPrinterChangeFlags nDiff
= SFX_PRINTER_ALL
) override
;
380 ShellMode
GetShellMode() const;
382 css::view::XSelectionSupplier
* GetUNOObject();
384 OUString
GetSelectionTextParam( bool bCompleteWords
,
386 virtual bool HasSelection( bool bText
= true ) const override
;
387 virtual OUString
GetSelectionText( bool bCompleteWords
= false ) override
;
388 virtual bool PrepareClose( bool bUI
= true ) override
;
389 virtual void MarginChanged() override
;
391 // replace word/selection with text from the thesaurus
392 // (this code has special handling for "in word" character)
393 void InsertThesaurusSynonym( const OUString
&rSynonmText
, const OUString
&rLookUpText
, bool bValidSelection
);
394 bool IsValidSelectionForThesaurus() const;
395 OUString
GetThesaurusLookUpText( bool bSelection
) const;
397 // immediately switch shell -> for GetSelectionObject
398 void StopShellTimer();
400 SwWrtShell
& GetWrtShell () const { return *m_pWrtShell
; }
401 SwWrtShell
* GetWrtShellPtr() const { return m_pWrtShell
.get(); }
403 SwEditWin
&GetEditWin() { return *m_pEditWin
; }
404 const SwEditWin
&GetEditWin () const { return *m_pEditWin
; }
406 #if defined(_WIN32) || defined UNX
407 void ScannerEventHdl();
410 // hand the handler for text blocks to the shell; create if applicable
411 SwGlossaryHdl
* GetGlosHdl();
413 const tools::Rectangle
& GetVisArea() const { return m_aVisArea
; }
415 bool IsScroll(const tools::Rectangle
& rRect
) const;
416 void Scroll( const tools::Rectangle
& rRect
,
417 sal_uInt16 nRangeX
= USHRT_MAX
,
418 sal_uInt16 nRangeY
= USHRT_MAX
);
420 long SetVScrollMax(long lMax
);
421 long SetHScrollMax(long lMax
);
423 void SpellError(LanguageType eLang
);
424 bool ExecSpellPopup( const Point
& rPt
);
425 void ExecSmartTagPopup( const Point
& rPt
);
427 DECL_LINK( OnlineSpellCallback
, SpellCallbackInfo
&, void );
428 bool ExecDrwTextSpellPopup(const Point
& rPt
);
430 void SetTabColFromDocPos( const Point
&rPt
) { m_aTabColFromDocPos
= rPt
; }
431 void SetTabColFromDoc( bool b
) { m_bTabColFromDoc
= b
; }
432 bool IsTabColFromDoc() const { return m_bTabColFromDoc
; }
433 void SetTabRowFromDoc( bool b
) { m_bTabRowFromDoc
= b
; }
434 bool IsTabRowFromDoc() const { return m_bTabRowFromDoc
; }
436 void SetNumRuleNodeFromDoc( SwTextNode
* pNumRuleNode
)
437 { m_pNumRuleNodeFromDoc
= pNumRuleNode
; }
439 void DocSzChgd( const Size
& rNewSize
);
440 const Size
& GetDocSz() const { return m_aDocSz
; }
441 void SetVisArea( const tools::Rectangle
&, bool bUpdateScrollbar
= true);
442 void SetVisArea( const Point
&, bool bUpdateScrollbar
= true);
445 void RecheckBrowseMode();
446 static SvxSearchDialog
* GetSearchDialog();
448 static sal_uInt16
GetMoveType();
449 static void SetMoveType(sal_uInt16 nSet
);
450 DECL_LINK( MoveNavigationHdl
, void*, void );
451 static void SetActMark(sal_Int32 nSet
);
453 bool HandleWheelCommands( const CommandEvent
& );
456 void InsFrameMode(sal_uInt16 nCols
);
458 void SetZoom( SvxZoomType eZoomType
, short nFactor
= 100, bool bViewOnly
= false);
459 virtual void SetZoomFactor( const Fraction
&rX
, const Fraction
& ) override
;
461 void SetViewLayout( sal_uInt16 nColumns
, bool bBookMode
, bool bViewOnly
= false );
463 void ShowHScrollbar(bool bShow
);
464 bool IsHScrollbarVisible()const;
466 void ShowVScrollbar(bool bShow
);
467 bool IsVScrollbarVisible()const;
469 void EnableHScrollbar(bool bEnable
);
470 void EnableVScrollbar(bool bEnable
);
477 bool StatVRuler() const { return m_pVRuler
->IsVisible(); }
478 void ChangeVRulerMetric(FieldUnit eUnit
);
479 void GetVRulerMetric(FieldUnit
& rToFill
) const;
481 SvxRuler
& GetHRuler() { return *m_pHRuler
; }
482 SvxRuler
& GetVRuler() { return *m_pVRuler
; }
483 void InvalidateRulerPos();
484 void ChangeTabMetric(FieldUnit eUnit
);
485 void GetHRulerMetric(FieldUnit
& rToFill
) const;
488 void Execute(SfxRequest
&);
489 void ExecLingu(SfxRequest
&);
490 void ExecDlg(SfxRequest
const &);
491 void ExecDlgExt(SfxRequest
const &);
492 void ExecColl(SfxRequest
const &);
493 void ExecutePrint(SfxRequest
&);
494 void ExecDraw(SfxRequest
&);
495 void ExecTabWin(SfxRequest
const &);
496 void ExecuteStatusLine(SfxRequest
&);
497 DECL_LINK( ExecRulerClick
, Ruler
*, void );
498 void ExecSearch(SfxRequest
&);
499 void ExecViewOptions(SfxRequest
&);
501 virtual bool IsConditionalFastCall( const SfxRequest
&rReq
) override
;
503 void StateViewOptions(SfxItemSet
&);
504 void StateSearch(SfxItemSet
&);
505 void GetState(SfxItemSet
&);
506 void StateStatusLine(SfxItemSet
&);
507 void UpdateWordCount(SfxShell
*, sal_uInt16
);
508 void ExecFormatFootnote();
509 void ExecNumberingOutline(SfxItemPool
&);
511 // functions for drawing
512 void SetDrawFuncPtr(std::unique_ptr
<SwDrawBase
> pFuncPtr
);
513 SwDrawBase
* GetDrawFuncPtr() const { return m_pDrawActual
.get(); }
514 void GetDrawState(SfxItemSet
&rSet
);
516 bool IsDrawRotate() const { return m_bDrawRotate
; }
517 void FlipDrawRotate() { m_bDrawRotate
= !m_bDrawRotate
; }
518 bool IsDrawSelMode() const { return m_bDrawSelMode
; }
519 void SetSelDrawSlot();
520 void FlipDrawSelMode() { m_bDrawSelMode
= !m_bDrawSelMode
; }
521 void NoRotate(); // turn off rotate mode
522 bool EnterDrawTextMode(const Point
& aDocPos
);
523 /// Same as EnterDrawTextMode(), but takes an SdrObject instead of guessing it by document position.
524 bool EnterShapeDrawTextMode(SdrObject
* pObject
);
525 void LeaveDrawCreate() { m_nDrawSfxId
= m_nFormSfxId
= USHRT_MAX
; m_sDrawCustom
.clear();}
526 bool IsDrawMode() const { return (m_nDrawSfxId
!= USHRT_MAX
|| m_nFormSfxId
!= USHRT_MAX
); }
527 bool IsFormMode() const;
528 bool IsBezierEditMode() const;
529 bool AreOnlyFormsSelected() const;
530 bool HasOnlyObj(SdrObject
const *pSdrObj
, SdrInventor eObjInventor
) const;
531 bool BeginTextEdit( SdrObject
* pObj
, SdrPageView
* pPV
=nullptr,
532 vcl::Window
* pWin
=nullptr, bool bIsNewObj
=false, bool bSetSelectionToStart
=false );
533 bool isSignatureLineSelected() const;
534 bool isSignatureLineSigned() const;
535 bool isQRCodeSelected() const;
537 void StateTabWin(SfxItemSet
&);
539 // attributes have changed
540 DECL_LINK( AttrChangedNotify
, LinkParamNone
*, void );
542 // form control has been activated
543 DECL_LINK( FormControlActivated
, LinkParamNone
*, void );
547 void AutoCaption(const sal_uInt16 nType
, const SvGlobalName
*pOleId
= nullptr);
548 void InsertCaption(const InsCaptionOpt
*pOpt
);
550 // Async call by Core
551 void UpdatePageNums(sal_uInt16 nPhyNum
, sal_uInt16 nVirtNum
, const OUString
& rPgStr
);
553 OUString
GetPageStr(sal_uInt16 nPhyNum
, sal_uInt16 nVirtNum
, const OUString
& rPgStr
);
555 /// Force page size for PgUp/PgDown to overwrite the computation based on m_aVisArea.
556 void ForcePageUpDownOffset(SwTwips nTwips
)
558 m_nLOKPageUpDownOffset
= nTwips
;
562 SfxShell
*GetCurShell() { return m_pShell
; }
563 SwDocShell
*GetDocShell();
564 inline const SwDocShell
*GetDocShell() const;
565 virtual FmFormShell
*GetFormShell() override
{ return m_pFormShell
; }
566 virtual const FmFormShell
*GetFormShell() const override
{ return m_pFormShell
; }
568 // so that in the SubShells' DTors m_pShell can be reset if applicable
569 void ResetSubShell() { m_pShell
= nullptr; }
571 virtual void WriteUserData(OUString
&, bool bBrowse
= false) override
;
572 virtual void ReadUserData(const OUString
&, bool bBrowse
= false) override
;
573 virtual void ReadUserDataSequence ( const css::uno::Sequence
< css::beans::PropertyValue
>& ) override
;
574 virtual void WriteUserDataSequence ( css::uno::Sequence
< css::beans::PropertyValue
>& ) override
;
576 void SetCursorAtTop( bool bFlag
, bool bCenter
= false )
577 { m_bTopCursor
= bFlag
; m_bCenterCursor
= bCenter
; }
579 bool JumpToSwMark( const OUString
& rMark
);
581 long InsertDoc( sal_uInt16 nSlotId
, const OUString
& rFileName
,
582 const OUString
& rFilterName
, sal_Int16 nVersion
= 0 );
584 void ExecuteInsertDoc( SfxRequest
& rRequest
, const SfxPoolItem
* pItem
);
585 long InsertMedium( sal_uInt16 nSlotId
, std::unique_ptr
<SfxMedium
> pMedium
, sal_Int16 nVersion
);
586 DECL_LINK( DialogClosedHdl
, sfx2::FileDialogHelper
*, void );
588 // status methods for clipboard.
589 // Status changes now notified from the clipboard.
590 bool IsPasteAllowed();
591 bool IsPasteSpecialAllowed();
592 bool IsPasteSpreadsheet(bool bHasOwnTableCopied
);
594 // Enable mail merge - mail merge field dialog enabled
595 void EnableMailMerge();
596 //apply Accessibility options
597 void ApplyAccessibilityOptions(SvtAccessibilityOptions
const & rAccessibilityOptions
);
599 SwView(SfxViewFrame
* pFrame
, SfxViewShell
*);
600 virtual ~SwView() override
;
602 void NotifyDBChanged();
604 SfxObjectShellLock
CreateTmpSelectionDoc();
606 void AddTransferable(SwTransferable
& rTransferable
);
608 // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
609 // or to support printing
610 void SetMailMergeConfigItem(std::shared_ptr
<SwMailMergeConfigItem
> const & rConfigItem
);
611 std::shared_ptr
<SwMailMergeConfigItem
> const & GetMailMergeConfigItem() const;
612 std::shared_ptr
<SwMailMergeConfigItem
> EnsureMailMergeConfigItem(const SfxItemSet
* pArgs
= nullptr);
614 void ExecFormatPaintbrush(SfxRequest
const &);
615 void StateFormatPaintbrush(SfxItemSet
&);
618 ErrCode
InsertGraphic( const OUString
&rPath
, const OUString
&rFilter
,
619 bool bLink
, GraphicFilter
*pFlt
);
621 void ExecuteScan( SfxRequest
& rReq
);
623 SwPostItMgr
* GetPostItMgr() { return m_pPostItMgr
.get();}
624 const SwPostItMgr
* GetPostItMgr() const { return m_pPostItMgr
.get();}
626 // exhibition hack (MA,MBA)
627 void SelectShellForDrop();
629 void UpdateDocStats();
631 // methods for printing
632 SAL_DLLPRIVATE
virtual SfxPrinter
* GetPrinter( bool bCreate
= false ) override
;
633 SAL_DLLPRIVATE
virtual bool HasPrintOptionsPage() const override
;
634 SAL_DLLPRIVATE
virtual std::unique_ptr
<SfxTabPage
> CreatePrintOptionsPage(weld::Container
* pPage
, weld::DialogController
* pController
,
635 const SfxItemSet
& rSet
) override
;
636 static SvxSearchItem
* GetSearchItem() { return s_pSrchItem
; }
637 /// See SfxViewShell::getPart().
638 int getPart() const override
;
639 /// See SfxViewShell::dumpAsXml().
640 void dumpAsXml(xmlTextWriterPtr pWriter
) const override
;
641 void SetRedlineAuthor(const OUString
& rAuthor
);
642 const OUString
& GetRedlineAuthor() const;
643 /// See SfxViewShell::NotifyCursor().
644 void NotifyCursor(SfxViewShell
* pViewShell
) const override
;
645 void ShowUIElement(const OUString
& sElementURL
) const;
657 OUString m_StringCache
[CachedStrings
];
659 const OUString
& GetCachedString(CachedStringID id
)
661 return m_StringCache
[id
];
664 void SetCachedString(CachedStringID id
, const OUString
& sStr
)
666 m_StringCache
[id
] = sStr
;
669 const OUString
& GetOldGrfCat();
670 void SetOldGrfCat(const OUString
& sStr
);
671 const OUString
& GetOldTabCat();
672 void SetOldTabCat(const OUString
& sStr
);
673 const OUString
& GetOldFrameCat();
674 void SetOldFrameCat(const OUString
& sStr
);
675 const OUString
& GetOldDrwCat();
676 void SetOldDrwCat(const OUString
& sStr
);
679 inline long SwView::GetXScroll() const
681 return (m_aVisArea
.GetWidth() * nScrollX
) / 100;
684 inline long SwView::GetYScroll() const
686 return (m_aVisArea
.GetHeight() * nScrollY
) / 100;
689 inline const SwDocShell
*SwView::GetDocShell() const
691 return const_cast<SwView
*>(this)->GetDocShell();
694 std::unique_ptr
<SfxTabPage
> CreatePrintOptionsPage(weld::Container
* pPage
, weld::DialogController
* pController
,
695 const SfxItemSet
&rOptions
,
698 extern bool bDocSzUpdated
;
702 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */