1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <shellid.hxx>
24 #include <tools/link.hxx>
25 #include <vcl/timer.hxx>
26 #include <sfx2/module.hxx>
27 #include <sfx2/shell.hxx>
28 #include <viewopt.hxx>
37 struct DBTextStruct_Impl
;
38 class SwBaseShell
: public SfxShell
43 static FlyMode eFrameMode
;
45 // Bug 75078 - if in GetState the asynch call of GetGraphic returns
46 // synch, the set the state directly into the itemset
47 SfxItemSet
* pGetStateSet
;
49 // Update-Timer for graphic
50 std::set
<sal_uInt16
> aGrfUpdateSlots
;
52 DECL_LINK( GraphicArrivedHdl
, void* );
55 SwWrtShell
& GetShell();
56 SwWrtShell
* GetShellPtr();
58 inline SwView
& GetView() { return rView
; }
59 inline void SetGetStateSet( SfxItemSet
* p
) { pGetStateSet
= p
; }
60 inline bool AddGrfUpdateSlot( sal_uInt16 nSlot
){ return aGrfUpdateSlots
.insert( nSlot
).second
; }
62 DECL_STATIC_LINK( SwBaseShell
, InsertDBTextHdl
, DBTextStruct_Impl
* );
64 void InsertURLButton( const String
& rURL
, const String
& rTarget
, const String
& rTxt
);
65 void InsertTable( SfxRequest
& _rRequest
);
68 SwBaseShell(SwView
&rShell
);
69 virtual ~SwBaseShell();
71 SFX_DECL_INTERFACE(SW_BASESHELL
)
74 void ExecDelete(SfxRequest
&);
76 void ExecClpbrd(SfxRequest
&);
77 void StateClpbrd(SfxItemSet
&);
79 void ExecUndo(SfxRequest
&);
80 void StateUndo(SfxItemSet
&);
82 void Execute(SfxRequest
&);
83 void GetState(SfxItemSet
&);
84 void StateStyle(SfxItemSet
&);
86 void ExecuteGallery(SfxRequest
&);
87 void GetGalleryState(SfxItemSet
&);
89 void ExecDlg(SfxRequest
&);
91 void StateStatusLine(SfxItemSet
&rSet
);
92 void ExecTxtCtrl(SfxRequest
& rReq
);
93 void GetTxtFontCtrlState(SfxItemSet
& rSet
);
94 void GetTxtCtrlState(SfxItemSet
& rSet
);
95 void GetBorderState(SfxItemSet
&rSet
);
96 void GetBckColState(SfxItemSet
&rSet
);
98 void ExecBckCol(SfxRequest
& rReq
);
99 void SetWrapMode( sal_uInt16 nSlot
);
101 void StateDisableItems(SfxItemSet
&);
103 void EditRegionDialog(SfxRequest
& rReq
);
104 void InsertRegionDialog(SfxRequest
& rReq
);
106 void ExecField(SfxRequest
& rReq
);
108 static void SetFrmMode( FlyMode eMode
, SwWrtShell
*pShell
); // with update!
109 static void _SetFrmMode( FlyMode eMode
) { eFrameMode
= eMode
; }
110 static FlyMode
GetFrmMode() { return eFrameMode
; }
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */