update dev300-m58
[ooovba.git] / sw / source / ui / inc / basesh.hxx
blob3d32bb8b87f52a3ad475c500294d22e0b103cd39
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: basesh.hxx,v $
10 * $Revision: 1.13 $
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 ************************************************************************/
30 #ifndef _SWBASESH_HXX
31 #define _SWBASESH_HXX
34 #include <shellid.hxx>
36 #define _SVSTDARR_USHORTSSORT
37 #define _SVSTDARR_USHORTS
38 #include <tools/link.hxx>
39 #include <vcl/timer.hxx>
40 #include <sfx2/module.hxx>
41 #include <sfx2/shell.hxx>
42 #include <svtools/svstdarr.hxx>
44 #include <mdiexp.hxx>
46 class SwWrtShell;
47 class SwCrsrShell;
48 class SwView;
49 class SfxItemSet;
50 class Graphic;
52 struct DBTextStruct_Impl;
53 class SwBaseShell: public SfxShell
55 SwView &rView;
57 // DragModus
58 static FlyMode eFrameMode;
60 // Bug 75078 - if in GetState the asynch call of GetGraphic returns
61 // synch, the set the state directly into the itemset
62 SfxItemSet* pGetStateSet;
64 //Update-Timer fuer Graphic
65 SvUShortsSort aGrfUpdateSlots;
67 DECL_LINK( GraphicArrivedHdl, SwCrsrShell* );
69 protected:
70 SwWrtShell& GetShell();
71 SwWrtShell* GetShellPtr();
73 inline SwView& GetView() { return rView; }
74 inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; }
75 inline BOOL AddGrfUpdateSlot( USHORT nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); }
77 DECL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* );
79 void InsertURLButton( const String& rURL, const String& rTarget, const String& rTxt );
80 void InsertTable( SfxRequest& _rRequest );
82 public:
83 SwBaseShell(SwView &rShell);
84 virtual ~SwBaseShell();
86 SFX_DECL_INTERFACE(SW_BASESHELL)
87 TYPEINFO();
89 void ExecDelete(SfxRequest &);
91 void ExecClpbrd(SfxRequest &);
92 void StateClpbrd(SfxItemSet &);
94 void ExecUndo(SfxRequest &);
95 void StateUndo(SfxItemSet &);
97 void Execute(SfxRequest &);
98 void GetState(SfxItemSet &);
99 void StateStyle(SfxItemSet &);
101 void ExecuteGallery(SfxRequest&);
102 void GetGalleryState(SfxItemSet&);
104 void ExecDlg(SfxRequest &);
106 void StateStatusLine(SfxItemSet &rSet);
107 void ExecTxtCtrl(SfxRequest& rReq);
108 void GetTxtFontCtrlState(SfxItemSet& rSet);
109 void GetTxtCtrlState(SfxItemSet& rSet);
110 void GetBorderState(SfxItemSet &rSet);
111 void GetBckColState(SfxItemSet &rSet);
113 void ExecBckCol(SfxRequest& rReq);
114 void SetWrapMode( USHORT nSlot );
116 void StateDisableItems(SfxItemSet &);
118 void EditRegionDialog(SfxRequest& rReq);
119 void InsertRegionDialog(SfxRequest& rReq);
121 void ExecField(SfxRequest& rReq);
123 static void SetFrmMode( FlyMode eMode, SwWrtShell *pShell ); //Mit Update!
124 static void _SetFrmMode( FlyMode eMode ) { eFrameMode = eMode; }
125 static FlyMode GetFrmMode() { return eFrameMode; }
130 #endif