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/.
13 #include <com/sun/star/frame/XFrame.hpp>
14 #include <sfx2/sidebar/PanelLayout.hxx>
15 #include <sfx2/sidebar/ControllerItem.hxx>
16 #include <sfx2/weldutils.hxx>
17 #include <svx/relfld.hxx>
21 class TableEditPanel
: public PanelLayout
,
22 public sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
25 static std::unique_ptr
<PanelLayout
>
26 Create(weld::Widget
* pParent
, const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
27 SfxBindings
* pBindings
);
29 TableEditPanel(weld::Widget
* pParent
, const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
30 SfxBindings
* pBindings
);
31 virtual ~TableEditPanel() override
;
33 virtual void NotifyItemUpdate(const sal_uInt16 nSId
, const SfxItemState eState
,
34 const SfxPoolItem
* pState
) override
;
36 virtual void GetControlState(const sal_uInt16
/*nSId*/,
37 boost::property_tree::ptree
& /*rState*/) override
{};
40 void InitRowHeightToolitem();
41 void InitColumnWidthToolitem();
43 SfxBindings
* m_pBindings
;
45 SvxRelativeField m_aRowHeightEdit
;
46 SvxRelativeField m_aColumnWidthEdit
;
47 std::unique_ptr
<weld::Toolbar
> m_xInsert
;
48 std::unique_ptr
<ToolbarUnoDispatcher
> m_xInsertDispatch
;
49 std::unique_ptr
<weld::Toolbar
> m_xSelect
;
50 std::unique_ptr
<ToolbarUnoDispatcher
> m_xSelectDispatch
;
51 std::unique_ptr
<weld::Toolbar
> m_xRowSizing
;
52 std::unique_ptr
<ToolbarUnoDispatcher
> m_xRowSizingDispatch
;
53 std::unique_ptr
<weld::Toolbar
> m_xColumnSizing
;
54 std::unique_ptr
<ToolbarUnoDispatcher
> m_xColumnSizingDispatch
;
55 std::unique_ptr
<weld::Toolbar
> m_xDelete
;
56 std::unique_ptr
<ToolbarUnoDispatcher
> m_xDeleteDispatch
;
57 std::unique_ptr
<weld::Toolbar
> m_xSplitMerge
;
58 std::unique_ptr
<ToolbarUnoDispatcher
> m_xSplitMergeDispatch
;
59 std::unique_ptr
<weld::Toolbar
> m_xMisc
;
60 std::unique_ptr
<ToolbarUnoDispatcher
> m_xMiscDispatch
;
62 ::sfx2::sidebar::ControllerItem m_aRowHeightController
;
63 ::sfx2::sidebar::ControllerItem m_aColumnWidthController
;
64 ::sfx2::sidebar::ControllerItem m_aInsertRowsBeforeController
;
65 ::sfx2::sidebar::ControllerItem m_aInsertRowsAfterController
;
66 ::sfx2::sidebar::ControllerItem m_aInsertColumnsBeforeController
;
67 ::sfx2::sidebar::ControllerItem m_aInsertColumnsAfterController
;
68 ::sfx2::sidebar::ControllerItem m_aDeleteRowsController
;
69 ::sfx2::sidebar::ControllerItem m_aDeleteColumnsController
;
70 ::sfx2::sidebar::ControllerItem m_aDeleteTableController
;
71 ::sfx2::sidebar::ControllerItem m_aSetMinimalRowHeightController
;
72 ::sfx2::sidebar::ControllerItem m_aSetOptimalRowHeightController
;
73 ::sfx2::sidebar::ControllerItem m_aDistributeRowsController
;
74 ::sfx2::sidebar::ControllerItem m_aSetMinimalColumnWidthController
;
75 ::sfx2::sidebar::ControllerItem m_aSetOptimalColumnWidthController
;
76 ::sfx2::sidebar::ControllerItem m_aDistributeColumnsController
;
77 ::sfx2::sidebar::ControllerItem m_aMergeCellsController
;
79 DECL_LINK(RowHeightMofiyHdl
, weld::MetricSpinButton
&, void);
80 DECL_LINK(ColumnWidthMofiyHdl
, weld::MetricSpinButton
&, void);
83 } // end of namespace sw::sidebar
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */