summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-10-31 17:11:13 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-10-31 17:19:45 +0100
commit477222ec7ef151007dfb7c2485ff25513d9eb1b1 (patch)
tree2dd4a4359d972cf056e2cf66ac2a81a4625b73cd
parentRemove useless bool manipulation. (diff)
downloadcore-feature/table_panel.tar.gz
core-feature/table_panel.zip
Table panel: Make sure all toolbox buttons has the right initial state feature/table_panel
For this we need to add a ControllerItem for all toolbox buttons. See SfxStateCache::SetCachedState(). Change-Id: Id69a92fe5748617e3cd98c3007afbff2885a5d3b
-rw-r--r--sw/source/uibase/sidebar/TableEditPanel.cxx29
-rw-r--r--sw/source/uibase/sidebar/TableEditPanel.hxx14
2 files changed, 43 insertions, 0 deletions
diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx
index b803845547a6..a657feb8718c 100644
--- a/sw/source/uibase/sidebar/TableEditPanel.cxx
+++ b/sw/source/uibase/sidebar/TableEditPanel.cxx
@@ -18,6 +18,7 @@
#include <svtools/unitconv.hxx>
#include <swmodule.hxx>
#include <usrpref.hxx>
+#include <svx/svxids.hrc>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -98,6 +99,20 @@ TableEditPanel::TableEditPanel(vcl::Window* pParent,
, m_pBindings(pBindings)
, m_aRowHeightController(SID_ATTR_TABLE_ROW_HEIGHT, *pBindings, *this)
, m_aColumnWidthController(SID_ATTR_TABLE_COLUMN_WIDTH, *pBindings, *this)
+ , m_aInsertRowsBeforeController(FN_TABLE_INSERT_ROW_BEFORE, *pBindings, *this)
+ , m_aInsertRowsAfterController(FN_TABLE_INSERT_ROW_AFTER, *pBindings, *this)
+ , m_aInsertColumnsBeforeController(FN_TABLE_INSERT_COL_BEFORE, *pBindings, *this)
+ , m_aInsertColumnsAfterController(FN_TABLE_INSERT_COL_AFTER, *pBindings, *this)
+ , m_aDeleteRowsController(FN_TABLE_DELETE_ROW, *pBindings, *this)
+ , m_aDeleteColumnsController(FN_TABLE_DELETE_COL, *pBindings, *this)
+ , m_aDeleteTableController(FN_TABLE_DELETE_TABLE, *pBindings, *this)
+ , m_aSetMinimalRowHeightController(SID_TABLE_MINIMAL_ROW_HEIGHT, *pBindings, *this)
+ , m_aSetOptimalRowHeightController(FN_TABLE_OPTIMAL_HEIGHT, *pBindings, *this)
+ , m_aDistributeRowsController(FN_TABLE_BALANCE_ROWS, *pBindings, *this)
+ , m_aSetMinimalColumnWidthController(SID_TABLE_MINIMAL_COLUMN_WIDTH, *pBindings, *this)
+ , m_aSetOptimalColumnWidthController(FN_TABLE_ADJUST_CELLS, *pBindings, *this)
+ , m_aDistributeColumnsController(FN_TABLE_BALANCE_CELLS, *pBindings, *this)
+ , m_aMergeCellsController(FN_TABLE_MERGE_CELLS, *pBindings, *this)
{
get(m_pRowHeightEdit, "rowheight");
get(m_pColumnWidthEdit, "columnwidth");
@@ -138,6 +153,20 @@ void TableEditPanel::dispose()
m_pColumnWidthEdit.clear();
m_aRowHeightController.dispose();
m_aColumnWidthController.dispose();
+ m_aInsertRowsBeforeController.dispose();
+ m_aInsertRowsAfterController.dispose();
+ m_aInsertColumnsBeforeController.dispose();
+ m_aInsertColumnsAfterController.dispose();
+ m_aDeleteRowsController.dispose();
+ m_aDeleteColumnsController.dispose();
+ m_aDeleteTableController.dispose();
+ m_aSetMinimalRowHeightController.dispose();
+ m_aSetOptimalRowHeightController.dispose();
+ m_aDistributeRowsController.dispose();
+ m_aSetMinimalColumnWidthController.dispose();
+ m_aSetOptimalColumnWidthController.dispose();
+ m_aDistributeColumnsController.dispose();
+ m_aMergeCellsController.dispose();
PanelLayout::dispose();
}
diff --git a/sw/source/uibase/sidebar/TableEditPanel.hxx b/sw/source/uibase/sidebar/TableEditPanel.hxx
index a0ce4e6f14d2..a825bc01cc38 100644
--- a/sw/source/uibase/sidebar/TableEditPanel.hxx
+++ b/sw/source/uibase/sidebar/TableEditPanel.hxx
@@ -48,6 +48,20 @@ private:
VclPtr<SvxRelativeField> m_pColumnWidthEdit;
::sfx2::sidebar::ControllerItem m_aRowHeightController;
::sfx2::sidebar::ControllerItem m_aColumnWidthController;
+ ::sfx2::sidebar::ControllerItem m_aInsertRowsBeforeController;
+ ::sfx2::sidebar::ControllerItem m_aInsertRowsAfterController;
+ ::sfx2::sidebar::ControllerItem m_aInsertColumnsBeforeController;
+ ::sfx2::sidebar::ControllerItem m_aInsertColumnsAfterController;
+ ::sfx2::sidebar::ControllerItem m_aDeleteRowsController;
+ ::sfx2::sidebar::ControllerItem m_aDeleteColumnsController;
+ ::sfx2::sidebar::ControllerItem m_aDeleteTableController;
+ ::sfx2::sidebar::ControllerItem m_aSetMinimalRowHeightController;
+ ::sfx2::sidebar::ControllerItem m_aSetOptimalRowHeightController;
+ ::sfx2::sidebar::ControllerItem m_aDistributeRowsController;
+ ::sfx2::sidebar::ControllerItem m_aSetMinimalColumnWidthController;
+ ::sfx2::sidebar::ControllerItem m_aSetOptimalColumnWidthController;
+ ::sfx2::sidebar::ControllerItem m_aDistributeColumnsController;
+ ::sfx2::sidebar::ControllerItem m_aMergeCellsController;
DECL_LINK(RowHeightMofiyHdl, Edit&, void);
DECL_LINK(ColumnWidthMofiyHdl, Edit&, void);