xref: /trunk/main/sw/source/ui/inc/view.hxx (revision 1d2dbeb0b7301723c6d13094e87a8714ef81a328)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew 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 
149cdf0e10cSrcweir     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;
203cdf0e10cSrcweir 
204cdf0e10cSrcweir     Point               aTabColFromDocPos;  //Verschieben von Tabellenspalten aus
205cdf0e10cSrcweir                                             //aus dem Dokument heraus.
206cdf0e10cSrcweir     SwTxtNode           * pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
207cdf0e10cSrcweir 
208cdf0e10cSrcweir     Size                aDocSz;         // aktuelle Dokumentgroesse
209cdf0e10cSrcweir     Rectangle           aVisArea;       // sichtbarer Bereich
210cdf0e10cSrcweir 
211cdf0e10cSrcweir     SwEditWin           *pEditWin;
212cdf0e10cSrcweir     SwWrtShell          *pWrtShell;
213cdf0e10cSrcweir 
214cdf0e10cSrcweir     SfxShell            *pShell;        //aktuelle SubShell auf dem Dispatcher
215cdf0e10cSrcweir     FmFormShell         *pFormShell;    // DB-FormShell
216cdf0e10cSrcweir 
217cdf0e10cSrcweir     SwView_Impl         *pViewImpl;     // Impl-Daten fuer UNO + Basic
218cdf0e10cSrcweir 
219cdf0e10cSrcweir 
220cdf0e10cSrcweir     SwScrollbar         *pHScrollbar,   // MDI Bedienelemente
221cdf0e10cSrcweir                         *pVScrollbar;
222cdf0e10cSrcweir 
223cdf0e10cSrcweir     Window              *pScrollFill;   // Dummy-Window zum Fuellen der rechten
224cdf0e10cSrcweir                                         // unteren Ecke, wenn beide Scrollbars
225cdf0e10cSrcweir                                         // aktiv sind
226cdf0e10cSrcweir 
227cdf0e10cSrcweir     SvxRuler            *pHRuler,
228cdf0e10cSrcweir                         *pVRuler;
229cdf0e10cSrcweir     ImageButton         *pTogglePageBtn;
230cdf0e10cSrcweir 
231cdf0e10cSrcweir     SwHlpImageButton    *pPageUpBtn,
232cdf0e10cSrcweir                         *pPageDownBtn;
233cdf0e10cSrcweir 
234cdf0e10cSrcweir     SwNaviImageButton   *pNaviBtn;
235cdf0e10cSrcweir     SwGlossaryHdl       *pGlosHdl;          // Henkel Textbausteine
236cdf0e10cSrcweir     SwDrawBase          *pDrawActual;
237cdf0e10cSrcweir 
238cdf0e10cSrcweir     const SwFrmFmt      *pLastTableFormat;
239cdf0e10cSrcweir 
240cdf0e10cSrcweir     SwFormatClipboard   *pFormatClipboard; //holds data for format paintbrush
241cdf0e10cSrcweir 
242cdf0e10cSrcweir     SwPostItMgr         *mpPostItMgr;
243cdf0e10cSrcweir 
244cdf0e10cSrcweir     int                 nSelectionType;
245cdf0e10cSrcweir 
246cdf0e10cSrcweir     static const int MASTERENUMCOMMANDS = 6;
247cdf0e10cSrcweir 
248cdf0e10cSrcweir     String          aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
249cdf0e10cSrcweir 
250cdf0e10cSrcweir     sal_uInt16          nPageCnt;
251cdf0e10cSrcweir 
252cdf0e10cSrcweir     // Aktueller Drawmode
253cdf0e10cSrcweir     sal_uInt16          nDrawSfxId;
254cdf0e10cSrcweir     String          sDrawCustom; //some drawing types are marked with strings!
255cdf0e10cSrcweir     sal_uInt16          nFormSfxId;
256cdf0e10cSrcweir     sal_uInt16          nLastPasteDestination;
257cdf0e10cSrcweir 
258cdf0e10cSrcweir     // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
259cdf0e10cSrcweir     sal_uInt16          nLeftBorderDistance;
260cdf0e10cSrcweir     sal_uInt16          nRightBorderDistance;
261cdf0e10cSrcweir 
262cdf0e10cSrcweir     sal_Bool            bCenterCrsr : 1,
263cdf0e10cSrcweir                     bTopCrsr : 1,
264cdf0e10cSrcweir                     bAllwaysShowSel : 1,
265cdf0e10cSrcweir                     bTabColFromDoc : 1,
266cdf0e10cSrcweir                     bNumIndentFromDoc : 1, // #i23726#
267cdf0e10cSrcweir                     bTabRowFromDoc : 1,
268cdf0e10cSrcweir                     bSetTabColFromDoc : 1 ,
269cdf0e10cSrcweir                     bSetTabRowFromDoc : 1,
270cdf0e10cSrcweir                     bAttrChgNotified : 1,
271cdf0e10cSrcweir                     bAttrChgNotifiedWithRegistrations : 1,
272cdf0e10cSrcweir                     bVerbsActive : 1,
273cdf0e10cSrcweir                     bDrawRotate : 1,
274cdf0e10cSrcweir                     bDrawSelMode : 1,
275cdf0e10cSrcweir                     bShowAtResize : 1,
276cdf0e10cSrcweir                     bInOuterResizePixel : 1,
277cdf0e10cSrcweir                     bInInnerResizePixel : 1,
278cdf0e10cSrcweir                     bPasteState : 1,
279cdf0e10cSrcweir                     bPasteSpecialState : 1,
280cdf0e10cSrcweir                     bInMailMerge : 1,
281cdf0e10cSrcweir                     bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
282cdf0e10cSrcweir                     bOldShellWasPagePreView : 1,
283cdf0e10cSrcweir                     bIsPreviewDoubleClick : 1, // #i114045#
284cdf0e10cSrcweir                     bMakeSelectionVisible : 1 // #b6330459# transport the bookmark selection
285cdf0e10cSrcweir                     ;
286cdf0e10cSrcweir 
287cdf0e10cSrcweir     // Methoden fuers Suchen
288cdf0e10cSrcweir     // Suchkontext setzen
289cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool              SearchAndWrap(sal_Bool bApi = sal_False);
290cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          SearchAll(sal_uInt16* pFound = 0);
291cdf0e10cSrcweir     SW_DLLPRIVATE sal_uLong         FUNC_Search( const SwSearchOptions& rOptions );
292cdf0e10cSrcweir     SW_DLLPRIVATE void          Replace();
293cdf0e10cSrcweir 
294cdf0e10cSrcweir     sal_Bool                                IsDocumentBorder();
295cdf0e10cSrcweir 
296cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          IsTextTool() const;
297cdf0e10cSrcweir 
298cdf0e10cSrcweir     // Bedienelemente verwalten anlegen
299cdf0e10cSrcweir     SW_DLLPRIVATE void          CreateBtns();
300cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( BtnPage, Button * );
301cdf0e10cSrcweir 
302cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer * );
303cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* );
304cdf0e10cSrcweir 
305cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( HtmlOptionsHdl, void * );
306cdf0e10cSrcweir 
307cdf0e10cSrcweir     inline long     GetXScroll() const;
308cdf0e10cSrcweir     inline long     GetYScroll() const;
309cdf0e10cSrcweir     SW_DLLPRIVATE  Point    AlignToPixel(const Point& rPt) const;
310cdf0e10cSrcweir     SW_DLLPRIVATE   void        CalcPt( Point* pPt,const Rectangle& rRect,
311cdf0e10cSrcweir                             sal_uInt16 nRangeX = USHRT_MAX,
312cdf0e10cSrcweir                             sal_uInt16 nRangeY = USHRT_MAX);
313cdf0e10cSrcweir 
314cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          GetPageScrollUpOffset(SwTwips& rOff) const;
315cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          GetPageScrollDownOffset(SwTwips& rOff) const;
316cdf0e10cSrcweir 
317cdf0e10cSrcweir     // Scrollbar Movements
318cdf0e10cSrcweir     SW_DLLPRIVATE long          PageUp();
319cdf0e10cSrcweir     SW_DLLPRIVATE long          PageDown();
320cdf0e10cSrcweir     SW_DLLPRIVATE long          PageUpCrsr(sal_Bool bSelect);
321cdf0e10cSrcweir     SW_DLLPRIVATE long          PageDownCrsr(sal_Bool bSelect);
322cdf0e10cSrcweir     SW_DLLPRIVATE long          PhyPageUp();
323cdf0e10cSrcweir     SW_DLLPRIVATE long          PhyPageDown();
324cdf0e10cSrcweir 
325cdf0e10cSrcweir     SW_DLLPRIVATE int               _CreateScrollbar( sal_Bool bHori );
326cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
327cdf0e10cSrcweir     SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
328cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          UpdateScrollbars();
329cdf0e10cSrcweir     SW_DLLPRIVATE void          CalcVisArea( const Size &rPixelSz );
330cdf0e10cSrcweir 
331cdf0e10cSrcweir     SW_DLLPRIVATE void            CreatePageButtons(sal_Bool bShow);
332cdf0e10cSrcweir 
333cdf0e10cSrcweir     // Linguistik-Funktionen
334cdf0e10cSrcweir     SW_DLLPRIVATE void          HyphenateDocument();
335cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          IsDrawTextHyphenate();
336cdf0e10cSrcweir     SW_DLLPRIVATE void          HyphenateDrawText();
337cdf0e10cSrcweir     SW_DLLPRIVATE void          StartThesaurus();
338cdf0e10cSrcweir 
339cdf0e10cSrcweir     // text conversion
340cdf0e10cSrcweir     SW_DLLPRIVATE void          StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
341cdf0e10cSrcweir 
342cdf0e10cSrcweir     // used for spell checking and text conversion
343cdf0e10cSrcweir     SW_DLLPRIVATE void          SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone,
344cdf0e10cSrcweir                                         sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 );
345cdf0e10cSrcweir     SW_DLLPRIVATE void          SpellEnd( SwConversionArgs *pConvArgs = 0 );
346cdf0e10cSrcweir 
347cdf0e10cSrcweir     SW_DLLPRIVATE void          HyphStart( SvxSpellArea eSpell );
348cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          CheckSpecialCntnt();
349cdf0e10cSrcweir     SW_DLLPRIVATE void          SpellKontext(sal_Bool bOn = sal_True)
350cdf0e10cSrcweir                             { bCenterCrsr = bOn; bAllwaysShowSel = bOn; }
351cdf0e10cSrcweir 
352cdf0e10cSrcweir     // Methoden fuers Printing
353cdf0e10cSrcweir     SW_DLLPRIVATE virtual   SfxPrinter*     GetPrinter( sal_Bool bCreate = sal_False );
354cdf0e10cSrcweir             SfxTabPage*     CreatePrintOptionsPage( Window* pParent,
355cdf0e10cSrcweir                                                     const SfxItemSet& rSet);
356cdf0e10cSrcweir     // fuer Readonly-Umschaltung
357cdf0e10cSrcweir     SW_DLLPRIVATE virtual void  Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
358cdf0e10cSrcweir     SW_DLLPRIVATE void          _CheckReadonlyState();
359cdf0e10cSrcweir     SW_DLLPRIVATE void          _CheckReadonlySelection();
360cdf0e10cSrcweir 
361cdf0e10cSrcweir     // Methode fuer PageDesc drehen
362cdf0e10cSrcweir     SW_DLLPRIVATE void          SwapPageMargin(const SwPageDesc&, SvxLRSpaceItem& rLR);
363cdf0e10cSrcweir 
364cdf0e10cSrcweir     SW_DLLPRIVATE void          _SetZoom( const Size &rEditSz,
365cdf0e10cSrcweir                               SvxZoomType eZoomType,
366cdf0e10cSrcweir                               short nFactor = 100,
367cdf0e10cSrcweir                               sal_Bool bViewOnly = sal_False);
368cdf0e10cSrcweir     SW_DLLPRIVATE void          CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
369cdf0e10cSrcweir 
370cdf0e10cSrcweir     SW_DLLPRIVATE void          ShowAtResize();
371cdf0e10cSrcweir 
372cdf0e10cSrcweir     SW_DLLPRIVATE virtual void  Move();
373cdf0e10cSrcweir 
374cdf0e10cSrcweir     SW_DLLPRIVATE sal_Bool          InsertGraphicDlg( SfxRequest& );
375cdf0e10cSrcweir 
376cdf0e10cSrcweir protected:
377cdf0e10cSrcweir 
378cdf0e10cSrcweir     SwView_Impl*    GetViewImpl() {return pViewImpl;}
379cdf0e10cSrcweir 
380cdf0e10cSrcweir     void ImpSetVerb( int nSelType );
381cdf0e10cSrcweir 
382cdf0e10cSrcweir     int             GetSelectionType() const { return nSelectionType; }
383cdf0e10cSrcweir     void            SetSelectionType(int nSet) { nSelectionType = nSet;}
384cdf0e10cSrcweir 
385cdf0e10cSrcweir     // fuer die SwWebView
386cdf0e10cSrcweir     void            SetShell( SfxShell* pS )            { pShell = pS; }
387cdf0e10cSrcweir     void            SetFormShell( FmFormShell* pSh )    { pFormShell = pSh; }
388cdf0e10cSrcweir 
389cdf0e10cSrcweir     virtual void    SelectShell();
390cdf0e10cSrcweir 
391cdf0e10cSrcweir     virtual void    Activate(sal_Bool);
392cdf0e10cSrcweir     virtual void    Deactivate(sal_Bool);
393cdf0e10cSrcweir     virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize );
394cdf0e10cSrcweir     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize );
395cdf0e10cSrcweir     virtual Size    GetOptimalSizePixel() const;
396cdf0e10cSrcweir 
397cdf0e10cSrcweir     void            SetImageButtonColor(Color& rColor);
398cdf0e10cSrcweir 
399cdf0e10cSrcweir     const SwFrmFmt* GetLastTblFrmFmt() const {return pLastTableFormat;}
400cdf0e10cSrcweir     void            SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;}
401cdf0e10cSrcweir 
402cdf0e10cSrcweir     // form letter execution
403cdf0e10cSrcweir     void    GenerateFormLetter(sal_Bool bUseCurrentDocument);
404cdf0e10cSrcweir 
405cdf0e10cSrcweir     using SfxShell::GetDispatcher;
406cdf0e10cSrcweir 
407cdf0e10cSrcweir public:
408cdf0e10cSrcweir 
409cdf0e10cSrcweir     SFX_DECL_VIEWFACTORY(SwView);
410cdf0e10cSrcweir     SFX_DECL_INTERFACE(SW_VIEWSHELL)
411cdf0e10cSrcweir     TYPEINFO();
412cdf0e10cSrcweir 
413cdf0e10cSrcweir     SfxDispatcher   &GetDispatcher();
414cdf0e10cSrcweir 
415cdf0e10cSrcweir     void                    GotFocus() const;
416cdf0e10cSrcweir     virtual SdrView*        GetDrawView() const;
417cdf0e10cSrcweir     virtual sal_Bool        HasUIFeature( sal_uInt32 nFeature );
418cdf0e10cSrcweir     virtual void            ShowCursor( FASTBOOL bOn = sal_True );
419cdf0e10cSrcweir     virtual ErrCode         DoVerb( long nVerb );
420cdf0e10cSrcweir 
421cdf0e10cSrcweir     virtual sal_uInt16          SetPrinter( SfxPrinter* pNew,
422cdf0e10cSrcweir                                         sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
423cdf0e10cSrcweir     ShellModes              GetShellMode();
424cdf0e10cSrcweir 
425cdf0e10cSrcweir     com::sun::star::view::XSelectionSupplier*       GetUNOObject();
426cdf0e10cSrcweir 
427cdf0e10cSrcweir     String                  GetSelectionTextParam( sal_Bool bCompleteWords,
428cdf0e10cSrcweir                                                    sal_Bool bEraseTrail );
429cdf0e10cSrcweir     virtual sal_Bool            HasSelection( sal_Bool  bText ) const;
430cdf0e10cSrcweir     virtual String          GetSelectionText( sal_Bool bCompleteWords = sal_False );
431cdf0e10cSrcweir     virtual sal_uInt16          PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
432cdf0e10cSrcweir     virtual void            MarginChanged();
433cdf0e10cSrcweir 
434cdf0e10cSrcweir     // replace word/selection with text from the thesaurus
435cdf0e10cSrcweir     // (this code has special handling for "in word" character)
436cdf0e10cSrcweir     void                    InsertThesaurusSynonym( const String &rSynonmText, const String &rLookUpText, bool bValidSelection );
437cdf0e10cSrcweir     bool                    IsValidSelectionForThesaurus() const;
438cdf0e10cSrcweir     String                  GetThesaurusLookUpText( bool bSelection ) const;
439cdf0e10cSrcweir 
440cdf0e10cSrcweir     // Shell sofort wechseln ->  fuer GetSelectionObject
441cdf0e10cSrcweir     void        StopShellTimer();
442cdf0e10cSrcweir 
443cdf0e10cSrcweir     inline SwWrtShell&      GetWrtShell   () const { return *pWrtShell; }
444cdf0e10cSrcweir     inline SwWrtShell*      GetWrtShellPtr() const { return  pWrtShell; }
445cdf0e10cSrcweir 
446cdf0e10cSrcweir     inline       SwEditWin &GetEditWin()        { return *pEditWin; }
447cdf0e10cSrcweir     inline const SwEditWin &GetEditWin () const { return *pEditWin; }
448cdf0e10cSrcweir 
449cdf0e10cSrcweir #if defined WNT || defined UNX
450cdf0e10cSrcweir     void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
451cdf0e10cSrcweir #endif
452cdf0e10cSrcweir 
453cdf0e10cSrcweir     //Handler fuer Textbausteine an die Textshell rausreichen, gfs. anlegen
454cdf0e10cSrcweir     SwGlossaryHdl*          GetGlosHdl();
455cdf0e10cSrcweir 
456cdf0e10cSrcweir     inline const Rectangle& GetVisArea() const { return aVisArea; }
457cdf0e10cSrcweir 
458cdf0e10cSrcweir     sal_Bool            IsScroll(const Rectangle& rRect) const;
459cdf0e10cSrcweir     void            Scroll( const Rectangle& rRect,
460cdf0e10cSrcweir                             sal_uInt16 nRangeX = USHRT_MAX,
461cdf0e10cSrcweir                             sal_uInt16 nRangeY = USHRT_MAX);
462cdf0e10cSrcweir 
463cdf0e10cSrcweir     long        SetVScrollMax(long lMax);
464cdf0e10cSrcweir     long        SetHScrollMax(long lMax);
465cdf0e10cSrcweir 
466cdf0e10cSrcweir     DECL_LINK( SpellError, LanguageType * );
467cdf0e10cSrcweir     sal_Bool            ExecSpellPopup( const Point& rPt );
468cdf0e10cSrcweir     sal_Bool            ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
469cdf0e10cSrcweir     // SMARTTAGS
470cdf0e10cSrcweir     sal_Bool            ExecSmartTagPopup( const Point& rPt );
471cdf0e10cSrcweir 
472cdf0e10cSrcweir     DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
473cdf0e10cSrcweir     sal_Bool            ExecDrwTxtSpellPopup(const Point& rPt);
474cdf0e10cSrcweir 
475cdf0e10cSrcweir     void            SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; }
476cdf0e10cSrcweir     void            SetTabColFromDoc( sal_Bool b ) { bTabColFromDoc = b; }
477cdf0e10cSrcweir     sal_Bool            IsTabColFromDoc() const    { return bTabColFromDoc; }
478cdf0e10cSrcweir     void            SetTabRowFromDoc( sal_Bool b ) { bTabRowFromDoc = b; }
479cdf0e10cSrcweir     sal_Bool            IsTabRowFromDoc() const    { return bTabRowFromDoc; }
480cdf0e10cSrcweir 
481cdf0e10cSrcweir     // -> #i23726#
482cdf0e10cSrcweir     void            SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
483cdf0e10cSrcweir                     { pNumRuleNodeFromDoc = pNumRuleNode; }
484cdf0e10cSrcweir     void            SetNumIndentFromDoc(sal_Bool b) { bNumIndentFromDoc = b; }
485cdf0e10cSrcweir     sal_Bool            IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
486cdf0e10cSrcweir     // <- #i23726#
487cdf0e10cSrcweir 
488cdf0e10cSrcweir     void    DocSzChgd( const Size& rNewSize );
489cdf0e10cSrcweir     const   Size&   GetDocSz() const { return aDocSz; }
490cdf0e10cSrcweir     virtual void    SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
491cdf0e10cSrcweir             void    SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
492cdf0e10cSrcweir             void    CheckVisArea();
493cdf0e10cSrcweir 
494cdf0e10cSrcweir     void RecheckBrowseMode();
495cdf0e10cSrcweir     static LAYOUT_NS Dialog* GetSearchDialog();
496cdf0e10cSrcweir 
497cdf0e10cSrcweir     static sal_uInt16   GetMoveType();
498cdf0e10cSrcweir     static void     SetMoveType(sal_uInt16 nSet);
499cdf0e10cSrcweir     DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
500cdf0e10cSrcweir     static void     SetActMark(sal_Int32 nSet);
501cdf0e10cSrcweir 
502cdf0e10cSrcweir     sal_Bool            HandleWheelCommands( const CommandEvent& );
503cdf0e10cSrcweir 
504cdf0e10cSrcweir     // Rahmen einfuegen
505cdf0e10cSrcweir     void            InsFrmMode(sal_uInt16 nCols);
506cdf0e10cSrcweir 
507cdf0e10cSrcweir     void            SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
508cdf0e10cSrcweir     virtual void    SetZoomFactor( const Fraction &rX, const Fraction & );
509cdf0e10cSrcweir 
510cdf0e10cSrcweir     void            SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
511cdf0e10cSrcweir 
512cdf0e10cSrcweir     void            ShowHScrollbar(sal_Bool bShow);
513cdf0e10cSrcweir     sal_Bool        IsHScrollbarVisible()const;
514cdf0e10cSrcweir 
515cdf0e10cSrcweir     void            ShowVScrollbar(sal_Bool bShow);
516cdf0e10cSrcweir     sal_Bool        IsVScrollbarVisible()const;
517cdf0e10cSrcweir 
518cdf0e10cSrcweir     int             CreateVLineal();
519cdf0e10cSrcweir     int             KillVLineal();
520cdf0e10cSrcweir     int             CreateTab();
521cdf0e10cSrcweir     int             KillTab();
522cdf0e10cSrcweir 
523cdf0e10cSrcweir     int             StatVLineal() const { return ((Window*)pVRuler)->IsVisible(); }
524cdf0e10cSrcweir     void            ChangeVLinealMetric(FieldUnit eUnit);
525cdf0e10cSrcweir     void            GetVLinealMetric(FieldUnit& rToFill) const;
526cdf0e10cSrcweir 
527cdf0e10cSrcweir     int             StatTab() const { return ((Window*)pHRuler)->IsVisible(); }
528cdf0e10cSrcweir     SvxRuler&       GetHLineal()    { return *pHRuler; }
529cdf0e10cSrcweir     SvxRuler&       GetVLineal()    { return *pVRuler; }
530cdf0e10cSrcweir     void            InvalidateRulerPos();
531cdf0e10cSrcweir     void            ChangeTabMetric(FieldUnit eUnit);
532cdf0e10cSrcweir     void            GetHLinealMetric(FieldUnit& rToFill) const;
533cdf0e10cSrcweir 
534cdf0e10cSrcweir         // Handler
535cdf0e10cSrcweir     void            Execute(SfxRequest&);
536cdf0e10cSrcweir     void            ExecPageMove(SfxRequest&);
537cdf0e10cSrcweir     void            ExecStyle(SfxRequest&);
538cdf0e10cSrcweir     void            ExecLingu(SfxRequest&);
539cdf0e10cSrcweir     void            ExecDataBase(SfxRequest&);
540cdf0e10cSrcweir     void            ExecDlg(SfxRequest&);
541cdf0e10cSrcweir     void            ExecDlgExt(SfxRequest&);
542cdf0e10cSrcweir     void            ExecDBDlg(SfxRequest &);
543cdf0e10cSrcweir     void            ExecColl(SfxRequest&);
544cdf0e10cSrcweir     void            ExecutePrint(SfxRequest&);
545cdf0e10cSrcweir     void            ExecDraw(SfxRequest&);
546cdf0e10cSrcweir     void            ExecTabWin(SfxRequest&);
547cdf0e10cSrcweir     void            ExecuteStatusLine(SfxRequest&);
548cdf0e10cSrcweir     DECL_LINK( ExecRulerClick, Ruler * );
549cdf0e10cSrcweir     void            ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
550cdf0e10cSrcweir     void            ExecViewOptions(SfxRequest &);
551cdf0e10cSrcweir 
552cdf0e10cSrcweir     void            StateViewOptions(SfxItemSet &);
553cdf0e10cSrcweir     void            StateSearch(SfxItemSet &);
554cdf0e10cSrcweir     void            GetState(SfxItemSet&);
555cdf0e10cSrcweir     void            StateStatusLine(SfxItemSet&);
556cdf0e10cSrcweir 
557cdf0e10cSrcweir 
558cdf0e10cSrcweir     // Funktionen fuer Drawing
559cdf0e10cSrcweir     void            SetDrawFuncPtr(SwDrawBase* pFuncPtr);
560cdf0e10cSrcweir     inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const  { return pDrawActual; }
561cdf0e10cSrcweir     void            GetDrawState(SfxItemSet &rSet);
562cdf0e10cSrcweir     void            ExitDraw();
563cdf0e10cSrcweir     inline sal_Bool     IsDrawRotate()      { return bDrawRotate; }
564cdf0e10cSrcweir     inline void     FlipDrawRotate()    { bDrawRotate = !bDrawRotate; }
565cdf0e10cSrcweir     inline sal_Bool     IsDrawSelMode()     { return bDrawSelMode; }
566cdf0e10cSrcweir     void            SetSelDrawSlot();
567cdf0e10cSrcweir     inline void     FlipDrawSelMode()   { bDrawSelMode = !bDrawSelMode; }
568cdf0e10cSrcweir     void            NoRotate();     // Rotate-Mode abschalten
569cdf0e10cSrcweir     sal_Bool            EnterDrawTextMode(const Point& aDocPos);
570cdf0e10cSrcweir     void            LeaveDrawCreate()   { nDrawSfxId = nFormSfxId = USHRT_MAX; sDrawCustom.Erase();}
571cdf0e10cSrcweir     sal_Bool            IsDrawMode()        { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
572cdf0e10cSrcweir     sal_Bool            IsFormMode() const;
573cdf0e10cSrcweir     sal_Bool            IsBezierEditMode();
574cdf0e10cSrcweir     sal_Bool            AreOnlyFormsSelected() const;
575cdf0e10cSrcweir     sal_Bool            HasDrwObj(SdrObject *pSdrObj) const;
576cdf0e10cSrcweir     sal_Bool            HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
577cdf0e10cSrcweir     sal_Bool            BeginTextEdit(  SdrObject* pObj, SdrPageView* pPV=NULL,
578cdf0e10cSrcweir                                     Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
579cdf0e10cSrcweir 
580cdf0e10cSrcweir     void            StateTabWin(SfxItemSet&);
581cdf0e10cSrcweir 
582cdf0e10cSrcweir     // Attribute haben sich geaendert
583cdf0e10cSrcweir     DECL_LINK( AttrChangedNotify, SwWrtShell * );
584cdf0e10cSrcweir 
585cdf0e10cSrcweir     // form control has been activated
586cdf0e10cSrcweir     DECL_LINK( FormControlActivated, FmFormShell* );
587cdf0e10cSrcweir 
588cdf0e10cSrcweir     // Links bearbeiten
589cdf0e10cSrcweir     void            EditLinkDlg();
590cdf0e10cSrcweir     void            AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
591cdf0e10cSrcweir     void            InsertCaption(const InsCaptionOpt *pOpt);
592cdf0e10cSrcweir 
593cdf0e10cSrcweir     // Async Aufruf durch Core
594cdf0e10cSrcweir     void        UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
595cdf0e10cSrcweir 
596cdf0e10cSrcweir     String      GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
597cdf0e10cSrcweir 
598cdf0e10cSrcweir     // Shell rausreichen
599cdf0e10cSrcweir                  SfxShell       *GetCurShell()  { return pShell; }
600cdf0e10cSrcweir                  SwDocShell     *GetDocShell();
601cdf0e10cSrcweir     inline const SwDocShell     *GetDocShell() const;
602cdf0e10cSrcweir     inline       FmFormShell    *GetFormShell() { return pFormShell; }
603cdf0e10cSrcweir     inline const FmFormShell    *GetFormShell() const { return pFormShell; }
604cdf0e10cSrcweir 
605cdf0e10cSrcweir     //damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann
606cdf0e10cSrcweir     void ResetSubShell()    { pShell = 0; }
607cdf0e10cSrcweir 
608cdf0e10cSrcweir     virtual void    WriteUserData(String &, sal_Bool bBrowse = sal_False );
609cdf0e10cSrcweir     virtual void    ReadUserData(const String &, sal_Bool bBrowse = sal_False );
610cdf0e10cSrcweir     virtual void    ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
611cdf0e10cSrcweir     virtual void    WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
612cdf0e10cSrcweir 
613cdf0e10cSrcweir     void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False )
614cdf0e10cSrcweir         { bTopCrsr = bFlag, bCenterCrsr = bCenter; }
615cdf0e10cSrcweir     sal_Bool IsCrsrAtTop() const                    { return bTopCrsr; }
616cdf0e10cSrcweir     sal_Bool IsCrsrAtCenter() const                 { return bCenterCrsr; }
617cdf0e10cSrcweir 
618cdf0e10cSrcweir     sal_Bool JumpToSwMark( const String& rMark );
619cdf0e10cSrcweir 
620cdf0e10cSrcweir     long InsertDoc( sal_uInt16 nSlotId, const String& rFileName,
621cdf0e10cSrcweir                     const String& rFilterName, sal_Int16 nVersion = 0 );
622cdf0e10cSrcweir 
623cdf0e10cSrcweir     void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
624cdf0e10cSrcweir     long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
625cdf0e10cSrcweir     DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
626cdf0e10cSrcweir 
627cdf0e10cSrcweir     // status methods for clipboard.
628cdf0e10cSrcweir     // Status changes now notified from the clipboard.
629cdf0e10cSrcweir     sal_Bool IsPasteAllowed();
630cdf0e10cSrcweir     sal_Bool IsPasteSpecialAllowed();
631cdf0e10cSrcweir 
632cdf0e10cSrcweir     // Enable mail merge - mail merge field dialog enabled
633cdf0e10cSrcweir     void EnableMailMerge(sal_Bool bEnable = sal_True);
634cdf0e10cSrcweir     //apply Accessiblity options
635cdf0e10cSrcweir     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
636cdf0e10cSrcweir 
637cdf0e10cSrcweir     SwView(SfxViewFrame* pFrame, SfxViewShell*);
638cdf0e10cSrcweir     ~SwView();
639cdf0e10cSrcweir 
640cdf0e10cSrcweir     void NotifyDBChanged();
641cdf0e10cSrcweir 
642cdf0e10cSrcweir     SfxObjectShellLock & GetTmpSelectionDoc();
643cdf0e10cSrcweir     SfxObjectShellLock & GetOrCreateTmpSelectionDoc();
644cdf0e10cSrcweir 
645cdf0e10cSrcweir     void        AddTransferable(SwTransferable& rTransferable);
646cdf0e10cSrcweir 
647cdf0e10cSrcweir     // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
648cdf0e10cSrcweir     // or to support printing
649cdf0e10cSrcweir     void   SetMailMergeConfigItem(SwMailMergeConfigItem*  pConfigItem, sal_uInt16 nRestart, sal_Bool bIsSource);
650cdf0e10cSrcweir     SwMailMergeConfigItem*  GetMailMergeConfigItem();
651cdf0e10cSrcweir     sal_uInt16              GetMailMergeRestartPage() const;
652cdf0e10cSrcweir     sal_Bool                IsMailMergeSourceView() const;
653cdf0e10cSrcweir 
654cdf0e10cSrcweir     void ExecFormatPaintbrush(SfxRequest &);
655cdf0e10cSrcweir     void StateFormatPaintbrush(SfxItemSet &);
656cdf0e10cSrcweir 
657cdf0e10cSrcweir     //public fuer D&D
658cdf0e10cSrcweir     int     InsertGraphic( const String &rPath, const String &rFilter,
659cdf0e10cSrcweir                             sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
660cdf0e10cSrcweir                             Graphic* pPreviewGrf = 0,
661cdf0e10cSrcweir                             sal_Bool bRule = sal_False );
662cdf0e10cSrcweir 
663cdf0e10cSrcweir     void ExecuteScan( SfxRequest& rReq );
664cdf0e10cSrcweir 
665cdf0e10cSrcweir     SwPostItMgr* GetPostItMgr() { return mpPostItMgr;}
666cdf0e10cSrcweir     const SwPostItMgr* GetPostItMgr() const { return mpPostItMgr;}
667cdf0e10cSrcweir };
668cdf0e10cSrcweir 
669cdf0e10cSrcweir // ----------------- inline Methoden ----------------------
670cdf0e10cSrcweir 
671cdf0e10cSrcweir inline long SwView::GetXScroll() const
672cdf0e10cSrcweir {
673cdf0e10cSrcweir     return aVisArea.GetWidth() * nScrollX / 100L;
674cdf0e10cSrcweir }
675cdf0e10cSrcweir 
676cdf0e10cSrcweir inline long SwView::GetYScroll() const
677cdf0e10cSrcweir {
678cdf0e10cSrcweir     return aVisArea.GetHeight() * nScrollY / 100L;
679cdf0e10cSrcweir }
680cdf0e10cSrcweir 
681cdf0e10cSrcweir inline const SwDocShell *SwView::GetDocShell() const
682cdf0e10cSrcweir {
683cdf0e10cSrcweir     return ((SwView*)this)->GetDocShell();
684cdf0e10cSrcweir }
685cdf0e10cSrcweir 
686cdf0e10cSrcweir //***********************************************************
687cdf0e10cSrcweir 
688cdf0e10cSrcweir SfxTabPage* CreatePrintOptionsPage( Window *pParent,
689cdf0e10cSrcweir                                     const SfxItemSet &rOptions,
690cdf0e10cSrcweir                                     sal_Bool bPreview);
691cdf0e10cSrcweir 
692cdf0e10cSrcweir #endif
693cdf0e10cSrcweir 
694