diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-26 14:17:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-23 12:07:34 +0200 |
commit | 5481ca586df8eed2c832e00bc5f7e910fa2cd174 (patch) | |
tree | 78ce9d1f047062151dfd48ce0c399910505f066e /vcl | |
parent | 55f0b65b0568b8a8b1d823578eea1cbf633f4134 (diff) |
weld SpecialSettingsPage and GeneratedValuesPage
Change-Id: I3b4c2a4d553032128efe25c008df30d6f1f77628
Reviewed-on: https://gerrit.libreoffice.org/61018
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 20 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 6 |
2 files changed, 26 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 00f31f36f702..972e23dacaf9 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1901,6 +1901,7 @@ public: : SalInstanceEntry(pButton, bTakeOwnership) , m_xButton(pButton) { + m_xButton->SetUseThousandSep(false); //off by default, MetricSpinButton enables it m_xButton->SetUpHdl(LINK(this, SalInstanceSpinButton, UpDownHdl)); m_xButton->SetDownHdl(LINK(this, SalInstanceSpinButton, UpDownHdl)); m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceSpinButton, LoseFocusHdl)); @@ -1948,11 +1949,18 @@ public: m_xButton->SetDecimalDigits(digits); } + //so with hh::mm::ss, incrementing mm will not reset ss void DisableRemainderFactor() { m_xButton->DisableRemainderFactor(); } + //off by default for direct SpinButtons, MetricSpinButton enables it + void SetUseThousandSep() + { + m_xButton->SetUseThousandSep(true); + } + virtual unsigned int get_digits() const override { return m_xButton->GetDecimalDigits(); @@ -2831,6 +2839,18 @@ public: return pSpinButton ? o3tl::make_unique<SalInstanceSpinButton>(pSpinButton, bTakeOwnership) : nullptr; } + virtual std::unique_ptr<weld::MetricSpinButton> weld_metric_spin_button(const OString& id, FieldUnit eUnit, + bool bTakeOwnership) override + { + std::unique_ptr<weld::SpinButton> xButton(weld_spin_button(id, bTakeOwnership)); + if (xButton) + { + SalInstanceSpinButton& rButton = dynamic_cast<SalInstanceSpinButton&>(*xButton); + rButton.SetUseThousandSep(); + } + return o3tl::make_unique<weld::MetricSpinButton>(std::move(xButton), eUnit); + } + virtual std::unique_ptr<weld::TimeSpinButton> weld_time_spin_button(const OString& id, TimeFieldFormat eFormat, bool bTakeOwnership) override { diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 13c1f3b49c96..90f104511547 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -6073,6 +6073,12 @@ public: return o3tl::make_unique<GtkInstanceSpinButton>(pSpinButton, bTakeOwnership); } + virtual std::unique_ptr<weld::MetricSpinButton> weld_metric_spin_button(const OString& id, FieldUnit eUnit, + bool bTakeOwnership) override + { + return o3tl::make_unique<weld::MetricSpinButton>(weld_spin_button(id, bTakeOwnership), eUnit); + } + virtual std::unique_ptr<weld::TimeSpinButton> weld_time_spin_button(const OString& id, TimeFieldFormat eFormat, bool bTakeOwnership) override { |