Line data Source code
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 : #ifndef INCLUDED_SC_SOURCE_UI_INC_DRAWSH_HXX
21 : #define INCLUDED_SC_SOURCE_UI_INC_DRAWSH_HXX
22 :
23 : #include <sfx2/shell.hxx>
24 : #include "shellids.hxx"
25 : #include <sfx2/module.hxx>
26 : #include <svx/svdmark.hxx>
27 : #include <tools/link.hxx>
28 : #include <rtl/ref.hxx>
29 :
30 : class AbstractSvxNameDialog;
31 : class ScViewData;
32 : class ScDrawView;
33 : namespace svx { namespace sidebar {
34 : class SelectionChangeHandler;
35 : } }
36 :
37 : class ScDrawShell : public SfxShell
38 : {
39 : ScViewData* pViewData;
40 : ::rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
41 :
42 : DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
43 :
44 : void SetHlinkForObject( SdrObject* pObj, const OUString& rHlnk );
45 :
46 : protected:
47 : virtual void Activate(bool bMDI) SAL_OVERRIDE;
48 0 : ScViewData* GetViewData() { return pViewData; }
49 :
50 : public:
51 : TYPEINFO_OVERRIDE();
52 52 : SFX_DECL_INTERFACE(SCID_DRAW_SHELL)
53 :
54 : private:
55 : /// SfxInterface initializer.
56 : static void InitInterface_Impl();
57 :
58 : public:
59 : ScDrawShell(ScViewData* pData);
60 : virtual ~ScDrawShell();
61 :
62 : static void StateDisableItems( SfxItemSet &rSet );
63 :
64 : void ExecDrawAttr(SfxRequest& rReq);
65 : void GetDrawAttrState(SfxItemSet &rSet);
66 : void GetAttrFuncState(SfxItemSet &rSet);
67 :
68 : void ExecDrawFunc(SfxRequest& rReq);
69 : void GetDrawFuncState(SfxItemSet &rSet);
70 : void GetState(SfxItemSet &rSet);
71 :
72 : void ExecFormText(SfxRequest& rReq); // StarFontWork
73 : void GetFormTextState(SfxItemSet& rSet);
74 :
75 : void ExecuteHLink(SfxRequest& rReq); // Hyperlink
76 : void GetHLinkState(SfxItemSet& rSet);
77 :
78 : void ExecFormatPaintbrush(SfxRequest& rReq);
79 : void StateFormatPaintbrush(SfxItemSet& rSet);
80 :
81 : void ExecuteMacroAssign( SdrObject* pObj, vcl::Window* pWin );
82 : void ExecuteLineDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
83 : void ExecuteAreaDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
84 : void ExecuteTextAttrDlg( SfxRequest& rReq, sal_uInt16 nTabPage = 0xffff );
85 :
86 : ScDrawView* GetDrawView();
87 :
88 : static bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark);
89 :
90 : void GetDrawAttrStateForIFBX( SfxItemSet& rSet );
91 : ::rtl::OUString GetSidebarContextName();
92 : };
93 :
94 : #endif
95 :
96 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|