summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-28 15:49:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-01 07:34:23 +0000
commitfc04f76336fdf8c96e35382cdeb497e2f939705c (patch)
tree70c9bbd054a34a9bca9d22bb7afbb9c4349beff0 /oox
parenteb4811590c85895ce531674596bdd6afb3397725 (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 'oox')
-rw-r--r--oox/source/drawingml/textfield.cxx8
-rw-r--r--oox/source/dump/dumperbase.cxx16
2 files changed, 12 insertions, 12 deletions
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index 2523156ade0d..b8a6f725e2ae 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -97,17 +97,17 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
case 9: // DateTime dd/mm/yy H:MM:SS PM
lclCreateTextFields( aFields, xModel, "datetime13" );
break;
- case 10: // Time H:MM
+ case 10: // tools::Time H:MM
bIsDate = false;
break;
- case 11: // Time H:MM:SS
+ case 11: // tools::Time H:MM:SS
bIsDate = false;
// this is the default format
break;
- case 12: // Time H:MM PM
+ case 12: // tools::Time H:MM PM
bIsDate = false;
break;
- case 13: // Time H:MM:SS PM
+ case 13: // tools::Time H:MM:SS PM
bIsDate = false;
break;
}
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 59711c0a4fd5..1143e6a284b6 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -2202,7 +2202,7 @@ util::DateTime InputObjectBase::dumpFileTime( const String& rName )
// file time is in 10^-7 seconds (100 nanoseconds), convert to nanoseconds
nFileTime *= 100;
// entire days
- sal_Int64 nDays = nFileTime / sal_Int64( ::Time::nanoSecPerDay );
+ sal_Int64 nDays = nFileTime / sal_Int64( ::tools::Time::nanoSecPerDay );
// number of entire years
sal_Int64 nYears = (nDays - (nDays / (4 * 365)) + (nDays / (100 * 365)) - (nDays / (400 * 365))) / 365;
// remaining days in the year
@@ -2225,16 +2225,16 @@ util::DateTime InputObjectBase::dumpFileTime( const String& rName )
// the day
aDateTime.Day = static_cast< sal_uInt16 >( nDaysInYear + 1 );
// number of nanoseconds in the day
- sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::Time::nanoSecPerDay );
+ sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::tools::Time::nanoSecPerDay );
// nanoseconds
- aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::Time::nanoSecPerSec );
- nTimeInDay /= ::Time::nanoSecPerSec;
+ aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::tools::Time::nanoSecPerSec );
+ nTimeInDay /= ::tools::Time::nanoSecPerSec;
// seconds
- aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::Time::secondPerMinute );
- nTimeInDay /= ::Time::secondPerMinute;
+ aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::secondPerMinute );
+ nTimeInDay /= ::tools::Time::secondPerMinute;
// minutes
- aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::Time::minutePerHour );
- nTimeInDay /= ::Time::minutePerHour;
+ aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::minutePerHour );
+ nTimeInDay /= ::tools::Time::minutePerHour;
// hours
aDateTime.Hours = static_cast< sal_uInt16 >( nTimeInDay );