LibreOffice Module sw (master)  1
basesh.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_BASESH_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_BASESH_HXX
21 
22 #include <shellid.hxx>
23 
24 #include <tools/link.hxx>
25 #include <sfx2/module.hxx>
26 #include <sfx2/shell.hxx>
27 
28 #include <mdiexp.hxx>
29 #include <set>
30 
31 class SwWrtShell;
32 class SwView;
33 class SfxItemSet;
34 class SwCursorShell;
35 
36 struct DBTextStruct_Impl;
38 {
40 
41  // DragMode
43 
44  // Bug 75078 - if in GetState the async call of GetGraphic returns
45  // synch, the set the state directly into the itemset
47 
48  // Update-Timer for graphic
49  std::set<sal_uInt16> aGrfUpdateSlots;
50 
51  DECL_LINK( GraphicArrivedHdl, SwCursorShell&, void );
52 
53 protected:
55  SwWrtShell* GetShellPtr();
56 
57  SwView& GetView() { return rView; }
58  void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; }
59  bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.insert( nSlot ).second; }
60 
61  DECL_LINK( InsertDBTextHdl, void*, void );
62 
63  void InsertURLButton( const OUString& rURL, const OUString& rTarget, const OUString& rText );
64  void InsertTable( SfxRequest& _rRequest );
65 
66 public:
67  SwBaseShell(SwView &rShell);
68  virtual ~SwBaseShell() override;
69 
71 
72 private:
74  static void InitInterface_Impl();
75 
76 public:
77  void ExecDelete(SfxRequest &);
78 
79  void ExecClpbrd(SfxRequest &);
80  void StateClpbrd(SfxItemSet &);
81 
82  void ExecUndo(SfxRequest &);
83  void StateUndo(SfxItemSet &);
84 
85  void Execute(SfxRequest &);
86  void GetState(SfxItemSet &);
87  void StateStyle(SfxItemSet &);
88 
89  void ExecuteGallery(SfxRequest&);
90  void GetGalleryState(SfxItemSet&);
91 
92  void ExecDlg(SfxRequest &);
93 
94  void ExecTextCtrl(SfxRequest& rReq);
95  void GetTextFontCtrlState(SfxItemSet& rSet);
96  void GetTextCtrlState(SfxItemSet& rSet);
97  void GetBorderState(SfxItemSet &rSet);
98  void GetBckColState(SfxItemSet &rSet);
99 
100  void ExecBckCol(SfxRequest& rReq);
101  void SetWrapMode( sal_uInt16 nSlot );
102 
103  static void StateDisableItems(SfxItemSet &);
104 
105  void EditRegionDialog(SfxRequest const & rReq);
106  void InsertRegionDialog(SfxRequest& rReq);
107 
108  void ExecField(SfxRequest const & rReq);
109 
110  static void SetFrameMode( FlyMode eMode, SwWrtShell *pShell ); // with update!
111  static void SetFrameMode_( FlyMode eMode ) { eFrameMode = eMode; }
112  static FlyMode GetFrameMode() { return eFrameMode; }
113 };
114 
115 #endif
116 
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FlyMode
Definition: mdiexp.hxx:41
SwView & GetView()
Definition: basesh.hxx:57
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
SfxItemSet * pGetStateSet
Definition: basesh.hxx:46
void SetGetStateSet(SfxItemSet *p)
Definition: basesh.hxx:58
Shell * GetShell()
std::set< sal_uInt16 > aGrfUpdateSlots
Definition: basesh.hxx:49
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
static FlyMode eFrameMode
Definition: basesh.hxx:42
#define SW_BASESHELL
Definition: shellid.hxx:26
bool AddGrfUpdateSlot(sal_uInt16 nSlot)
Definition: basesh.hxx:59
SwView & rView
Definition: basesh.hxx:39
static FlyMode GetFrameMode()
Definition: basesh.hxx:112
Definition: view.hxx:146
#define SFX_DECL_INTERFACE(nId)