[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 28 20:13:01 UTC 2020
vcl/source/window/builder.cxx | 34 +++++++++++-----------------------
1 file changed, 11 insertions(+), 23 deletions(-)
New commits:
commit 1e4cc854a2aa7af0be83fc809e4b37af9e71ac8d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jan 28 15:27:05 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 28 21:12:24 2020 +0100
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 at redhat.com>
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")
{
More information about the Libreoffice-commits
mailing list