From 828d2637fd3120bfd342b41548caf9c55fc0f603 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Tue, 30 Jan 2024 17:07:46 +0100 Subject: tdf#159662 Add table alignment and left/right spacing to sidebar in Writer Change-Id: I12d898f21ca8c7d581aaa1c587c5b6434a35f516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162769 Tested-by: Jenkins Reviewed-by: Gabor Kelemen --- include/svx/relfld.hxx | 1 + sw/inc/cmdid.h | 5 +- sw/inc/strings.hrc | 7 ++ sw/sdi/_tabsh.sdi | 20 ++++ sw/sdi/swriter.sdi | 50 ++++++++++ sw/source/uibase/shells/tabsh.cxx | 144 ++++++++++++++++++++++++++- sw/source/uibase/sidebar/TableEditPanel.cxx | 147 +++++++++++++++++++++++++++- sw/source/uibase/sidebar/TableEditPanel.hxx | 11 +++ sw/uiconfig/swriter/ui/sidebartableedit.ui | 115 +++++++++++++++++++++- 9 files changed, 492 insertions(+), 8 deletions(-) diff --git a/include/svx/relfld.hxx b/include/svx/relfld.hxx index 8bc4c05580ec..85cec451cb94 100644 --- a/include/svx/relfld.hxx +++ b/include/svx/relfld.hxx @@ -46,6 +46,7 @@ public: void EnableNegativeMode() {bNegativeEnabled = true;} void set_sensitive(bool sensitive) { m_xSpinButton->set_sensitive(sensitive); } + bool get_sensitive() const { return m_xSpinButton->get_sensitive(); } void set_value(int nValue, FieldUnit eValueUnit) { m_xSpinButton->set_value(nValue, eValueUnit); } int get_value(FieldUnit eDestUnit) const { return m_xSpinButton->get_value(eDestUnit); } int get_min(FieldUnit eValueUnit) const { return m_xSpinButton->get_min(eValueUnit); } diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 4773f173d603..e8521380c62c 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -520,7 +520,10 @@ class SwUINumRuleItem; #define FN_FORMAT_APPLY_DEFAULT (FN_FORMAT2 + 157) #define FN_FORMAT_APPLY_TEXTBODY (FN_FORMAT2 + 158) #define FN_REMOVE_DIRECT_CHAR_FORMATS (FN_FORMAT2 + 159) -//free (160) +#define SID_ATTR_TABLE_ALIGNMENT (FN_FORMAT2 + 160) +#define SID_ATTR_TABLE_LEFT_SPACE (FN_FORMAT2 + 161) +#define SID_ATTR_TABLE_RIGHT_SPACE (FN_FORMAT2 + 162) +//free (163 except 194 already used above) // Region: Extras #define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* */ diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 8f3eadcab6d8..b3e9a9370bfc 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -1492,6 +1492,13 @@ #define STR_COMPAT_OPT_USEVARIABLEWIDTHNBSP NC_("STR_COMPAT_OPT_USEVARIABLEWIDTHNBSP", "Render non-breaking spaces (NBSP) as standard-space-width (off for fixed size)") #define STR_COMPAT_OPT_NOGAPAFTERNOTENUMBER NC_("STR_COMPAT_OPT_NOGAPAFTERNOTENUMBER", "Do not add an extra space after number in footnotes / endnotes with hanging first line") +#define STR_TABLE_PANEL_ALIGN_AUTO NC_("sidebartableedit|alignautolabel", "Automatic") +#define STR_TABLE_PANEL_ALIGN_LEFT NC_("sidebartableedit|alignleftlabel", "Left") +#define STR_TABLE_PANEL_ALIGN_FROM_LEFT NC_("sidebartableedit|alignfromleftlabel", "From left") +#define STR_TABLE_PANEL_ALIGN_RIGHT NC_("sidebartableedit|alignrightlabel", "Right") +#define STR_TABLE_PANEL_ALIGN_CENTER NC_("sidebartableedit|aligncenterlabel", "Center") +#define STR_TABLE_PANEL_ALIGN_MANUAL NC_("sidebartableedit|alignmanuallabel", "Manual") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/sdi/_tabsh.sdi b/sw/sdi/_tabsh.sdi index e4b6b9a2dd6c..7596d2c29bda 100644 --- a/sw/sdi/_tabsh.sdi +++ b/sw/sdi/_tabsh.sdi @@ -446,5 +446,25 @@ interface BaseTextTable StateMethod = GetState ; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] + + SID_ATTR_TABLE_ALIGNMENT + [ + ExecMethod = Execute ; + StateMethod = GetState ; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] + + SID_ATTR_TABLE_LEFT_SPACE + [ + StateMethod = GetState ; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] + + SID_ATTR_TABLE_RIGHT_SPACE + [ + StateMethod = GetState ; + DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; + ] + } diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 861d5ccec21a..16d939a8903d 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -8693,6 +8693,56 @@ SfxUInt32Item TableColumWidth SID_ATTR_TABLE_COLUMN_WIDTH GroupId = SfxGroupId::Table; ] +SfxUInt32Item TableAlignment SID_ATTR_TABLE_ALIGNMENT +(SfxInt32Item TableLeftSpace SID_ATTR_TABLE_LEFT_SPACE, SfxInt32Item TableRightSpace SID_ATTR_TABLE_RIGHT_SPACE) +[ + AutoUpdate = TRUE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Table; +] + +SfxInt32Item TableLeftSpace SID_ATTR_TABLE_LEFT_SPACE +[ + AutoUpdate = FALSE, + FastCall = TRUE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Table; +] + +SfxInt32Item TableRightSpace SID_ATTR_TABLE_RIGHT_SPACE +[ + AutoUpdate = FALSE, + FastCall = TRUE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Table; +] + SfxVoidItem OutlineLevelsShown FN_OUTLINE_LEVELS_SHOWN () [ diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 8b1280dcbab7..492cd041d081 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -232,8 +232,7 @@ static std::shared_ptr lcl_TableParamToItemSet( SfxItemSet& rSet, Sw SvxLRSpaceItem aLRSpace( pFormat->GetLRSpace() ); SwTwips nLeft = aLRSpace.GetLeft(); SwTwips nRight = aLRSpace.GetRight(); - SwTwips nDiff = pRep->GetSpace() - nRight - nLeft - nWidth; - if(nAlign != text::HoriOrientation::FULL && std::abs(nDiff) > 2) + if(nAlign != text::HoriOrientation::FULL) { SwTwips nLR = pRep->GetSpace() - nWidth; switch ( nAlign ) @@ -1223,6 +1222,96 @@ void SwTableShell::Execute(SfxRequest &rReq) } return; } + case SID_ATTR_TABLE_ALIGNMENT: + { + const SfxUInt16Item* pAlignItem = rReq.GetArg(SID_ATTR_TABLE_ALIGNMENT); + if (pAlignItem && pAlignItem->GetValue() <= text::HoriOrientation::LEFT_AND_WIDTH) + { + SfxItemSetFixed aSet( GetPool()); + rSh.StartUndo(SwUndoId::TABLE_ATTR); + SwFormatHoriOrient aAttr( 0, pAlignItem->GetValue()); + + const SfxInt32Item* pLeftItem = rReq.GetArg(SID_ATTR_TABLE_LEFT_SPACE); + const SfxInt32Item* pRightItem = rReq.GetArg(SID_ATTR_TABLE_RIGHT_SPACE); + + SvxLRSpaceItem aLRSpace( RES_LR_SPACE ); + SwTwips nLeft = pLeftItem ? pLeftItem->GetValue() : 0; + SwTwips nRight = pRightItem ? pRightItem->GetValue() : 0; + SwTabCols aTabCols; + rSh.GetTabCols(aTabCols); + tools::Long nSpace = aTabCols.GetRightMax(); + SwTwips nWidth = nSpace; + switch (pAlignItem->GetValue()) + { + case text::HoriOrientation::LEFT: + if (MINLAY < nSpace - nRight) + nWidth = nSpace - nRight; + else + { + nWidth = MINLAY; + nRight = nSpace - MINLAY; + } + nLeft = 0; + break; + case text::HoriOrientation::RIGHT: + if (MINLAY < nSpace - nLeft) + nWidth = nSpace - nLeft; + else + { + nWidth = MINLAY; + nLeft = nSpace - MINLAY; + } + nRight = 0; + break; + case text::HoriOrientation::LEFT_AND_WIDTH: + // width doesn't change + nRight = 0; + nLeft = std::min(nLeft, nSpace); + break; + case text::HoriOrientation::FULL: + nLeft = nRight = 0; + break; + case text::HoriOrientation::CENTER: + if (MINLAY < nSpace - 2 * nLeft) + nWidth = nSpace - 2 * nLeft; + else + { + nWidth = MINLAY; + nLeft = nRight = (nSpace - MINLAY) / 2; + } + break; + case text::HoriOrientation::NONE: + if (MINLAY < nSpace - nLeft - nRight) + nWidth = nSpace - nLeft - nRight; + else + { + nWidth = MINLAY; + //TODO: keep the previous value - if possible and reduce the 'new one' only + nLeft = nRight = (nSpace - MINLAY) / 2; + } + break; + default: + break; + } + SwFormatFrameSize aSz( SwFrameSize::Variable, nWidth ); + aSet.Put(aSz); + + aLRSpace.SetLeft(nLeft); + aLRSpace.SetRight(nRight); + aSet.Put( aLRSpace ); + + aSet.Put( aAttr ); + rSh.SetTableAttr( aSet ); + rSh.EndUndo(SwUndoId::TABLE_ATTR); + static sal_uInt16 aInva[] = + { SID_ATTR_TABLE_LEFT_SPACE, + SID_ATTR_TABLE_RIGHT_SPACE, + 0 + }; + GetView().GetViewFrame().GetBindings().Invalidate( aInva ); + } + return; + } default: bMore = true; } @@ -1569,6 +1658,57 @@ void SwTableShell::GetState(SfxItemSet &rSet) break; } + case SID_ATTR_TABLE_ALIGNMENT: + { + const sal_uInt16 nAlign = pFormat->GetHoriOrient().GetHoriOrient(); + rSet.Put(SfxUInt16Item(nSlot, nAlign)); + break; + } + case SID_ATTR_TABLE_LEFT_SPACE: + case SID_ATTR_TABLE_RIGHT_SPACE: + { + SwTabCols aTabCols; + rSh.GetTabCols(aTabCols); + tools::Long nSpace = aTabCols.GetRightMax(); + SvxLRSpaceItem aLRSpace(pFormat->GetLRSpace()); + SwTwips nLeft = aLRSpace.GetLeft(); + SwTwips nRight = aLRSpace.GetRight(); + + sal_uInt16 nPercent = 0; + auto nWidth = ::GetTableWidth(pFormat, aTabCols, &nPercent, &rSh ); + // The table width is wrong for relative values. + if (nPercent) + nWidth = nSpace * nPercent / 100; + const sal_uInt16 nAlign = pFormat->GetHoriOrient().GetHoriOrient(); + if(nAlign != text::HoriOrientation::FULL ) + { + SwTwips nLR = nSpace - nWidth; + switch ( nAlign ) + { + case text::HoriOrientation::CENTER: + nLeft = nRight = nLR / 2; + break; + case text::HoriOrientation::LEFT: + nRight = nLR; + nLeft = 0; + break; + case text::HoriOrientation::RIGHT: + nLeft = nLR; + nRight = 0; + break; + case text::HoriOrientation::LEFT_AND_WIDTH: + nRight = nLR - nLeft; + break; + case text::HoriOrientation::NONE: + if(!nPercent) + nWidth = nSpace - nLeft - nRight; + break; + } + } + rSet.Put(SfxInt32Item(SID_ATTR_TABLE_LEFT_SPACE, nLeft)); + rSet.Put(SfxInt32Item(SID_ATTR_TABLE_RIGHT_SPACE, nRight)); + break; + } } nSlot = aIter.NextWhich(); } diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx index 61dcd2d4e52a..1022804cbbf0 100644 --- a/sw/source/uibase/sidebar/TableEditPanel.cxx +++ b/sw/source/uibase/sidebar/TableEditPanel.cxx @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -21,7 +22,9 @@ #include #include +#include +using namespace ::com::sun::star; namespace sw::sidebar { std::unique_ptr @@ -84,6 +87,42 @@ void TableEditPanel::NotifyItemUpdate(const sal_uInt16 nSID, const SfxItemState break; } + case SID_ATTR_TABLE_ALIGNMENT: + if (pState && eState >= SfxItemState::DEFAULT) + { + const SfxUInt16Item* pItem = static_cast(pState); + if (pItem) + { + sal_uInt16 nAlignment = pItem->GetValue(); + m_xAlignment->set_active_id(OUString::number(nAlignment)); + EnableLeftRight(nAlignment); + } + } + break; + case SID_ATTR_TABLE_LEFT_SPACE: + case SID_ATTR_TABLE_RIGHT_SPACE: + { + if (pState && eState >= SfxItemState::DEFAULT) + { + const SfxInt32Item* pItem = static_cast(pState); + if (pItem) + { + if (SID_ATTR_TABLE_LEFT_SPACE == nSID) + { + m_aLeftSpacingEdit.set_value( + m_aLeftSpacingEdit.normalize(pItem->GetValue()), FieldUnit::TWIP); + m_aLeftSpacingEdit.save_value(); + } + else + { + m_aRightSpacingEdit.set_value( + m_aRightSpacingEdit.normalize(pItem->GetValue()), FieldUnit::TWIP); + m_aRightSpacingEdit.save_value(); + } + } + } + break; + } } } @@ -106,10 +145,16 @@ TableEditPanel::TableEditPanel(weld::Widget* pParent, , m_xDeleteDispatch(new ToolbarUnoDispatcher(*m_xDelete, *m_xBuilder, rxFrame)) , m_xSplitMerge(m_xBuilder->weld_toolbar("split_merge")) , m_xSplitMergeDispatch(new ToolbarUnoDispatcher(*m_xSplitMerge, *m_xBuilder, rxFrame)) + , m_xAlignment(m_xBuilder->weld_combo_box("alignmentLB")) + , m_aLeftSpacingEdit(m_xBuilder->weld_metric_spin_button("leftspace", FieldUnit::CM)) + , m_aRightSpacingEdit(m_xBuilder->weld_metric_spin_button("rightspace", FieldUnit::CM)) , m_xMisc(m_xBuilder->weld_toolbar("misc")) , m_xMiscDispatch(new ToolbarUnoDispatcher(*m_xMisc, *m_xBuilder, rxFrame)) , m_aRowHeightController(SID_ATTR_TABLE_ROW_HEIGHT, *pBindings, *this) , m_aColumnWidthController(SID_ATTR_TABLE_COLUMN_WIDTH, *pBindings, *this) + , m_aAlignmentController(SID_ATTR_TABLE_ALIGNMENT, *pBindings, *this) + , m_aLeftSpacingController(SID_ATTR_TABLE_LEFT_SPACE, *pBindings, *this) + , m_aRightSpacingController(SID_ATTR_TABLE_RIGHT_SPACE, *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) @@ -133,7 +178,7 @@ TableEditPanel::TableEditPanel(weld::Widget* pParent, InitRowHeightToolitem(); InitColumnWidthToolitem(); - + InitAlignmentControls(); if (comphelper::LibreOfficeKit::isActive()) m_xMisc->set_item_visible(".uno:InsertFormula", false); } @@ -166,6 +211,29 @@ void TableEditPanel::InitColumnWidthToolitem() limitWidthForSidebar(m_aColumnWidthEdit); } +void TableEditPanel::InitAlignmentControls() +{ + m_xAlignment->connect_changed(LINK(this, TableEditPanel, AlignmentHdl)); + m_aLeftSpacingEdit.connect_value_changed(LINK(this, TableEditPanel, SpacingHdl)); + m_aRightSpacingEdit.connect_value_changed(LINK(this, TableEditPanel, SpacingHdl)); + m_xAlignment->append(OUString::number(text::HoriOrientation::FULL), + SwResId(STR_TABLE_PANEL_ALIGN_AUTO)); + m_xAlignment->append(OUString::number(text::HoriOrientation::LEFT), + SwResId(STR_TABLE_PANEL_ALIGN_LEFT)); + m_xAlignment->append(OUString::number(text::HoriOrientation::LEFT_AND_WIDTH), + SwResId(STR_TABLE_PANEL_ALIGN_FROM_LEFT)); + m_xAlignment->append(OUString::number(text::HoriOrientation::RIGHT), + SwResId(STR_TABLE_PANEL_ALIGN_RIGHT)); + m_xAlignment->append(OUString::number(text::HoriOrientation::CENTER), + SwResId(STR_TABLE_PANEL_ALIGN_CENTER)); + m_xAlignment->append(OUString::number(text::HoriOrientation::NONE), + SwResId(STR_TABLE_PANEL_ALIGN_MANUAL)); + + FieldUnit eFieldUnit = SW_MOD()->GetUsrPref(false)->GetMetric(); + m_aLeftSpacingEdit.SetFieldUnit(eFieldUnit); + m_aRightSpacingEdit.SetFieldUnit(eFieldUnit); +} + TableEditPanel::~TableEditPanel() { m_xMiscDispatch.reset(); @@ -207,6 +275,33 @@ TableEditPanel::~TableEditPanel() m_aMergeCellsController.dispose(); } +void TableEditPanel::EnableLeftRight(sal_uInt16 nAlignment) +{ + bool enableLeft = true; + bool enableRight = true; + switch (nAlignment) + { + case text::HoriOrientation::FULL: + enableLeft = false; + enableRight = false; + break; + case text::HoriOrientation::LEFT: + enableLeft = false; + break; + case text::HoriOrientation::CENTER: + case text::HoriOrientation::RIGHT: + enableRight = false; + break; + case text::HoriOrientation::LEFT_AND_WIDTH: + enableRight = false; + break; + default: + break; + } + m_aLeftSpacingEdit.set_sensitive(enableLeft); + m_aRightSpacingEdit.set_sensitive(enableRight); +} + IMPL_LINK_NOARG(TableEditPanel, RowHeightMofiyHdl, weld::MetricSpinButton&, void) { SwTwips nNewHeight = static_cast( @@ -228,6 +323,56 @@ IMPL_LINK_NOARG(TableEditPanel, ColumnWidthMofiyHdl, weld::MetricSpinButton&, vo m_pBindings->GetDispatcher()->ExecuteList(SID_ATTR_TABLE_COLUMN_WIDTH, SfxCallMode::RECORD, { &aColumnWidth }); } + +IMPL_LINK_NOARG(TableEditPanel, AlignmentHdl, weld::ComboBox&, void) { AlignmentModify(true); } + +IMPL_LINK(TableEditPanel, SpacingHdl, weld::MetricSpinButton&, rField, void) +{ + if (!rField.get_value_changed_from_saved()) + return; + rField.save_value(); + AlignmentModify(false); +} + +void TableEditPanel::AlignmentModify(bool alignmentChanged) +{ + sal_uInt16 nAlign = m_xAlignment->get_active_id().toUInt32(); + SwTwips nLeft = static_cast( + m_aLeftSpacingEdit.denormalize(m_aLeftSpacingEdit.get_value(FieldUnit::TWIP))); + SwTwips nRight = static_cast( + m_aRightSpacingEdit.denormalize(m_aRightSpacingEdit.get_value(FieldUnit::TWIP))); + if (alignmentChanged) + { + EnableLeftRight(nAlign); + switch (nAlign) + { + case text::HoriOrientation::CENTER: + nLeft = nRight = (nLeft + nRight) / 2; + break; + case text::HoriOrientation::LEFT: + nRight = nLeft + nRight; + nLeft = 0; + break; + case text::HoriOrientation::RIGHT: + nLeft = nLeft + nRight; + nRight = 0; + break; + default: + if (!m_aLeftSpacingEdit.get_sensitive()) + nLeft = 0; + if (!m_aRightSpacingEdit.get_sensitive()) + nRight = 0; + break; + } + } + + SfxUInt16Item aAlign(SID_ATTR_TABLE_ALIGNMENT, nAlign); + SfxInt32Item aLeft(SID_ATTR_TABLE_LEFT_SPACE, nLeft); + SfxInt32Item aRight(SID_ATTR_TABLE_RIGHT_SPACE, nRight); + m_pBindings->GetDispatcher()->ExecuteList(SID_ATTR_TABLE_ALIGNMENT, SfxCallMode::RECORD, + { &aAlign, &aLeft, &aRight }); +} + } // end of namespace ::sw::sidebar /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/sidebar/TableEditPanel.hxx b/sw/source/uibase/sidebar/TableEditPanel.hxx index 140de8653896..8aee8b4cea6d 100644 --- a/sw/source/uibase/sidebar/TableEditPanel.hxx +++ b/sw/source/uibase/sidebar/TableEditPanel.hxx @@ -39,6 +39,9 @@ public: private: void InitRowHeightToolitem(); void InitColumnWidthToolitem(); + void InitAlignmentControls(); + void EnableLeftRight(sal_uInt16 nAlignment); + void AlignmentModify(bool alignmentChanged); SfxBindings* m_pBindings; @@ -56,11 +59,17 @@ private: std::unique_ptr m_xDeleteDispatch; std::unique_ptr m_xSplitMerge; std::unique_ptr m_xSplitMergeDispatch; + std::unique_ptr m_xAlignment; + SvxRelativeField m_aLeftSpacingEdit; + SvxRelativeField m_aRightSpacingEdit; std::unique_ptr m_xMisc; std::unique_ptr m_xMiscDispatch; ::sfx2::sidebar::ControllerItem m_aRowHeightController; ::sfx2::sidebar::ControllerItem m_aColumnWidthController; + ::sfx2::sidebar::ControllerItem m_aAlignmentController; + ::sfx2::sidebar::ControllerItem m_aLeftSpacingController; + ::sfx2::sidebar::ControllerItem m_aRightSpacingController; ::sfx2::sidebar::ControllerItem m_aInsertRowsBeforeController; ::sfx2::sidebar::ControllerItem m_aInsertRowsAfterController; ::sfx2::sidebar::ControllerItem m_aInsertColumnsBeforeController; @@ -78,6 +87,8 @@ private: DECL_LINK(RowHeightMofiyHdl, weld::MetricSpinButton&, void); DECL_LINK(ColumnWidthMofiyHdl, weld::MetricSpinButton&, void); + DECL_LINK(AlignmentHdl, weld::ComboBox&, void); + DECL_LINK(SpacingHdl, weld::MetricSpinButton&, void); }; } // end of namespace sw::sidebar diff --git a/sw/uiconfig/swriter/ui/sidebartableedit.ui b/sw/uiconfig/swriter/ui/sidebartableedit.ui index 55c4a839ef30..e3a50c34321e 100644 --- a/sw/uiconfig/swriter/ui/sidebartableedit.ui +++ b/sw/uiconfig/swriter/ui/sidebartableedit.ui @@ -12,12 +12,24 @@ 1 10 + + -99.98999999999999 + 99.98999999999999 + 0.05 + 1 + + + -99.98999999999999 + 99.98999999999999 + 0.05 + 1 + True False - + True False @@ -452,6 +464,95 @@ 3 + + + True + False + True + Alignment: + True + alignmentLB + 0 + + + 0 + 9 + + + + + True + False + Set the alignment options for the selected table. + True + + + 1 + 9 + + + + + True + False + True + Left spacing: + True + leftspace + 0 + + + 0 + 10 + + + + + True + False + True + Right spacing: + True + rightspace + 0 + + + 1 + 10 + + + + + True + True + Left Spacing + True + 0 + True + adjustment3 + 2 + + + 0 + 11 + + + + + True + True + Right Spacing + True + 0 + True + adjustment4 + 2 + + + 1 + 11 + + True @@ -496,7 +597,7 @@ 1 - 9 + 13 @@ -510,7 +611,7 @@ 0 - 9 + 13 @@ -520,10 +621,16 @@ 0 - 8 + 12 2 + + + + + + 0 -- cgit