[Libreoffice-commits] core.git: 2 commits - sw/source vcl/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 2 12:28:05 UTC 2019
sw/source/uibase/sidebar/TableEditPanel.cxx | 29 ++++++++++++++++++++++++++++
sw/source/uibase/sidebar/TableEditPanel.hxx | 14 +++++++++++++
vcl/source/window/toolbox2.cxx | 2 -
3 files changed, 43 insertions(+), 2 deletions(-)
New commits:
commit 47c88b2c4db23f33a4371139745b8427564d3667
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Oct 31 17:11:13 2019 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat Nov 2 13:27:02 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.zolnai at collabora.com>
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);
commit f875aca60c46f070e72f61836b33c39b62adcda3
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Oct 31 15:12:40 2019 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat Nov 2 13:26:47 2019 +0100
Remove useless bool manipulation.
Must be a left over of sal_Bool -> bool conversion.
Change-Id: I8b37e513dc1f36b015b29ce3dad4ade2df7807d9
Reviewed-on: https://gerrit.libreoffice.org/81898
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 201e44213d49..3cd3ed85a5ed 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1252,8 +1252,6 @@ void ToolBox::EnableItem( sal_uInt16 nItemId, bool bEnable )
if ( nPos != ITEM_NOTFOUND )
{
ImplToolItem* pItem = &mpData->m_aItems[nPos];
- if ( bEnable )
- bEnable = true;
if ( pItem->mbEnabled != bEnable )
{
pItem->mbEnabled = bEnable;
More information about the Libreoffice-commits
mailing list