sw/source/ui/table/tabledlg.cxx | 9 +++++---- sw/source/uibase/table/tablepg.hxx | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)
New commits: commit bfd3f939325e53c9dc85d2486316927c2b34eaf8 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Aug 13 17:03:11 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Aug 14 16:33:31 2020 +0200 tdf#135693 rerun the callbacks on inconsistency just once Change-Id: I250cf11b816e91b521378c132e4ee8065956bb73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100679 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 9e2259e6ad65..77cf26c43042 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -267,7 +267,7 @@ IMPL_LINK( SwFormatTablePage, ValueChangedHdl, weld::MetricSpinButton&, rEdit, v ModifyHdl(rEdit); } -void SwFormatTablePage::ModifyHdl(const weld::MetricSpinButton& rEdit) +void SwFormatTablePage::ModifyHdl(const weld::MetricSpinButton& rEdit, bool bAllowInconsistencies) { SwTwips nCurWidth = static_cast< SwTwips >(m_xWidthMF->DenormalizePercent(m_xWidthMF->get_value(FieldUnit::TWIP))); SwTwips nPrevWidth = nCurWidth; @@ -371,9 +371,10 @@ void SwFormatTablePage::ModifyHdl(const weld::MetricSpinButton& rEdit) // tdf#135021 if the user changed the width spinbutton, and in this // ModifyHdl we changed the value of that width spinbutton, then rerun // the ModifyHdl on the replaced value so the left/right/width value - // relationships are consistent - if (&rEdit == m_xWidthMF->get()) - ModifyHdl(rEdit); + // relationships are consistent. + // But (tdf#135693) only make one effort of rectifying the inconsistency + if (&rEdit == m_xWidthMF->get() && !bAllowInconsistencies) + ModifyHdl(rEdit, true); } bModified = true; diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx index 60e8938e6b39..adfee146e03c 100644 --- a/sw/source/uibase/table/tablepg.hxx +++ b/sw/source/uibase/table/tablepg.hxx @@ -69,7 +69,7 @@ class SwFormatTablePage : public SfxTabPage int m_nOrigRightMax; void Init(); - void ModifyHdl(const weld::MetricSpinButton& rEdit); + void ModifyHdl(const weld::MetricSpinButton& rEdit, bool bAllowInconsistencies = false); DECL_LINK(AutoClickHdl, weld::ToggleButton&, void); DECL_LINK(RelWidthClickHdl, weld::ToggleButton&, void); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits