summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-08-13 12:21:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-08-13 14:51:15 +0100
commit2235f495e36082ea1f2ccdd6b37b822a81e27279 (patch)
treefff0699bcbbc55b4c2604245bb71dd5b59fc22af /vcl
parent3c307ff5a5a41553336bc639ca8c3ff2b31d286a (diff)
add a seconds unit
Change-Id: I3507caab5cd61c282102ab21bf034ec54e497af3
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/field.cxx3
-rw-r--r--vcl/source/src/units.src1
-rw-r--r--vcl/source/window/builder.cxx2
3 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 31e790fc5f60..7ff247ce958b 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1303,10 +1303,12 @@ double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, sa
eOutUnit == FUNIT_CUSTOM ||
eOutUnit == FUNIT_NONE ||
eOutUnit == FUNIT_DEGREE ||
+ eOutUnit == FUNIT_SECOND ||
eOutUnit == FUNIT_PIXEL ||
eInUnit == FUNIT_CUSTOM ||
eInUnit == FUNIT_NONE ||
eInUnit == FUNIT_DEGREE ||
+ eInUnit == FUNIT_SECOND ||
eInUnit == FUNIT_PIXEL )
return nValue;
else
@@ -1397,6 +1399,7 @@ double MetricField::ConvertDoubleValue( double nValue, sal_uInt16 nDigits,
eInUnit == FUNIT_CUSTOM ||
eInUnit == FUNIT_NONE ||
eInUnit == FUNIT_DEGREE ||
+ eInUnit == FUNIT_SECOND ||
eInUnit == FUNIT_PIXEL ||
eOutUnit == MAP_PIXEL ||
eOutUnit == MAP_SYSFONT ||
diff --git a/vcl/source/src/units.src b/vcl/source/src/units.src
index 744d4d339089..8f07c7f4b5bf 100644
--- a/vcl/source/src/units.src
+++ b/vcl/source/src/units.src
@@ -46,6 +46,7 @@ StringArray SV_FUNIT_STRINGS
< " pixels" ; FUNIT_PIXEL ; > ;
< " pixel" ; FUNIT_PIXEL ; > ;
< "°" ; FUNIT_DEGREE ; > ;
+ < "sec" ; FUNIT_SECOND ; > ;
};
};
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index ac6c0e47c1fa..f67e452d9b84 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -829,6 +829,8 @@ namespace
eUnit = FUNIT_PIXEL;
else if ((sUnit == "degrees") || (sUnit == "degree"))
eUnit = FUNIT_DEGREE;
+ else if ((sUnit == "sec") || (sUnit == "seconds") || (sUnit == "second"))
+ eUnit = FUNIT_SECOND;
else if (sUnit != "0")
eUnit = FUNIT_CUSTOM;