diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-28 15:49:26 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-01 07:34:23 +0000 |
commit | fc04f76336fdf8c96e35382cdeb497e2f939705c (patch) | |
tree | 70c9bbd054a34a9bca9d22bb7afbb9c4349beff0 /xmloff/source/forms/propertyimport.cxx | |
parent | eb4811590c85895ce531674596bdd6afb3397725 (diff) |
fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.
Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff/source/forms/propertyimport.cxx')
-rw-r--r-- | xmloff/source/forms/propertyimport.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 42bbe4f3873f..939574608756 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -61,13 +61,13 @@ namespace ::com::sun::star::util::Time lcl_getTime(double _nValue) { ::com::sun::star::util::Time aTime; - sal_uInt64 nIntValue = static_cast<sal_uInt64>(_nValue * ::Time::nanoSecPerDay); - aTime.NanoSeconds = nIntValue % ::Time::nanoSecPerSec; - nIntValue /= ::Time::nanoSecPerSec; - aTime.Seconds = nIntValue % ::Time::secondPerMinute; - nIntValue /= ::Time::secondPerMinute; - aTime.Minutes = nIntValue % ::Time::minutePerHour; - nIntValue /= ::Time::minutePerHour; + sal_uInt64 nIntValue = static_cast<sal_uInt64>(_nValue * ::tools::Time::nanoSecPerDay); + aTime.NanoSeconds = nIntValue % ::tools::Time::nanoSecPerSec; + nIntValue /= ::tools::Time::nanoSecPerSec; + aTime.Seconds = nIntValue % ::tools::Time::secondPerMinute; + nIntValue /= ::tools::Time::secondPerMinute; + aTime.Minutes = nIntValue % ::tools::Time::minutePerHour; + nIntValue /= ::tools::Time::minutePerHour; OSL_ENSURE(nIntValue < 24, "lcl_getTime: more than a day?"); aTime.Hours = nIntValue; @@ -199,7 +199,7 @@ Any PropertyConversion::convertString( const ::com::sun::star::uno::Type& _rExpe case TYPE_TIME: { OSL_ENSURE(((sal_uInt32)nValue) == 0, - "PropertyConversion::convertString: a Time value with more than a fractional part?"); + "PropertyConversion::convertString: a tools::Time value with more than a fractional part?"); aReturn <<= lcl_getTime(nValue); } break; |