xref: /aoo41x/main/sw/source/ui/inc/view.hxx (revision 52f1c2ee)
11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
31d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
51d2dbeb0SAndrew Rist  * distributed with this work for additional information
61d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
71d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
101d2dbeb0SAndrew Rist  *
111d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
121d2dbeb0SAndrew Rist  *
131d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
171d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist  * under the License.
191d2dbeb0SAndrew Rist  *
201d2dbeb0SAndrew Rist  *************************************************************/
211d2dbeb0SAndrew Rist 
221d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _SWVIEW_HXX
24cdf0e10cSrcweir #define _SWVIEW_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <vcl/timer.hxx>
27cdf0e10cSrcweir #include <vcl/field.hxx>
28cdf0e10cSrcweir #include <svtools/htmlcfg.hxx>
29cdf0e10cSrcweir #include <sfx2/viewfac.hxx>
30cdf0e10cSrcweir #include <sfx2/viewsh.hxx>
31cdf0e10cSrcweir #include <sfx2/objsh.hxx>
32cdf0e10cSrcweir #include <editeng/svxenum.hxx>
33cdf0e10cSrcweir #include <svx/zoomitem.hxx>
34cdf0e10cSrcweir #include <editeng/editstat.hxx>
35cdf0e10cSrcweir #include "swdllapi.h"
36cdf0e10cSrcweir #include <swtypes.hxx>
37cdf0e10cSrcweir #include <shellid.hxx>
38cdf0e10cSrcweir #include <layout/layout.hxx>
39cdf0e10cSrcweir #include <IMark.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class SwBaseShell;
42cdf0e10cSrcweir class Button;
43cdf0e10cSrcweir class ImageButton;
44cdf0e10cSrcweir class SwTxtFmtColl;
45cdf0e10cSrcweir class SwPageDesc;
46cdf0e10cSrcweir class SwFrmFmt;
47cdf0e10cSrcweir class SwCharFmt;
48cdf0e10cSrcweir class SwNumRule;
49cdf0e10cSrcweir class SwViewOption;
50cdf0e10cSrcweir class SwGlossaryHdl;
51cdf0e10cSrcweir class SwDrawBase;
52cdf0e10cSrcweir class SvxRuler;
53cdf0e10cSrcweir class SvxLRSpaceItem;
54cdf0e10cSrcweir class SwDocShell;
55cdf0e10cSrcweir class SwScrollbar;
56cdf0e10cSrcweir class SvxVCBrowser;
57cdf0e10cSrcweir class SvBorder;
58cdf0e10cSrcweir class Ruler;
59cdf0e10cSrcweir class OutlinerView;
60cdf0e10cSrcweir class SvxSearchItem;
61cdf0e10cSrcweir class SearchAttrItemList;
62cdf0e10cSrcweir class SvxSearchDialog;
63cdf0e10cSrcweir class SdrView;
64cdf0e10cSrcweir class Dialog;
65cdf0e10cSrcweir class SdrObject;
66cdf0e10cSrcweir class SdrPageView;
67cdf0e10cSrcweir class SwNaviImageButton;
68cdf0e10cSrcweir class SwHlpImageButton;
69cdf0e10cSrcweir class Outliner;
70cdf0e10cSrcweir class SwView;
71cdf0e10cSrcweir class SwEditWin;
72cdf0e10cSrcweir class SwWrtShell;
73cdf0e10cSrcweir class SwView_Impl;
74cdf0e10cSrcweir class XSelectionObject;
75cdf0e10cSrcweir struct SwSearchOptions;
76cdf0e10cSrcweir class FmFormShell;
77cdf0e10cSrcweir class CommandEvent;
78cdf0e10cSrcweir class InsCaptionOpt;
79cdf0e10cSrcweir class SvGlobalName;
80cdf0e10cSrcweir class SvtAccessibilityOptions;
81cdf0e10cSrcweir class SwTransferable;
82cdf0e10cSrcweir class SwMailMergeConfigItem;
83cdf0e10cSrcweir class SwTxtNode; // #i23726#
84cdf0e10cSrcweir class SwPrintData;
85cdf0e10cSrcweir class SwFormatClipboard;
86cdf0e10cSrcweir struct SwConversionArgs;
87cdf0e10cSrcweir class Graphic;
88cdf0e10cSrcweir class GraphicFilter;
89cdf0e10cSrcweir class SwPostItMgr;
90cdf0e10cSrcweir class SwFieldBookmark;
91cdf0e10cSrcweir 
92cdf0e10cSrcweir namespace com{ namespace sun { namespace star {
93cdf0e10cSrcweir 	namespace view{ class XSelectionSupplier; }
94cdf0e10cSrcweir }}}
95cdf0e10cSrcweir namespace sfx2 { class FileDialogHelper; }
96cdf0e10cSrcweir 
97cdf0e10cSrcweir const long nLeftOfst = -370;
98cdf0e10cSrcweir const long nScrollX	 =	 30;
99cdf0e10cSrcweir const long nScrollY	 =	 30;
100cdf0e10cSrcweir 
101cdf0e10cSrcweir #define MINZOOM 20
102cdf0e10cSrcweir #define MAXZOOM 600
103cdf0e10cSrcweir 
104cdf0e10cSrcweir #define MAX_MARKS 5
105cdf0e10cSrcweir 
106cdf0e10cSrcweir #define CHILDWIN_LABEL      1
107cdf0e10cSrcweir #define CHILDWIN_MAILMERGE  2
108cdf0e10cSrcweir 
109cdf0e10cSrcweir enum ShellModes
110cdf0e10cSrcweir {
111cdf0e10cSrcweir 	SHELL_MODE_TEXT,
112cdf0e10cSrcweir 	SHELL_MODE_FRAME,
113cdf0e10cSrcweir 	SHELL_MODE_GRAPHIC,
114cdf0e10cSrcweir 	SHELL_MODE_OBJECT,
115cdf0e10cSrcweir 	SHELL_MODE_DRAW,
116cdf0e10cSrcweir 	SHELL_MODE_DRAW_CTRL,
117cdf0e10cSrcweir 	SHELL_MODE_DRAW_FORM,
118cdf0e10cSrcweir 	SHELL_MODE_DRAWTEXT,
119cdf0e10cSrcweir 	SHELL_MODE_BEZIER,
120cdf0e10cSrcweir 	SHELL_MODE_LIST_TEXT,
121cdf0e10cSrcweir 	SHELL_MODE_TABLE_TEXT,
122cdf0e10cSrcweir 	SHELL_MODE_TABLE_LIST_TEXT,
123cdf0e10cSrcweir 	SHELL_MODE_MEDIA,
124cdf0e10cSrcweir     SHELL_MODE_EXTRUDED_CUSTOMSHAPE,
125cdf0e10cSrcweir     SHELL_MODE_FONTWORK,
126cdf0e10cSrcweir 	SHELL_MODE_POSTIT
127cdf0e10cSrcweir };
128cdf0e10cSrcweir 
129cdf0e10cSrcweir /*--------------------------------------------------------------------
130cdf0e10cSrcweir 	Beschreibung:	Anwendung einer Vorlage
131cdf0e10cSrcweir  --------------------------------------------------------------------*/
132cdf0e10cSrcweir 
133cdf0e10cSrcweir struct SwApplyTemplate
134cdf0e10cSrcweir {
135cdf0e10cSrcweir 	union
136cdf0e10cSrcweir 	{
137cdf0e10cSrcweir 		SwTxtFmtColl* pTxtColl;
138cdf0e10cSrcweir 		SwPageDesc*   pPageDesc;
139cdf0e10cSrcweir 		SwFrmFmt*	  pFrmFmt;
140cdf0e10cSrcweir 		SwCharFmt*	  pCharFmt;
141cdf0e10cSrcweir 		SwNumRule*	  pNumRule;
142cdf0e10cSrcweir 	} aColl;
143cdf0e10cSrcweir 
144cdf0e10cSrcweir 	int eType;
145cdf0e10cSrcweir 	sal_uInt16 nColor;
146cdf0e10cSrcweir     SwFormatClipboard* pFormatClipboard;
147cdf0e10cSrcweir 	sal_Bool bUndo;
148cdf0e10cSrcweir 
SwApplyTemplateSwApplyTemplate149cdf0e10cSrcweir 	SwApplyTemplate() :
150cdf0e10cSrcweir 		eType(0),
151cdf0e10cSrcweir 		nColor(0),
152cdf0e10cSrcweir         pFormatClipboard(0),
153cdf0e10cSrcweir 		bUndo(sal_False)
154cdf0e10cSrcweir 	{
155cdf0e10cSrcweir 		aColl.pTxtColl = 0;
156cdf0e10cSrcweir 	}
157cdf0e10cSrcweir };
158cdf0e10cSrcweir 
159cdf0e10cSrcweir 
160cdf0e10cSrcweir /*--------------------------------------------------------------------
161cdf0e10cSrcweir 	Beschreibung:	Sicht auf ein Dokument
162cdf0e10cSrcweir  --------------------------------------------------------------------*/
163cdf0e10cSrcweir 
164cdf0e10cSrcweir class SW_DLLPUBLIC SwView: public SfxViewShell
165cdf0e10cSrcweir {
166cdf0e10cSrcweir 	//Messehack (MA,MBA)
167cdf0e10cSrcweir 	friend void lcl_SelectShellForDrop( SwView &rView );
168cdf0e10cSrcweir 
169cdf0e10cSrcweir 	friend class TestTemplateItem;
170cdf0e10cSrcweir     friend class SwHHCWrapper;
171cdf0e10cSrcweir 	friend class SwHyphWrapper;
172cdf0e10cSrcweir 	friend class SwView_Impl;
173cdf0e10cSrcweir 	friend class SwClipboardChangeListener;
174cdf0e10cSrcweir 
175cdf0e10cSrcweir 	//suchen & ersetzen
176cdf0e10cSrcweir 	static SvxSearchDialog *pSrchDlg;
177cdf0e10cSrcweir 	static SvxSearchItem   *pSrchItem;
178cdf0e10cSrcweir 
179cdf0e10cSrcweir 	static sal_uInt16			nInsertCtrlState;
180cdf0e10cSrcweir 	static sal_uInt16			nWebInsertCtrlState;
181cdf0e10cSrcweir 	static sal_uInt16			nInsertObjectCtrlState;
182cdf0e10cSrcweir 	static sal_uInt16			nInsertFieldCtrlState;
183cdf0e10cSrcweir 	static sal_uInt16			nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi)
184cdf0e10cSrcweir     static sal_Int32        nActMark; // aktuelle Sprungmarke fuer unbenannte Merker
185cdf0e10cSrcweir 
186cdf0e10cSrcweir 	static sal_Bool             bExtra;
187cdf0e10cSrcweir 	static sal_Bool             bFound;
188cdf0e10cSrcweir 	static sal_Bool				bJustOpened;
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 	static SearchAttrItemList* pSrchList;
191cdf0e10cSrcweir 	static SearchAttrItemList* pReplList;
192cdf0e10cSrcweir 
193cdf0e10cSrcweir 
194cdf0e10cSrcweir     SvxHtmlOptions      aHTMLOpt;
195cdf0e10cSrcweir 	Timer				aTimer;			//Fuer verzoegerte ChgLnks waehrend
196cdf0e10cSrcweir 										//einer Aktion
197cdf0e10cSrcweir 	String				aPageStr;		//Statusanzeige, aktuelle Seite
198cdf0e10cSrcweir 	String 				sSwViewData,
199cdf0e10cSrcweir 	//and the new cursor position if the user double click in the PagePreView
200cdf0e10cSrcweir 						sNewCrsrPos;
201cdf0e10cSrcweir     // to support keyboard the number of the page to go to can be set too
202cdf0e10cSrcweir     sal_uInt16              nNewPage;
203ca62e2c2SSteve Yin 	sal_uInt16			nOldPageNum;
204ca62e2c2SSteve Yin 	String			nOldSectionName;
205cdf0e10cSrcweir 	Point				aTabColFromDocPos;	//Verschieben von Tabellenspalten aus
206cdf0e10cSrcweir 											//aus dem Dokument heraus.
207cdf0e10cSrcweir     SwTxtNode           * pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
208cdf0e10cSrcweir 
209cdf0e10cSrcweir 	Size				aDocSz;			// aktuelle Dokumentgroesse
210cdf0e10cSrcweir 	Rectangle			aVisArea;		// sichtbarer Bereich
211cdf0e10cSrcweir 
212cdf0e10cSrcweir 	SwEditWin			*pEditWin;
213cdf0e10cSrcweir 	SwWrtShell			*pWrtShell;
214cdf0e10cSrcweir 
215cdf0e10cSrcweir 	SfxShell			*pShell;		//aktuelle SubShell auf dem Dispatcher
216cdf0e10cSrcweir 	FmFormShell			*pFormShell;	// DB-FormShell
217cdf0e10cSrcweir 
218cdf0e10cSrcweir 	SwView_Impl			*pViewImpl;		// Impl-Daten fuer UNO + Basic
219cdf0e10cSrcweir 
220cdf0e10cSrcweir 
221cdf0e10cSrcweir 	SwScrollbar	   		*pHScrollbar,	// MDI Bedienelemente
222cdf0e10cSrcweir 						*pVScrollbar;
223cdf0e10cSrcweir 
224cdf0e10cSrcweir 	Window		   		*pScrollFill;	// Dummy-Window zum Fuellen der rechten
225cdf0e10cSrcweir 										// unteren Ecke, wenn beide Scrollbars
226cdf0e10cSrcweir 										// aktiv sind
227cdf0e10cSrcweir 
228cdf0e10cSrcweir     SvxRuler            *pHRuler,
229cdf0e10cSrcweir                         *pVRuler;
230cdf0e10cSrcweir 	ImageButton	   		*pTogglePageBtn;
231cdf0e10cSrcweir 
232cdf0e10cSrcweir 	SwHlpImageButton 	*pPageUpBtn,
233cdf0e10cSrcweir 						*pPageDownBtn;
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 	SwNaviImageButton 	*pNaviBtn;
236cdf0e10cSrcweir 	SwGlossaryHdl  		*pGlosHdl;			// Henkel Textbausteine
237cdf0e10cSrcweir 	SwDrawBase			*pDrawActual;
238cdf0e10cSrcweir 
239cdf0e10cSrcweir 	const SwFrmFmt		*pLastTableFormat;
240cdf0e10cSrcweir 
241cdf0e10cSrcweir     SwFormatClipboard   *pFormatClipboard; //holds data for format paintbrush
242cdf0e10cSrcweir 
243cdf0e10cSrcweir 	SwPostItMgr			*mpPostItMgr;
244cdf0e10cSrcweir 
245cdf0e10cSrcweir 	int					nSelectionType;
246cdf0e10cSrcweir 
247cdf0e10cSrcweir     static const int MASTERENUMCOMMANDS = 6;
248cdf0e10cSrcweir 
249cdf0e10cSrcweir     String			aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
250cdf0e10cSrcweir 
251cdf0e10cSrcweir     sal_uInt16          nPageCnt;
252cdf0e10cSrcweir 
253cdf0e10cSrcweir 	// Aktueller Drawmode
254cdf0e10cSrcweir 	sal_uInt16			nDrawSfxId;
255cdf0e10cSrcweir     String          sDrawCustom; //some drawing types are marked with strings!
256cdf0e10cSrcweir 	sal_uInt16			nFormSfxId;
257cdf0e10cSrcweir 	sal_uInt16			nLastPasteDestination;
258cdf0e10cSrcweir 
259cdf0e10cSrcweir     // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
260cdf0e10cSrcweir     sal_uInt16          nLeftBorderDistance;
261cdf0e10cSrcweir     sal_uInt16          nRightBorderDistance;
262cdf0e10cSrcweir 
263cdf0e10cSrcweir 	sal_Bool			bCenterCrsr : 1,
264cdf0e10cSrcweir 					bTopCrsr : 1,
265cdf0e10cSrcweir 					bAllwaysShowSel : 1,
266cdf0e10cSrcweir 					bTabColFromDoc : 1,
267cdf0e10cSrcweir                     bNumIndentFromDoc : 1, // #i23726#
268cdf0e10cSrcweir                     bTabRowFromDoc : 1,
269cdf0e10cSrcweir 					bSetTabColFromDoc : 1 ,
270cdf0e10cSrcweir                     bSetTabRowFromDoc : 1,
271cdf0e10cSrcweir 					bAttrChgNotified : 1,
272cdf0e10cSrcweir 					bAttrChgNotifiedWithRegistrations : 1,
273cdf0e10cSrcweir 					bVerbsActive : 1,
274cdf0e10cSrcweir 					bDrawRotate : 1,
275cdf0e10cSrcweir 					bDrawSelMode : 1,
276cdf0e10cSrcweir 					bShowAtResize : 1,
277cdf0e10cSrcweir 					bInOuterResizePixel : 1,
278cdf0e10cSrcweir                     bInInnerResizePixel : 1,
279cdf0e10cSrcweir 					bPasteState : 1,
280cdf0e10cSrcweir                     bPasteSpecialState : 1,
281cdf0e10cSrcweir                     bInMailMerge : 1,
282cdf0e10cSrcweir                     bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
283cdf0e10cSrcweir                     bOldShellWasPagePreView : 1,
284cdf0e10cSrcweir                     bIsPreviewDoubleClick : 1, // #i114045#
285cdf0e10cSrcweir                     bMakeSelectionVisible : 1 // #b6330459# transport the bookmark selection
286cdf0e10cSrcweir 					;
287cdf0e10cSrcweir 
288cdf0e10cSrcweir 	// Methoden fuers Suchen
289cdf0e10cSrcweir 	// Suchkontext setzen
290cdf0e10cSrcweir 	SW_DLLPRIVATE sal_Bool   			SearchAndWrap(sal_Bool bApi = sal_False);
291cdf0e10cSrcweir 	SW_DLLPRIVATE sal_Bool 			SearchAll(sal_uInt16* pFound = 0);
292cdf0e10cSrcweir 	SW_DLLPRIVATE sal_uLong			FUNC_Search( const SwSearchOptions& rOptions );
293cdf0e10cSrcweir 	SW_DLLPRIVATE void 			Replace();
294cdf0e10cSrcweir 
295cdf0e10cSrcweir 	sal_Bool		                        IsDocumentBorder();
296cdf0e10cSrcweir 
297cdf0e10cSrcweir 	SW_DLLPRIVATE sal_Bool			IsTextTool() const;
298cdf0e10cSrcweir 
299cdf0e10cSrcweir 	// Bedienelemente verwalten anlegen
300cdf0e10cSrcweir 	SW_DLLPRIVATE void			CreateBtns();
301cdf0e10cSrcweir 	SW_DLLPRIVATE DECL_LINK( BtnPage, Button * );
302cdf0e10cSrcweir 
303cdf0e10cSrcweir 	SW_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer * );
304cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* );
305cdf0e10cSrcweir 
306cdf0e10cSrcweir 	SW_DLLPRIVATE DECL_LINK( HtmlOptionsHdl, void * );
307cdf0e10cSrcweir 
308cdf0e10cSrcweir 	inline long		GetXScroll() const;
309cdf0e10cSrcweir 	inline long		GetYScroll() const;
310cdf0e10cSrcweir 	SW_DLLPRIVATE  Point	AlignToPixel(const Point& rPt) const;
311cdf0e10cSrcweir 	SW_DLLPRIVATE 	void		CalcPt(	Point* pPt,const Rectangle& rRect,
312cdf0e10cSrcweir 							sal_uInt16 nRangeX = USHRT_MAX,
313cdf0e10cSrcweir 							sal_uInt16 nRangeY = USHRT_MAX);
314cdf0e10cSrcweir 
315cdf0e10cSrcweir 	SW_DLLPRIVATE sal_Bool			GetPageScrollUpOffset(SwTwips& rOff) const;
316cdf0e10cSrcweir 	SW_DLLPRIVATE sal_Bool			GetPageScrollDownOffset(SwTwips& rOff) const;
317cdf0e10cSrcweir 
318cdf0e10cSrcweir 	// Scrollbar Movements
319cdf0e10cSrcweir 	SW_DLLPRIVATE long			PageUp();
320cdf0e10cSrcweir 	SW_DLLPRIVATE long			PageDown();
321cdf0e10cSrcweir 	SW_DLLPRIVATE long			PageUpCrsr(sal_Bool bSelect);
322cdf0e10cSrcweir 	SW_DLLPRIVATE long			PageDownCrsr(sal_Bool bSelect);
323cdf0e10cSrcweir 	SW_DLLPRIVATE long			PhyPageUp();
324cdf0e10cSrcweir 	SW_DLLPRIVATE long			PhyPageDown();
325cdf0e10cSrcweir 
326cdf0e10cSrcweir     SW_DLLPRIVATE int               _CreateScrollbar( sal_Bool bHori );
327cdf0e10cSrcweir 	SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
328cdf0e10cSrcweir 	SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
329cdf0e10cSrcweir 	SW_DLLPRIVATE sal_Bool			UpdateScrollbars();
330cdf0e10cSrcweir 	SW_DLLPRIVATE void			CalcVisArea( const Size &rPixelSz );
331cdf0e10cSrcweir 
332cdf0e10cSrcweir     SW_DLLPRIVATE void            CreatePageButtons(sal_Bool bShow);
333cdf0e10cSrcweir 
334cdf0e10cSrcweir 	// Linguistik-Funktionen
335cdf0e10cSrcweir 	SW_DLLPRIVATE void			HyphenateDocument();
336cdf0e10cSrcweir 	SW_DLLPRIVATE sal_Bool			IsDrawTextHyphenate();
337cdf0e10cSrcweir 	SW_DLLPRIVATE void			HyphenateDrawText();
338cdf0e10cSrcweir 	SW_DLLPRIVATE void			StartThesaurus();
339cdf0e10cSrcweir 
340cdf0e10cSrcweir     // text conversion
341cdf0e10cSrcweir     SW_DLLPRIVATE void          StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
342cdf0e10cSrcweir 
343cdf0e10cSrcweir     // used for spell checking and text conversion
344cdf0e10cSrcweir     SW_DLLPRIVATE void          SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone,
345cdf0e10cSrcweir                                         sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 );
346cdf0e10cSrcweir     SW_DLLPRIVATE void          SpellEnd( SwConversionArgs *pConvArgs = 0 );
347cdf0e10cSrcweir 
348cdf0e10cSrcweir     SW_DLLPRIVATE void          HyphStart( SvxSpellArea eSpell );
349cdf0e10cSrcweir 	SW_DLLPRIVATE sal_Bool			CheckSpecialCntnt();
SpellKontext(sal_Bool bOn=sal_True)350cdf0e10cSrcweir 	SW_DLLPRIVATE void			SpellKontext(sal_Bool bOn = sal_True)
351cdf0e10cSrcweir 							{ bCenterCrsr = bOn; bAllwaysShowSel = bOn; }
352cdf0e10cSrcweir 
353cdf0e10cSrcweir 	// Methoden fuers Printing
354cdf0e10cSrcweir 	SW_DLLPRIVATE virtual	SfxPrinter* 	GetPrinter( sal_Bool bCreate = sal_False );
355cdf0e10cSrcweir 			SfxTabPage* 	CreatePrintOptionsPage( Window* pParent,
356cdf0e10cSrcweir 													const SfxItemSet& rSet);
357cdf0e10cSrcweir 	// fuer Readonly-Umschaltung
358cdf0e10cSrcweir 	SW_DLLPRIVATE virtual void	Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
359cdf0e10cSrcweir 	SW_DLLPRIVATE void			_CheckReadonlyState();
360cdf0e10cSrcweir 	SW_DLLPRIVATE void			_CheckReadonlySelection();
361cdf0e10cSrcweir 
362cdf0e10cSrcweir 	// Methode fuer PageDesc drehen
363cdf0e10cSrcweir 	SW_DLLPRIVATE void			SwapPageMargin(const SwPageDesc&, SvxLRSpaceItem& rLR);
364cdf0e10cSrcweir 
365cdf0e10cSrcweir 	SW_DLLPRIVATE void			_SetZoom( const Size &rEditSz,
366cdf0e10cSrcweir 							  SvxZoomType eZoomType,
367cdf0e10cSrcweir 							  short nFactor = 100,
368cdf0e10cSrcweir 							  sal_Bool bViewOnly = sal_False);
369cdf0e10cSrcweir 	SW_DLLPRIVATE void			CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 	SW_DLLPRIVATE void		    ShowAtResize();
372cdf0e10cSrcweir 
373cdf0e10cSrcweir 	SW_DLLPRIVATE virtual void	Move();
374cdf0e10cSrcweir 
375*52f1c2eeSArmin Le Grand public: // #123922# Needs to be called from a 2nd place now as a helper method
376cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          InsertGraphicDlg( SfxRequest& );
377cdf0e10cSrcweir 
378cdf0e10cSrcweir protected:
379cdf0e10cSrcweir 
GetViewImpl()380cdf0e10cSrcweir 	SwView_Impl*	GetViewImpl() {return pViewImpl;}
381cdf0e10cSrcweir 
382cdf0e10cSrcweir 	void ImpSetVerb( int nSelType );
383cdf0e10cSrcweir 
GetSelectionType() const384cdf0e10cSrcweir 	int				GetSelectionType() const { return nSelectionType; }
SetSelectionType(int nSet)385cdf0e10cSrcweir 	void			SetSelectionType(int nSet) { nSelectionType = nSet;}
386cdf0e10cSrcweir 
387cdf0e10cSrcweir 	// fuer die SwWebView
SetShell(SfxShell * pS)388cdf0e10cSrcweir 	void			SetShell( SfxShell* pS ) 			{ pShell = pS; }
SetFormShell(FmFormShell * pSh)389cdf0e10cSrcweir 	void 			SetFormShell( FmFormShell* pSh )	{ pFormShell = pSh; }
390cdf0e10cSrcweir 
391cdf0e10cSrcweir 	virtual void	SelectShell();
392cdf0e10cSrcweir 
393cdf0e10cSrcweir 	virtual void	Activate(sal_Bool);
394cdf0e10cSrcweir 	virtual void 	Deactivate(sal_Bool);
395cdf0e10cSrcweir 	virtual void 	InnerResizePixel( const Point &rOfs, const Size &rSize );
396cdf0e10cSrcweir 	virtual void 	OuterResizePixel( const Point &rOfs, const Size &rSize );
397cdf0e10cSrcweir 	virtual Size	GetOptimalSizePixel() const;
398cdf0e10cSrcweir 
399cdf0e10cSrcweir 	void			SetImageButtonColor(Color& rColor);
400cdf0e10cSrcweir 
GetLastTblFrmFmt() const401cdf0e10cSrcweir 	const SwFrmFmt* GetLastTblFrmFmt() const {return pLastTableFormat;}
SetLastTblFrmFmt(const SwFrmFmt * pSet)402cdf0e10cSrcweir 	void 			SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;}
403cdf0e10cSrcweir 
404cdf0e10cSrcweir     // form letter execution
405cdf0e10cSrcweir     void    GenerateFormLetter(sal_Bool bUseCurrentDocument);
406cdf0e10cSrcweir 
407cdf0e10cSrcweir     using SfxShell::GetDispatcher;
408cdf0e10cSrcweir 
409cdf0e10cSrcweir public:
410cdf0e10cSrcweir 
411cdf0e10cSrcweir 	SFX_DECL_VIEWFACTORY(SwView);
412cdf0e10cSrcweir 	SFX_DECL_INTERFACE(SW_VIEWSHELL)
413cdf0e10cSrcweir 	TYPEINFO();
414cdf0e10cSrcweir 
415cdf0e10cSrcweir 	SfxDispatcher 	&GetDispatcher();
416cdf0e10cSrcweir 
417cdf0e10cSrcweir 	void                    GotFocus() const;
418cdf0e10cSrcweir 	virtual SdrView*		GetDrawView() const;
419cdf0e10cSrcweir 	virtual	sal_Bool		HasUIFeature( sal_uInt32 nFeature );
420cdf0e10cSrcweir 	virtual	void			ShowCursor( FASTBOOL bOn = sal_True );
421cdf0e10cSrcweir 	virtual ErrCode			DoVerb( long nVerb );
422cdf0e10cSrcweir 
423cdf0e10cSrcweir 	virtual sal_uInt16			SetPrinter(	SfxPrinter* pNew,
424cdf0e10cSrcweir                                         sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
425cdf0e10cSrcweir 	ShellModes				GetShellMode();
426cdf0e10cSrcweir 
427cdf0e10cSrcweir 	com::sun::star::view::XSelectionSupplier*		GetUNOObject();
428cdf0e10cSrcweir 
429cdf0e10cSrcweir 	String					GetSelectionTextParam( sal_Bool bCompleteWords,
430cdf0e10cSrcweir 												   sal_Bool bEraseTrail );
431cdf0e10cSrcweir 	virtual sal_Bool			HasSelection( sal_Bool  bText ) const;
432cdf0e10cSrcweir 	virtual String			GetSelectionText( sal_Bool bCompleteWords = sal_False );
433cdf0e10cSrcweir 	virtual sal_uInt16			PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
434cdf0e10cSrcweir 	virtual	void			MarginChanged();
435cdf0e10cSrcweir 
436cdf0e10cSrcweir     // replace word/selection with text from the thesaurus
437cdf0e10cSrcweir     // (this code has special handling for "in word" character)
438cdf0e10cSrcweir     void                    InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bValidSelection );
439cdf0e10cSrcweir     bool                    IsValidSelectionForThesaurus() const;
440cdf0e10cSrcweir     String                  GetThesaurusLookUpText( bool bSelection ) const;
441cdf0e10cSrcweir 
442cdf0e10cSrcweir 	// Shell sofort wechseln ->  fuer GetSelectionObject
443cdf0e10cSrcweir 	void		StopShellTimer();
444cdf0e10cSrcweir 
GetWrtShell() const445cdf0e10cSrcweir 	inline SwWrtShell&		GetWrtShell   () const { return *pWrtShell; }
GetWrtShellPtr() const446cdf0e10cSrcweir 	inline SwWrtShell*		GetWrtShellPtr() const { return  pWrtShell; }
447cdf0e10cSrcweir 
GetEditWin()448cdf0e10cSrcweir 	inline 		 SwEditWin &GetEditWin() 	    { return *pEditWin; }
GetEditWin() const449cdf0e10cSrcweir 	inline const SwEditWin &GetEditWin () const { return *pEditWin; }
450cdf0e10cSrcweir 
451cdf0e10cSrcweir #if defined WNT || defined UNX
452cdf0e10cSrcweir 	void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
453cdf0e10cSrcweir #endif
454cdf0e10cSrcweir 
455cdf0e10cSrcweir 	//Handler fuer Textbausteine an die Textshell rausreichen, gfs. anlegen
456cdf0e10cSrcweir 	SwGlossaryHdl*			GetGlosHdl();
457cdf0e10cSrcweir 
GetVisArea() const458cdf0e10cSrcweir 	inline const Rectangle&	GetVisArea() const { return aVisArea; }
459cdf0e10cSrcweir 
460cdf0e10cSrcweir 	sal_Bool			IsScroll(const Rectangle& rRect) const;
461cdf0e10cSrcweir 	void			Scroll(	const Rectangle& rRect,
462cdf0e10cSrcweir 							sal_uInt16 nRangeX = USHRT_MAX,
463cdf0e10cSrcweir 							sal_uInt16 nRangeY = USHRT_MAX);
464cdf0e10cSrcweir 
465cdf0e10cSrcweir 	long		SetVScrollMax(long lMax);
466cdf0e10cSrcweir 	long		SetHScrollMax(long lMax);
467cdf0e10cSrcweir 
468cdf0e10cSrcweir 	DECL_LINK( SpellError, LanguageType * );
469cdf0e10cSrcweir 	sal_Bool 			ExecSpellPopup( const Point& rPt );
470cdf0e10cSrcweir     sal_Bool            ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
471cdf0e10cSrcweir     // SMARTTAGS
472cdf0e10cSrcweir     sal_Bool            ExecSmartTagPopup( const Point& rPt );
473cdf0e10cSrcweir 
474cdf0e10cSrcweir 	DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
475cdf0e10cSrcweir 	sal_Bool			ExecDrwTxtSpellPopup(const Point& rPt);
476cdf0e10cSrcweir 
SetTabColFromDocPos(const Point & rPt)477cdf0e10cSrcweir 	void			SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; }
SetTabColFromDoc(sal_Bool b)478cdf0e10cSrcweir 	void			SetTabColFromDoc( sal_Bool b ) { bTabColFromDoc = b; }
IsTabColFromDoc() const479cdf0e10cSrcweir     sal_Bool            IsTabColFromDoc() const    { return bTabColFromDoc; }
SetTabRowFromDoc(sal_Bool b)480cdf0e10cSrcweir     void            SetTabRowFromDoc( sal_Bool b ) { bTabRowFromDoc = b; }
IsTabRowFromDoc() const481cdf0e10cSrcweir     sal_Bool            IsTabRowFromDoc() const    { return bTabRowFromDoc; }
482cdf0e10cSrcweir 
483cdf0e10cSrcweir     // -> #i23726#
SetNumRuleNodeFromDoc(SwTxtNode * pNumRuleNode)484cdf0e10cSrcweir     void            SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
485cdf0e10cSrcweir                     { pNumRuleNodeFromDoc = pNumRuleNode; }
SetNumIndentFromDoc(sal_Bool b)486cdf0e10cSrcweir     void            SetNumIndentFromDoc(sal_Bool b) { bNumIndentFromDoc = b; }
IsNumIndentFromDoc() const487cdf0e10cSrcweir     sal_Bool            IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
488cdf0e10cSrcweir     // <- #i23726#
489cdf0e10cSrcweir 
490cdf0e10cSrcweir     void	DocSzChgd( const Size& rNewSize );
GetDocSz() const491cdf0e10cSrcweir 	const 	Size&	GetDocSz() const { return aDocSz; }
492cdf0e10cSrcweir 	virtual void	SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
493cdf0e10cSrcweir 			void	SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
494cdf0e10cSrcweir 			void	CheckVisArea();
495cdf0e10cSrcweir 
496cdf0e10cSrcweir 	void RecheckBrowseMode();
497cdf0e10cSrcweir     static LAYOUT_NS Dialog* GetSearchDialog();
498cdf0e10cSrcweir 
499cdf0e10cSrcweir 	static sal_uInt16	GetMoveType();
500cdf0e10cSrcweir 	static void		SetMoveType(sal_uInt16 nSet);
501cdf0e10cSrcweir     DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
502cdf0e10cSrcweir 	static void		SetActMark(sal_Int32 nSet);
503cdf0e10cSrcweir 
504cdf0e10cSrcweir 	sal_Bool 			HandleWheelCommands( const CommandEvent& );
505cdf0e10cSrcweir 
506cdf0e10cSrcweir 	// Rahmen einfuegen
507cdf0e10cSrcweir 	void			InsFrmMode(sal_uInt16 nCols);
508cdf0e10cSrcweir 
509cdf0e10cSrcweir 	void			SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
510cdf0e10cSrcweir 	virtual void	SetZoomFactor( const Fraction &rX, const Fraction & );
511cdf0e10cSrcweir 
512cdf0e10cSrcweir     void            SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
513cdf0e10cSrcweir 
514cdf0e10cSrcweir     void            ShowHScrollbar(sal_Bool bShow);
515cdf0e10cSrcweir     sal_Bool        IsHScrollbarVisible()const;
516cdf0e10cSrcweir 
517cdf0e10cSrcweir     void            ShowVScrollbar(sal_Bool bShow);
518cdf0e10cSrcweir     sal_Bool        IsVScrollbarVisible()const;
519cdf0e10cSrcweir 
520cdf0e10cSrcweir     int             CreateVLineal();
521cdf0e10cSrcweir     int             KillVLineal();
522cdf0e10cSrcweir     int             CreateTab();
523cdf0e10cSrcweir     int             KillTab();
524cdf0e10cSrcweir 
StatVLineal() const525cdf0e10cSrcweir     int             StatVLineal() const { return ((Window*)pVRuler)->IsVisible(); }
526cdf0e10cSrcweir 	void			ChangeVLinealMetric(FieldUnit eUnit);
527cdf0e10cSrcweir     void            GetVLinealMetric(FieldUnit& rToFill) const;
528cdf0e10cSrcweir 
StatTab() const529cdf0e10cSrcweir     int             StatTab() const { return ((Window*)pHRuler)->IsVisible(); }
GetHLineal()530cdf0e10cSrcweir     SvxRuler&       GetHLineal()    { return *pHRuler; }
GetVLineal()531cdf0e10cSrcweir     SvxRuler&       GetVLineal()    { return *pVRuler; }
532cdf0e10cSrcweir 	void			InvalidateRulerPos();
533cdf0e10cSrcweir 	void			ChangeTabMetric(FieldUnit eUnit);
534cdf0e10cSrcweir     void            GetHLinealMetric(FieldUnit& rToFill) const;
535cdf0e10cSrcweir 
536cdf0e10cSrcweir 		// Handler
537cdf0e10cSrcweir 	void			Execute(SfxRequest&);
538cdf0e10cSrcweir 	void			ExecPageMove(SfxRequest&);
539cdf0e10cSrcweir 	void			ExecStyle(SfxRequest&);
540cdf0e10cSrcweir 	void			ExecLingu(SfxRequest&);
541cdf0e10cSrcweir 	void			ExecDataBase(SfxRequest&);
542cdf0e10cSrcweir 	void			ExecDlg(SfxRequest&);
543cdf0e10cSrcweir 	void			ExecDlgExt(SfxRequest&);
544cdf0e10cSrcweir 	void			ExecDBDlg(SfxRequest &);
545cdf0e10cSrcweir 	void			ExecColl(SfxRequest&);
546cdf0e10cSrcweir 	void			ExecutePrint(SfxRequest&);
547cdf0e10cSrcweir 	void 			ExecDraw(SfxRequest&);
548cdf0e10cSrcweir 	void 			ExecTabWin(SfxRequest&);
549cdf0e10cSrcweir 	void			ExecuteStatusLine(SfxRequest&);
550cdf0e10cSrcweir 	DECL_LINK( ExecRulerClick, Ruler * );
551cdf0e10cSrcweir 	void 			ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
552cdf0e10cSrcweir     void            ExecViewOptions(SfxRequest &);
553cdf0e10cSrcweir 
554cdf0e10cSrcweir     void            StateViewOptions(SfxItemSet &);
555cdf0e10cSrcweir     void            StateSearch(SfxItemSet &);
556cdf0e10cSrcweir 	void			GetState(SfxItemSet&);
557cdf0e10cSrcweir 	void			StateStatusLine(SfxItemSet&);
558cdf0e10cSrcweir 
559cdf0e10cSrcweir 
560cdf0e10cSrcweir 	// Funktionen fuer Drawing
561cdf0e10cSrcweir 	void			SetDrawFuncPtr(SwDrawBase* pFuncPtr);
GetDrawFuncPtr() const562cdf0e10cSrcweir 	inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const	{ return pDrawActual; }
563cdf0e10cSrcweir 	void 			GetDrawState(SfxItemSet &rSet);
564cdf0e10cSrcweir 	void			ExitDraw();
IsDrawRotate()565cdf0e10cSrcweir 	inline sal_Bool		IsDrawRotate()		{ return bDrawRotate; }
FlipDrawRotate()566cdf0e10cSrcweir 	inline void		FlipDrawRotate()	{ bDrawRotate = !bDrawRotate; }
IsDrawSelMode()567cdf0e10cSrcweir 	inline sal_Bool		IsDrawSelMode() 	{ return bDrawSelMode; }
568cdf0e10cSrcweir 	void			SetSelDrawSlot();
FlipDrawSelMode()569cdf0e10cSrcweir 	inline void		FlipDrawSelMode()	{ bDrawSelMode = !bDrawSelMode; }
570cdf0e10cSrcweir 	void			NoRotate();		// Rotate-Mode abschalten
571cdf0e10cSrcweir 	sal_Bool			EnterDrawTextMode(const Point& aDocPos);
LeaveDrawCreate()572cdf0e10cSrcweir     void            LeaveDrawCreate()   { nDrawSfxId = nFormSfxId = USHRT_MAX; sDrawCustom.Erase();}
IsDrawMode()573cdf0e10cSrcweir 	sal_Bool			IsDrawMode()		{ return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
574cdf0e10cSrcweir 	sal_Bool			IsFormMode() const;
575cdf0e10cSrcweir 	sal_Bool			IsBezierEditMode();
576cdf0e10cSrcweir 	sal_Bool			AreOnlyFormsSelected() const;
577cdf0e10cSrcweir 	sal_Bool			HasDrwObj(SdrObject *pSdrObj) const;
578cdf0e10cSrcweir 	sal_Bool			HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
579cdf0e10cSrcweir 	sal_Bool			BeginTextEdit(	SdrObject* pObj, SdrPageView* pPV=NULL,
580cdf0e10cSrcweir 									Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
581cdf0e10cSrcweir 
582cdf0e10cSrcweir 	void			StateTabWin(SfxItemSet&);
583cdf0e10cSrcweir 
584cdf0e10cSrcweir 	// Attribute haben sich geaendert
585cdf0e10cSrcweir 	DECL_LINK( AttrChangedNotify, SwWrtShell * );
586cdf0e10cSrcweir 
587cdf0e10cSrcweir     // form control has been activated
588cdf0e10cSrcweir     DECL_LINK( FormControlActivated, FmFormShell* );
589cdf0e10cSrcweir 
590cdf0e10cSrcweir 	// Links bearbeiten
591cdf0e10cSrcweir 	void			EditLinkDlg();
592cdf0e10cSrcweir 	void			AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
593cdf0e10cSrcweir 	void			InsertCaption(const InsCaptionOpt *pOpt);
594cdf0e10cSrcweir 
595cdf0e10cSrcweir 	// Async Aufruf durch Core
596cdf0e10cSrcweir 	void        UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
597cdf0e10cSrcweir 
598cdf0e10cSrcweir 	String 		GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
599cdf0e10cSrcweir 
600cdf0e10cSrcweir 	// Shell rausreichen
GetCurShell()601cdf0e10cSrcweir 				 SfxShell		*GetCurShell()	{ return pShell; }
602cdf0e10cSrcweir 				 SwDocShell		*GetDocShell();
603cdf0e10cSrcweir 	inline const SwDocShell		*GetDocShell() const;
GetFormShell()604cdf0e10cSrcweir 	inline		 FmFormShell	*GetFormShell()	{ return pFormShell; }
GetFormShell() const605cdf0e10cSrcweir 	inline const FmFormShell    *GetFormShell()	const { return pFormShell; }
606cdf0e10cSrcweir 
607cdf0e10cSrcweir 	//damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann
ResetSubShell()608cdf0e10cSrcweir 	void ResetSubShell() 	{ pShell = 0; }
609cdf0e10cSrcweir 
610cdf0e10cSrcweir 	virtual void	WriteUserData(String &, sal_Bool bBrowse = sal_False );
611cdf0e10cSrcweir 	virtual void	ReadUserData(const String &, sal_Bool bBrowse = sal_False );
612cdf0e10cSrcweir     virtual void    ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
613cdf0e10cSrcweir     virtual void    WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
614cdf0e10cSrcweir 
SetCrsrAtTop(sal_Bool bFlag,sal_Bool bCenter=sal_False)615cdf0e10cSrcweir 	void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False )
616cdf0e10cSrcweir 		{ bTopCrsr = bFlag, bCenterCrsr = bCenter; }
IsCrsrAtTop() const617cdf0e10cSrcweir 	sal_Bool IsCrsrAtTop() const 					{ return bTopCrsr; }
IsCrsrAtCenter() const618cdf0e10cSrcweir 	sal_Bool IsCrsrAtCenter() const 				{ return bCenterCrsr; }
619cdf0e10cSrcweir 
620cdf0e10cSrcweir 	sal_Bool JumpToSwMark( const String& rMark );
621cdf0e10cSrcweir 
622cdf0e10cSrcweir 	long InsertDoc( sal_uInt16 nSlotId, const String& rFileName,
623cdf0e10cSrcweir 					const String& rFilterName, sal_Int16 nVersion = 0 );
624cdf0e10cSrcweir 
625cdf0e10cSrcweir     void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
626cdf0e10cSrcweir     long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
627cdf0e10cSrcweir     DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
628cdf0e10cSrcweir 
629cdf0e10cSrcweir     // status methods for clipboard.
630cdf0e10cSrcweir 	// Status changes now notified from the clipboard.
631cdf0e10cSrcweir 	sal_Bool IsPasteAllowed();
632cdf0e10cSrcweir 	sal_Bool IsPasteSpecialAllowed();
633cdf0e10cSrcweir 
634cdf0e10cSrcweir     // Enable mail merge - mail merge field dialog enabled
635cdf0e10cSrcweir     void EnableMailMerge(sal_Bool bEnable = sal_True);
636cdf0e10cSrcweir     //apply Accessiblity options
637cdf0e10cSrcweir     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
638cdf0e10cSrcweir 
639cdf0e10cSrcweir 	SwView(SfxViewFrame* pFrame, SfxViewShell*);
640cdf0e10cSrcweir 	~SwView();
641cdf0e10cSrcweir 
642cdf0e10cSrcweir     void NotifyDBChanged();
643cdf0e10cSrcweir 
644cdf0e10cSrcweir     SfxObjectShellLock & GetTmpSelectionDoc();
645cdf0e10cSrcweir     SfxObjectShellLock & GetOrCreateTmpSelectionDoc();
646cdf0e10cSrcweir 
647cdf0e10cSrcweir     void        AddTransferable(SwTransferable& rTransferable);
648cdf0e10cSrcweir 
649cdf0e10cSrcweir     // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
650cdf0e10cSrcweir     // or to support printing
651cdf0e10cSrcweir     void   SetMailMergeConfigItem(SwMailMergeConfigItem*  pConfigItem, sal_uInt16 nRestart, sal_Bool bIsSource);
652cdf0e10cSrcweir     SwMailMergeConfigItem*  GetMailMergeConfigItem();
653cdf0e10cSrcweir     sal_uInt16              GetMailMergeRestartPage() const;
654cdf0e10cSrcweir     sal_Bool                IsMailMergeSourceView() const;
655cdf0e10cSrcweir 
656cdf0e10cSrcweir     void ExecFormatPaintbrush(SfxRequest &);
657cdf0e10cSrcweir     void StateFormatPaintbrush(SfxItemSet &);
658cdf0e10cSrcweir 
659cdf0e10cSrcweir     //public fuer D&D
660cdf0e10cSrcweir     int     InsertGraphic( const String &rPath, const String &rFilter,
661cdf0e10cSrcweir                             sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
662cdf0e10cSrcweir                             Graphic* pPreviewGrf = 0,
663cdf0e10cSrcweir                             sal_Bool bRule = sal_False );
664cdf0e10cSrcweir 
665cdf0e10cSrcweir 	void ExecuteScan( SfxRequest& rReq );
666cdf0e10cSrcweir 
GetPostItMgr()667cdf0e10cSrcweir 	SwPostItMgr* GetPostItMgr() { return mpPostItMgr;}
GetPostItMgr() const668cdf0e10cSrcweir     const SwPostItMgr* GetPostItMgr() const { return mpPostItMgr;}
669cdf0e10cSrcweir };
670cdf0e10cSrcweir 
671cdf0e10cSrcweir // ----------------- inline Methoden ----------------------
672cdf0e10cSrcweir 
GetXScroll() const673cdf0e10cSrcweir inline long SwView::GetXScroll() const
674cdf0e10cSrcweir {
675cdf0e10cSrcweir 	return aVisArea.GetWidth() * nScrollX / 100L;
676cdf0e10cSrcweir }
677cdf0e10cSrcweir 
GetYScroll() const678cdf0e10cSrcweir inline long SwView::GetYScroll() const
679cdf0e10cSrcweir {
680cdf0e10cSrcweir 	return aVisArea.GetHeight() * nScrollY / 100L;
681cdf0e10cSrcweir }
682cdf0e10cSrcweir 
GetDocShell() const683cdf0e10cSrcweir inline const SwDocShell	*SwView::GetDocShell() const
684cdf0e10cSrcweir {
685cdf0e10cSrcweir 	return ((SwView*)this)->GetDocShell();
686cdf0e10cSrcweir }
687cdf0e10cSrcweir 
688cdf0e10cSrcweir //***********************************************************
689cdf0e10cSrcweir 
690cdf0e10cSrcweir SfxTabPage* CreatePrintOptionsPage(	Window *pParent,
691cdf0e10cSrcweir 									const SfxItemSet &rOptions,
692cdf0e10cSrcweir 									sal_Bool bPreview);
693cdf0e10cSrcweir 
694cdf0e10cSrcweir #endif
695cdf0e10cSrcweir 
696