LibreOffice Module sc (master) 1
editsh.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
20#pragma once
21
22#include <sfx2/shell.hxx>
23#include <tools/link.hxx>
24#include <rtl/ref.hxx>
25
26#include <shellids.hxx>
27
28class SfxModule;
29class EditView;
30class ScViewData;
31class ScInputHandler;
32class SvxURLField;
35
36class ScEditShell final : public SfxShell
37{
38private:
44
45 // tdf#140361 at context menu popup time set if the EditHyperlink entry
46 // should be disabled and use that state if queried about it if
47 // EditHyperlink is dispatched from the menu. So ignoring where the mouse
48 // currently happens to be when the menu was dismissed.
50
51 const SvxURLField* GetURLField();
53
54 DECL_LINK( ClipboardChanged, TransferableDataHelper*, void );
55
56public:
58
59private:
61 static void InitInterface_Impl();
62
63public:
64 ScEditShell(EditView* pView, ScViewData& rData);
65 virtual ~ScEditShell() override;
66
67 void SetEditView(EditView* pView);
69
70 void Execute(SfxRequest& rReq);
71 void ExecuteTrans(const SfxRequest& rReq);
72 void GetState(SfxItemSet &rSet);
73 void GetClipState(SfxItemSet& rSet);
74
75 void ExecuteAttr(SfxRequest& rReq);
76 void GetAttrState(SfxItemSet &rSet);
77
78 void ExecuteUndo(const SfxRequest& rReq);
79 void GetUndoState(SfxItemSet &rSet);
80
81 OUString GetSelectionText( bool bWholeWord );
82
84 bool ShouldDisableEditHyperlink() const;
88};
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
rtl::Reference< TransferableClipboardListener > mxClipEvtLstnr
Definition: editsh.hxx:41
bool ShouldDisableEditHyperlink() const
return true if "Edit Hyperlink" in context menu should be disabled
Definition: editsh.cxx:715
const SvxURLField * GetURLField()
Definition: editsh.cxx:847
EditView * pEditView
Definition: editsh.hxx:39
void ExecuteUndo(const SfxRequest &rReq)
Definition: editsh.cxx:1265
bool bPastePossible
Definition: editsh.hxx:42
ScInputHandler * GetMyInputHdl()
Definition: editsh.cxx:116
void GetUndoState(SfxItemSet &rSet)
Definition: editsh.cxx:1314
static void InitInterface_Impl()
SfxInterface initializer.
Definition: editsh.cxx:87
EditView * GetEditView()
Definition: editsh.hxx:68
ScViewData & rViewData
Definition: editsh.hxx:40
virtual ~ScEditShell() override
Definition: editsh.cxx:104
void ExecuteAttr(SfxRequest &rReq)
Definition: editsh.cxx:935
std::optional< bool > moAtContextMenu_DisableEditHyperlink
Definition: editsh.hxx:49
bool bIsInsertMode
Definition: editsh.hxx:43
OUString GetSelectionText(bool bWholeWord)
Definition: editsh.cxx:1240
ScEditShell(EditView *pView, ScViewData &rData)
Definition: editsh.cxx:92
void GetAttrState(SfxItemSet &rSet)
Definition: editsh.cxx:1168
DECL_LINK(ClipboardChanged, TransferableDataHelper *, void)
void EnableEditHyperlink()
force "Edit Hyperlink" to true, with the expectation that SID_EDIT_HYPERLINK is later Invalidated to ...
Definition: editsh.cxx:720
void GetState(SfxItemSet &rSet)
Definition: editsh.cxx:725
void ExecuteTrans(const SfxRequest &rReq)
Definition: editsh.cxx:1345
void SetEditView(EditView *pView)
Definition: editsh.cxx:121
void Execute(SfxRequest &rReq)
Definition: editsh.cxx:158
void GetClipState(SfxItemSet &rSet)
Definition: editsh.cxx:874
#define SFX_DECL_INTERFACE(nId)
#define SCID_EDIT_SHELL
Definition: shellids.hxx:27