xref: /trunk/main/sw/source/ui/inc/basesh.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SWBASESH_HXX
28 #define _SWBASESH_HXX
29 
30 
31 #include <shellid.hxx>
32 
33 #define _SVSTDARR_USHORTSSORT
34 #define _SVSTDARR_USHORTS
35 #include <tools/link.hxx>
36 #include <vcl/timer.hxx>
37 #include <sfx2/module.hxx>
38 #include <sfx2/shell.hxx>
39 #include <svl/svstdarr.hxx>
40 
41 #include <mdiexp.hxx>
42 
43 class SwWrtShell;
44 class SwCrsrShell;
45 class SwView;
46 class SfxItemSet;
47 class Graphic;
48 
49 struct DBTextStruct_Impl;
50 class SwBaseShell: public SfxShell
51 {
52 	SwView      &rView;
53 
54 	// DragModus
55     static FlyMode eFrameMode;
56 
57 	// Bug 75078 - if in GetState the asynch call of GetGraphic returns
58 	//				synch, the set the state directly into the itemset
59 	SfxItemSet* 		pGetStateSet;
60 
61 	//Update-Timer fuer Graphic
62 	SvUShortsSort aGrfUpdateSlots;
63 
64 	DECL_LINK( GraphicArrivedHdl, SwCrsrShell* );
65 
66 protected:
67 	SwWrtShell&			GetShell();
68 	SwWrtShell*			GetShellPtr();
69 
70 	inline SwView&		GetView()						{ return rView; }
71 	inline void			SetGetStateSet( SfxItemSet* p )	{ pGetStateSet = p; }
72 	inline sal_Bool			AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); }
73 
74     DECL_STATIC_LINK( 	SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* );
75 
76     void 				InsertURLButton( const String& rURL, const String& rTarget, const String& rTxt );
77 	void 				InsertTable( SfxRequest& _rRequest );
78 
79 public:
80 	SwBaseShell(SwView &rShell);
81 	virtual     ~SwBaseShell();
82 
83 	SFX_DECL_INTERFACE(SW_BASESHELL)
84 	TYPEINFO();
85 
86 	void        ExecDelete(SfxRequest &);
87 
88 	void        ExecClpbrd(SfxRequest &);
89 	void        StateClpbrd(SfxItemSet &);
90 
91 	void        ExecUndo(SfxRequest &);
92 	void        StateUndo(SfxItemSet &);
93 
94 	void        Execute(SfxRequest &);
95 	void        GetState(SfxItemSet &);
96 	void        StateStyle(SfxItemSet &);
97 
98 	void		ExecuteGallery(SfxRequest&);
99 	void		GetGalleryState(SfxItemSet&);
100 
101 	void        ExecDlg(SfxRequest &);
102 
103 	void        StateStatusLine(SfxItemSet &rSet);
104 	void        ExecTxtCtrl(SfxRequest& rReq);
105 	void        GetTxtFontCtrlState(SfxItemSet& rSet);
106 	void        GetTxtCtrlState(SfxItemSet& rSet);
107 	void 		GetBorderState(SfxItemSet &rSet);
108 	void        GetBckColState(SfxItemSet &rSet);
109 
110 	void        ExecBckCol(SfxRequest& rReq);
111 	void		SetWrapMode( sal_uInt16 nSlot );
112 
113 	void		StateDisableItems(SfxItemSet &);
114 
115 	void		EditRegionDialog(SfxRequest& rReq);
116 	void		InsertRegionDialog(SfxRequest& rReq);
117 
118 	void		ExecField(SfxRequest& rReq);
119 
120     static void    SetFrmMode( FlyMode eMode, SwWrtShell *pShell );  //Mit Update!
121     static void   _SetFrmMode( FlyMode eMode )   { eFrameMode = eMode; }
122     static FlyMode  GetFrmMode()                 { return eFrameMode;  }
123 
124 };
125 
126 
127 #endif
128