[Libreoffice-commits] core.git: Branch 'feature/table_panel' - 3 commits - sw/source vcl/source
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 31 16:19:05 UTC 2019
sw/source/uibase/shells/tabsh.cxx | 2 +
sw/source/uibase/sidebar/TableEditPanel.cxx | 29 ++++++++++++++++++++++++++++
sw/source/uibase/sidebar/TableEditPanel.hxx | 14 +++++++++++++
vcl/source/window/toolbox2.cxx | 2 -
4 files changed, 45 insertions(+), 2 deletions(-)
New commits:
commit 5eab4139a2f3ee3326eb297c74c3d80983f304c6
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: Thu Oct 31 17:11:13 2019 +0100
Table panel: Make sure all toolbox buttons has the right initial state
For this we need to a ControllerItem for all toolbox buttons.
See SfxStateCache::SetCachedState().
Change-Id: Id69a92fe5748617e3cd98c3007afbff2885a5d3b
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 77ba1e7d32c307e88ad3e18a88334f74401ff67f
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: Thu Oct 31 15:12:40 2019 +0100
Remove useless bool manipulation.
Must be a left over of sal_Bool -> bool conversion.
Change-Id: I8b37e513dc1f36b015b29ce3dad4ade2df7807d9
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 4aecf7abfaa6..c3d9d07d0b5c 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1251,8 +1251,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;
commit 08a3cabbaf578e4b845d6208deea678e452e8868
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Oct 30 14:17:37 2019 +0100
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Oct 30 14:21:22 2019 +0100
Table panel: Make sure Row Height spin button works with the default size type
SwFormatFrameSize() object has ATT_VAR_SIZE size type by default, before
we change it to anything else. We will change ATT_VAR_SIZE to ATT_MIN_SIZE
when changing the row height on the sidebar panel, similar to the
row height dialog.
Change-Id: I2520340e023b910549ff2a4b011e9ae3da2b7b11
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 57e6f99b59ec..df63915ce961 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -1123,6 +1123,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
std::unique_ptr<SwFormatFrameSize> pHeight = rSh.GetRowHeight();
if ( pHeight )
{
+ if (pHeight->GetHeightSizeType() == ATT_VAR_SIZE)
+ pHeight->SetHeightSizeType(ATT_MIN_SIZE);
pHeight->SetHeight(nNewHeight);
rSh.SetRowHeight(*pHeight);
}
More information about the Libreoffice-commits
mailing list