diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-28 15:27:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-28 21:12:24 +0100 |
commit | 1e4cc854a2aa7af0be83fc809e4b37af9e71ac8d (patch) | |
tree | db4667083ba19a76c1db15e4c73d47b1998b0c54 /vcl | |
parent | cad2485d924a9f766a8e65379bdcd7a42c0228ee (diff) |
the only VclComboBoxNumeric left has a pattern
so the !pattern case is dead
Change-Id: Ib8d8c2fc4d9929cf5b66f389fddc23189448bd47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87639
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/builder.cxx | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 3e9c2add65a8..400073bfda8a 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2061,29 +2061,17 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & if (bDropdown) nBits |= WB_DROPDOWN; - if (!sPattern.isEmpty()) - { - connectNumericFormatterAdjustment(id, sAdjustment); - OUString sUnit = extractUnit(sPattern); - FieldUnit eUnit = detectMetricUnit(sUnit); - SAL_INFO("vcl.layout", "making metric box for " << name << " " << sUnit); - VclPtrInstance<MetricBox> xBox(pParent, nBits); - xBox->EnableAutoSize(true); - xBox->SetUnit(eUnit); - xBox->SetDecimalDigits(extractDecimalDigits(sPattern)); - if (eUnit == FieldUnit::CUSTOM) - xBox->SetCustomUnitText(sUnit); - xWindow = xBox; - } - else - { - SAL_INFO("vcl.layout", "making numeric box for " << name); - connectNumericFormatterAdjustment(id, sAdjustment); - VclPtrInstance<NumericBox> xBox(pParent, nBits); - if (bDropdown) - xBox->EnableAutoSize(true); - xWindow = xBox; - } + connectNumericFormatterAdjustment(id, sAdjustment); + OUString sUnit = extractUnit(sPattern); + FieldUnit eUnit = detectMetricUnit(sUnit); + SAL_INFO("vcl.layout", "making metric box for " << name << " " << sUnit); + VclPtrInstance<MetricBox> xBox(pParent, nBits); + xBox->EnableAutoSize(true); + xBox->SetUnit(eUnit); + xBox->SetDecimalDigits(extractDecimalDigits(sPattern)); + if (eUnit == FieldUnit::CUSTOM) + xBox->SetCustomUnitText(sUnit); + xWindow = xBox; } else if (name == "GtkIconView") { |