1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: view.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
33 #include <vcl/timer.hxx>
34 #include <vcl/field.hxx>
35 #include <sfx2/viewfac.hxx>
36 #include <sfx2/viewsh.hxx>
37 #include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell)
38 #include <svx/svxenum.hxx>
39 #include <svx/zoomitem.hxx>
40 #include <svx/editstat.hxx>
42 #include <swtypes.hxx>
43 #include <shellid.hxx>
44 #include <layout/layout.hxx>
68 class SearchAttrItemList
;
69 class SvxSearchDialog
;
74 class SwNaviImageButton
;
75 class SwHlpImageButton
;
81 class XSelectionObject
;
82 struct SwSearchOptions
;
87 class SvtAccessibilityOptions
;
90 class SwMailMergeConfigItem
;
91 class SwTxtNode
; // #i23726#
93 class SwFormatClipboard
;
94 struct SwConversionArgs
;
98 class SwFieldBookmark
;
100 namespace com
{ namespace sun
{ namespace star
{
101 namespace view
{ class XSelectionSupplier
; }
103 namespace sfx2
{ class FileDialogHelper
; }
105 const long nLeftOfst
= -370;
106 const long nScrollX
= 30;
107 const long nScrollY
= 30;
114 #define CHILDWIN_LABEL 1
115 #define CHILDWIN_MAILMERGE 2
124 SHELL_MODE_DRAW_CTRL
,
125 SHELL_MODE_DRAW_FORM
,
128 SHELL_MODE_LIST_TEXT
,
129 SHELL_MODE_TABLE_TEXT
,
130 SHELL_MODE_TABLE_LIST_TEXT
,
132 SHELL_MODE_EXTRUDED_CUSTOMSHAPE
,
137 /*--------------------------------------------------------------------
138 Beschreibung: Anwendung einer Vorlage
139 --------------------------------------------------------------------*/
141 struct SwApplyTemplate
145 SwTxtFmtColl
* pTxtColl
;
146 SwPageDesc
* pPageDesc
;
154 SwFormatClipboard
* pFormatClipboard
;
168 /*--------------------------------------------------------------------
169 Beschreibung: Sicht auf ein Dokument
170 --------------------------------------------------------------------*/
172 class SW_DLLPUBLIC SwView
: public SfxViewShell
175 friend void lcl_SelectShellForDrop( SwView
&rView
);
177 friend class TestTemplateItem
;
178 friend class SwHHCWrapper
;
179 friend class SwHyphWrapper
;
180 friend class SwView_Impl
;
181 friend class SwClipboardChangeListener
;
184 static SvxSearchDialog
*pSrchDlg
;
185 static SvxSearchItem
*pSrchItem
;
187 static USHORT nInsertCtrlState
;
188 static USHORT nWebInsertCtrlState
;
189 static USHORT nInsertObjectCtrlState
;
190 static USHORT nInsertFieldCtrlState
;
191 static USHORT nMoveType
; // fuer Buttons unter dem Scrollbar (viewmdi)
192 static sal_Int32 nActMark
; // aktuelle Sprungmarke fuer unbenannte Merker
196 static BOOL bJustOpened
;
198 static SearchAttrItemList
* pSrchList
;
199 static SearchAttrItemList
* pReplList
;
202 Timer aTimer
; //Fuer verzoegerte ChgLnks waehrend
204 String aPageStr
; //Statusanzeige, aktuelle Seite
206 //and the new cursor position if the user double click in the PagePreView
208 // to support keyboard the number of the page to go to can be set too
211 Point aTabColFromDocPos
; //Verschieben von Tabellenspalten aus
212 //aus dem Dokument heraus.
213 SwTxtNode
* pNumRuleNodeFromDoc
; // Moving indent of numrule #i23726#
215 Size aDocSz
; // aktuelle Dokumentgroesse
216 Rectangle aVisArea
; // sichtbarer Bereich
219 SwWrtShell
*pWrtShell
;
221 SfxShell
*pShell
; //aktuelle SubShell auf dem Dispatcher
222 FmFormShell
*pFormShell
; // DB-FormShell
224 SwView_Impl
*pViewImpl
; // Impl-Daten fuer UNO + Basic
227 SwScrollbar
*pHScrollbar
, // MDI Bedienelemente
230 Window
*pScrollFill
; // Dummy-Window zum Fuellen der rechten
231 // unteren Ecke, wenn beide Scrollbars
236 ImageButton
*pTogglePageBtn
;
238 SwHlpImageButton
*pPageUpBtn
,
241 SwNaviImageButton
*pNaviBtn
;
242 SwGlossaryHdl
*pGlosHdl
; // Henkel Textbausteine
243 SwDrawBase
*pDrawActual
;
245 const SwFrmFmt
*pLastTableFormat
;
247 SwFormatClipboard
*pFormatClipboard
; //holds data for format paintbrush
249 SwPostItMgr
*mpPostItMgr
;
253 static const int MASTERENUMCOMMANDS
= 6;
255 String aCurrShapeEnumCommand
[ MASTERENUMCOMMANDS
];
259 // Aktueller Drawmode
261 String sDrawCustom
; //some drawing types are marked with strings!
263 USHORT nLastPasteDestination
;
265 // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
266 USHORT nLeftBorderDistance
;
267 USHORT nRightBorderDistance
;
269 BOOL bCenterCrsr
: 1,
273 bNumIndentFromDoc
: 1, // #i23726#
275 bSetTabColFromDoc
: 1 ,
276 bSetTabRowFromDoc
: 1,
277 bAttrChgNotified
: 1,
278 bAttrChgNotifiedWithRegistrations
: 1,
283 bInOuterResizePixel
: 1,
284 bInInnerResizePixel
: 1,
286 bPasteSpecialState
: 1,
288 bInDtor
: 1, //detect destructor to prevent creating of sub shells while closing
289 bOldShellWasPagePreView
: 1,
290 bMakeSelectionVisible
: 1 // #b6330459# transport the bookmark selection
293 // Methoden fuers Suchen
294 // Suchkontext setzen
295 SW_DLLPRIVATE BOOL
SearchAndWrap(BOOL bApi
= FALSE
);
296 SW_DLLPRIVATE BOOL
SearchAll(USHORT
* pFound
= 0);
297 SW_DLLPRIVATE ULONG
FUNC_Search( const SwSearchOptions
& rOptions
);
298 SW_DLLPRIVATE
void Replace();
300 BOOL
IsDocumentBorder();
302 SW_DLLPRIVATE BOOL
IsTextTool() const;
304 // Bedienelemente verwalten anlegen
305 SW_DLLPRIVATE
void CreateBtns();
306 SW_DLLPRIVATE
DECL_LINK( BtnPage
, Button
* );
308 SW_DLLPRIVATE
DECL_LINK( TimeoutHdl
, Timer
* );
309 SW_DLLPRIVATE
DECL_LINK( UpdatePercentHdl
, GraphicFilter
* );
312 inline long GetXScroll() const;
313 inline long GetYScroll() const;
314 SW_DLLPRIVATE Point
AlignToPixel(const Point
& rPt
) const;
315 SW_DLLPRIVATE
void CalcPt( Point
* pPt
,const Rectangle
& rRect
,
316 USHORT nRangeX
= USHRT_MAX
,
317 USHORT nRangeY
= USHRT_MAX
);
319 SW_DLLPRIVATE BOOL
GetPageScrollUpOffset(SwTwips
& rOff
) const;
320 SW_DLLPRIVATE BOOL
GetPageScrollDownOffset(SwTwips
& rOff
) const;
322 // Scrollbar Movements
323 SW_DLLPRIVATE
long PageUp();
324 SW_DLLPRIVATE
long PageDown();
325 SW_DLLPRIVATE
long PageUpCrsr(BOOL bSelect
);
326 SW_DLLPRIVATE
long PageDownCrsr(BOOL bSelect
);
327 SW_DLLPRIVATE
long PhyPageUp();
328 SW_DLLPRIVATE
long PhyPageDown();
330 SW_DLLPRIVATE
int _CreateScrollbar( BOOL bHori
);
331 SW_DLLPRIVATE
DECL_LINK( ScrollHdl
, SwScrollbar
* );
332 SW_DLLPRIVATE
DECL_LINK( EndScrollHdl
, SwScrollbar
* );
333 SW_DLLPRIVATE BOOL
UpdateScrollbars();
334 SW_DLLPRIVATE
void CalcVisArea( const Size
&rPixelSz
);
336 SW_DLLPRIVATE
void CreatePageButtons(BOOL bShow
);
338 // Linguistik-Funktionen
339 SW_DLLPRIVATE
void HyphenateDocument();
340 SW_DLLPRIVATE BOOL
IsDrawTextHyphenate();
341 SW_DLLPRIVATE
void HyphenateDrawText();
342 SW_DLLPRIVATE
void StartThesaurus();
345 SW_DLLPRIVATE
void StartTextConversion( LanguageType nSourceLang
, LanguageType nTargetLang
, const Font
*pTargetFont
, sal_Int32 nOptions
, sal_Bool bIsInteractive
);
347 // used for spell checking and text conversion
348 SW_DLLPRIVATE
void SpellStart( SvxSpellArea eSpell
, BOOL bStartDone
,
349 BOOL bEndDone
, SwConversionArgs
*pConvArgs
= 0 );
350 SW_DLLPRIVATE
void SpellEnd( SwConversionArgs
*pConvArgs
= 0 );
352 SW_DLLPRIVATE
void HyphStart( SvxSpellArea eSpell
);
353 SW_DLLPRIVATE BOOL
CheckSpecialCntnt();
354 SW_DLLPRIVATE
void SpellKontext(BOOL bOn
= TRUE
)
355 { bCenterCrsr
= bOn
; bAllwaysShowSel
= bOn
; }
357 // Methoden fuers Printing
358 SW_DLLPRIVATE
virtual SfxPrinter
* GetPrinter( BOOL bCreate
= FALSE
);
359 SW_DLLPRIVATE
virtual PrintDialog
* CreatePrintDialog( Window
* pParent
);
360 SfxTabPage
* CreatePrintOptionsPage( Window
* pParent
,
361 const SfxItemSet
& rSet
);
362 // fuer Readonly-Umschaltung
363 SW_DLLPRIVATE
virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
364 SW_DLLPRIVATE
void _CheckReadonlyState();
365 SW_DLLPRIVATE
void _CheckReadonlySelection();
367 // Methode fuer PageDesc drehen
368 SW_DLLPRIVATE
void SwapPageMargin(const SwPageDesc
&, SvxLRSpaceItem
& rLR
);
370 SW_DLLPRIVATE
void _SetZoom( const Size
&rEditSz
,
371 SvxZoomType eZoomType
,
373 BOOL bViewOnly
= FALSE
);
374 SW_DLLPRIVATE
void CalcAndSetBorderPixel( SvBorder
&rToFill
, BOOL bInner
);
376 SW_DLLPRIVATE
void ShowAtResize();
378 SW_DLLPRIVATE
virtual void Move();
380 SW_DLLPRIVATE BOOL
InsertGraphicDlg( SfxRequest
& );
384 SwView_Impl
* GetViewImpl() {return pViewImpl
;}
386 void ImpSetVerb( int nSelType
);
388 int GetSelectionType() const { return nSelectionType
; }
389 void SetSelectionType(int nSet
) { nSelectionType
= nSet
;}
391 // fuer die SwWebView
392 void SetShell( SfxShell
* pS
) { pShell
= pS
; }
393 void SetFormShell( FmFormShell
* pSh
) { pFormShell
= pSh
; }
395 virtual void SelectShell();
397 virtual void Activate(BOOL
);
398 virtual void Deactivate(BOOL
);
399 virtual void InnerResizePixel( const Point
&rOfs
, const Size
&rSize
);
400 virtual void OuterResizePixel( const Point
&rOfs
, const Size
&rSize
);
401 virtual Size
GetOptimalSizePixel() const;
403 void SetImageButtonColor(Color
& rColor
);
405 const SwFrmFmt
* GetLastTblFrmFmt() const {return pLastTableFormat
;}
406 void SetLastTblFrmFmt(const SwFrmFmt
* pSet
) {pLastTableFormat
= pSet
;}
408 // form letter execution
409 void GenerateFormLetter(BOOL bUseCurrentDocument
);
411 using SfxShell::GetDispatcher
;
415 SFX_DECL_VIEWFACTORY(SwView
);
416 SFX_DECL_INTERFACE(SW_VIEWSHELL
)
419 SfxDispatcher
&GetDispatcher();
421 void GotFocus() const;
422 virtual SdrView
* GetDrawView() const;
423 virtual sal_Bool
HasUIFeature( sal_uInt32 nFeature
);
424 virtual void ShowCursor( FASTBOOL bOn
= TRUE
);
425 virtual ErrCode
DoVerb( long nVerb
);
427 virtual USHORT
SetPrinter( SfxPrinter
* pNew
,
428 USHORT nDiff
= SFX_PRINTER_ALL
, bool bIsAPI
=false);
429 virtual ErrCode
DoPrint( SfxPrinter
*pPrinter
, PrintDialog
*pPrintDialog
,
430 BOOL bSilent
, BOOL bIsAPI
);
431 ShellModes
GetShellMode();
433 com::sun::star::view::XSelectionSupplier
* GetUNOObject();
435 String
GetSelectionTextParam( BOOL bCompleteWords
,
437 virtual BOOL
HasSelection( BOOL bText
) const;
438 virtual String
GetSelectionText( BOOL bCompleteWords
= FALSE
);
439 virtual USHORT
PrepareClose( BOOL bUI
= TRUE
, BOOL bForBrowsing
= FALSE
);
440 virtual void MarginChanged();
442 // Shell sofort wechseln -> fuer GetSelectionObject
443 void StopShellTimer();
445 inline SwWrtShell
& GetWrtShell () const { return *pWrtShell
; }
446 inline SwWrtShell
* GetWrtShellPtr() const { return pWrtShell
; }
448 inline SwEditWin
&GetEditWin() { return *pEditWin
; }
449 inline const SwEditWin
&GetEditWin () const { return *pEditWin
; }
451 #if defined WIN || defined WNT || defined UNX
452 void ScannerEventHdl( const ::com::sun::star::lang::EventObject
& rEventObject
);
455 //Handler fuer Textbausteine an die Textshell rausreichen, gfs. anlegen
456 SwGlossaryHdl
* GetGlosHdl();
458 inline const Rectangle
& GetVisArea() const { return aVisArea
; }
460 BOOL
IsScroll(const Rectangle
& rRect
) const;
461 void Scroll( const Rectangle
& rRect
,
462 USHORT nRangeX
= USHRT_MAX
,
463 USHORT nRangeY
= USHRT_MAX
);
465 long SetVScrollMax(long lMax
);
466 long SetHScrollMax(long lMax
);
468 DECL_LINK( SpellError
, LanguageType
* );
469 BOOL
ExecSpellPopup( const Point
& rPt
);
470 BOOL
ExecFieldPopup( const Point
& rPt
, sw::mark::IFieldmark
*fieldBM
);
472 BOOL
ExecSmartTagPopup( const Point
& rPt
);
474 DECL_LINK( OnlineSpellCallback
, SpellCallbackInfo
*);
475 BOOL
ExecDrwTxtSpellPopup(const Point
& rPt
);
477 void SetTabColFromDocPos( const Point
&rPt
) { aTabColFromDocPos
= rPt
; }
478 void SetTabColFromDoc( BOOL b
) { bTabColFromDoc
= b
; }
479 BOOL
IsTabColFromDoc() const { return bTabColFromDoc
; }
480 void SetTabRowFromDoc( BOOL b
) { bTabRowFromDoc
= b
; }
481 BOOL
IsTabRowFromDoc() const { return bTabRowFromDoc
; }
484 void SetNumRuleNodeFromDoc( SwTxtNode
* pNumRuleNode
)
485 { pNumRuleNodeFromDoc
= pNumRuleNode
; }
486 void SetNumIndentFromDoc(BOOL b
) { bNumIndentFromDoc
= b
; }
487 BOOL
IsNumIndentFromDoc() const { return NULL
!= pNumRuleNodeFromDoc
; }
490 void DocSzChgd( const Size
& rNewSize
);
491 const Size
& GetDocSz() const { return aDocSz
; }
492 virtual void SetVisArea( const Rectangle
&, BOOL bUpdateScrollbar
= TRUE
);
493 void SetVisArea( const Point
&, BOOL bUpdateScrollbar
= TRUE
);
496 static LAYOUT_NS Dialog
* GetSearchDialog();
498 static USHORT
GetMoveType();
499 static void SetMoveType(USHORT nSet
);
500 DECL_STATIC_LINK( SwView
, MoveNavigationHdl
, bool* ); // #i75416#
501 static void SetActMark(sal_Int32 nSet
);
503 BOOL
HandleWheelCommands( const CommandEvent
& );
506 void InsFrmMode(USHORT nCols
);
508 void SetZoom( SvxZoomType eZoomType
, short nFactor
= 100, BOOL bViewOnly
= FALSE
);
509 virtual void SetZoomFactor( const Fraction
&rX
, const Fraction
& );
511 void SetViewLayout( USHORT nColumns
, bool bBookMode
, BOOL bViewOnly
= FALSE
);
513 void ShowHScrollbar(sal_Bool bShow
);
514 sal_Bool
IsHScrollbarVisible()const;
516 void ShowVScrollbar(sal_Bool bShow
);
517 sal_Bool
IsVScrollbarVisible()const;
524 int StatVLineal() const { return ((Window
*)pVRuler
)->IsVisible(); }
525 void ChangeVLinealMetric(FieldUnit eUnit
);
526 void GetVLinealMetric(FieldUnit
& rToFill
) const;
528 int StatTab() const { return ((Window
*)pHRuler
)->IsVisible(); }
529 SvxRuler
& GetHLineal() { return *pHRuler
; }
530 SvxRuler
& GetVLineal() { return *pVRuler
; }
531 void InvalidateRulerPos();
532 void ChangeTabMetric(FieldUnit eUnit
);
533 void GetHLinealMetric(FieldUnit
& rToFill
) const;
536 void Execute(SfxRequest
&);
537 void ExecPageMove(SfxRequest
&);
538 void ExecStyle(SfxRequest
&);
539 void ExecLingu(SfxRequest
&);
540 void ExecDataBase(SfxRequest
&);
541 void ExecDlg(SfxRequest
&);
542 void ExecDlgExt(SfxRequest
&);
543 void ExecDBDlg(SfxRequest
&);
544 void ExecColl(SfxRequest
&);
545 void ExecutePrint(SfxRequest
&);
546 void ExecDraw(SfxRequest
&);
547 void ExecTabWin(SfxRequest
&);
548 void ExecuteStatusLine(SfxRequest
&);
549 DECL_LINK( ExecRulerClick
, Ruler
* );
550 void ExecSearch(SfxRequest
&, BOOL bNoMessage
= FALSE
);
551 void ExecViewOptions(SfxRequest
&);
553 void StateViewOptions(SfxItemSet
&);
554 void StateSearch(SfxItemSet
&);
555 void GetState(SfxItemSet
&);
556 void StateStatusLine(SfxItemSet
&);
559 // Funktionen fuer Drawing
560 void SetDrawFuncPtr(SwDrawBase
* pFuncPtr
);
561 inline SwDrawBase
* GetDrawFuncPtr(/*BOOL bBuf = FALSE*/) const { return pDrawActual
; }
562 void GetDrawState(SfxItemSet
&rSet
);
564 inline BOOL
IsDrawRotate() { return bDrawRotate
; }
565 inline void FlipDrawRotate() { bDrawRotate
= !bDrawRotate
; }
566 inline BOOL
IsDrawSelMode() { return bDrawSelMode
; }
567 void SetSelDrawSlot();
568 inline void FlipDrawSelMode() { bDrawSelMode
= !bDrawSelMode
; }
569 void NoRotate(); // Rotate-Mode abschalten
570 BOOL
EnterDrawTextMode(const Point
& aDocPos
);
571 void LeaveDrawCreate() { nDrawSfxId
= nFormSfxId
= USHRT_MAX
; sDrawCustom
.Erase();}
572 BOOL
IsDrawMode() { return (nDrawSfxId
!= USHRT_MAX
|| nFormSfxId
!= USHRT_MAX
); }
573 BOOL
IsFormMode() const;
574 BOOL
IsBezierEditMode();
575 BOOL
AreOnlyFormsSelected() const;
576 BOOL
HasDrwObj(SdrObject
*pSdrObj
) const;
577 BOOL
HasOnlyObj(SdrObject
*pSdrObj
, UINT32 eObjInventor
) const;
578 BOOL
BeginTextEdit( SdrObject
* pObj
, SdrPageView
* pPV
=NULL
,
579 Window
* pWin
=NULL
, BOOL bIsNewObj
=FALSE
);
581 void StateTabWin(SfxItemSet
&);
583 // Attribute haben sich geaendert
584 DECL_LINK( AttrChangedNotify
, SwWrtShell
* );
586 // form control has been activated
587 DECL_LINK( FormControlActivated
, FmFormShell
* );
591 void AutoCaption(const USHORT nType
, const SvGlobalName
*pOleId
= 0);
592 void InsertCaption(const InsCaptionOpt
*pOpt
);
594 // Async Aufruf durch Core
595 void UpdatePageNums(USHORT nPhyNum
, USHORT nVirtNum
, const String
& rPgStr
);
597 String
GetPageStr(USHORT nPhyNum
, USHORT nVirtNum
, const String
& rPgStr
);
600 SfxShell
*GetCurShell() { return pShell
; }
601 SwDocShell
*GetDocShell();
602 inline const SwDocShell
*GetDocShell() const;
603 inline FmFormShell
*GetFormShell() { return pFormShell
; }
605 //damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann
606 void ResetSubShell() { pShell
= 0; }
608 virtual void WriteUserData(String
&, BOOL bBrowse
= FALSE
);
609 virtual void ReadUserData(const String
&, BOOL bBrowse
= FALSE
);
610 virtual void ReadUserDataSequence ( const com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
>&, sal_Bool bBrowse
);
611 virtual void WriteUserDataSequence ( com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
>&, sal_Bool bBrowse
);
613 void SetCrsrAtTop( BOOL bFlag
, BOOL bCenter
= FALSE
)
614 { bTopCrsr
= bFlag
, bCenterCrsr
= bCenter
; }
615 BOOL
IsCrsrAtTop() const { return bTopCrsr
; }
616 BOOL
IsCrsrAtCenter() const { return bCenterCrsr
; }
618 BOOL
JumpToSwMark( const String
& rMark
);
620 long InsertDoc( USHORT nSlotId
, const String
& rFileName
,
621 const String
& rFilterName
, INT16 nVersion
= 0 );
623 void ExecuteInsertDoc( SfxRequest
& rRequest
, const SfxPoolItem
* pItem
);
624 long InsertMedium( USHORT nSlotId
, SfxMedium
* pMedium
, INT16 nVersion
);
625 DECL_LINK( DialogClosedHdl
, sfx2::FileDialogHelper
* );
627 // status methods for clipboard.
628 // Status changes now notified from the clipboard.
629 BOOL
IsPasteAllowed();
630 BOOL
IsPasteSpecialAllowed();
632 // Enable mail merge - mail merge field dialog enabled
633 void EnableMailMerge(BOOL bEnable
= TRUE
);
634 //apply Accessiblity options
635 void ApplyAccessiblityOptions(SvtAccessibilityOptions
& rAccessibilityOptions
);
637 // get print options (SwPrtOptions)
638 static void MakeOptions( PrintDialog
* pDlg
, SwPrtOptions
& rOpts
,
639 BOOL
* pPrtProspect
, BOOL
* pPrtProspect_RTL
, BOOL bWeb
, SfxPrinter
* pPrt
, SwPrintData
* pData
);
641 SwView(SfxViewFrame
* pFrame
, SfxViewShell
*);
644 void NotifyDBChanged();
646 SfxObjectShellRef
& GetTmpSelectionDoc();
647 SfxObjectShellRef
& GetOrCreateTmpSelectionDoc();
649 void AddTransferable(SwTransferable
& rTransferable
);
651 // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
652 // or to support printing
653 void SetMailMergeConfigItem(SwMailMergeConfigItem
* pConfigItem
, sal_uInt16 nRestart
, sal_Bool bIsSource
);
654 SwMailMergeConfigItem
* GetMailMergeConfigItem();
655 sal_uInt16
GetMailMergeRestartPage() const;
656 sal_Bool
IsMailMergeSourceView() const;
658 void ExecFormatPaintbrush(SfxRequest
&);
659 void StateFormatPaintbrush(SfxItemSet
&);
662 int InsertGraphic( const String
&rPath
, const String
&rFilter
,
663 BOOL bLink
= TRUE
, GraphicFilter
*pFlt
= 0,
664 Graphic
* pPreviewGrf
= 0,
665 BOOL bRule
= FALSE
);
667 void ExecuteScan( SfxRequest
& rReq
);
669 SwPostItMgr
* GetPostItMgr() { return mpPostItMgr
;}
670 const SwPostItMgr
* GetPostItMgr() const { return mpPostItMgr
;}
673 // ----------------- inline Methoden ----------------------
675 inline long SwView::GetXScroll() const
677 return aVisArea
.GetWidth() * nScrollX
/ 100L;
680 inline long SwView::GetYScroll() const
682 return aVisArea
.GetHeight() * nScrollY
/ 100L;
685 inline const SwDocShell
*SwView::GetDocShell() const
687 return ((SwView
*)this)->GetDocShell();
690 //***********************************************************
692 SfxTabPage
* CreatePrintOptionsPage( Window
*pParent
,
693 const SfxItemSet
&rOptions
,