[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 14 14:34:10 UTC 2020
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 <caolanm at redhat.com>
AuthorDate: Thu Aug 13 17:03:11 2020 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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);
More information about the Libreoffice-commits
mailing list