vcl/source/window/builder.cxx | 46 ++++++------------------------------------ 1 file changed, 7 insertions(+), 39 deletions(-)
New commits: commit a9c0dcc13d99d9f768f64c877920280e4411756b Author: Caolán McNamara <[email protected]> AuthorDate: Wed May 27 11:47:31 2020 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed May 27 14:11:19 2020 +0200 no GtkSpinButtons with :pattern hack exist anymore Change-Id: I9d622890b3f8e58d6b634014f242e7cd9016d507 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94937 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 8410e67871a3..21ced1163496 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2014,52 +2014,20 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & else if (name == "GtkSpinButton") { OUString sAdjustment = extractAdjustment(rMap); - OUString sPattern = BuilderUtils::extractCustomProperty(rMap); - OUString sUnit = extractUnit(sPattern); WinBits nBits = WB_CLIPCHILDREN|WB_LEFT|WB_BORDER|WB_3DLOOK|WB_SPIN|WB_REPEAT; - if (sPattern.isEmpty()) + if (m_bLegacy) { - SAL_INFO("vcl.builder", "making numeric field for " << name << " " << sUnit); - if (m_bLegacy) - { - connectNumericFormatterAdjustment(id, sAdjustment); - xWindow = VclPtr<NumericField>::Create(pParent, nBits); - } - else - { - connectFormattedFormatterAdjustment(id, sAdjustment); - VclPtrInstance<FormattedField> xField(pParent, nBits); - xField->SetMinValue(0); - xWindow = xField; - } + connectNumericFormatterAdjustment(id, sAdjustment); + xWindow = VclPtr<NumericField>::Create(pParent, nBits); } else { - if (sPattern == "hh:mm") - { - connectTimeFormatterAdjustment(id, sAdjustment); - SAL_INFO("vcl.builder", "making time field for " << name << " " << sUnit); - xWindow = VclPtr<TimeField>::Create(pParent, nBits); - } - else if (sPattern == "yy:mm:dd") - { - connectDateFormatterAdjustment(id, sAdjustment); - SAL_INFO("vcl.builder", "making date field for " << name << " " << sUnit); - xWindow = VclPtr<DateField>::Create(pParent, nBits); - } - else - { - connectNumericFormatterAdjustment(id, sAdjustment); - FieldUnit eUnit = detectMetricUnit(sUnit); - SAL_INFO("vcl.builder", "making metric field for " << name << " " << sUnit); - VclPtrInstance<MetricField> xField(pParent, nBits); - xField->SetUnit(eUnit); - if (eUnit == FieldUnit::CUSTOM) - xField->SetCustomUnitText(sUnit); - xWindow = xField; - } + connectFormattedFormatterAdjustment(id, sAdjustment); + VclPtrInstance<FormattedField> xField(pParent, nBits); + xField->SetMinValue(0); + xWindow = xField; } } else if (name == "GtkLinkButton") _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
