summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tools/fldunit.hxx2
-rw-r--r--rsc/source/parser/rscibas.cxx1
-rw-r--r--svx/source/svdraw/svdmodel.cxx1
-rw-r--r--svx/source/svdraw/svdtrans.cxx1
-rw-r--r--vcl/source/control/field.cxx3
-rw-r--r--vcl/source/src/units.src1
-rw-r--r--vcl/source/window/builder.cxx2
7 files changed, 10 insertions, 1 deletions
diff --git a/include/tools/fldunit.hxx b/include/tools/fldunit.hxx
index df2b84a76fe4..7b8fa4d530bc 100644
--- a/include/tools/fldunit.hxx
+++ b/include/tools/fldunit.hxx
@@ -22,7 +22,7 @@
enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM,
FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA,
FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CHAR, FUNIT_LINE, FUNIT_CUSTOM,
- FUNIT_PERCENT, FUNIT_100TH_MM, FUNIT_PIXEL, FUNIT_DEGREE };
+ FUNIT_PERCENT, FUNIT_100TH_MM, FUNIT_PIXEL, FUNIT_DEGREE, FUNIT_SECOND };
#endif
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index b79c90f208aa..e4026715d701 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -195,6 +195,7 @@ RscEnum * RscTypCont::InitFieldUnitsType()
SETCONST( pFieldUnits, "FUNIT_LINE", FUNIT_LINE );
SETCONST( pFieldUnits, "FUNIT_PERCENT", FUNIT_PERCENT );
SETCONST( pFieldUnits, "FUNIT_DEGREE", FUNIT_DEGREE);
+ SETCONST( pFieldUnits, "FUNIT_SECOND", FUNIT_SECOND);
SETCONST( pFieldUnits, "FUNIT_PIXEL", FUNIT_PIXEL );
return pFieldUnits;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 91106dabeb3e..64510af58e76 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1041,6 +1041,7 @@ void SdrModel::ImpSetUIUnit()
case FUNIT_LINE : break;
case FUNIT_PIXEL : break;
case FUNIT_DEGREE : break;
+ case FUNIT_SECOND : break;
} // switch
// check if mapping is from metric to inch and adapt
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index b257530e249e..806802c6a0f2 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -779,6 +779,7 @@ void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, boo
case FUNIT_LINE : break;
case FUNIT_PIXEL : break;
case FUNIT_DEGREE : break;
+ case FUNIT_SECOND : break;
} // switch
rnKomma=nKomma;
rbMetr=bMetr;
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;