/src/libreoffice/sw/source/uibase/inc/basesh.hxx
Line | Count | Source |
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 | | #pragma once |
20 | | |
21 | | #include <shellid.hxx> |
22 | | |
23 | | #include <tools/link.hxx> |
24 | | #include <sfx2/module.hxx> |
25 | | #include <sfx2/shell.hxx> |
26 | | #include <mdiexp.hxx> |
27 | | #include <memory> |
28 | | #include <set> |
29 | | #include <vector> |
30 | | |
31 | | class SwPaM; |
32 | | class SwWrtShell; |
33 | | class SwView; |
34 | | class SfxItemSet; |
35 | | class SwCursorShell; |
36 | | |
37 | | struct DBTextStruct_Impl; |
38 | | class SW_DLLPUBLIC SwBaseShell: public SfxShell |
39 | | { |
40 | | SwView &m_rView; |
41 | | |
42 | | // DragMode |
43 | | static FlyMode s_eFrameMode; |
44 | | |
45 | | // Bug 75078 - if in GetState the async call of GetGraphic returns |
46 | | // synch, the set the state directly into the itemset |
47 | | SfxItemSet* m_pGetStateSet; |
48 | | |
49 | | // Update-Timer for graphic |
50 | | std::set<sal_uInt16> m_aGrfUpdateSlots; |
51 | | |
52 | | DECL_DLLPRIVATE_LINK( GraphicArrivedHdl, SwCursorShell&, void ); |
53 | | |
54 | | protected: |
55 | | SwWrtShell& GetShell(); |
56 | | SwWrtShell* GetShellPtr(); |
57 | | |
58 | 0 | SwView& GetView() { return m_rView; } |
59 | 0 | void SetGetStateSet( SfxItemSet* p ) { m_pGetStateSet = p; } |
60 | 0 | bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return m_aGrfUpdateSlots.insert( nSlot ).second; } |
61 | | |
62 | | DECL_DLLPRIVATE_LINK( InsertDBTextHdl, void*, void ); |
63 | | |
64 | | void InsertURLButton( const OUString& rURL, const OUString& rTarget, const OUString& rText ); |
65 | | void InsertTable( SfxRequest& _rRequest ); |
66 | | |
67 | | public: |
68 | | SwBaseShell(SwView &rShell); |
69 | | virtual ~SwBaseShell() override; |
70 | | |
71 | | SFX_DECL_INTERFACE(SW_BASESHELL) |
72 | | |
73 | | private: |
74 | | /// SfxInterface initializer. |
75 | | static void InitInterface_Impl(); |
76 | | |
77 | | public: |
78 | | void ExecDelete(SfxRequest &); |
79 | | |
80 | | void ExecClpbrd(SfxRequest &); |
81 | | void StateClpbrd(SfxItemSet &); |
82 | | |
83 | | void ExecUndo(SfxRequest &); |
84 | | void StateUndo(SfxItemSet &); |
85 | | |
86 | | void Execute(SfxRequest &); |
87 | | void GetState(SfxItemSet &); |
88 | | void StateStyle(SfxItemSet &); |
89 | | |
90 | | void ExecuteGallery(SfxRequest&); |
91 | | void GetGalleryState(SfxItemSet&); |
92 | | |
93 | | void ExecDlg(SfxRequest &); |
94 | | |
95 | | void ExecTextCtrl(SfxRequest& rReq); |
96 | | void GetTextFontCtrlState(SfxItemSet& rSet); |
97 | | void GetTextCtrlState(SfxItemSet& rSet); |
98 | | void GetBorderState(SfxItemSet &rSet); |
99 | | void GetBckColState(SfxItemSet &rSet); |
100 | | |
101 | | void ExecBckCol(SfxRequest& rReq); |
102 | | void SetWrapMode( sal_uInt16 nSlot ); |
103 | | |
104 | | static void StateDisableItems(SfxItemSet &); |
105 | | |
106 | | void EditRegionDialog(SfxRequest const & rReq); |
107 | | void InsertRegionDialog(SfxRequest& rReq); |
108 | | |
109 | | void ExecField(SfxRequest const & rReq); |
110 | | |
111 | | static void SetFrameMode( FlyMode eMode, SwWrtShell *pShell ); // with update! |
112 | 0 | static void SetFrameMode_( FlyMode eMode ) { s_eFrameMode = eMode; } |
113 | 0 | static FlyMode GetFrameMode() { return s_eFrameMode; } |
114 | | |
115 | | // duplicate rOrig and rOrig's multi-selection Ring so the first element of the returned |
116 | | // vector can be used equivalently to rOrig to affect the same selections |
117 | | static std::shared_ptr<std::vector<std::unique_ptr<SwPaM>>> CopyPaMRing(SwPaM& rOrig); |
118 | | }; |
119 | | |
120 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |