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 <vcl/field.hxx>
24 #include <vcl/floatwin.hxx>
25 #include <svtools/htmlcfg.hxx>
26 #include <sfx2/viewfac.hxx>
27 #include <sfx2/viewsh.hxx>
28 #include <sfx2/objsh.hxx>
29 #include <editeng/svxenum.hxx>
30 #include <sfx2/zoomitem.hxx>
31 #include <svx/ruler.hxx>
32 #include <svx/svxids.hrc>
33 #include <svx/fmshell.hxx>
34 #include <editeng/editstat.hxx>
36 #include <swtypes.hxx>
37 #include <shellid.hxx>
42 class SwTextFormatColl
;
56 class SearchAttrItemList
;
57 class SvxSearchDialog
;
62 class SwHlpImageButton
;
67 struct SwSearchOptions
;
71 class SvtAccessibilityOptions
;
73 class SwMailMergeConfigItem
;
74 class SwTextNode
; // #i23726#
75 class SwFormatClipboard
;
76 struct SwConversionArgs
;
80 enum class SotExchangeDest
;
82 enum class SvxSearchCmd
;
83 enum class SelectionType
: sal_Int32
;
85 namespace com
{ namespace sun
{ namespace star
{
86 namespace view
{ class XSelectionSupplier
; }
88 namespace sfx2
{ class FileDialogHelper
; }
90 const long nLeftOfst
= -370;
91 const long nScrollX
= 30;
92 const long nScrollY
= 30;
119 struct SwApplyTemplate
123 SwTextFormatColl
* pTextColl
;
124 SwPageDesc
* pPageDesc
;
125 SwFrameFormat
* pFrameFormat
;
126 SwCharFormat
* pCharFormat
;
130 SfxStyleFamily eType
;
132 SwFormatClipboard
* m_pFormatClipboard
;
133 size_t nUndo
; //< The initial undo stack depth.
136 eType(SfxStyleFamily::None
),
138 m_pFormatClipboard(nullptr),
141 aColl
.pTextColl
= nullptr;
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
*m_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 m_bExtra
;
160 static bool m_bFound
;
161 static bool m_bJustOpened
;
163 static SearchAttrItemList
* m_pSrchList
;
164 static SearchAttrItemList
* m_pReplList
;
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 SwWrtShell
*m_pWrtShell
;
185 SfxShell
*m_pShell
; // current SubShell at the dispatcher
186 FmFormShell
*m_pFormShell
; // DB-FormShell
188 SwView_Impl
*m_pViewImpl
; // Impl-data for UNO + Basic
190 VclPtr
<SwScrollbar
> m_pHScrollbar
, // MDI control elements
193 bool m_bHScrollbarEnabled
;
194 bool m_bVScrollbarEnabled
;
196 VclPtr
<vcl::Window
> m_pScrollFill
; // dummy window for filling the lower right edge
197 // when both scrollbars are active
199 VclPtr
<SvxRuler
> m_pHRuler
,
201 VclPtr
<ImageButton
> m_pTogglePageBtn
;
203 SwGlossaryHdl
*m_pGlosHdl
; // handle text block
204 SwDrawBase
*m_pDrawActual
;
206 const SwFrameFormat
*m_pLastTableFormat
;
208 SwFormatClipboard
*m_pFormatClipboard
; //holds data for format paintbrush
210 SwPostItMgr
*m_pPostItMgr
;
212 SelectionType m_nSelectionType
;
213 VclPtr
<FloatingWindow
> m_pFieldPopup
;
214 sal_uInt16 m_nPageCnt
;
217 sal_uInt16 m_nDrawSfxId
;
218 OUString m_sDrawCustom
; //some drawing types are marked with strings!
219 sal_uInt16 m_nFormSfxId
;
220 SotExchangeDest m_nLastPasteDestination
;
222 // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
223 sal_uInt16 m_nLeftBorderDistance
;
224 sal_uInt16 m_nRightBorderDistance
;
226 SvxSearchCmd m_eLastSearchCommand
;
228 bool m_bWheelScrollInProgress
;
230 bool m_bCenterCursor
: 1,
232 m_bAlwaysShowSel
: 1,
233 m_bTabColFromDoc
: 1,
234 m_bTabRowFromDoc
: 1,
235 m_bSetTabColFromDoc
: 1 ,
236 m_bSetTabRowFromDoc
: 1,
237 m_bAttrChgNotified
: 1,
238 m_bAttrChgNotifiedWithRegistrations
: 1,
243 m_bInOuterResizePixel
: 1,
244 m_bInInnerResizePixel
: 1,
246 m_bPasteSpecialState
: 1,
248 m_bInDtor
: 1, //detect destructor to prevent creating of sub shells while closing
249 m_bOldShellWasPagePreview
: 1,
250 m_bIsPreviewDoubleClick
: 1, // #i114045#
251 m_bMakeSelectionVisible
: 1, // transport the bookmark selection
252 m_bAnnotationMode
; ///< The real cursor position is inside an annotation.
254 /// LibreOfficeKit has to force the page size for PgUp/PgDown
255 /// functionality based on the user's view, instead of using the m_aVisArea.
256 SwTwips m_nLOKPageUpDownOffset
;
258 // methods for searching
259 // set search context
260 SAL_DLLPRIVATE
bool SearchAndWrap(bool bApi
);
261 SAL_DLLPRIVATE
bool SearchAll();
262 SAL_DLLPRIVATE sal_uLong
FUNC_Search( const SwSearchOptions
& rOptions
);
263 SAL_DLLPRIVATE
void Replace();
265 bool IsDocumentBorder();
267 SAL_DLLPRIVATE
bool IsTextTool() const;
269 DECL_DLLPRIVATE_LINK( TimeoutHdl
, Timer
*, void );
271 DECL_DLLPRIVATE_LINK( FieldPopupModeEndHdl
, FloatingWindow
*, void );
273 inline long GetXScroll() const;
274 inline long GetYScroll() const;
275 SAL_DLLPRIVATE Point
AlignToPixel(const Point
& rPt
) const;
276 SAL_DLLPRIVATE
void CalcPt( Point
* pPt
,const tools::Rectangle
& rRect
,
280 SAL_DLLPRIVATE
bool GetPageScrollUpOffset(SwTwips
& rOff
) const;
281 SAL_DLLPRIVATE
bool GetPageScrollDownOffset(SwTwips
& rOff
) const;
283 // scrollbar movements
284 SAL_DLLPRIVATE
long PageUp();
285 SAL_DLLPRIVATE
long PageDown();
286 SAL_DLLPRIVATE
bool PageUpCursor(bool bSelect
);
287 SAL_DLLPRIVATE
bool PageDownCursor(bool bSelect
);
288 SAL_DLLPRIVATE
long PhyPageUp();
289 SAL_DLLPRIVATE
long PhyPageDown();
291 SAL_DLLPRIVATE
void CreateScrollbar( bool bHori
);
292 DECL_DLLPRIVATE_LINK( ScrollHdl
, ScrollBar
*, void );
293 DECL_DLLPRIVATE_LINK( EndScrollHdl
, ScrollBar
*, void );
294 SAL_DLLPRIVATE
bool UpdateScrollbars();
295 DECL_DLLPRIVATE_LINK( WindowChildEventListener
, VclWindowEvent
&, void );
296 SAL_DLLPRIVATE
void CalcVisArea( const Size
&rPixelSz
);
298 // linguistics functions
299 SAL_DLLPRIVATE
void HyphenateDocument();
300 SAL_DLLPRIVATE
bool IsDrawTextHyphenate();
301 SAL_DLLPRIVATE
void HyphenateDrawText();
302 SAL_DLLPRIVATE
void StartThesaurus();
305 SAL_DLLPRIVATE
void StartTextConversion( LanguageType nSourceLang
, LanguageType nTargetLang
, const vcl::Font
*pTargetFont
, sal_Int32 nOptions
, bool bIsInteractive
);
307 // used for spell checking and text conversion
308 SAL_DLLPRIVATE
void SpellStart( SvxSpellArea eSpell
, bool bStartDone
,
309 bool bEndDone
, SwConversionArgs
*pConvArgs
);
310 SAL_DLLPRIVATE
void SpellEnd( SwConversionArgs
*pConvArgs
);
312 SAL_DLLPRIVATE
void HyphStart( SvxSpellArea eSpell
);
313 SAL_DLLPRIVATE
void SpellKontext(bool bOn
= true)
314 { m_bCenterCursor
= bOn
; m_bAlwaysShowSel
= bOn
; }
316 // for readonly switching
317 SAL_DLLPRIVATE
virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
318 SAL_DLLPRIVATE
void CheckReadonlyState();
319 SAL_DLLPRIVATE
void CheckReadonlySelection();
321 // method for rotating PageDesc
322 SAL_DLLPRIVATE
void SwapPageMargin(const SwPageDesc
&, SvxLRSpaceItem
& rLR
);
324 SAL_DLLPRIVATE
void SetZoom_( const Size
&rEditSz
,
325 SvxZoomType eZoomType
,
328 SAL_DLLPRIVATE
void CalcAndSetBorderPixel( SvBorder
&rToFill
);
330 SAL_DLLPRIVATE
void ShowAtResize();
332 SAL_DLLPRIVATE
virtual void Move() override
;
334 public: // #i123922# Needs to be called from a 2nd place now as a helper method
335 SAL_DLLPRIVATE
bool InsertGraphicDlg( SfxRequest
& );
339 SwView_Impl
* GetViewImpl() {return m_pViewImpl
;}
341 void ImpSetVerb( SelectionType nSelType
);
343 SelectionType
GetSelectionType() const { return m_nSelectionType
; }
344 void SetSelectionType(SelectionType nSet
) { m_nSelectionType
= nSet
;}
347 void SetShell( SfxShell
* pS
) { m_pShell
= pS
; }
348 void SetFormShell( FmFormShell
* pSh
) { m_pFormShell
= pSh
; }
350 virtual void SelectShell();
352 virtual void Activate(bool) override
;
353 virtual void Deactivate(bool) override
;
354 virtual void InnerResizePixel( const Point
&rOfs
, const Size
&rSize
, bool inplaceEditModeChange
) override
;
355 virtual void OuterResizePixel( const Point
&rOfs
, const Size
&rSize
) override
;
357 const SwFrameFormat
* GetLastTableFrameFormat() const {return m_pLastTableFormat
;}
358 void SetLastTableFrameFormat(const SwFrameFormat
* pSet
) {m_pLastTableFormat
= pSet
;}
360 // form letter execution
361 void GenerateFormLetter(bool bUseCurrentDocument
);
363 using SfxShell::GetDispatcher
;
366 SFX_DECL_VIEWFACTORY(SwView
);
367 SFX_DECL_INTERFACE(SW_VIEWSHELL
)
370 /// SfxInterface initializer.
371 static void InitInterface_Impl();
374 SfxDispatcher
&GetDispatcher();
376 void GotFocus() const;
377 virtual SdrView
* GetDrawView() const override
;
378 virtual bool HasUIFeature(SfxShellFeature nFeature
) const override
;
379 virtual void ShowCursor( bool bOn
= true ) override
;
380 virtual ErrCode
DoVerb( long nVerb
) override
;
382 virtual sal_uInt16
SetPrinter( SfxPrinter
* pNew
,
383 SfxPrinterChangeFlags nDiff
= SFX_PRINTER_ALL
) override
;
384 ShellMode
GetShellMode();
386 css::view::XSelectionSupplier
* GetUNOObject();
388 OUString
GetSelectionTextParam( bool bCompleteWords
,
390 virtual bool HasSelection( bool bText
= true ) const override
;
391 virtual OUString
GetSelectionText( bool bCompleteWords
= false ) override
;
392 virtual bool PrepareClose( bool bUI
= true ) override
;
393 virtual void MarginChanged() override
;
395 // replace word/selection with text from the thesaurus
396 // (this code has special handling for "in word" character)
397 void InsertThesaurusSynonym( const OUString
&rSynonmText
, const OUString
&rLookUpText
, bool bValidSelection
);
398 bool IsValidSelectionForThesaurus() const;
399 OUString
GetThesaurusLookUpText( bool bSelection
) const;
401 // immediately switch shell -> for GetSelectionObject
402 void StopShellTimer();
404 SwWrtShell
& GetWrtShell () const { return *m_pWrtShell
; }
405 SwWrtShell
* GetWrtShellPtr() const { return m_pWrtShell
; }
407 SwEditWin
&GetEditWin() { return *m_pEditWin
; }
408 const SwEditWin
&GetEditWin () const { return *m_pEditWin
; }
410 #if defined(_WIN32) || defined UNX
411 void ScannerEventHdl();
414 // hand the handler for text blocks to the shell; create if applicable
415 SwGlossaryHdl
* GetGlosHdl();
417 const tools::Rectangle
& GetVisArea() const { return m_aVisArea
; }
419 bool IsScroll(const tools::Rectangle
& rRect
) const;
420 void Scroll( const tools::Rectangle
& rRect
,
421 sal_uInt16 nRangeX
= USHRT_MAX
,
422 sal_uInt16 nRangeY
= USHRT_MAX
);
424 long SetVScrollMax(long lMax
);
425 long SetHScrollMax(long lMax
);
427 void SpellError(LanguageType eLang
);
428 bool ExecSpellPopup( const Point
& rPt
);
429 void ExecFieldPopup( const Point
& rPt
, sw::mark::IFieldmark
*fieldBM
);
430 void ExecSmartTagPopup( const Point
& rPt
);
432 DECL_LINK( OnlineSpellCallback
, SpellCallbackInfo
&, void );
433 bool ExecDrwTextSpellPopup(const Point
& rPt
);
435 void SetTabColFromDocPos( const Point
&rPt
) { m_aTabColFromDocPos
= rPt
; }
436 void SetTabColFromDoc( bool b
) { m_bTabColFromDoc
= b
; }
437 bool IsTabColFromDoc() const { return m_bTabColFromDoc
; }
438 void SetTabRowFromDoc( bool b
) { m_bTabRowFromDoc
= b
; }
439 bool IsTabRowFromDoc() const { return m_bTabRowFromDoc
; }
441 void SetNumRuleNodeFromDoc( SwTextNode
* pNumRuleNode
)
442 { m_pNumRuleNodeFromDoc
= pNumRuleNode
; }
444 void DocSzChgd( const Size
& rNewSize
);
445 const Size
& GetDocSz() const { return m_aDocSz
; }
446 void SetVisArea( const tools::Rectangle
&, bool bUpdateScrollbar
= true);
447 void SetVisArea( const Point
&, bool bUpdateScrollbar
= true);
450 void RecheckBrowseMode();
451 static SvxSearchDialog
* GetSearchDialog();
453 static sal_uInt16
GetMoveType();
454 static void SetMoveType(sal_uInt16 nSet
);
455 DECL_LINK( MoveNavigationHdl
, void*, void );
456 static void SetActMark(sal_Int32 nSet
);
458 bool HandleWheelCommands( const CommandEvent
& );
461 void InsFrameMode(sal_uInt16 nCols
);
463 void SetZoom( SvxZoomType eZoomType
, short nFactor
= 100, bool bViewOnly
= false);
464 virtual void SetZoomFactor( const Fraction
&rX
, const Fraction
& ) override
;
466 void SetViewLayout( sal_uInt16 nColumns
, bool bBookMode
, bool bViewOnly
= false );
468 void ShowHScrollbar(bool bShow
);
469 bool IsHScrollbarVisible()const;
471 void ShowVScrollbar(bool bShow
);
472 bool IsVScrollbarVisible()const;
474 void EnableHScrollbar(bool bEnable
);
475 void EnableVScrollbar(bool bEnable
);
482 bool StatVRuler() const { return m_pVRuler
->IsVisible(); }
483 void ChangeVRulerMetric(FieldUnit eUnit
);
484 void GetVRulerMetric(FieldUnit
& rToFill
) const;
486 SvxRuler
& GetHRuler() { return *m_pHRuler
; }
487 SvxRuler
& GetVRuler() { return *m_pVRuler
; }
488 void InvalidateRulerPos();
489 void ChangeTabMetric(FieldUnit eUnit
);
490 void GetHRulerMetric(FieldUnit
& rToFill
) const;
493 void Execute(SfxRequest
&);
494 void ExecLingu(SfxRequest
&);
495 void ExecDlg(SfxRequest
&);
496 void ExecDlgExt(SfxRequest
&);
497 void ExecColl(SfxRequest
&);
498 void ExecutePrint(SfxRequest
&);
499 void ExecDraw(SfxRequest
&);
500 void ExecTabWin(SfxRequest
&);
501 void ExecuteStatusLine(SfxRequest
&);
502 DECL_LINK( ExecRulerClick
, Ruler
*, void );
503 void ExecSearch(SfxRequest
&);
504 void ExecViewOptions(SfxRequest
&);
506 void StateViewOptions(SfxItemSet
&);
507 void StateSearch(SfxItemSet
&);
508 void GetState(SfxItemSet
&);
509 void StateStatusLine(SfxItemSet
&);
510 void UpdateWordCount(SfxShell
*, sal_uInt16
);
511 void ExecFormatFootnote();
512 void ExecNumberingOutline(SfxItemPool
&);
514 // functions for drawing
515 void SetDrawFuncPtr(SwDrawBase
* pFuncPtr
);
516 SwDrawBase
* GetDrawFuncPtr() const { return m_pDrawActual
; }
517 void GetDrawState(SfxItemSet
&rSet
);
519 bool IsDrawRotate() { return m_bDrawRotate
; }
520 void FlipDrawRotate() { m_bDrawRotate
= !m_bDrawRotate
; }
521 bool IsDrawSelMode() { return m_bDrawSelMode
; }
522 void SetSelDrawSlot();
523 void FlipDrawSelMode() { m_bDrawSelMode
= !m_bDrawSelMode
; }
524 void NoRotate(); // turn off rotate mode
525 bool EnterDrawTextMode(const Point
& aDocPos
);
526 /// Same as EnterDrawTextMode(), but takes an SdrObject instead of guessing it by document position.
527 bool EnterShapeDrawTextMode(SdrObject
* pObject
);
528 void LeaveDrawCreate() { m_nDrawSfxId
= m_nFormSfxId
= USHRT_MAX
; m_sDrawCustom
.clear();}
529 bool IsDrawMode() { return (m_nDrawSfxId
!= USHRT_MAX
|| m_nFormSfxId
!= USHRT_MAX
); }
530 bool IsFormMode() const;
531 bool IsBezierEditMode();
532 bool AreOnlyFormsSelected() const;
533 bool HasDrwObj(SdrObject
*pSdrObj
) const;
534 bool HasOnlyObj(SdrObject
*pSdrObj
, SdrInventor eObjInventor
) const;
535 bool BeginTextEdit( SdrObject
* pObj
, SdrPageView
* pPV
=nullptr,
536 vcl::Window
* pWin
=nullptr, bool bIsNewObj
=false, bool bSetSelectionToStart
=false );
538 void StateTabWin(SfxItemSet
&);
540 // attributes have changed
541 DECL_LINK( AttrChangedNotify
, SwCursorShell
*, void );
543 // form control has been activated
544 DECL_LINK( FormControlActivated
, LinkParamNone
*, void );
548 void AutoCaption(const sal_uInt16 nType
, const SvGlobalName
*pOleId
= nullptr);
549 void InsertCaption(const InsCaptionOpt
*pOpt
);
551 // Async call by Core
552 void UpdatePageNums(sal_uInt16 nPhyNum
, sal_uInt16 nVirtNum
, const OUString
& rPgStr
);
554 OUString
GetPageStr(sal_uInt16 nPhyNum
, sal_uInt16 nVirtNum
, const OUString
& rPgStr
);
556 /// Force page size for PgUp/PgDown to overwrite the computation based on m_aVisArea.
557 void ForcePageUpDownOffset(SwTwips nTwips
)
559 m_nLOKPageUpDownOffset
= nTwips
;
563 SfxShell
*GetCurShell() { return m_pShell
; }
564 SwDocShell
*GetDocShell();
565 inline const SwDocShell
*GetDocShell() const;
566 virtual FmFormShell
*GetFormShell() override
{ return m_pFormShell
; }
567 virtual const FmFormShell
*GetFormShell() const override
{ return m_pFormShell
; }
569 // so that in the SubShells' DTors m_pShell can be reset if applicable
570 void ResetSubShell() { m_pShell
= nullptr; }
572 virtual void WriteUserData(OUString
&, bool bBrowse
= false) override
;
573 virtual void ReadUserData(const OUString
&, bool bBrowse
= false) override
;
574 virtual void ReadUserDataSequence ( const css::uno::Sequence
< css::beans::PropertyValue
>& ) override
;
575 virtual void WriteUserDataSequence ( css::uno::Sequence
< css::beans::PropertyValue
>& ) override
;
577 void SetCursorAtTop( bool bFlag
, bool bCenter
= false )
578 { m_bTopCursor
= bFlag
; m_bCenterCursor
= bCenter
; }
580 bool JumpToSwMark( const OUString
& rMark
);
582 long InsertDoc( sal_uInt16 nSlotId
, const OUString
& rFileName
,
583 const OUString
& rFilterName
, sal_Int16 nVersion
= 0 );
585 void ExecuteInsertDoc( SfxRequest
& rRequest
, const SfxPoolItem
* pItem
);
586 long InsertMedium( sal_uInt16 nSlotId
, SfxMedium
* pMedium
, sal_Int16 nVersion
);
587 DECL_LINK( DialogClosedHdl
, sfx2::FileDialogHelper
*, void );
589 // status methods for clipboard.
590 // Status changes now notified from the clipboard.
591 bool IsPasteAllowed();
592 bool IsPasteSpecialAllowed();
594 // Enable mail merge - mail merge field dialog enabled
595 void EnableMailMerge();
596 //apply Accessiblity options
597 void ApplyAccessiblityOptions(SvtAccessibilityOptions
& 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
>& rConfigItem
, sal_uInt16 nRestart
);
611 std::shared_ptr
<SwMailMergeConfigItem
> GetMailMergeConfigItem() const;
612 std::shared_ptr
<SwMailMergeConfigItem
> EnsureMailMergeConfigItem(const SfxItemSet
* pArgs
= nullptr, sal_uInt16 nWizardRestartPage
= 0);
614 void ExecFormatPaintbrush(SfxRequest
&);
615 void StateFormatPaintbrush(SfxItemSet
&);
618 int InsertGraphic( const OUString
&rPath
, const OUString
&rFilter
,
619 bool bLink
, GraphicFilter
*pFlt
);
621 void ExecuteScan( SfxRequest
& rReq
);
623 SwPostItMgr
* GetPostItMgr() { return m_pPostItMgr
;}
624 const SwPostItMgr
* GetPostItMgr() const { return m_pPostItMgr
;}
626 // exhibition hack (MA,MBA)
627 void SelectShellForDrop();
629 void UpdateDocStats();
630 /// Where is the real cursor: in the annotation or in the main document?
631 void SetAnnotationMode(bool bMode
);
633 // methods for printing
634 SAL_DLLPRIVATE
virtual SfxPrinter
* GetPrinter( bool bCreate
= false ) override
;
635 SAL_DLLPRIVATE
virtual bool HasPrintOptionsPage() const override
;
636 SAL_DLLPRIVATE
virtual VclPtr
<SfxTabPage
> CreatePrintOptionsPage( vcl::Window
* pParent
,
637 const SfxItemSet
& rSet
) override
;
638 static SvxSearchItem
* GetSearchItem() { return m_pSrchItem
; }
639 /// See SfxViewShell::getPart().
640 int getPart() const override
;
641 /// See SfxViewShell::dumpAsXml().
642 void dumpAsXml(struct _xmlTextWriter
* pWriter
) const override
;
643 void SetRedlineAuthor(const OUString
& rAuthor
);
644 const OUString
& GetRedlineAuthor();
645 /// See SfxViewShell::NotifyCursor().
646 void NotifyCursor(SfxViewShell
* pViewShell
) const override
;
649 inline long SwView::GetXScroll() const
651 return m_aVisArea
.GetWidth() * nScrollX
/ 100L;
654 inline long SwView::GetYScroll() const
656 return m_aVisArea
.GetHeight() * nScrollY
/ 100L;
659 inline const SwDocShell
*SwView::GetDocShell() const
661 return const_cast<SwView
*>(this)->GetDocShell();
664 VclPtr
<SfxTabPage
> CreatePrintOptionsPage( vcl::Window
*pParent
,
665 const SfxItemSet
&rOptions
,
668 extern bool bDocSzUpdated
;
672 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */