summaryrefslogtreecommitdiff
path: root/vcl/source/window/builder.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/builder.cxx')
-rw-r--r--vcl/source/window/builder.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 0d4ca5764834..5aac570883dd 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1351,14 +1351,14 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
if (!sPattern.isEmpty())
{
+ connectNumericFormatterAdjustment(id, sAdjustment);
OString sUnit = extractUnit(sPattern);
FieldUnit eUnit = detectMetricUnit(sUnit);
SAL_INFO("vcl.layout", "making metric box for " << name.getStr() << " " << sUnit.getStr());
- connectNumericFormatterAdjustment(id, sAdjustment);
- MetricBox *pBox = new MetricBox(pParent, nBits|WB_BORDER);
- if (bDropdown)
- pBox->EnableAutoSize(true);
+ MetricBox *pBox = new MetricBox(pParent, nBits);
+ pBox->EnableAutoSize(true);
pBox->SetUnit(eUnit);
+ pBox->SetDecimalDigits(extractDecimalDigits(sPattern));
if (eUnit == FUNIT_CUSTOM)
pBox->SetCustomUnitText(OStringToOUString(sUnit, RTL_TEXTENCODING_UTF8));
pWindow = pBox;