Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / ui / inc / drawsh.hxx
blob082a772c679f6404de055ef4a6a5e7673ab3b65d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_DRAWSH_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_DRAWSH_HXX
23 #include <sfx2/shell.hxx>
24 #include <shellids.hxx>
25 #include <svx/svdtypes.hxx>
26 #include <tools/link.hxx>
27 #include <rtl/ref.hxx>
29 class AbstractSvxObjectNameDialog;
30 class ScViewData;
31 class ScDrawView;
32 class SdrMarkList;
33 class SfxModule;
34 class SdrObject;
36 namespace weld { class Window; }
38 namespace svx { namespace sidebar {
39 class SelectionChangeHandler;
40 } }
42 class ScDrawShell : public SfxShell
44 ScViewData* pViewData;
45 ::rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
47 DECL_LINK( NameObjectHdl, AbstractSvxObjectNameDialog&, bool );
49 void SetHlinkForObject( SdrObject* pObj, const OUString& rHlnk );
51 protected:
52 virtual void Activate(bool bMDI) override;
53 ScViewData* GetViewData() { return pViewData; }
55 public:
56 SFX_DECL_INTERFACE(SCID_DRAW_SHELL)
58 private:
59 /// SfxInterface initializer.
60 static void InitInterface_Impl();
62 public:
63 ScDrawShell(ScViewData* pData);
64 virtual ~ScDrawShell() override;
66 static void StateDisableItems( SfxItemSet &rSet );
68 void ExecDrawAttr(SfxRequest& rReq);
69 void GetDrawAttrState(SfxItemSet &rSet);
70 void GetAttrFuncState(SfxItemSet &rSet);
72 void ExecDrawFunc(SfxRequest& rReq);
73 void GetDrawFuncState(SfxItemSet &rSet);
74 void GetState(SfxItemSet &rSet);
76 void ExecFormText(const SfxRequest& rReq); // StarFontWork
77 void GetFormTextState(SfxItemSet& rSet);
79 void ExecuteHLink(const SfxRequest& rReq); // Hyperlink
80 void GetHLinkState(SfxItemSet& rSet);
82 void ExecFormatPaintbrush(const SfxRequest& rReq);
83 void StateFormatPaintbrush(SfxItemSet& rSet);
85 void ExecuteMacroAssign(SdrObject* pObj, weld::Window* pWin);
86 void ExecuteLineDlg( const SfxRequest& rReq );
87 void ExecuteAreaDlg( const SfxRequest& rReq );
88 void ExecuteTextAttrDlg( SfxRequest& rReq );
89 void ExecuteMeasureDlg( SfxRequest& rReq );
91 ScDrawView* GetDrawView();
93 static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo,const SdrMarkList& rMark);
95 void GetDrawAttrStateForIFBX( SfxItemSet& rSet );
96 OUString const & GetSidebarContextName();
99 #endif
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */