1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <sfx2/shell.hxx>
23 #include <shellids.hxx>
24 #include <svx/svdtypes.hxx>
25 #include <tools/link.hxx>
26 #include <rtl/ref.hxx>
28 class AbstractSvxObjectNameDialog
;
35 namespace weld
{ class Window
; }
37 namespace svx::sidebar
{ class SelectionChangeHandler
; }
39 class ScDrawShell
: public SfxShell
41 ScViewData
& rViewData
;
42 ::rtl::Reference
<svx::sidebar::SelectionChangeHandler
> mpSelectionChangeHandler
;
44 DECL_LINK( NameObjectHdl
, AbstractSvxObjectNameDialog
&, bool );
47 virtual void Activate(bool bMDI
) override
;
48 ScViewData
& GetViewData() { return rViewData
; }
51 SFX_DECL_INTERFACE(SCID_DRAW_SHELL
)
54 /// SfxInterface initializer.
55 static void InitInterface_Impl();
58 ScDrawShell(ScViewData
& rData
);
59 virtual ~ScDrawShell() override
;
61 static void StateDisableItems( SfxItemSet
&rSet
);
63 void ExecDrawAttr(SfxRequest
& rReq
);
64 void GetDrawAttrState(SfxItemSet
&rSet
);
65 void GetAttrFuncState(SfxItemSet
&rSet
);
67 void ExecDrawFunc(SfxRequest
& rReq
);
68 void GetDrawFuncState(SfxItemSet
&rSet
);
69 void GetState(SfxItemSet
&rSet
);
71 void ExecFormText(const SfxRequest
& rReq
); // StarFontWork
72 void GetFormTextState(SfxItemSet
& rSet
);
74 void ExecuteHLink(const SfxRequest
& rReq
); // Hyperlink
75 void GetHLinkState(SfxItemSet
& rSet
);
77 void ExecFormatPaintbrush(const SfxRequest
& rReq
);
78 void StateFormatPaintbrush(SfxItemSet
& rSet
);
80 void ExecuteMacroAssign(SdrObject
* pObj
, weld::Window
* pWin
);
81 void ExecuteLineDlg( const SfxRequest
& rReq
);
82 void ExecuteAreaDlg( const SfxRequest
& rReq
);
83 void ExecuteTextAttrDlg( SfxRequest
& rReq
);
84 void ExecuteMeasureDlg( SfxRequest
& rReq
);
86 ScDrawView
* GetDrawView();
88 static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo
,const SdrMarkList
& rMark
);
90 void GetDrawAttrStateForIFBX( SfxItemSet
& rSet
);
91 OUString
const & GetSidebarContextName();
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */