[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 10 06:58:32 PDT 2012
vcl/source/window/builder.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 1364daae4a6fe079bf78cc08ee28a870b2faffb2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 10 14:57:55 2012 +0100
add a route to toggle off spinners from spinboxes
Change-Id: I344b591b9d02e08717db1da89518f1a9654bd7a1
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index e7ad8a4..55e10ad 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -447,15 +447,19 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, const
FieldUnit eUnit = detectMetricUnit(sUnit);
+ WinBits nBits = WB_RIGHT|WB_BORDER|WB_3DLOOK;
+ if (!id.endsWith("-nospin"))
+ nBits |= WB_SPIN;
+
if (sPattern.isEmpty())
{
fprintf(stderr, "making numeric field for %s %s\n", name.getStr(), sUnit.getStr());
- pWindow = new NumericField(pParent, WB_RIGHT|WB_SPIN|WB_BORDER|WB_3DLOOK);
+ pWindow = new NumericField(pParent, nBits);
}
else
{
fprintf(stderr, "making metric field for %s %s\n", name.getStr(), sUnit.getStr());
- MetricField *pField = new MetricField(pParent, WB_RIGHT|WB_SPIN|WB_BORDER|WB_3DLOOK);
+ MetricField *pField = new MetricField(pParent, nBits);
pField->SetUnit(eUnit);
pWindow = pField;
}
More information about the Libreoffice-commits
mailing list