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