diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 15 | ||||
-rw-r--r-- | vcl/source/control/fmtfield.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 12 |
3 files changed, 26 insertions, 3 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 82f1138c7537..ade8338f9946 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2093,6 +2093,11 @@ public: : SalInstanceEntry(pButton, bTakeOwnership) , m_xButton(pButton) { + // #i6278# allow more decimal places than the output format. As + // the numbers shown in the edit fields are used for input, it makes more + // sense to display the values in the input format rather than the output + // format. + m_xButton->UseInputStringForFormatting(); } virtual double get_value() const override @@ -2121,6 +2126,16 @@ public: { m_xButton->SetFormatter(pFormatter); } + + virtual sal_Int32 get_format_key() const override + { + return m_xButton->GetFormatKey(); + } + + virtual void set_format_key(sal_Int32 nFormatKey) override + { + m_xButton->SetFormatKey(nFormatKey); + } }; class SalInstanceLabel : public SalInstanceWidget, public virtual weld::Label diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx index 280bf06649f5..d9e2b015506b 100644 --- a/vcl/source/control/fmtfield.cxx +++ b/vcl/source/control/fmtfield.cxx @@ -320,8 +320,6 @@ FormattedField::FormattedField(vcl::Window* pParent, WinBits nStyle) { } -VCL_BUILDER_FACTORY_ARGS(FormattedField, WB_BORDER | WB_SPIN) - void FormattedField::SetText(const OUString& rStr) { diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index d23daa538d3f..2ffe595cb223 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -4540,7 +4540,7 @@ private: } else { - m_pFormatter->GetOutputString(dVal, m_nFormatKey, sNewText, &m_pLastOutputColor); + m_pFormatter->GetInputLineString(dVal, m_nFormatKey, sNewText); } set_text(sNewText); return true; @@ -4658,6 +4658,16 @@ public: signal_output(); } + virtual sal_Int32 get_format_key() const override + { + return m_nFormatKey; + } + + virtual void set_format_key(sal_Int32 nFormatKey) override + { + m_nFormatKey = nFormatKey; + } + virtual ~GtkInstanceFormattedSpinButton() override { g_signal_handler_disconnect(m_pButton, m_nInputSignalId); |