sw/source/uibase/sidebar/TableEditPanel.cxx |   29 ++++++++++++++++++++++++++++
 sw/source/uibase/sidebar/TableEditPanel.hxx |   14 +++++++++++++
 2 files changed, 43 insertions(+)

New commits:
commit 2fdd4ee38a60d50ebba057ee5ba7f09b720a0ce4
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Thu Oct 31 17:11:13 2019 +0100
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Mon Nov 4 18:49:01 2019 +0100

    Table panel: Make sure all toolbox buttons has the right initial state
    
    For this we need to add a ControllerItem for all toolbox buttons.
    See SfxStateCache::SetCachedState().
    
    Change-Id: Id69a92fe5748617e3cd98c3007afbff2885a5d3b
    Reviewed-on: https://gerrit.libreoffice.org/81899
    Tested-by: Jenkins
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>
    (cherry picked from commit 47c88b2c4db23f33a4371139745b8427564d3667)
    Reviewed-on: https://gerrit.libreoffice.org/82030
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx 
b/sw/source/uibase/sidebar/TableEditPanel.cxx
index c61292dd43ec..d252b4baa8eb 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 6d7a9c63f732..53380b44ebd5 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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to