summaryrefslogtreecommitdiffstats
path: root/sc
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 /sc
parentFallout fdo#83010: wrap on limits also in corner cases (diff)
downloadcore-fc04f76336fdf8c96e35382cdeb497e2f939705c.tar.gz
core-fc04f76336fdf8c96e35382cdeb497e2f939705c.zip
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 'sc')
-rw-r--r--sc/inc/editutil.hxx2
-rw-r--r--sc/inc/externalrefmgr.hxx4
-rw-r--r--sc/source/core/data/dbdocutl.cxx16
-rw-r--r--sc/source/core/data/documen8.cxx4
-rw-r--r--sc/source/core/data/dpobject.cxx16
-rw-r--r--sc/source/core/tool/chgviset.cxx2
-rw-r--r--sc/source/core/tool/editutil.cxx2
-rw-r--r--sc/source/core/tool/interpr2.cxx20
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/filter/html/htmlexp.cxx2
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx2
-rw-r--r--sc/source/filter/oox/revisionfragment.cxx2
-rw-r--r--sc/source/filter/orcus/interface.cxx10
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx12
-rw-r--r--sc/source/filter/xml/XMLConverter.cxx2
-rw-r--r--sc/source/ui/dbgui/scendlg.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx12
-rw-r--r--sc/source/ui/inc/preview.hxx2
-rw-r--r--sc/source/ui/inc/printfun.hxx2
-rw-r--r--sc/source/ui/miscdlgs/highred.cxx4
-rw-r--r--sc/source/ui/miscdlgs/sharedocdlg.cxx4
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx4
-rw-r--r--sc/source/ui/view/preview.cxx4
-rw-r--r--sc/source/ui/view/printfun.cxx4
-rw-r--r--sc/source/ui/view/viewfun6.cxx6
-rw-r--r--sc/workben/test.cxx12
26 files changed, 77 insertions, 77 deletions
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 4acb1834b590..142650fa9fa1 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -196,7 +196,7 @@ struct ScHeaderFieldData
OUString aShortDocName; // pure file name
OUString aTabName;
Date aDate;
- Time aTime;
+ tools::Time aTime;
long nPageNo;
long nTotalPages;
SvxNumType eNumType;
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 383186ef715f..8a2d3a4dcfa4 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -419,9 +419,9 @@ private:
struct SrcShell
{
SfxObjectShellRef maShell;
- Time maLastAccess;
+ tools::Time maLastAccess;
- SrcShell() : maLastAccess( Time::SYSTEM ) {}
+ SrcShell() : maLastAccess( tools::Time::SYSTEM ) {}
};
typedef ::boost::unordered_map<sal_uInt16, SrcShell> DocShellMap;
diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx
index 66aa2e2e2c84..f99aaf0a2213 100644
--- a/sc/source/core/data/dbdocutl.cxx
+++ b/sc/source/core/data/dbdocutl.cxx
@@ -105,10 +105,10 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
NUMBERFORMAT_TIME, ScGlobal::eLnge );
util::Time aTime = xRow->getTime(nRowPos);
- nVal = aTime.Hours / static_cast<double>(::Time::hourPerDay) +
- aTime.Minutes / static_cast<double>(::Time::minutePerDay) +
- aTime.Seconds / static_cast<double>(::Time::secondPerDay) +
- aTime.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay);
+ nVal = aTime.Hours / static_cast<double>(::tools::Time::hourPerDay) +
+ aTime.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
+ aTime.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
+ aTime.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
bEmptyFlag = xRow->wasNull();
bValue = true;
}
@@ -123,10 +123,10 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB
util::DateTime aStamp = xRow->getTimestamp(nRowPos);
nVal = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) -
*pFormTable->GetNullDate() ) +
- aStamp.Hours / static_cast<double>(::Time::hourPerDay) +
- aStamp.Minutes / static_cast<double>(::Time::minutePerDay) +
- aStamp.Seconds / static_cast<double>(::Time::secondPerDay) +
- aStamp.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay);
+ aStamp.Hours / static_cast<double>(::tools::Time::hourPerDay) +
+ aStamp.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
+ aStamp.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
+ aStamp.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
bEmptyFlag = xRow->wasNull();
bValue = true;
}
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 88169a589134..ddb8acdbd5dc 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -474,7 +474,7 @@ public:
IdleCalcTextWidthScope(ScDocument& rDoc, ScAddress& rCalcPos) :
mrDoc(rDoc),
mrCalcPos(rCalcPos),
- mnStartTime(Time::GetSystemTicks()),
+ mnStartTime(tools::Time::GetSystemTicks()),
mpStylePool(rDoc.GetStyleSheetPool()),
mnOldSearchMask(mpStylePool->GetSearchMask()),
meOldFamily(mpStylePool->GetSearchFamily()),
@@ -683,7 +683,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
// Quit if either 1) its duration exceeds 50 ms, or 2) there is any
// pending event after processing 32 cells.
- if ((50L < Time::GetSystemTicks() - aScope.getStartTime()) || (nCount > 31 && Application::AnyInput(ABORT_EVENTS)))
+ if ((50L < tools::Time::GetSystemTicks() - aScope.getStartTime()) || (nCount > 31 && Application::AnyInput(ABORT_EVENTS)))
nCount = CALCMAX;
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 472d8eba4dd5..64d072b245eb 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -220,10 +220,10 @@ void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) cons
rNumType = NUMBERFORMAT_TIME;
util::Time aTime = mxRow->getTime(nCol+1);
- fValue = aTime.Hours / static_cast<double>(::Time::hourPerDay) +
- aTime.Minutes / static_cast<double>(::Time::minutePerDay) +
- aTime.Seconds / static_cast<double>(::Time::secondPerDay) +
- aTime.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay);
+ fValue = aTime.Hours / static_cast<double>(::tools::Time::hourPerDay) +
+ aTime.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
+ aTime.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
+ aTime.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
rData.SetValue(fValue);
break;
}
@@ -233,10 +233,10 @@ void DBConnector::getValue(long nCol, ScDPItemData &rData, short& rNumType) cons
util::DateTime aStamp = mxRow->getTimestamp(nCol+1);
fValue = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - maNullDate ) +
- aStamp.Hours / static_cast<double>(::Time::hourPerDay) +
- aStamp.Minutes / static_cast<double>(::Time::minutePerDay) +
- aStamp.Seconds / static_cast<double>(::Time::secondPerDay) +
- aStamp.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay);
+ aStamp.Hours / static_cast<double>(::tools::Time::hourPerDay) +
+ aStamp.Minutes / static_cast<double>(::tools::Time::minutePerDay) +
+ aStamp.Seconds / static_cast<double>(::tools::Time::secondPerDay) +
+ aStamp.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay);
rData.SetValue(fValue);
break;
}
diff --git a/sc/source/core/tool/chgviset.cxx b/sc/source/core/tool/chgviset.cxx
index 17185aafb8bf..01f830c2ccf7 100644
--- a/sc/source/core/tool/chgviset.cxx
+++ b/sc/source/core/tool/chgviset.cxx
@@ -135,7 +135,7 @@ void ScChangeViewSettings::AdjustDateMode( const ScDocument& rDoc )
// Set the next minute as the start time and assume that
// the document isn't saved, reloaded, edited and filter set
// all together during the gap between those two times.
- aFirstDateTime += Time( 0, 1 );
+ aFirstDateTime += tools::Time( 0, 1 );
aFirstDateTime.SetSec(0);
aFirstDateTime.SetNanoSec(0);
}
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 50b2b6c8fee3..245831f49ab2 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -780,7 +780,7 @@ static OUString lcl_GetNumStr(sal_Int32 nNo, SvxNumType eType)
ScHeaderFieldData::ScHeaderFieldData()
:
aDate( Date::EMPTY ),
- aTime( Time::EMPTY )
+ aTime( tools::Time::EMPTY )
{
nPageNo = nTotalPages = 0;
eNumType = SVX_ARABIC;
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index f5179a89426e..cadc47b79205 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -108,11 +108,11 @@ void ScInterpreter::ScGetActTime()
nFuncFmtType = NUMBERFORMAT_DATETIME;
Date aActDate( Date::SYSTEM );
long nDiff = aActDate - *(pFormatter->GetNullDate());
- Time aActTime( Time::SYSTEM );
- double nTime = aActTime.GetHour() / static_cast<double>(::Time::hourPerDay) +
- aActTime.GetMin() / static_cast<double>(::Time::minutePerDay) +
- aActTime.GetSec() / static_cast<double>(::Time::secondPerDay) +
- aActTime.GetNanoSec() / static_cast<double>(::Time::nanoSecPerDay);
+ tools::Time aActTime( tools::Time::SYSTEM );
+ double nTime = aActTime.GetHour() / static_cast<double>(::tools::Time::hourPerDay) +
+ aActTime.GetMin() / static_cast<double>(::tools::Time::minutePerDay) +
+ aActTime.GetSec() / static_cast<double>(::tools::Time::secondPerDay) +
+ aActTime.GetNanoSec() / static_cast<double>(::tools::Time::nanoSecPerDay);
PushDouble( (double) nDiff + nTime );
}
@@ -141,15 +141,15 @@ void ScInterpreter::ScGetMin()
{
double fTime = GetDouble();
fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg
- long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) % ::Time::secondPerHour;
- PushDouble( (double) (nVal / ::Time::secondPerMinute) );
+ long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) % ::tools::Time::secondPerHour;
+ PushDouble( (double) (nVal / ::tools::Time::secondPerMinute) );
}
void ScInterpreter::ScGetSec()
{
double fTime = GetDouble();
fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg
- long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) % ::Time::secondPerMinute;
+ long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) % ::tools::Time::secondPerMinute;
PushDouble( (double) nVal );
}
@@ -157,7 +157,7 @@ void ScInterpreter::ScGetHour()
{
double fTime = GetDouble();
fTime -= ::rtl::math::approxFloor(fTime); // Datumsanteil weg
- long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) / ::Time::secondPerHour;
+ long nVal = (long)::rtl::math::approxFloor(fTime*DATE_TIME_FACTOR+0.5) / ::tools::Time::secondPerHour;
PushDouble((double) nVal);
}
@@ -459,7 +459,7 @@ void ScInterpreter::ScGetTime()
double nSec = GetDouble();
double nMin = GetDouble();
double nHour = GetDouble();
- double fTime = fmod( (nHour * ::Time::secondPerHour) + (nMin * ::Time::secondPerMinute) + nSec, DATE_TIME_FACTOR) / DATE_TIME_FACTOR;
+ double fTime = fmod( (nHour * ::tools::Time::secondPerHour) + (nMin * ::tools::Time::secondPerMinute) + nSec, DATE_TIME_FACTOR) / DATE_TIME_FACTOR;
if (fTime < 0)
PushIllegalArgument();
else
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 6fb756f09f6f..cce7b0226f98 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -160,7 +160,7 @@ void XclImpPCItem::ReadSxdatetime( XclImpStream& rStrm )
sal_uInt16 nYear, nMonth;
sal_uInt8 nDay, nHour, nMin, nSec;
rStrm >> nYear >> nMonth >> nDay >> nHour >> nMin >> nSec;
- SetDateTime( DateTime( Date( nDay, nMonth, nYear ), Time( nHour, nMin, nSec ) ) );
+ SetDateTime( DateTime( Date( nDay, nMonth, nYear ), tools::Time( nHour, nMin, nSec ) ) );
}
void XclImpPCItem::ReadSxempty( XclImpStream& rStrm )
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index fdf1dfaf8f64..9e87e0320b48 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -156,7 +156,7 @@ static void lcl_AddStamp( OUString& rStr, const OUString& rName,
const LocaleDataWrapper& rLoc )
{
Date aD(rDateTime.Day, rDateTime.Month, rDateTime.Year);
- Time aT(rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds,
+ tools::Time aT(rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds,
rDateTime.NanoSeconds);
DateTime aDateTime(aD,aT);
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index b9a491f3d21a..cab987616a80 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -124,7 +124,7 @@ const sal_uInt16 BIFF_PCDEFINITION_ENABLEREFRESH = 0x0020;
/** Adjusts the weird date format read from binary streams.
Dates before 1900-Mar-01 are stored including the non-existing leap day
- 1900-02-29. Time values (without date) are stored as times of day
+ 1900-02-29. tools::Time values (without date) are stored as times of day
1900-Jan-00. Nothing has to be done when the workbook is stored in 1904
date mode (dates before 1904-Jan-01 will not occur in this case).
*/
diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx
index cab30a371f03..45ad6de90335 100644
--- a/sc/source/filter/oox/revisionfragment.cxx
+++ b/sc/source/filter/oox/revisionfragment.cxx
@@ -301,7 +301,7 @@ void RevisionHeadersFragment::importHeader( const AttributeList& rAttribs )
util::DateTime aDateTime;
sax::Converter::parseDateTime(aDateTime, 0, aDateTimeStr);
Date aDate(aDateTime.Day, aDateTime.Month, aDateTime.Year);
- Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds);
+ tools::Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds);
aMetadata.maDateTime.SetDate(aDate.GetDate());
aMetadata.maDateTime.SetTime(aTime.GetTime());
}
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 72811c63a3b3..3735f28c82b2 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -242,16 +242,16 @@ void ScOrcusSheet::set_date_time(
Date aDate(day, month, year);
sal_uInt32 nSec = floor(second);
- sal_uInt32 nNanoSec = (second - nSec) * ::Time::nanoSecPerSec;
- Time aTime(hour, minute, nSec, nNanoSec);
+ sal_uInt32 nNanoSec = (second - nSec) * ::tools::Time::nanoSecPerSec;
+ tools::Time aTime(hour, minute, nSec, nNanoSec);
Date aNullDate(*pFormatter->GetNullDate());
long nDateDiff = aDate - aNullDate;
double fTime =
- static_cast<double>(aTime.GetNanoSec()) / ::Time::nanoSecPerSec +
+ static_cast<double>(aTime.GetNanoSec()) / ::tools::Time::nanoSecPerSec +
aTime.GetSec() +
- aTime.GetMin() * ::Time::secondPerMinute +
- aTime.GetHour() * ::Time::secondPerHour;
+ aTime.GetMin() * ::tools::Time::secondPerMinute +
+ aTime.GetHour() * ::tools::Time::secondPerHour;
fTime /= DATE_TIME_FACTOR;
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index ee54d244c099..e4fe55c0cd1a 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -433,7 +433,7 @@ void ScXMLChangeTrackingImportHelper::EndChangeAction()
void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, OUString& rUser, DateTime& aDateTime)
{
Date aDate(aInfo.aDateTime.Day, aInfo.aDateTime.Month, aInfo.aDateTime.Year);
- Time aTime(aInfo.aDateTime.Hours, aInfo.aDateTime.Minutes, aInfo.aDateTime.Seconds, aInfo.aDateTime.NanoSeconds);
+ tools::Time aTime(aInfo.aDateTime.Hours, aInfo.aDateTime.Minutes, aInfo.aDateTime.Seconds, aInfo.aDateTime.NanoSeconds);
aDateTime.SetDate( aDate.GetDate() );
aDateTime.SetTime( aTime.GetTime() );
@@ -454,7 +454,7 @@ void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, O
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsAction* pAction)
{
- DateTime aDateTime( Date(0), Time(0) );
+ DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
@@ -467,7 +467,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsActio
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateDeleteAction(ScMyDelAction* pAction)
{
- DateTime aDateTime( Date(0), Time(0) );
+ DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
@@ -483,7 +483,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction
OSL_ENSURE(pAction->pMoveRanges, "no move ranges");
if (pAction->pMoveRanges)
{
- DateTime aDateTime( Date(0), Time(0) );
+ DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
@@ -498,7 +498,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction
ScChangeAction* ScXMLChangeTrackingImportHelper::CreateRejectionAction(ScMyRejAction* pAction)
{
- DateTime aDateTime( Date(0), Time(0) );
+ DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
@@ -519,7 +519,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateContentAction(ScMyContent
sInputString = pAction->pCellInfo->sInputString;
}
- DateTime aDateTime( Date(0), Time(0) );
+ DateTime aDateTime( Date(0), tools::Time(0) );
OUString aUser;
ConvertInfo(pAction->aInfo, aUser, aDateTime);
diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx
index 7f08774cdd75..4e4fb3143aa3 100644
--- a/sc/source/filter/xml/XMLConverter.cxx
+++ b/sc/source/filter/xml/XMLConverter.cxx
@@ -331,7 +331,7 @@ void ScXMLConverter::ConvertCoreToAPIDateTime(const DateTime& aDateTime, util::D
void ScXMLConverter::ConvertAPIToCoreDateTime(const util::DateTime& aDateTime, DateTime& rDateTime)
{
Date aDate(aDateTime.Day, aDateTime.Month, aDateTime.Year);
- Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds);
+ tools::Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds);
DateTime aTempDateTime (aDate, aTime);
rDateTime = aTempDateTime;
}
diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx
index 9ba5f255481b..8c210054bc23 100644
--- a/sc/source/ui/dbgui/scendlg.cxx
+++ b/sc/source/ui/dbgui/scendlg.cxx
@@ -86,7 +86,7 @@ ScNewScenarioDlg::ScNewScenarioDlg( vcl::Window* pParent, const OUString& rName,
OUString aComment(sCreatedBy + " " + aUserOpt.GetFirstName() + " " +aUserOpt.GetLastName()
+ ", " + sOn + " " + ScGlobal::GetpLocaleData()->getDate(Date(Date::SYSTEM))
- + ", " + ScGlobal::GetpLocaleData()->getTime(Time(Time::SYSTEM)));
+ + ", " + ScGlobal::GetpLocaleData()->getTime(tools::Time(tools::Time::SYSTEM)));
m_pEdComment->SetText(aComment);
m_pEdName->SetText(rName);
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 6449cbcae873..ba92b732dbbb 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2071,7 +2071,7 @@ void ScExternalRefManager::enableDocTimer( bool bEnable )
{
DocShellMap::iterator it = maDocShells.begin(), itEnd = maDocShells.end();
for (; it != itEnd; ++it)
- it->second.maLastAccess = Time(Time::SYSTEM);
+ it->second.maLastAccess = tools::Time(tools::Time::SYSTEM);
maSrcDocTimer.Start();
}
@@ -2272,7 +2272,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
// document already loaded.
SfxObjectShell* p = itr->second.maShell;
- itr->second.maLastAccess = Time( Time::SYSTEM );
+ itr->second.maLastAccess = tools::Time( tools::Time::SYSTEM );
return &static_cast<ScDocShell*>(p)->GetDocument();
}
@@ -2283,7 +2283,7 @@ ScDocument* ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
//document is unsaved document
SfxObjectShell* p = itr->second.maShell;
- itr->second.maLastAccess = Time( Time::SYSTEM );
+ itr->second.maLastAccess = tools::Time( tools::Time::SYSTEM );
return &static_cast<ScDocShell*>(p)->GetDocument();
}
@@ -2747,13 +2747,13 @@ bool ScExternalRefManager::refreshSrcDocument(sal_uInt16 nFileId)
{
it->second.maShell->DoClose();
it->second.maShell = xDocShell;
- it->second.maLastAccess = Time(Time::SYSTEM);
+ it->second.maLastAccess = tools::Time(tools::Time::SYSTEM);
}
else
{
SrcShell aSrcDoc;
aSrcDoc.maShell = xDocShell;
- aSrcDoc.maLastAccess = Time(Time::SYSTEM);
+ aSrcDoc.maLastAccess = tools::Time(tools::Time::SYSTEM);
cacheNewDocShell(nFileId, aSrcDoc);
}
@@ -2947,7 +2947,7 @@ void ScExternalRefManager::purgeStaleSrcDocument(sal_Int32 nTimeOut)
for (; itr != itrEnd; ++itr)
{
// in 100th of a second.
- sal_Int32 nSinceLastAccess = (Time( Time::SYSTEM ) - itr->second.maLastAccess).GetTime();
+ sal_Int32 nSinceLastAccess = (tools::Time( tools::Time::SYSTEM ) - itr->second.maLastAccess).GetTime();
if (nSinceLastAccess >= nTimeOut)
{
// Timed out. Let's close this, and exit the loop.
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index e6a247add44a..2d0f7ea502e6 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -48,7 +48,7 @@ private:
long nTabStart; // First (real) page of the sheet
long nDisplayStart; // same as above, relative to the start of counting
Date aDate;
- Time aTime;
+ tools::Time aTime;
long nTotalPages;
Size aPageSize; // for GetOptimalZoom
ScPrintState aState;
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 264ee8d9c367..1b99dd51da22 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -245,7 +245,7 @@ public:
void SetOffset( const Point& rOfs );
void SetManualZoom( sal_uInt16 nNewZoom );
- void SetDateTime( const Date& rDate, const Time& rTime );
+ void SetDateTime( const Date& rDate, const tools::Time& rTime );
void SetClearFlag( bool bFlag );
void SetUseStyleColor( bool bFlag );
diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx
index c7f5a684168d..bddfdef57fc0 100644
--- a/sc/source/ui/miscdlgs/highred.cxx
+++ b/sc/source/ui/miscdlgs/highred.cxx
@@ -214,9 +214,9 @@ IMPL_LINK( ScHighlightChgDlg, OKBtnHdl, PushButton*, pOKBtn )
ScChgsDateMode eMode = (ScChgsDateMode) m_pFilterCtr->GetDateMode();
aChangeViewSet.SetTheDateMode( eMode );
Date aFirstDate( m_pFilterCtr->GetFirstDate() );
- Time aFirstTime( m_pFilterCtr->GetFirstTime() );
+ tools::Time aFirstTime( m_pFilterCtr->GetFirstTime() );
Date aLastDate( m_pFilterCtr->GetLastDate() );
- Time aLastTime( m_pFilterCtr->GetLastTime() );
+ tools::Time aLastTime( m_pFilterCtr->GetLastTime() );
aChangeViewSet.SetTheFirstDateTime( DateTime( aFirstDate, aFirstTime ) );
aChangeViewSet.SetTheLastDateTime( DateTime( aLastDate, aLastTime ) );
aChangeViewSet.SetHasAuthor(m_pFilterCtr->IsAuthor());
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index 562342bf20e8..87b9bbe89f1c 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -174,7 +174,7 @@ void ScShareDocumentDlg::UpdateView()
sal_uInt16 nHours = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
sal_uInt16 nMinutes = sal::static_int_cast< sal_uInt16 >( aTimeStr.getToken( 0, ':', nIndex ).toInt32() );
Date aDate( nDay, nMonth, nYear );
- Time aTime( nHours, nMinutes );
+ tools::Time aTime( nHours, nMinutes );
DateTime aDateTime( aDate, aTime );
OUString aString( aUser );
@@ -229,7 +229,7 @@ void ScShareDocumentDlg::UpdateView()
util::DateTime uDT(xDocProps->getModificationDate());
Date d(uDT.Day, uDT.Month, uDT.Year);
- Time t(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds);
+ tools::Time t(uDT.Hours, uDT.Minutes, uDT.Seconds, uDT.NanoSeconds);
DateTime aDateTime(d,t);
aString += formatTime(aDateTime, *ScGlobal::pLocaleData);
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 36da2966796b..e8afa40eab5b 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -944,7 +944,7 @@ void ScEditFieldObj::setPropertyValueDateTime(const OUString& rName, const uno::
else if (rName == SC_UNONAME_DATETIME)
{
maDateTime = rVal.get<util::DateTime>();
- Time aTime(maDateTime.Hours, maDateTime.Minutes, maDateTime.Seconds, maDateTime.NanoSeconds);
+ tools::Time aTime(maDateTime.Hours, maDateTime.Minutes, maDateTime.Seconds, maDateTime.NanoSeconds);
p->SetFixTime(aTime);
}
else if (rName == SC_UNONAME_NUMFMT)
@@ -1043,7 +1043,7 @@ uno::Any ScEditFieldObj::getPropertyValueDateTime(const OUString& rName)
if (rName == SC_UNONAME_DATETIME)
{
- Time aT(p->GetFixTime());
+ tools::Time aT(p->GetFixTime());
maDateTime.Year = 0;
maDateTime.Month = 0;
maDateTime.Day = 0;
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index dbd970d60af7..e7cad9911d72 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -96,7 +96,7 @@ ScPreview::ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell*
nTabStart( 0 ),
nDisplayStart( 0 ),
aDate( Date::SYSTEM ),
- aTime( Time::SYSTEM ),
+ aTime( tools::Time::SYSTEM ),
nTotalPages( 0 ),
pLocationData( NULL ),
pDrawView( NULL ),
@@ -695,7 +695,7 @@ void ScPreview::DataChanged(bool bNewTime)
if (bNewTime)
{
aDate = Date( Date::SYSTEM );
- aTime = Time( Time::SYSTEM );
+ aTime = tools::Time( tools::Time::SYSTEM );
}
bValid = false;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 87c65ee90c82..bb379604e695 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1032,7 +1032,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
else
aFieldData.nTotalPages = nTotalPages;
- SetDateTime( Date( Date::SYSTEM ), Time( Time::SYSTEM ) );
+ SetDateTime( Date( Date::SYSTEM ), tools::Time( tools::Time::SYSTEM ) );
if( pDocShell->getDocProperties()->getTitle().getLength() != 0 )
aFieldData.aTitle = pDocShell->getDocProperties()->getTitle();
@@ -1068,7 +1068,7 @@ void ScPrintFunc::GetScaleData( Size& rPhysSize, long& rDocHdr, long& rDocFtr )
rDocFtr = aFtr.nHeight;
}
-void ScPrintFunc::SetDateTime( const Date& rDate, const Time& rTime )
+void ScPrintFunc::SetDateTime( const Date& rDate, const tools::Time& rTime )
{
aFieldData.aDate = rDate;
aFieldData.aTime = rTime;
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 838b82c43789..228e1b45703d 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -281,7 +281,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
break;
case NUMBERFORMAT_TIME:
{
- Time aActTime( Time::SYSTEM );
+ tools::Time aActTime( tools::Time::SYSTEM );
fVal = aActTime.GetTimeInDays();
}
break;
@@ -394,7 +394,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
break;
case NUMBERFORMAT_TIME:
{
- Time aActTime( Time::SYSTEM );
+ tools::Time aActTime( tools::Time::SYSTEM );
fVal = aActTime.GetTimeInDays();
}
break;
@@ -404,7 +404,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
case NUMBERFORMAT_DATE:
{
double fDate = rtl::math::approxFloor( fCell);
- Time aActTime( Time::SYSTEM );
+ tools::Time aActTime( tools::Time::SYSTEM );
fVal = fDate + aActTime.GetTimeInDays();
}
break;
diff --git a/sc/workben/test.cxx b/sc/workben/test.cxx
index d91803c1a817..a16cdd65f802 100644
--- a/sc/workben/test.cxx
+++ b/sc/workben/test.cxx
@@ -427,7 +427,7 @@ void lcl_Annotations( FixedText& aTimeText )
if (xPos && xControl)
{
- sal_uLong nStart = Time::GetSystemTicks();
+ sal_uLong nStart = tools::Time::GetSystemTicks();
xAnnotationText->setText(L"bla");
xCursor->gotoEnd(false);
@@ -441,7 +441,7 @@ void lcl_Annotations( FixedText& aTimeText )
xPos->setText(L"dumdi");
}
- sal_uLong nEnd = Time::GetSystemTicks();
+ sal_uLong nEnd = tools::Time::GetSystemTicks();
aTimeText.SetText(String(nEnd-nStart)+String(" ms"));
}
}
@@ -585,7 +585,7 @@ void lcl_Cells( FixedText& aTimeText )
if (xDoc)
{
long nCount = 0;
- sal_uLong nStart = Time::GetSystemTicks();
+ sal_uLong nStart = tools::Time::GetSystemTicks();
XActionLockableRef xLock = (XActionLockable*)
xDoc->queryInterface(XActionLockable::getSmartUik());
@@ -624,7 +624,7 @@ void lcl_Cells( FixedText& aTimeText )
}
}
- sal_uLong nEnd = Time::GetSystemTicks();
+ sal_uLong nEnd = tools::Time::GetSystemTicks();
aTimeText.SetText(String(nCount)+String(" ")+String(nEnd-nStart)+String(" ms"));
// if (xLock)
@@ -1510,9 +1510,9 @@ IMPL_LINK_NOARG(MyWindow, CountHdl)
{
case 0:
{
- sal_uLong nStart = Time::GetSystemTicks();
+ sal_uLong nStart = tools::Time::GetSystemTicks();
lcl_DoCount();
- sal_uLong nEnd = Time::GetSystemTicks();
+ sal_uLong nEnd = tools::Time::GetSystemTicks();
aTimeText.SetText(String("Count: ")+String(nEnd-nStart)+String(" ms"));
}
break;