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#include <mdiexp.hxx>
28#include <memory>
29#include <set>
30#include <vector>
31
32class SwPaM;
33class SwWrtShell;
34class SwView;
35class SfxItemSet;
36class SwCursorShell;
37
40{
42
43 // DragMode
45
46 // Bug 75078 - if in GetState the async call of GetGraphic returns
47 // synch, the set the state directly into the itemset
49
50 // Update-Timer for graphic
51 std::set<sal_uInt16> m_aGrfUpdateSlots;
52
53 DECL_DLLPRIVATE_LINK( GraphicArrivedHdl, SwCursorShell&, void );
54
55protected:
57 SwWrtShell* GetShellPtr();
58
59 SwView& GetView() { return m_rView; }
60 void SetGetStateSet( SfxItemSet* p ) { m_pGetStateSet = p; }
61 bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return m_aGrfUpdateSlots.insert( nSlot ).second; }
62
63 DECL_DLLPRIVATE_LINK( InsertDBTextHdl, void*, void );
64
65 void InsertURLButton( const OUString& rURL, const OUString& rTarget, const OUString& rText );
66 void InsertTable( SfxRequest& _rRequest );
67
68public:
69 SwBaseShell(SwView &rShell);
70 virtual ~SwBaseShell() override;
71
73
74private:
76 static void InitInterface_Impl();
77
78public:
79 void ExecDelete(SfxRequest &);
80
81 void ExecClpbrd(SfxRequest &);
82 void StateClpbrd(SfxItemSet &);
83
84 void ExecUndo(SfxRequest &);
85 void StateUndo(SfxItemSet &);
86
87 void Execute(SfxRequest &);
88 void GetState(SfxItemSet &);
89 void StateStyle(SfxItemSet &);
90
91 void ExecuteGallery(SfxRequest&);
92 void GetGalleryState(SfxItemSet&);
93
94 void ExecDlg(SfxRequest &);
95
96 void ExecTextCtrl(SfxRequest& rReq);
97 void GetTextFontCtrlState(SfxItemSet& rSet);
98 void GetTextCtrlState(SfxItemSet& rSet);
99 void GetBorderState(SfxItemSet &rSet);
100 void GetBckColState(SfxItemSet &rSet);
101
102 void ExecBckCol(SfxRequest& rReq);
103 void SetWrapMode( sal_uInt16 nSlot );
104
105 static void StateDisableItems(SfxItemSet &);
106
107 void EditRegionDialog(SfxRequest const & rReq);
108 void InsertRegionDialog(SfxRequest& rReq);
109
110 void ExecField(SfxRequest const & rReq);
111
112 static void SetFrameMode( FlyMode eMode, SwWrtShell *pShell ); // with update!
113 static void SetFrameMode_( FlyMode eMode ) { s_eFrameMode = eMode; }
114 static FlyMode GetFrameMode() { return s_eFrameMode; }
115
116 // duplicate rOrig and rOrig's multi-selection Ring so the first element of the returned
117 // vector can be used equivalently to rOrig to affect the same selections
118 static std::shared_ptr<std::vector<std::unique_ptr<SwPaM>>> CopyPaMRing(SwPaM& rOrig);
119};
120
121#endif
122
123/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwView & m_rView
Definition: basesh.hxx:41
DECL_DLLPRIVATE_LINK(InsertDBTextHdl, void *, void)
SfxItemSet * m_pGetStateSet
Definition: basesh.hxx:48
bool AddGrfUpdateSlot(sal_uInt16 nSlot)
Definition: basesh.hxx:61
SwView & GetView()
Definition: basesh.hxx:59
static void SetFrameMode_(FlyMode eMode)
Definition: basesh.hxx:113
DECL_DLLPRIVATE_LINK(GraphicArrivedHdl, SwCursorShell &, void)
static FlyMode GetFrameMode()
Definition: basesh.hxx:114
void SetGetStateSet(SfxItemSet *p)
Definition: basesh.hxx:60
static FlyMode s_eFrameMode
Definition: basesh.hxx:44
std::set< sal_uInt16 > m_aGrfUpdateSlots
Definition: basesh.hxx:51
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
Definition: view.hxx:146
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
Mode eMode
void * p
FlyMode
Definition: mdiexp.hxx:40
Shell * GetShell()
const ::avmedia::MediaItem * Execute(const SdrMarkView *pSdrView, SfxRequest const &rReq)
void GetState(const SdrMarkView *pSdrView, SfxItemSet &rSet)
#define SFX_DECL_INTERFACE(nId)
#define SW_BASESHELL
Definition: shellid.hxx:26
#define SW_DLLPUBLIC
Definition: swdllapi.h:28