summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-14 21:15:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-16 14:51:52 +0100
commit11300c48d4350c2f6748a1ca04b919cfae338d41 (patch)
tree4184e16c15d0adc2b4ec83ca4b2b34d7b1d57c3d /vcl
parent41d588835c359171c8d1a410221d75b9410b0c2d (diff)
Resolves: tdf#121246 crash in chart dialogs
Change-Id: I3bc720e44f5ea15749e6bc0f0fada3a17a783e23 Reviewed-on: https://gerrit.libreoffice.org/63463 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.cxx15
-rw-r--r--vcl/source/control/fmtfield.cxx2
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx12
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);